From b88a288f4f787b509463678e3cd9ccfa3f37014b Mon Sep 17 00:00:00 2001
From: chengf <cgf12138@163.com>
Date: 星期三, 11 三月 2026 12:01:05 +0800
Subject: [PATCH] 导入测试

---
 service-job/src/main/java/com/java110/job/importData/adapt/ImportReportMainV2QueueDataAdapt.java |  194 +++++++++++++-----------------------------------
 1 files changed, 52 insertions(+), 142 deletions(-)

diff --git a/service-job/src/main/java/com/java110/job/importData/adapt/ImportReportMainV2QueueDataAdapt.java b/service-job/src/main/java/com/java110/job/importData/adapt/ImportReportMainV2QueueDataAdapt.java
index bb7acdc..c8e2b72 100644
--- a/service-job/src/main/java/com/java110/job/importData/adapt/ImportReportMainV2QueueDataAdapt.java
+++ b/service-job/src/main/java/com/java110/job/importData/adapt/ImportReportMainV2QueueDataAdapt.java
@@ -3,6 +3,7 @@
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.importData.Vtil;
 import com.java110.dto.log.AssetImportLogDetailDto;
 import com.java110.dto.msg.MaintenancePaymentPo;
 import com.java110.dto.msg.MpFifthPaymentRecordPo;
@@ -67,11 +68,8 @@
                 String flowNumber = getCellValue(cellArray, 1); // 绗�2鍒楋細娴佽浆缂栧彿
                 String projectName = getCellValue(cellArray, 4); // 绗�5鍒楋細椤圭洰鍚嶇О
                 String ownersCommitteeAmountStr = getCellValue(cellArray, 12); // 绗�13鍒楋細涓氬浼氶噾棰�
-                if (isBlank(flowNumber) || isBlank(projectName) || isBlank(ownersCommitteeAmountStr)) {
-                    throw new IllegalArgumentException(
-                            String.format("鏍稿績瀛楁缂哄け锛氭祦杞紪鍙穂%s]銆侀」鐩悕绉癧%s]銆佷笟濮斾細閲戦[%s]",
-                                    flowNumber, projectName, ownersCommitteeAmountStr)
-                    );
+                if (Vtil.defaultValue(getCellValue(cellArray, 1)).equals("")) {
+                    continue;
                 }
                 AnnouncementTimeRangePo announcementTimeRangePo = null;
                 OwnersCommitteeConventionPo ocoPo = null;
@@ -81,29 +79,34 @@
 
                 // 3. 鏋勫缓3寮犺〃鐨凱O瀵硅薄锛堝瓧娈垫槧灏�+涓氬姟璁$畻锛�
                 MaintenancePayment mainPo = buildMaintenancePaymentPoV2(cellArray);//涓昏〃
-                if (!getCellValue(cellArray, 22).isEmpty() && !getCellValue(cellArray, 23).isEmpty()) {
-                    announcementTimeRangePo = buildAnnouncementTimeRangePo(cellArray, Long.valueOf(mainPo.getId()));//鍏叡鏀剁泭閲�
-                }
-                if (!getCellValue(cellArray, 26).isEmpty() && !getCellValue(cellArray, 27).isEmpty()) {
-                    ocoPo = buildOwnersCommitteeConventionPo(cellArray, Long.valueOf(mainPo.getId()));
-                }
-                if (!getCellValue(cellArray, 29).isEmpty()) {
-                    owiPo = buildOwnerWithdrawalInfoPo(cellArray, Long.valueOf(mainPo.getId()));
-                }
-                if (!getCellValue(cellArray, 39).isEmpty()) {
-                    oqgPo = buildOwnerQualityGuaranteePo(cellArray, Long.valueOf(mainPo.getId()));
-                }
-                List<MpPaymentRecordPo> paymentRecordPos = buildMpPaymentRecordPos(cellArray, mainPo.getFlowNumber(), String.valueOf(mainPo.getId()));
-                List<MpFifthPaymentRecord> fifthPos = buildMpFifthPaymentRecordPos(cellArray, mainPo.getFlowNumber(), String.valueOf(mainPo.getId()));
-                if (!getCellValue(cellArray, 137).isEmpty()) {
-                    ownerRemarkInfoPo = buildOwnerRemarkInfoPo(cellArray, mainPo.getFlowNumber(), String.valueOf(mainPo.getId()));
-                }
+//                if (!getCellValue(cellArray, 22).isEmpty() && !getCellValue(cellArray, 23).isEmpty()) {
+                    announcementTimeRangePo = buildAnnouncementTimeRangePo(cellArray, mainPo.getId());//鍏叡鏀剁泭閲�
+//                }
+//                if (!getCellValue(cellArray, 26).isEmpty() && !getCellValue(cellArray, 27).isEmpty()) {
+                    ocoPo = buildOwnersCommitteeConventionPo(cellArray, mainPo.getId());
+//                }
+//                if (!getCellValue(cellArray, 29).isEmpty()) {
+                    owiPo = buildOwnerWithdrawalInfoPo(cellArray, mainPo.getId());
+//                }
+//                if (!getCellValue(cellArray, 39).isEmpty()) {
+                    oqgPo = buildOwnerQualityGuaranteePo(cellArray, mainPo.getId());
+//                }
+                List<MpPaymentRecordPo> paymentRecordPos = buildMpPaymentRecordPos(cellArray, mainPo.getFlowNumber(), mainPo.getId());
+                List<MpFifthPaymentRecord> fifthPos = buildMpFifthPaymentRecordPos(cellArray, mainPo.getFlowNumber(), mainPo.getId());
+//                if (!getCellValue(cellArray, 137).isEmpty()) {
+                    ownerRemarkInfoPo = buildOwnerRemarkInfoPo(cellArray, mainPo.getFlowNumber(), mainPo.getId());
+//                }
 
                 importData(mainPo, announcementTimeRangePo, ocoPo, owiPo, oqgPo, paymentRecordPos, fifthPos, ownerRemarkInfoPo);
 
                 // 5. 鏇存柊瀵煎叆鏃ュ織鐘舵�侊紙鎴愬姛锛�- 璋冪敤鐖剁被鏂规硶
                 super.updateImportLogDetailState(logDetailDto.getDetailId());
 
+                try {
+                    Thread.sleep(1000);
+                } catch (InterruptedException e) {
+                    throw new RuntimeException(e);
+                }
             } catch (Exception e) {
                 throw new IllegalArgumentException(e.getMessage());
             }
