个人效率逻辑更改

master
chen 4 years ago
parent 5f33bd2655
commit 0d4d0edd64
  1. 110
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  2. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java

@ -27,6 +27,7 @@ import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
@ -295,6 +296,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
} }
//获取每个业务id的三种状态 //获取每个业务id的三种状态
HashMap<Integer, Object> hashMap = Maps.newHashMap(); 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))) { 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.setOperatingStatus(operatingStatus);
statusPO.setProcessId(1); statusPO.setProcessId(1);
statusPO.setStatus(status); 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.setProcessId(2);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(3);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(4);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(5);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(6);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(7);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(8);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(9);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); 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.setProcessId(10);
statusPO.setName(name); statusPO.setName(name);
statusPO.setStatus(status); statusPO.setStatus(status);
hashMap.put(businessId, statusPO); // hashMap.put(businessId, statusPO);
statusPO.setBusinessId(businessId);
statusPOS.add(statusPO);
}); });
} }
} }
//遍历map,key值为业务id statusPOS.forEach(po -> {
for (Integer key : hashMap.keySet()) {
PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse(); PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse();
efficiencyListResponse.setBusinessId(key); efficiencyListResponse.setBusinessId(po.getBusinessId());
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查询业务 //根据业务id查询业务
DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(key); DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(po.getBusinessId());
//业务申请日期 //业务申请日期
Date createTime = dgApplyAmountInfo.getCreateTime(); Date createTime = dgApplyAmountInfo.getCreateTime();
//提单人id //提单人id
Integer presenterId = dgApplyAmountInfo.getPresenterId(); Integer presenterId = dgApplyAmountInfo.getPresenterId();
efficiencyListResponse.setDetailId(po.getDetailId()); efficiencyListResponse.setDetailId(po.getDetailId());
efficiencyListResponse.setRoleId(po.getRoleId()); efficiencyListResponse.setRoleId(po.getRoleId());
efficiencyListResponse.setOperatingStatus(operatingStatus); efficiencyListResponse.setOperatingStatus(po.getOperatingStatus());
efficiencyListResponse.setApproveStatus(status); efficiencyListResponse.setApproveStatus(po.getStatus());
efficiencyListResponse.setBusinessStatus(businessStatus); efficiencyListResponse.setBusinessStatus(po.getBusinessStatus());
efficiencyListResponse.setTaskNode(String.valueOf(processId)); efficiencyListResponse.setTaskNode(String.valueOf(po.getProcessId()));
efficiencyListResponse.setClientName(name); efficiencyListResponse.setClientName(po.getName());
efficiencyListResponse.setApplicantId(presenterId); efficiencyListResponse.setApplicantId(presenterId);
efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime)); efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime));
//用户处理过业务,统计耗时 //用户处理过业务,统计耗时
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>(); 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); List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper);
if (auditProcessList != null && auditProcessList.size() != 0) { 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 countTime = hashMapTime.get("countTime");
Object endTime = hashMapTime.get("endTime"); Object endTime = hashMapTime.get("endTime");
efficiencyListResponse.setTimeConsuming(countTime(String.valueOf(countTime))); efficiencyListResponse.setTimeConsuming(countTime(String.valueOf(countTime)));
efficiencyListResponse.setCompleteTime(String.valueOf(endTime)); efficiencyListResponse.setCompleteTime(String.valueOf(endTime));
} }
efficiencyList.add(efficiencyListResponse); 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; return efficiencyList;
} }

@ -185,6 +185,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
wrapperTemp.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID); wrapperTemp.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID);
DgPaymentConfirmationConsider paymentConfirmationTemp = baseMapper.selectOne(wrapperTemp); DgPaymentConfirmationConsider paymentConfirmationTemp = baseMapper.selectOne(wrapperTemp);
paymentConfirmationTemp.setAuditOpinion(""); paymentConfirmationTemp.setAuditOpinion("");
paymentConfirmationTemp.setImgFile(imgFile);
paymentConfirmationTemp.setStatus(StatusCode.SP_IN_REVIEW); paymentConfirmationTemp.setStatus(StatusCode.SP_IN_REVIEW);
paymentConfirmationTemp.setOperatingStatus(StatusCode.CZ_ON_HAND); paymentConfirmationTemp.setOperatingStatus(StatusCode.CZ_ON_HAND);
int updateById = baseMapper.updateById(paymentConfirmationTemp); int updateById = baseMapper.updateById(paymentConfirmationTemp);

Loading…
Cancel
Save