diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java index 126f68cb..dd400ed4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java @@ -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 hashMap = Maps.newHashMap(); + ArrayList 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 { 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 wrapper = new QueryWrapper<>(); - wrapper.eq("user_id", currentUser).eq("business_id", key); + wrapper.eq("user_id", currentUser).eq("business_id", po.getBusinessId()); List auditProcessList = dgAuditProcessMapper.selectList(wrapper); if (auditProcessList != null && auditProcessList.size() != 0) { //获取累计耗时,完成时间 - HashMap hashMapTime = getTime(key, currentUser); + HashMap 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 wrapper = new QueryWrapper<>(); + // wrapper.eq("user_id", currentUser).eq("business_id", key); + // List auditProcessList = dgAuditProcessMapper.selectList(wrapper); + // if (auditProcessList != null && auditProcessList.size() != 0) { + // //获取累计耗时,完成时间 + // HashMap 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; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java index 3cf909c4..dc1048bd 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java @@ -185,6 +185,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl