|
|
@ -248,40 +248,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
roleList.add(Integer.parseInt(id)); |
|
|
|
roleList.add(Integer.parseInt(id)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//查询用户处理过的业务
|
|
|
|
|
|
|
|
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
wrapper.eq("user_id", currentUser).groupBy("business_id").select("business_id"); |
|
|
|
|
|
|
|
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper); |
|
|
|
|
|
|
|
if (auditProcessList != null && auditProcessList.size() != 0) { |
|
|
|
|
|
|
|
List<Integer> businessIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
auditProcessList.forEach(dgAuditProcess -> { |
|
|
|
|
|
|
|
businessIdList.add(dgAuditProcess.getBusinessId()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据业务id查询业务流程,统计耗时,完成时间
|
|
|
|
|
|
|
|
businessIdList.forEach(businessId -> { |
|
|
|
|
|
|
|
//new返回对象
|
|
|
|
|
|
|
|
PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse(); |
|
|
|
|
|
|
|
efficiencyListResponse.setBusinessId(businessId); |
|
|
|
|
|
|
|
//根据业务id查询业务
|
|
|
|
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(businessId); |
|
|
|
|
|
|
|
//业务申请日期
|
|
|
|
|
|
|
|
Date createTime = dgApplyAmountInfo.getCreateTime(); |
|
|
|
|
|
|
|
//客户公司id
|
|
|
|
|
|
|
|
Integer companyId = dgApplyAmountInfo.getCompanyId(); |
|
|
|
|
|
|
|
//提单人id
|
|
|
|
|
|
|
|
Integer presenterId = dgApplyAmountInfo.getPresenterId(); |
|
|
|
|
|
|
|
efficiencyListResponse.setApplicantId(presenterId); |
|
|
|
|
|
|
|
efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime)); |
|
|
|
|
|
|
|
efficiencyListResponse.setClientName(String.valueOf(companyId)); |
|
|
|
|
|
|
|
//获取累计耗时,完成时间,任务节点
|
|
|
|
|
|
|
|
HashMap<String, Object> hashMap = getTime(businessId, currentUser); |
|
|
|
|
|
|
|
Object countTime = hashMap.get("countTime"); |
|
|
|
|
|
|
|
Object endTime = hashMap.get("endTime"); |
|
|
|
|
|
|
|
efficiencyListResponse.setTimeConsuming(String.valueOf(countTime)); |
|
|
|
|
|
|
|
efficiencyListResponse.setCompleteTime(String.valueOf(endTime)); |
|
|
|
|
|
|
|
efficiencyList.add(efficiencyListResponse); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//获取每个业务id的三种状态
|
|
|
|
//获取每个业务id的三种状态
|
|
|
|
HashMap<Integer, Object> hashMap = Maps.newHashMap(); |
|
|
|
HashMap<Integer, Object> hashMap = Maps.newHashMap(); |
|
|
|
//角色不为空
|
|
|
|
//角色不为空
|
|
|
@ -504,31 +470,45 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//再次循环,拼接数据
|
|
|
|
//遍历map,key值为业务id
|
|
|
|
efficiencyList.forEach(personalEfficiencyListResponse -> { |
|
|
|
for (Integer key : hashMap.keySet()) { |
|
|
|
Integer businessId = personalEfficiencyListResponse.getBusinessId(); |
|
|
|
PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse(); |
|
|
|
Object o = hashMap.get(businessId); |
|
|
|
efficiencyListResponse.setBusinessId(key); |
|
|
|
//有数据
|
|
|
|
StatusPO po = (StatusPO)hashMap.get(key); |
|
|
|
if (ObjectUtil.isNotNull(o)) { |
|
|
|
Integer businessStatus = po.getBusinessStatus(); |
|
|
|
//强制转换
|
|
|
|
Integer operatingStatus = po.getOperatingStatus(); |
|
|
|
if (o instanceof StatusPO) { |
|
|
|
Integer processId = po.getProcessId(); |
|
|
|
StatusPO statusPO = (StatusPO) o; |
|
|
|
Integer status = po.getStatus(); |
|
|
|
String name = statusPO.getName(); |
|
|
|
String name = po.getName(); |
|
|
|
Integer operatingStatus = statusPO.getOperatingStatus(); |
|
|
|
//根据业务id查询业务
|
|
|
|
Integer processId = statusPO.getProcessId(); |
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(key); |
|
|
|
Integer status = statusPO.getStatus(); |
|
|
|
//业务申请日期
|
|
|
|
Integer businessStatus = statusPO.getBusinessStatus(); |
|
|
|
Date createTime = dgApplyAmountInfo.getCreateTime(); |
|
|
|
personalEfficiencyListResponse.setTaskNode(String.valueOf(processId)); |
|
|
|
//客户公司id
|
|
|
|
personalEfficiencyListResponse.setBusinessStatus(businessStatus); |
|
|
|
Integer companyId = dgApplyAmountInfo.getCompanyId(); |
|
|
|
personalEfficiencyListResponse.setOperatingStatus(operatingStatus); |
|
|
|
//提单人id
|
|
|
|
personalEfficiencyListResponse.setApproveStatus(status); |
|
|
|
Integer presenterId = dgApplyAmountInfo.getPresenterId(); |
|
|
|
personalEfficiencyListResponse.setClientName(name); |
|
|
|
efficiencyListResponse.setOperatingStatus(operatingStatus); |
|
|
|
} |
|
|
|
efficiencyListResponse.setApproveStatus(status); |
|
|
|
} |
|
|
|
efficiencyListResponse.setBusinessStatus(businessStatus); |
|
|
|
String timeConsuming = personalEfficiencyListResponse.getTimeConsuming(); |
|
|
|
efficiencyListResponse.setTaskNode(String.valueOf(processId)); |
|
|
|
String totalTimeConsuming = countTime(timeConsuming); |
|
|
|
efficiencyListResponse.setClientName(name); |
|
|
|
personalEfficiencyListResponse.setTimeConsuming(totalTimeConsuming); |
|
|
|
efficiencyListResponse.setApplicantId(presenterId); |
|
|
|
}); |
|
|
|
efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime)); |
|
|
|
|
|
|
|
efficiencyListResponse.setClientName(String.valueOf(companyId)); |
|
|
|
|
|
|
|
//用户处理过业务,统计耗时
|
|
|
|
|
|
|
|
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
wrapper.eq("user_id", currentUser).eq("business_id",key); |
|
|
|
|
|
|
|
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper); |
|
|
|
|
|
|
|
if (auditProcessList != null && auditProcessList.size() != 0) { |
|
|
|
|
|
|
|
//获取累计耗时,完成时间
|
|
|
|
|
|
|
|
HashMap<String, Object> hashMapTime = getTime(key, currentUser); |
|
|
|
|
|
|
|
Object countTime = hashMapTime.get("countTime"); |
|
|
|
|
|
|
|
Object endTime = hashMapTime.get("endTime"); |
|
|
|
|
|
|
|
efficiencyListResponse.setTimeConsuming(countTime(String.valueOf(countTime))); |
|
|
|
|
|
|
|
efficiencyListResponse.setCompleteTime(String.valueOf(endTime)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
efficiencyList.add(efficiencyListResponse); |
|
|
|
} |
|
|
|
} |
|
|
|
return efficiencyList; |
|
|
|
return efficiencyList; |
|
|
|
} |
|
|
|
} |
|
|
|