소스 검색

feat: 监察统计 by zero update 2

shc 7 달 전
부모
커밋
3502bab7a7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/manager/SysStatisticManager.java

+ 2 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/manager/SysStatisticManager.java

@@ -883,9 +883,9 @@ public class SysStatisticManager {
                     // 审核通过值
                     uMap.put("passedScore", passedScore);
                     // 审核通过率
-                    uMap.put("passedCountRate", String.format("%.2f", 100.0 * (passedCount / taskPkgCount)));
+                    uMap.put("passedCountRate", taskPkgCount == 0 ? "0.00" : String.format("%.2f", 100.0 * (passedCount / taskPkgCount)));
                     // 审核通过百分比
-                    uMap.put("passedRate", String.format("%.2f", 100.0 * (passedScore / taskScoreTotal)));
+                    uMap.put("passedRate", taskScoreTotal == 0 ? "0.00" : String.format("%.2f", 100.0 * (passedScore / taskScoreTotal)));
 
                     // 任务数
                     uMap.put("userTaskCount", taskPkgCount);