@@ -146,30 +149,26 @@
         return po;
     }
 
-    private OwnerQualityGuaranteePo buildOwnerQualityGuaranteePo(JSONArray cellArray, Long aLong) {
+    private OwnerQualityGuaranteePo buildOwnerQualityGuaranteePo(JSONArray cellArray, String aLong) {
         OwnerQualityGuaranteePo po = new OwnerQualityGuaranteePo();
         long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 閬垮厤璐熸暟
         po.setId(longId); // 涓婚敭ID
-        po.setMpId(aLong.toString());
-        try {
-            po.setQualityGuaranteePeriod2Start(parseDateToString(getCellValue(cellArray, 37)));
-            po.setQualityGuaranteePeriod2End(parseDateToString(getCellValue(cellArray, 38)));
-            po.setAcceptanceDate(parseDateToString(getCellValue(cellArray, 41)));
-            po.setAvailableWithdrawalDate(parseDate(getCellValue(cellArray, 43)));
-        } catch (ParseException e) {
-            throw new RuntimeException("鏃ユ湡杞崲閿欒");
-        }
+        po.setMpId(aLong);
+            po.setQualityGuaranteePeriod2Start(Vtil.defaultValueToDate(getCellValue(cellArray, 37)));
+            po.setQualityGuaranteePeriod2End(Vtil.defaultValueToDate(getCellValue(cellArray, 38)));
+            po.setAcceptanceDate(Vtil.defaultValueToDate(getCellValue(cellArray, 41)));
+            po.setAvailableWithdrawalDate(Vtil.defaultValueToDate(getCellValue(cellArray, 43)));
         po.setQualityGuaranteeRatio(getCellNum(cellArray, 39));
         po.setQualityGuaranteeAmount(getCellNum(cellArray, 12) * po.getQualityGuaranteeRatio());
         po.setAuditStatus(getCellValue(cellArray, 42));
         return po;
     }
 
-    private OwnerWithdrawalInfoPo buildOwnerWithdrawalInfoPo(JSONArray cellArray, Long aLong) {
+    private OwnerWithdrawalInfoPo buildOwnerWithdrawalInfoPo(JSONArray cellArray, String aLong) {
         OwnerWithdrawalInfoPo po = new OwnerWithdrawalInfoPo();
         long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 閬垮厤璐熸暟
         po.setId(longId); // 涓婚敭ID
-        po.setMpId(aLong.toString());
+        po.setMpId(aLong);
         po.setWithdrawalEncounteredProblem(getCellValue(cellArray, 28));
         po.setShortageOrArrears(getCellNum(cellArray, 29));
         po.setRoadName(getCellValue(cellArray, 30));
@@ -181,7 +180,7 @@
         return po;
     }
 
-    private OwnersCommitteeConventionPo buildOwnersCommitteeConventionPo(JSONArray cellArray, Long mpId) {
+    private OwnersCommitteeConventionPo buildOwnersCommitteeConventionPo(JSONArray cellArray, String mpId) {
         OwnersCommitteeConventionPo po = new OwnersCommitteeConventionPo();
 
         long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 閬垮厤璐熸暟
@@ -194,7 +193,7 @@
         return po;
     }
 
-    private AnnouncementTimeRangePo buildAnnouncementTimeRangePo(JSONArray cellArray, Long mpId) {
+    private AnnouncementTimeRangePo buildAnnouncementTimeRangePo(JSONArray cellArray, String mpId) {
         AnnouncementTimeRangePo po = new AnnouncementTimeRangePo();
         long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 閬垮厤璐熸暟
         po.setId(longId); // 涓婚敭ID
@@ -228,8 +227,8 @@
         po.setReportDepartment(getCellValue(cellArray, 15)); // 绗�16鍒楋細绛炬姤閮ㄩ棬
         po.setFundTypeLevel1(getCellValue(cellArray, 16)); // 绗�17鍒楋細鍩洪噾绫诲瀷-涓�绾у垎绫�
         po.setFundTypeLevel2(getCellValue(cellArray, 17)); // 绗�18鍒楋細鍩洪噾绫诲瀷-浜岀骇鍒嗙被
-        po.setMaintenanceType(getCellValue(cellArray, 18)); // 绗�19鍒楋細骞�/鍏ㄤ綋
-        po.setBuildingOrAll(getCellValue(cellArray, 19)); // 绗�20鍒楋細缁翠慨绫诲瀷
+        po.setMaintenanceType(getCellValue(cellArray, 19)); // 绗�19鍒楋細骞�/鍏ㄤ綋
+        po.setBuildingOrAll(getCellValue(cellArray, 18)); // 绗�20鍒楋細缁翠慨绫诲瀷
         po.setPayeeName(getCellValue(cellArray, 145)); // 鏀粯鍏徃鍚嶇О/涓汉鍚嶅瓧
         po.setIdCardNumber(getCellValue(cellArray, 146)); // 涓汉韬唤璇佸彿鐮�
         po.setBankName(getCellValue(cellArray, 147)); // 寮�鎴烽摱琛�
@@ -267,7 +266,7 @@
         po.setBuildingOrAll(getCellValue(cellArray, 18)); // 绗�19鍒楋細骞�/鍏ㄤ綋
         po.setMaintenanceType(getCellValue(cellArray, 19)); // 绗�20鍒楋細缁翠慨绫诲瀷
         po.setQualityGuaranteePeriod1(getCellValue(cellArray, 20)); // 绗�21鍒楋細璐ㄤ繚鏈燂紙绗竴涓級
-        po.setPublicIncomeAnnouncement(getCellValue(cellArray, 21)); // 绗�22鍒楋細鍏叡鏀剁泭閲戝叕甯冩儏鍐�
+//        po.setPublicIncomeAnnouncement(getCellValue(cellArray, 21)); // 绗�22鍒楋細鍏叡鏀剁泭閲戝叕甯冩儏鍐�
         // 鍏叡鏀剁泭閲戝叕甯冨瓙瀛楁锛堢23-26鍒楋級
         po.setPlannedAnnouncementStart(getCellValue(cellArray, 21)); // 鎷熷叕甯�-璧峰锛堝勾鏈堬級
         po.setPlannedAnnouncementEnd(getCellValue(cellArray, 22)); // 鎷熷叕甯�-姝紙骞存湀锛�
@@ -286,104 +285,15 @@
         po.setDoorRoomNumber(getCellValue(cellArray, 34)); // 闂ㄥ鍙�
         po.setOwnerAddress(getCellValue(cellArray, 35)); // 涓氫富鍦板潃
 //        po.setWithdrawalProblem(getCellValue(cellArray, 36)); // 绗�38鍒楋細鏀彇瀛樺湪闂
-        po.setProblemDifficulty(getCellValue(cellArray, 36)); // 绗�39鍒楋細闂闅惧害
-        po.setAvailableWithdrawalDate(parseDate(getCellValue(cellArray, 37))); // 绗�40鍒楋細鍙惎鍔ㄦ敮鍙栨棩鏈燂紙骞存湀鏃ワ級
-        po.setQualityGuaranteePeriod2(getCellValue(cellArray, 39) + "~" + getCellValue(cellArray, 40)); // 绗�41鍒楋細璐ㄤ繚鏈燂紙绗簩涓級
-        po.setQualityGuaranteeRatio(parseBigDecimal(getCellValue(cellArray, 40))); // 绗�42鍒楋細璐ㄤ繚閲戝崰姣�
-        po.setQualityGuaranteeAmount(parseBigDecimal(getCellValue(cellArray, 41))); // 绗�43鍒楋細璐ㄤ繚閲戦噾棰濓紙鍏冿級
-        po.setReceivedQualityGuarantee(parseBigDecimal(getCellValue(cellArray, 42))); // 绗�44鍒楋細宸插埌璐﹁川淇濋噾
+        po.setProblemDifficulty(getCellValue(cellArray, 36)); // 绗�36鍒楋細闂闅惧害
+        po.setAvailableWithdrawalDate(parseDate(getCellValue(cellArray, 43))); // 绗�40鍒楋細鍙惎鍔ㄦ敮鍙栨棩鏈燂紙骞存湀鏃ワ級
+        po.setQualityGuaranteePeriod2(getCellValue(cellArray, 37) + "~" + getCellValue(cellArray, 38)); // 绗�41鍒楋細璐ㄤ繚鏈燂紙绗簩涓級
+        po.setQualityGuaranteeRatio(parseBigDecimal(getCellValue(cellArray, 39))); // 绗�42鍒楋細璐ㄤ繚閲戝崰姣�
+        po.setQualityGuaranteeAmount(parseBigDecimal(getCellValue(cellArray, 40))); // 绗�43鍒楋細璐ㄤ繚閲戦噾棰濓紙鍏冿級
+        po.setReceivedQualityGuarantee(parseBigDecimal(getCellValue(cellArray, 44))); // 绗�44鍒楋細宸插埌璐﹁川淇濋噾
 //        po.setStartDate(parseDate(getCellValue(cellArray, 44))); // 绗�45鍒楋細璧峰锛堝勾鏈堟棩锛�
 //        po.setEndDate(parseDate(getCellValue(cellArray, 45))); // 绗�46鍒楋細缁堟锛堝勾鏈堟棩锛�
 
-        // -------------------------- 17涓嚜鍔ㄨ绠楀瓧娈碉紙鏍稿績涓氬姟閫昏緫锛�--------------------------
-        // 1. 鎵撳嵃鍚堣 = 绗竴娆绗簲娆℃墦鍗伴噾棰濅箣鍜岋紙绗�47鍒楁墦鍗伴噾棰�+绗�54鍒�+绗�61鍒�+绗�68鍒�+绗�75鍒楋級
-        BigDecimal print1 = parseBigDecimal(getCellValue(cellArray, 45)); // 绗竴娆℃墦鍗伴噾棰濓紙绗�50鍒楋級
-        BigDecimal print2 = parseBigDecimal(getCellValue(cellArray, 57)); // 绗簩娆℃墦鍗伴噾棰濓紙绗�57鍒楋級
-        BigDecimal print3 = parseBigDecimal(getCellValue(cellArray, 69)); // 绗笁娆℃墦鍗伴噾棰濓紙绗�64鍒楋級
-        BigDecimal print4 = parseBigDecimal(getCellValue(cellArray, 81)); // 绗洓娆℃墦鍗伴噾棰濓紙绗�71鍒楋級
-        BigDecimal print5 = parseBigDecimal(getCellValue(cellArray, 93)); // 绗簲娆℃墦鍗伴噾棰濓紙绗�78鍒楋級
-//        BigDecimal printTotal = add(print1, print2, print3, print4, print5);
-//        po.setPrintTotal(printTotal); // 鑷畾涔夊瓧娈碉細鎵撳嵃鍚堣
-
-        // 2. 鍒拌处鍚堣 = 绗竴娆绗簲娆″埌璐﹂噾棰濅箣鍜岋紙绗�51鍒�+绗�58鍒�+绗�65鍒�+绗�72鍒�+绗�79鍒楋級
-        BigDecimal arrival1 = parseBigDecimal(getCellValue(cellArray, 48)); // 绗竴娆″埌璐﹂噾棰濓紙绗�52鍒楋級
-        BigDecimal arrival2 = parseBigDecimal(getCellValue(cellArray, 60)); // 绗簩娆″埌璐﹂噾棰濓紙绗�59鍒楋級
-        BigDecimal arrival3 = parseBigDecimal(getCellValue(cellArray, 72)); // 绗笁娆″埌璐﹂噾棰濓紙绗�66鍒楋級
-        BigDecimal arrival4 = parseBigDecimal(getCellValue(cellArray, 84)); // 绗洓娆″埌璐﹂噾棰濓紙绗�73鍒楋級
-        BigDecimal arrival5 = parseBigDecimal(getCellValue(cellArray, 96)); // 绗簲娆″埌璐﹂噾棰濓紙绗�80鍒楋級
-//        BigDecimal arrivalTotal = add(arrival1, arrival2, arrival3, arrival4, arrival5);
-//        po.setArrivalTotal(arrivalTotal); // 鑷畾涔夊瓧娈碉細鍒拌处鍚堣
-
-        // 3. 缁翠慨鍩洪噾鍒拌处鐜� = IF(鍒拌处鍚堣<>0, 鍒拌处鍚堣/涓氬浼氶噾棰�, 0)
-        BigDecimal ownersAmount = po.getOwnersCommitteeAmount();
-//        BigDecimal fundArrivalRate = (arrivalTotal.compareTo(BigDecimal.ZERO) != 0 && ownersAmount.compareTo(BigDecimal.ZERO) != 0)
-//                ? arrivalTotal.divide(ownersAmount, 4, BigDecimal.ROUND_HALF_UP) // 淇濈暀4浣嶅皬鏁�
-//                : BigDecimal.ZERO;
-//        po.setFundArrivalRate(fundArrivalRate); // 鑷畾涔夊瓧娈碉細缁翠慨鍩洪噾鍒拌处鐜�
-
-        // 4. 灏氱己閲戦 = IF(鍩洪噾绫诲瀷<>"缁翠慨鍩洪噾", 0, 涓氬浼氶噾棰�-鍒拌处鍚堣)
-        String fundType = po.getFundTypeLevel1();
-//        BigDecimal shortageAmount = ("缁翠慨鍩洪噾".equals(fundType))
-//                ? subtract(ownersAmount, arrivalTotal)
-//                : BigDecimal.ZERO;
-//        po.setFundShortageAmount(shortageAmount); // 鑷畾涔夊瓧娈碉細灏氱己閲戦
-
-        // 5. 绠$悊璐� = 绠$悊澶勯噾棰� * 绠$悊璐瑰崰姣旓紙鐧惧垎姣旇浆灏忔暟锛�
-        BigDecimal managementFeeRatio = po.getManagementFeeRatio() == null ? BigDecimal.ZERO : po.getManagementFeeRatio().divide(new BigDecimal(100));
-        BigDecimal managementFee = multiply(po.getManagementOfficeAmount(), managementFeeRatio);
-//        po.setManagementFee(managementFee); // 鑷畾涔夊瓧娈碉細绠$悊璐�
-
-        // 6. 搴斾粯閲戦A = IF(瀹¤閲戦涓虹┖, 涓氬浼氶噾棰�-绠$悊璐�, 瀹¤閲戦-绠$悊璐�)
-        BigDecimal auditAmount = po.getAuditAmount() == null ? BigDecimal.ZERO : po.getAuditAmount();
-        BigDecimal payableA = (auditAmount.compareTo(BigDecimal.ZERO) == 0)
-                ? subtract(ownersAmount, managementFee)
-                : subtract(auditAmount, managementFee);
-//        po.setPayableAmountA(payableA); // 鑷畾涔夊瓧娈碉細搴斾粯閲戦A
-
-        // 7. 搴斾粯閲戦B = 涓氬浼氶噾棰�-绠$悊璐�-璐ㄤ繚閲戦噾棰�
-        BigDecimal qualityGuaranteeAmount = po.getQualityGuaranteeAmount() == null ? BigDecimal.ZERO : po.getQualityGuaranteeAmount();
-        BigDecimal payableB = subtract(ownersAmount, managementFee, qualityGuaranteeAmount);
-//        po.setPayableAmountB(payableB); // 鑷畾涔夊瓧娈碉細搴斾粯閲戦B
-
-        // 8. 搴斾粯閲戦C = 瀹炴敹閲戦-瀹炴敹閲戦脳绠$悊璐规瘮渚嬶紙瀹炴敹閲戦鍙栧埌璐﹀悎璁★級
-//        BigDecimal payableC = multiply(arrivalTotal, BigDecimal.ONE.subtract(managementFeeRatio));
-//        po.setPayableAmountC(payableC); // 鑷畾涔夊瓧娈碉細搴斾粯閲戦C
-
-        // 9. 鎷熶粯鍚堣 = 绗竴娆绗簲娆℃嫙浠橀噾棰濅箣鍜岋紙绗�82鍒�+绗�88鍒�+绗�94鍒�+绗�100鍒�+绗�106鍒楋級
-        BigDecimal plannedPay1 = parseBigDecimal(getCellValue(cellArray, 113)); // 绗竴娆℃嫙浠橀噾棰濓紙绗�83鍒楋級
-        BigDecimal plannedPay2 = parseBigDecimal(getCellValue(cellArray, 119)); // 绗簩娆℃嫙浠橀噾棰濓紙绗�89鍒楋級
-        BigDecimal plannedPay3 = parseBigDecimal(getCellValue(cellArray, 125)); // 绗笁娆℃嫙浠橀噾棰濓紙绗�95鍒楋級
-        BigDecimal plannedPay4 = parseBigDecimal(getCellValue(cellArray, 131)); // 绗洓娆℃嫙浠橀噾棰濓紙绗�101鍒楋級
-        BigDecimal plannedPay5 = parseBigDecimal(getCellValue(cellArray, 137)); // 绗簲娆℃嫙浠橀噾棰濓紙绗�107鍒楋級
-        BigDecimal plannedPayTotal = add(plannedPay1, plannedPay2, plannedPay3, plannedPay4, plannedPay5);
-//        po.setPlannedPayTotal(plannedPayTotal); // 鑷畾涔夊瓧娈碉細鎷熶粯鍚堣
-
-        // 10. 瀹炰粯鍚堣 = 绗竴娆绗簲娆″疄浠橀噾棰濅箣鍜岋紙绗�85鍒�+绗�91鍒�+绗�97鍒�+绗�103鍒�+绗�109鍒楋級
-        BigDecimal actualPay1 = parseBigDecimal(getCellValue(cellArray, 117)); // 绗竴娆″疄浠橀噾棰濓紙绗�86鍒楋級
-        BigDecimal actualPay2 = parseBigDecimal(getCellValue(cellArray, 123)); // 绗簩娆″疄浠橀噾棰濓紙绗�92鍒楋級
-        BigDecimal actualPay3 = parseBigDecimal(getCellValue(cellArray, 130)); // 绗笁娆″疄浠橀噾棰濓紙绗�98鍒楋級
-        BigDecimal actualPay4 = parseBigDecimal(getCellValue(cellArray, 135)); // 绗洓娆″疄浠橀噾棰濓紙绗�104鍒楋級
-        BigDecimal actualPay5 = parseBigDecimal(getCellValue(cellArray, 141)); // 绗簲娆″疄浠橀噾棰濓紙绗�110鍒楋級
-        BigDecimal actualPayTotal = add(actualPay1, actualPay2, actualPay3, actualPay4, actualPay5);
-//        po.setActualPayTotal(actualPayTotal); // 鑷畾涔夊瓧娈碉細瀹炰粯鍚堣
-
-        // 11. 鏈粯鍚堣 = 瀹″畾閲戦-瀹炰粯鍚堣锛堝瀹氶噾棰濆彇瀹¤閲戦锛屾棤鍒欏彇涓氬浼氶噾棰濓級
-        BigDecimal approvedAmount = (auditAmount.compareTo(BigDecimal.ZERO) == 0) ? ownersAmount : auditAmount;
-        BigDecimal unpaidTotal = subtract(approvedAmount, actualPayTotal);
-//        po.setUnpaidTotal(unpaidTotal); // 鑷畾涔夊瓧娈碉細鏈粯鍚堣
-
-        // 12. 鍨粯閲戦 = 澶嶆潅鏉′欢鍒ゆ柇锛堝熀閲戠被鍨嬨�佸埌璐﹀悎璁°�佸叕甯冩儏鍐碉級
-//        BigDecimal advanceAmount = calculateAdvanceAmount(fundType, arrivalTotal, actualPayTotal, po.getPublicIncomeAnnouncement());
-//        po.setAdvanceAmount(advanceAmount); // 鑷畾涔夊瓧娈碉細鍨粯閲戦
-
-        // 13. 鏈粯鍚堣锛堝埌璐﹀彛寰勶級 = 鎸夊叕甯冩儏鍐靛垎鏀绠�
-//        BigDecimal unpaidByArrival = calculateUnpaidByArrival(po.getPublicIncomeAnnouncement(), ownersAmount, managementFee, actualPayTotal, arrivalTotal);
-//        po.setUnpaidByArrival(unpaidByArrival); // 鑷畾涔夊瓧娈碉細鏈粯鍚堣锛堝埌璐﹀彛寰勶級
-
-        // 14-16. 寰呬粯閲戦A/B/C
-//        po.setPendingPayA(subtract(auditAmount, managementFee)); // 寰呬粯閲戦A = 瀹′环閲戦 - 绠$悊璐�
-//        po.setPendingPayB(subtract(auditAmount, qualityGuaranteeAmount, managementFee)); // 寰呬粯閲戦B = 瀹′环閲戦 - 璐ㄤ繚閲� - 绠$悊璐�
-//        po.setPendingPayC(multiply(arrivalTotal, BigDecimal.ONE.subtract(managementFeeRatio))); // 寰呬粯閲戦C = 鍒拌处鍚堣*(1-绠$悊璐瑰崰姣�)
 
         // 鏀粯淇℃伅锛堢111-116鍒楋級
         po.setPayeeName(getCellValue(cellArray, 143)); // 鏀粯鍏徃鍚嶇О/涓汉鍚嶅瓧
@@ -421,9 +331,9 @@
     private void buildSinglePaymentRecord(String mpId, JSONArray cellArray, String flowNumber, int printTimes,
                                                        int index, List<MpPaymentRecordPo> pos) throws ParseException {
 
-        if (getCellValue(cellArray, index).isEmpty()) {
-            return;
-        }
+//        if (getCellValue(cellArray, index).isEmpty()) {
+//            return;
+//        }
 
         MpPaymentRecordPo po = new MpPaymentRecordPo();
 
@@ -469,16 +379,16 @@
 
     private void buildMpFifthPaymentRecordPo(List<MpFifthPaymentRecord> pos, JSONArray cellArray, String flowNumber, String mainPo, int index) {
 
-        if (getCellValue(cellArray, index).isEmpty()) {
-            return;
-        }
+//        if (getCellValue(cellArray, index).isEmpty()) {
+//            return;
+//        }
 
         MpFifthPaymentRecord po = new MpFifthPaymentRecord();
 
         long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 閬垮厤璐熸暟
         po.setId(longId+"");
         po.setMpId(flowNumber);
-        po.setFifthPlannedPaymentAmount(new BigDecimal(getCellValue(cellArray, index)).toString());
+        po.setFifthPlannedPaymentAmount(Vtil.defaultValue(getCellValue(cellArray, index)));
         try {
             po.setPlannedPaymentDate(parseDate(getCellValue(cellArray, index + 1)));
             po.setActualPaymentDate(parseDate(getCellValue(cellArray, index  + 5)));
@@ -487,7 +397,7 @@
         }
         po.setCategory(getCellValue(cellArray, index + 2));
         po.setReimburser(getCellValue(cellArray, index + 3));
-        po.setActualPaymentAmount(new BigDecimal(getCellValue(cellArray, index + 4)).toString());
+        po.setActualPaymentAmount(getCellValue(cellArray, index + 4));
     }
 
     /**

--
Gitblit v1.8.0