Jelajahi Sumber

修改bug:
协议管理-费用管理,改费用提示程序异常

jiakai 4 bulan lalu
induk
melakukan
4ce87949b4

+ 4 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -137,8 +137,10 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
         // 校验ptlAgreementCostTypeList 数据  exportKeepPointRatio 不能大于 export
         if (!CollectionUtils.isEmpty(ptlAgreementCostEnd.getPtlAgreementCostTypeList())) {
             for (PtlAgreementCostEnd.PtlAgreementCostTypeDto ptlAgreementCostTypeDto : ptlAgreementCostEnd.getPtlAgreementCostTypeList()) {
-                if (ptlAgreementCostTypeDto.getExportKeepPointRatio().compareTo(ptlAgreementCostTypeDto.getExport()) > 0) {
-                    return HttpResult.error("出口留点比例不能大于出口比例");
+                if (null != ptlAgreementCostTypeDto.getExportKeepPointRatio() && null != ptlAgreementCostTypeDto.getExport()){
+                    if (ptlAgreementCostTypeDto.getExportKeepPointRatio().compareTo(ptlAgreementCostTypeDto.getExport()) > 0) {
+                        return HttpResult.error("出口留点比例不能大于出口比例");
+                    }
                 }
             }
         }