Pārlūkot izejas kodu

1.财务保险结算列表报错

wuhp 1 gadu atpakaļ
vecāks
revīzija
f502f6b45c

+ 6 - 6
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -2290,12 +2290,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
             }
             List<SettlementDocumentaryFeesEntity> settleInsPlyIncomes = settlementDocumentaryFeesService.queryAmount(params);  //金额总数
             for (SettlementDocumentaryFeesEntity settleInsPlyIncome : settleInsPlyIncomes) {
-                BigDecimal settleIcommissionFeevalue = settleInsPlyIncome.getSettlementAmount();// 已结算金额
-                readyCommissionFeevalue = readyCommissionFeevalue.add(settleIcommissionFeevalue);  //已结算总
-
-                BigDecimal divide = new BigDecimal(100).subtract(settleInsPlyIncome.getTaxPoints()).divide(new BigDecimal(100));
-                expendAmount = expendAmount.add(settleInsPlyIncome.getSettlementAmount().multiply(divide));
-
+                if(ObjectUtils.isNotEmpty(settleInsPlyIncome)){
+                    BigDecimal settleIcommissionFeevalue = settleInsPlyIncome.getSettlementAmount().compareTo(BigDecimal.ZERO) > 0 ? settleInsPlyIncome.getSettlementAmount() : BigDecimal.ZERO;// 已结算金额
+                    readyCommissionFeevalue = readyCommissionFeevalue.add(settleIcommissionFeevalue);  //已结算总
+                    BigDecimal divide = new BigDecimal(100).subtract(settleInsPlyIncome.getTaxPoints()).divide(new BigDecimal(100));
+                    expendAmount = expendAmount.add(settleInsPlyIncome.getSettlementAmount().multiply(divide));
+                }
             }
             params.put("settlementStatus", 0);  //未开票金额
             List<SettlementDocumentaryFeesEntity> noInvoicInsPlyIncomes = settlementDocumentaryFeesService.queryNew(params);  //金额总数

+ 1 - 1
src/main/resources/mapper/modules/fnc/SettlementDocumentaryFeesMapper.xml

@@ -324,7 +324,7 @@
         a.agree_ment_id as "agreeMentId",
         a.partner_companies_id as "partnerCompaniesId",
         a.invoicing_method as "invoicingMethod",
-        a.tax_points as "taxPoints",
+        ifnull(a.tax_points,0) as "taxPoints",
         a.expend_amount as "expendAmount",
         a.parent_id as "parentId",
         a.handling_fees_status as "handlingFeesStatus",