Bladeren bron

顽症报表--空指针处理

zhuang 7 maanden geleden
bovenliggende
commit
f47c3cefb6

+ 3 - 3
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxPersistentManageServiceImpl.java

@@ -568,9 +568,9 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             dto.setCheckNumber(report.getCheckNumber());
             dto.setPunishNumber(report.getPunishNumber());
             dto.setPunishTotalAmount(report.getPunishTotalAmount());
-            dto.setCheckNumberPer(calculateRatio(report.getCheckNumber(), org.getUserCount()));
-            dto.setPunishNumberPer(calculateRatio(report.getPunishNumber(), org.getUserCount()));
-            dto.setPunishTotalAmountPer(calculateRatio(report.getPunishTotalAmount(), org.getUserCount()));
+            dto.setCheckNumberPer(calculateRatio(report.getCheckNumber() == null?0:report.getCheckNumber(), org.getUserCount()));
+            dto.setPunishNumberPer(calculateRatio(report.getPunishNumber() ==null?0:report.getPunishNumber(), org.getUserCount()));
+            dto.setPunishTotalAmountPer(calculateRatio(report.getPunishTotalAmount() == null?0:report.getPunishTotalAmount(), org.getUserCount()));
         }
         return dto;
     }