|
|
|
@ -27,6 +27,7 @@ import com.daqing.framework.exception.ExceptionCast; |
|
|
|
|
import com.daqing.framework.model.StatusCode; |
|
|
|
|
import com.daqing.framework.model.response.PromptSuccess; |
|
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
|
|
import com.google.common.collect.Lists; |
|
|
|
|
import com.google.common.collect.Maps; |
|
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
|
|
import com.daqing.framework.utils.PageUtils; |
|
|
|
@ -295,6 +296,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
} |
|
|
|
|
//获取每个业务id的三种状态
|
|
|
|
|
HashMap<Integer, Object> hashMap = Maps.newHashMap(); |
|
|
|
|
ArrayList<StatusPO> statusPOS = Lists.newArrayList(); |
|
|
|
|
//角色不为空
|
|
|
|
|
//担保业务员角色、担保经理角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) { |
|
|
|
@ -316,7 +318,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(1); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -340,7 +344,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(2); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -364,7 +370,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(3); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -388,7 +396,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(4); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -413,7 +423,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(5); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -436,7 +448,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(6); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -459,7 +473,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(7); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -483,7 +499,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(8); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -507,7 +525,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(9); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -531,49 +551,83 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
statusPO.setProcessId(10); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
// hashMap.put(businessId, statusPO);
|
|
|
|
|
statusPO.setBusinessId(businessId); |
|
|
|
|
statusPOS.add(statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//遍历map,key值为业务id
|
|
|
|
|
for (Integer key : hashMap.keySet()) { |
|
|
|
|
statusPOS.forEach(po -> { |
|
|
|
|
PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse(); |
|
|
|
|
efficiencyListResponse.setBusinessId(key); |
|
|
|
|
StatusPO po = (StatusPO) hashMap.get(key); |
|
|
|
|
Integer businessStatus = po.getBusinessStatus(); |
|
|
|
|
Integer operatingStatus = po.getOperatingStatus(); |
|
|
|
|
Integer processId = po.getProcessId(); |
|
|
|
|
Integer status = po.getStatus(); |
|
|
|
|
String name = po.getName(); |
|
|
|
|
efficiencyListResponse.setBusinessId(po.getBusinessId()); |
|
|
|
|
//根据业务id查询业务
|
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(key); |
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(po.getBusinessId()); |
|
|
|
|
//业务申请日期
|
|
|
|
|
Date createTime = dgApplyAmountInfo.getCreateTime(); |
|
|
|
|
//提单人id
|
|
|
|
|
Integer presenterId = dgApplyAmountInfo.getPresenterId(); |
|
|
|
|
efficiencyListResponse.setDetailId(po.getDetailId()); |
|
|
|
|
efficiencyListResponse.setRoleId(po.getRoleId()); |
|
|
|
|
efficiencyListResponse.setOperatingStatus(operatingStatus); |
|
|
|
|
efficiencyListResponse.setApproveStatus(status); |
|
|
|
|
efficiencyListResponse.setBusinessStatus(businessStatus); |
|
|
|
|
efficiencyListResponse.setTaskNode(String.valueOf(processId)); |
|
|
|
|
efficiencyListResponse.setClientName(name); |
|
|
|
|
efficiencyListResponse.setOperatingStatus(po.getOperatingStatus()); |
|
|
|
|
efficiencyListResponse.setApproveStatus(po.getStatus()); |
|
|
|
|
efficiencyListResponse.setBusinessStatus(po.getBusinessStatus()); |
|
|
|
|
efficiencyListResponse.setTaskNode(String.valueOf(po.getProcessId())); |
|
|
|
|
efficiencyListResponse.setClientName(po.getName()); |
|
|
|
|
efficiencyListResponse.setApplicantId(presenterId); |
|
|
|
|
efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime)); |
|
|
|
|
//用户处理过业务,统计耗时
|
|
|
|
|
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>(); |
|
|
|
|
wrapper.eq("user_id", currentUser).eq("business_id", key); |
|
|
|
|
wrapper.eq("user_id", currentUser).eq("business_id", po.getBusinessId()); |
|
|
|
|
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper); |
|
|
|
|
if (auditProcessList != null && auditProcessList.size() != 0) { |
|
|
|
|
//获取累计耗时,完成时间
|
|
|
|
|
HashMap<String, Object> hashMapTime = getTime(key, currentUser); |
|
|
|
|
HashMap<String, Object> hashMapTime = getTime(po.getBusinessId(), 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); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
//遍历map,key值为业务id
|
|
|
|
|
// for (Integer key : hashMap.keySet()) {
|
|
|
|
|
// PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse();
|
|
|
|
|
// efficiencyListResponse.setBusinessId(key);
|
|
|
|
|
// StatusPO po = (StatusPO) hashMap.get(key);
|
|
|
|
|
// Integer businessStatus = po.getBusinessStatus();
|
|
|
|
|
// Integer operatingStatus = po.getOperatingStatus();
|
|
|
|
|
// Integer processId = po.getProcessId();
|
|
|
|
|
// Integer status = po.getStatus();
|
|
|
|
|
// String name = po.getName();
|
|
|
|
|
// //根据业务id查询业务
|
|
|
|
|
// DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(key);
|
|
|
|
|
// //业务申请日期
|
|
|
|
|
// Date createTime = dgApplyAmountInfo.getCreateTime();
|
|
|
|
|
// //提单人id
|
|
|
|
|
// Integer presenterId = dgApplyAmountInfo.getPresenterId();
|
|
|
|
|
// efficiencyListResponse.setDetailId(po.getDetailId());
|
|
|
|
|
// efficiencyListResponse.setRoleId(po.getRoleId());
|
|
|
|
|
// efficiencyListResponse.setOperatingStatus(operatingStatus);
|
|
|
|
|
// efficiencyListResponse.setApproveStatus(status);
|
|
|
|
|
// efficiencyListResponse.setBusinessStatus(businessStatus);
|
|
|
|
|
// efficiencyListResponse.setTaskNode(String.valueOf(processId));
|
|
|
|
|
// efficiencyListResponse.setClientName(name);
|
|
|
|
|
// efficiencyListResponse.setApplicantId(presenterId);
|
|
|
|
|
// efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime));
|
|
|
|
|
// //用户处理过业务,统计耗时
|
|
|
|
|
// 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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|