Explorar el Código

hotfix: fit for every role

dengjia hace 3 meses
padre
commit
8786025462

+ 7 - 13
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/manager/WmSupervisionManager.java

@@ -1248,7 +1248,6 @@ public class WmSupervisionManager {
 
                   int total = 0;
                   int supTotal = 0;
-                  int total1 = 0;
                   int supTotal1 = 0;
 
                   // 生产企业财务部监督员
@@ -1260,7 +1259,7 @@ public class WmSupervisionManager {
                   // 营销中心财务部监督员
                   int optFinaSupTotal = 0;
 
-                  Set<Integer> todos = new HashSet<>();
+                  int todos = 0;
                   // 获取c端包统计信息
                   if (CollUtil.isNotEmpty(pkgs)) {
 
@@ -1353,7 +1352,7 @@ public class WmSupervisionManager {
                     // 监察员
                     if (CollUtil.containsAny(roles, List.of(49, 52, 53, 56))) {
                       // 获取监察结果
-                      total1 = total;
+                      todos = total - supTotal;
                       supTotal1 = supTotal;
                     }
                     // 服务商
@@ -1372,7 +1371,7 @@ public class WmSupervisionManager {
                               : 0;
 
                       // 获取监察结果
-                      total1 = supTotal;
+                      todos = 0;
                       supTotal1 = supTotal;
                     }
                     // 其他角色
@@ -1427,23 +1426,18 @@ public class WmSupervisionManager {
 
                         // 负责人
                         if (CollUtil.containsAny(roles, List.of(57, 58, 59, 60))) {
-
                           supTotal1 = advices.size();
-                          total1 = init.size() + supTotal1;
-                          todos = init;
+                          todos = init.size();
                         }
                         // 分管领导
                         else if (CollUtil.containsAny(roles, List.of(51, 54, 55, 61))) {
-
                           supTotal1 = advices.size();
-                          total1 = ckt1.size() + supTotal1;
-                          todos = ckt1;
+                          todos = ckt1.size();
                         }
                         // 事业部总经理
                         else if (CollUtil.containsAny(roles, List.of(39))) {
                           supTotal1 = advices.size();
-                          total1 = ckt2.size() + supTotal1;
-                          todos = ckt2;
+                          todos = ckt2.size();
                         }
                       }
                     }
@@ -1457,7 +1451,7 @@ public class WmSupervisionManager {
                   stat.put("optLawSupTotal", optLawSupTotal);
                   stat.put("optFinaSupTotal", optFinaSupTotal);
                   map.put("taskSupStat", stat);
-                  map.put("toCheck", todos.size() > 0);
+                  map.put("toCheck", todos > 0);
                   map.put("checked", supTotal1 != 0);
 
                   return map;