Commit 80dfe85a by 王力

Merge branch 'dev_scheduleresult0713' into 'develop'

修改

See merge request !225
2 parents e2a7eb8e 06e0ac64
......@@ -276,7 +276,7 @@ public class ScheduleServiceImpl implements ScheduleService {
List<OrderRequest> emtpy = new ArrayList<>();
HashMap<String, Integer> skillCount = new HashMap<>();
HashMap<String, Integer> skillCounter = new HashMap<>();
Map<String, List<OrderRequest>> cc = orders.stream().collect(Collectors.groupingBy(OrderRequest::getSkill));
for(Map.Entry<String, List<OrderRequest>> entry: cc.entrySet()){
......@@ -284,15 +284,15 @@ public class ScheduleServiceImpl implements ScheduleService {
Integer count = entry.getValue().size();
String skillCategory = skillMapping.get(skill);
Integer v = skillCount.getOrDefault(skillCategory, 0);
Integer v = skillCounter.getOrDefault(skillCategory, 0);
v += count;
skillCount.put(skillCategory, v);
skillCounter.put(skillCategory, v);
}
s.setTotal(orders.size());
s.setInstallNum(cc.getOrDefault("安装", emtpy).size());
s.setFixNum(cc.getOrDefault("维修", emtpy).size());
s.setDesignNum(cc.getOrDefault("整改", emtpy).size());
s.setCleanNum(cc.getOrDefault("清洁保养", emtpy).size());
s.setInstallNum(skillCounter.getOrDefault("安装", 0));
s.setFixNum(skillCounter.getOrDefault("维修", 0));
s.setDesignNum(skillCounter.getOrDefault("整改", 0));
s.setCleanNum(skillCounter.getOrDefault("清洁保养", 0));
return s;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!