|
|
@ -170,6 +170,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
Integer processId; // 业务节点id
|
|
|
|
Integer processId; // 业务节点id
|
|
|
|
String departmentIdList; // 部门id集合
|
|
|
|
String departmentIdList; // 部门id集合
|
|
|
|
// 将数据归类
|
|
|
|
// 将数据归类
|
|
|
|
|
|
|
|
|
|
|
|
for (List<DgTeamEfficiencyPO> dgTeamEfficiencyList : list) { |
|
|
|
for (List<DgTeamEfficiencyPO> dgTeamEfficiencyList : list) { |
|
|
|
if (dgTeamEfficiencyList.size() < 2) { |
|
|
|
if (dgTeamEfficiencyList.size() < 2) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
@ -183,13 +184,14 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
departmentIdList = dgTeamEfficiencyList.get(i).getDepartmentId(); |
|
|
|
departmentIdList = dgTeamEfficiencyList.get(i).getDepartmentId(); |
|
|
|
map.put(processId, time + ",1"); |
|
|
|
map.put(processId, time + ",1"); |
|
|
|
String[] departmentIds = departmentIdList.split(","); |
|
|
|
String[] departmentIds = departmentIdList.split(","); |
|
|
|
Map timeSumByDepId = new HashMap(); |
|
|
|
|
|
|
|
|
|
|
|
Map<String,String> timeSumByDepId = new HashMap<String,String>(); |
|
|
|
for (String departmentId : departmentIds) { |
|
|
|
for (String departmentId : departmentIds) { |
|
|
|
if (departmentId.equals("0")) { |
|
|
|
if (departmentId.equals("0")) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int pd = processId+Integer.parseInt(departmentId); |
|
|
|
String dl = dgTeamEfficiencyList.size()+"*"+i+"*"+departmentId; |
|
|
|
// 没有当前部门的数据,直接新建一个
|
|
|
|
// 没有当前部门的数据,直接新建一个
|
|
|
|
if (hashMap.get(Integer.parseInt(departmentId)) == null) { |
|
|
|
if (hashMap.get(Integer.parseInt(departmentId)) == null) { |
|
|
|
hashMap.put(Integer.parseInt(departmentId), map); |
|
|
|
hashMap.put(Integer.parseInt(departmentId), map); |
|
|
@ -204,12 +206,11 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
// 计算当前部门在当前节点的累计时间
|
|
|
|
// 计算当前部门在当前节点的累计时间
|
|
|
|
String existTime = existMap.get(processId).substring(0, existMap.get(processId).indexOf(",")); |
|
|
|
String existTime = existMap.get(processId).substring(0, existMap.get(processId).indexOf(",")); |
|
|
|
|
|
|
|
|
|
|
|
//int sumTime = Integer.parseInt(existTime) + Integer.parseInt(time);
|
|
|
|
|
|
|
|
//timeSumByDepId 这个map只用于记录遍历部门多少次数
|
|
|
|
//timeSumByDepId 这个map只用于记录遍历部门多少次数
|
|
|
|
timeSumByDepId.put(Integer.parseInt(departmentId),time); |
|
|
|
timeSumByDepId.put(dl,time); |
|
|
|
if(timeSumByDepId.size()>1){ |
|
|
|
if(timeSumByDepId.size()>1){ |
|
|
|
// 累计时间加上本次时间
|
|
|
|
// 累计时间加上本次时间
|
|
|
|
existMap.put(processId, (Integer.parseInt(time)) + "," + count); |
|
|
|
existMap.put(processId, (Integer.parseInt(existTime)) + "," + count); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
existMap.put(processId, (Integer.parseInt(existTime) + Integer.parseInt(time)) + "," + count); |
|
|
|
existMap.put(processId, (Integer.parseInt(existTime) + Integer.parseInt(time)) + "," + count); |
|
|
|
} |
|
|
|
} |
|
|
|