Просмотр исходного кода

修改bug:
bug表1044,应收订单 导出表中的应收手续费与应收界面的手续费不一致(跟单也是)

jiakai 1 месяц назад
Родитель
Сommit
658290d7bf

+ 18 - 6
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -3841,12 +3841,24 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             // updateAgreementId不为空时,从ins_ply_income(income)查询比例覆盖batchModifyVo,用于后续calRatio和calPremium计算
             // ins_ply_income中的比例是字符串形式的小数值(如"0.20000"),转为BigDecimal后与batchModifyVo.divide100()后的格式一致
             if (StrUtil.isNotBlank(updateAgreementId)) {
-                batchModifyVo.setJqSuperviseCostsProportion(StrUtil.isNotBlank(income.getJqSuperviseCostsProportion()) ? new BigDecimal(income.getJqSuperviseCostsProportion()) : BigDecimal.ZERO);
-                batchModifyVo.setJqOtherCostsProportion(StrUtil.isNotBlank(income.getJqOtherCostsProportion()) ? new BigDecimal(income.getJqOtherCostsProportion()) : BigDecimal.ZERO);
-                batchModifyVo.setSySuperviseCostsProportion(StrUtil.isNotBlank(income.getSySuperviseCostsProportion()) ? new BigDecimal(income.getSySuperviseCostsProportion()) : BigDecimal.ZERO);
-                batchModifyVo.setSyOtherCostsProportion(StrUtil.isNotBlank(income.getSyOtherCostsProportion()) ? new BigDecimal(income.getSyOtherCostsProportion()) : BigDecimal.ZERO);
-                batchModifyVo.setJySuperviseCostsProportion(StrUtil.isNotBlank(income.getJySuperviseCostsProportion()) ? new BigDecimal(income.getJySuperviseCostsProportion()) : BigDecimal.ZERO);
-                batchModifyVo.setJyOtherCostsProportion(StrUtil.isNotBlank(income.getJyOtherCostsProportion()) ? new BigDecimal(income.getJyOtherCostsProportion()) : BigDecimal.ZERO);
+                if (null == batchModifyVo.getJqSuperviseCostsProportion() || BigDecimal.ZERO.compareTo(batchModifyVo.getJqSuperviseCostsProportion()) == 0){
+                    batchModifyVo.setJqSuperviseCostsProportion(StrUtil.isNotBlank(income.getJqSuperviseCostsProportion()) ? new BigDecimal(income.getJqSuperviseCostsProportion()) : BigDecimal.ZERO);
+                }
+                if (null == batchModifyVo.getJqOtherCostsProportion() || BigDecimal.ZERO.compareTo(batchModifyVo.getJqOtherCostsProportion()) == 0) {
+                    batchModifyVo.setJqOtherCostsProportion(StrUtil.isNotBlank(income.getJqOtherCostsProportion()) ? new BigDecimal(income.getJqOtherCostsProportion()) : BigDecimal.ZERO);
+                }
+                if (null == batchModifyVo.getSySuperviseCostsProportion() || BigDecimal.ZERO.compareTo(batchModifyVo.getSySuperviseCostsProportion()) == 0) {
+                    batchModifyVo.setSySuperviseCostsProportion(StrUtil.isNotBlank(income.getSySuperviseCostsProportion()) ? new BigDecimal(income.getSySuperviseCostsProportion()) : BigDecimal.ZERO);
+                }
+                if (null == batchModifyVo.getSyOtherCostsProportion() || BigDecimal.ZERO.compareTo(batchModifyVo.getSyOtherCostsProportion()) == 0) {
+                    batchModifyVo.setSyOtherCostsProportion(StrUtil.isNotBlank(income.getSyOtherCostsProportion()) ? new BigDecimal(income.getSyOtherCostsProportion()) : BigDecimal.ZERO);
+                }
+                if (null == batchModifyVo.getJySuperviseCostsProportion() || BigDecimal.ZERO.compareTo(batchModifyVo.getJySuperviseCostsProportion()) == 0) {
+                    batchModifyVo.setJySuperviseCostsProportion(StrUtil.isNotBlank(income.getJySuperviseCostsProportion()) ? new BigDecimal(income.getJySuperviseCostsProportion()) : BigDecimal.ZERO);
+                }
+                if (null == batchModifyVo.getJyOtherCostsProportion() || BigDecimal.ZERO.compareTo(batchModifyVo.getJyOtherCostsProportion()) == 0) {
+                    batchModifyVo.setJyOtherCostsProportion(StrUtil.isNotBlank(income.getJyOtherCostsProportion()) ? new BigDecimal(income.getJyOtherCostsProportion()) : BigDecimal.ZERO);
+                }
                 log.info("切换协议后,从ins_ply_income查询比例覆盖batchModifyVo。orderNo=[{}], batchModifyVo=[{}]", income.getOrderNo(), JSONUtil.toJsonStr(batchModifyVo));
             }