|
@@ -359,7 +359,9 @@ public class SysStatisticManager {
|
|
|
// 获取子集
|
|
|
List<Integer> parentQrtPlanIds = qrtPlanList.stream().mapToInt(SysImplementPlan::getPlanId).boxed().distinct().sorted().collect(Collectors.toList());
|
|
|
|
|
|
- List<SysImplementPlan> subQrtPlans = implementPlanService.list(Wrappers.<SysImplementPlan>lambdaQuery().in(SysImplementPlan::getParentId, parentQrtPlanIds));
|
|
|
+ List<SysImplementPlan> subQrtPlans = implementPlanService.list(Wrappers.<SysImplementPlan>lambdaQuery()
|
|
|
+ .eq(SysImplementPlan::getPlanState, UpmsState.ImplementPlanState.PASSED)
|
|
|
+ .in(SysImplementPlan::getParentId, parentQrtPlanIds));
|
|
|
|
|
|
if (CollUtil.isEmpty(subQrtPlans)) {
|
|
|
break;
|
|
@@ -850,7 +852,7 @@ public class SysStatisticManager {
|
|
|
userMap = new ArrayList<>(userList.size());
|
|
|
for (SysUser u : userList) {
|
|
|
String uId = u.getUserId().toString();
|
|
|
- Map<String, Object> uMap = new HashMap<>(11);
|
|
|
+ Map<String, Object> uMap = new HashMap<>(13);
|
|
|
// 用户ID
|
|
|
uMap.put("userId", u.getUserId());
|
|
|
// 用户名
|
|
@@ -874,8 +876,8 @@ public class SysStatisticManager {
|
|
|
deptPkgScoreTotal += userPkgScoreTotal;
|
|
|
|
|
|
int taskPkgCount = 0;
|
|
|
- long taskScoreTotal = 0L;
|
|
|
- long passedScore = 0L;
|
|
|
+ int taskScoreTotal = 0;
|
|
|
+ int passedScore = 0;
|
|
|
int passedCount = 0;
|
|
|
List<WmTask> tasks = userId2TaskMap.get(uId);
|
|
|
if (CollUtil.isNotEmpty(tasks)) {
|
|
@@ -887,11 +889,13 @@ public class SysStatisticManager {
|
|
|
}
|
|
|
|
|
|
taskPkgCount = tasks.size();
|
|
|
- taskScoreTotal = tasks.stream().mapToLong(WmTask::getScore).sum();
|
|
|
+ taskScoreTotal = tasks.stream().mapToInt(WmTask::getScore).sum();
|
|
|
}
|
|
|
|
|
|
// 审核通过值
|
|
|
uMap.put("passedScore", passedScore);
|
|
|
+ uMap.put("passedCount", passedCount);
|
|
|
+ uMap.put("taskPkgCount", taskPkgCount);
|
|
|
// 审核通过率
|
|
|
uMap.put("passedCountRate", taskPkgCount == 0 ? "0.00" : String.format("%.2f", 100.0 * (passedCount / taskPkgCount)));
|
|
|
// 审核通过百分比
|