From 0d4d0edd64897180f4fa3b4a5e2deea2985f379a Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 23 Apr 2021 17:58:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=95=88=E7=8E=87=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DgEfficiencyServiceImpl.java | 110 +++++++++++++----- ...aymentConfirmationConsiderServiceImpl.java | 1 + 2 files changed, 83 insertions(+), 28 deletions(-) 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