Преглед изворни кода

1.平台新增逻辑修改

wuhp пре 2 година
родитељ
комит
8ad1f97157

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

@@ -2833,6 +2833,15 @@ handlingProportion,
         if (insPlyIncome.getNoPremium() != null && insPlyIncome.getNoPremium().compareTo(BigDecimal.ZERO) > 0 && insPlyIncome.getNoOtherCostsProportion() != null && insPlyIncome.getNoOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0) {
             insPlyIncome.setNoOtherCostsPremium(this.getBigDecimal(insPlyIncome.getNoPremium(),insPlyIncome.getNoOtherCostsProportion()));
         }
+
+        HashMap<String, Object> params = new HashMap<>();
+        params.put("agreeId",insPlyIncomeVo.getAgreeId());
+
+        PtlAgreement ptlAgreement = ptlAgreementService.selectAgreeId(params);
+        if (ObjectUtils.isEmpty(ptlAgreement)) {
+            return HttpResult.error("协议匹配不上");
+        }
+        insPlyIncome.setAgreementId(ptlAgreement.getId());
         insPlyIncome.setJqReceivableProportion(this.calculateTotal(insPlyIncome.getJqSuperviseCostsProportion(),insPlyIncome.getNoOtherCostsProportion(),null));
         insPlyIncome.setSyReceivableProportion(this.calculateTotal(insPlyIncome.getSySuperviseCostsProportion(),insPlyIncome.getNoOtherCostsProportion(),null));
         insPlyIncome.setNoReceivableProportion(this.calculateTotal(insPlyIncome.getNoSuperviseCostsProportion(),insPlyIncome.getNoOtherCostsProportion(),null));
@@ -2844,6 +2853,8 @@ handlingProportion,
         insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getCommissionFeevalue(),insPlyIncome.getOtherFeevalue(),null));
         insPlyIncome.setAgreementType("1");
         insPlyIncome.setHandlingFeesStatus("0");
+        insPlyIncome.setCommissionFeevalue(insPlyIncomeVo.getCommissionFeevalue());
+        insPlyIncome.setOtherFeevalue(insPlyIncomeVo.getOtherFeevalue());
         insPlyIncome.setIsNotCar("0");
         insPlyIncome.setIsNotDocumentary("0");
         insPlyIncome.setDocumentaryFeesStatus("0");

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

@@ -953,7 +953,7 @@
         MAX( ec.name ) AS "companyName",
         sum( a.commission_feevalue ) AS "commissionFeevalue",
         sum( a.other_feevalue ) AS "otherFeevalue",
-        SUM( a.commission_feevalue + a.other_feevalue ) AS "totalFeevalue",
+        SUM( IFNULL(a.commission_feevalue,0) + IFNULL (a.other_feevalue,0) ) AS "totalFeevalue",
         GROUP_CONCAT(a.id) as "ids",
         MAX( a.partner_companies_name) as "partnerCompaniesName",
         MAX(pa.docking_person) as "dockingPerson"