zhang_qk hace 1 mes
padre
commit
7dad903d50

+ 4 - 2
Procedure/backend/project/src/main/java/com/sundata/product/rwa/calc/service/implement/units/GeneralLedgerUnit.java

@@ -254,8 +254,10 @@ public class GeneralLedgerUnit extends CalcUnit {
             }
             // 债项风险权重
            DiffconfigListModel diffconfigListModel = subjectDiffConfig.get(ruleListModel.getGlCode());
-//            BigDecimal differAmt = BigDecimal.ZERO; // 核对差异金额(万元)
-            BigDecimal differRate = differAmt.divide(subjectSumBigDecimal, 8, RoundingMode.HALF_UP); // 核对差异率%
+            BigDecimal differRate = BigDecimal.ZERO; // 核对差异率%
+            if(subjectSumBigDecimal != BigDecimal.ZERO) {
+                 differRate = differAmt.divide(subjectSumBigDecimal, 8, RoundingMode.HALF_UP); // 核对差异率%
+            }
             if (differAmt.compareTo(BigDecimal.ZERO) == 0 && subjectSumBigDecimal.compareTo(BigDecimal.ZERO) == 0) {
                 differRate = BigDecimal.ZERO;
             }

+ 3 - 1
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigdataparam/service/RealEstateService.java

@@ -50,9 +50,11 @@ public class RealEstateService extends BaseService<RptDefineModel> {
 
     public List<RealEstateModel> selectDataList(RealEstateModel model) {
         String date_date =  DBExecutor.doQuery ("SELECT MAX(DATA_DATE) FROM RIM_APM_RWA_BS_FC_LOAN_CMS_ENT");
-        if("".equals(date_date)){
+        if(date_date == null || "".equals(date_date)){
             date_date = "20991231";
             model.setDataDate(date_date);
+        }else {
+            model.setDataDate(date_date);
         }
         return realEstateMapper.selectDataList(model);
     }