瀏覽代碼

feat: 监察统计 by zero update 2

shc 7 月之前
父節點
當前提交
3502bab7a7

+ 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);