chengf
2025-12-11 f29e6f31e4f2d533124fc68346b7cc072f427c9b
service-job/src/main/java/com/java110/job/importData/adapt/ImportReportMainV2QueueDataAdapt.java
@@ -22,10 +22,8 @@
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
 * 签报收支款数据导入适配器(适配"Z三、模版签报收支款情况-V5-20251127.xlsx"的"荣顺苑签报单"sheet)
 * 前端请求需传入:param.append('importAdapt', "importReportMainV2QueueData")
@@ -97,7 +95,8 @@
    private MaintenancePaymentPo buildMaintenancePaymentPo(JSONArray cellArray) throws ParseException {
        MaintenancePaymentPo po = new MaintenancePaymentPo();
        // 基础字段(直接映射Excel单元格)
        po.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_maintenanceId)); // 主键ID
        long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数
        po.setId(longId+""); // 主键ID
        po.setAuxiliaryColumn(getCellValue(cellArray, 0)); // 第1列:辅助列
        po.setFlowNumber(getCellValue(cellArray, 1)); // 第2列:流转编号
        po.setSerialNumber(parseInteger(getCellValue(cellArray, 2))); // 第3列:序号
@@ -275,7 +274,9 @@
                                                       int arrivalDateCol, int arrivalAmountCol,
                                                       int withdrawerCol, int shortageCol) throws ParseException {
        MpPaymentRecordPo po = new MpPaymentRecordPo();
        po.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_paymentRecordId));
        long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数
        po.setId(longId+"");
        po.setMpId(flowNumber + "_PRINT" + printTimes); // mp_id = 流转编号_打印次数(确保唯一)
        po.setFirstPrintDate(parseDate(getCellValue(cellArray, dateCol)));
        po.setResolutionNumber(getCellValue(cellArray, resolutionCol));
@@ -298,7 +299,8 @@
     */
    private MpFifthPaymentRecordPo buildMpFifthPaymentRecordPo(JSONArray cellArray, String flowNumber) throws ParseException {
        MpFifthPaymentRecordPo po = new MpFifthPaymentRecordPo();
        po.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_fifthPaymentId));
        long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数
        po.setId(longId+"");
        po.setMpId(flowNumber + "_FIFTH"); // mp_id = 流转编号_FIFTH
        // 第五次拟付实付数据(第106-111列)
        po.setFifthPlannedPaymentAmount(parseBigDecimal(getCellValue(cellArray, 137))); // 第五次拟付金额