|
|
|
@ -234,287 +234,267 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
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的三种状态
|
|
|
|
|
HashMap<Integer, Object> hashMap = Maps.newHashMap(); |
|
|
|
|
//角色不为空
|
|
|
|
|
//担保业务员角色、担保经理角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) { |
|
|
|
|
//业务申请列表查询
|
|
|
|
|
IPage<BusinessApplicationListResponse> positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId()); |
|
|
|
|
List<BusinessApplicationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0){ |
|
|
|
|
records.forEach(businessApplicationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = businessApplicationListResponse.getBusinessId(); |
|
|
|
|
String name = businessApplicationListResponse.getName(); |
|
|
|
|
Integer status = businessApplicationListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = businessApplicationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = businessApplicationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(1); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//获取每个业务id的三种状态
|
|
|
|
|
HashMap<Integer, Object> hashMap = Maps.newHashMap(); |
|
|
|
|
//角色不为空
|
|
|
|
|
//担保业务员角色、担保经理角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) { |
|
|
|
|
//业务申请列表查询
|
|
|
|
|
IPage<BusinessApplicationListResponse> positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId()); |
|
|
|
|
List<BusinessApplicationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0){ |
|
|
|
|
records.forEach(businessApplicationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = businessApplicationListResponse.getBusinessId(); |
|
|
|
|
String name = businessApplicationListResponse.getName(); |
|
|
|
|
Integer status = businessApplicationListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = businessApplicationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = businessApplicationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(1); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//担保经理角色、担保A角角色、担保B角角色、担保领导角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_LD_ID))) { |
|
|
|
|
// 担保部调查列表
|
|
|
|
|
IPage<GuaranteeListResponse> positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<GuaranteeListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(guaranteeListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = guaranteeListResponse.getBusinessId(); |
|
|
|
|
Integer status = guaranteeListResponse.getStatus(); |
|
|
|
|
String name = guaranteeListResponse.getName(); |
|
|
|
|
Integer operatingStatus = guaranteeListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = guaranteeListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(2); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//担保经理角色、担保A角角色、担保B角角色、担保领导角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_LD_ID))) { |
|
|
|
|
// 担保部调查列表
|
|
|
|
|
IPage<GuaranteeListResponse> positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<GuaranteeListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(guaranteeListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = guaranteeListResponse.getBusinessId(); |
|
|
|
|
Integer status = guaranteeListResponse.getStatus(); |
|
|
|
|
String name = guaranteeListResponse.getName(); |
|
|
|
|
Integer operatingStatus = guaranteeListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = guaranteeListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(2); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//资产经理角色、资产专员角色、资产领导角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_LD_ID))) { |
|
|
|
|
// 资产部调查列表
|
|
|
|
|
IPage<AssetsInvestigationListResponse> positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<AssetsInvestigationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(assetsInvestigationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = assetsInvestigationListResponse.getBusinessId(); |
|
|
|
|
Integer status = assetsInvestigationListResponse.getStatus(); |
|
|
|
|
String name = assetsInvestigationListResponse.getName(); |
|
|
|
|
Integer operatingStatus = assetsInvestigationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = assetsInvestigationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(3); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//资产经理角色、资产专员角色、资产领导角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_LD_ID))) { |
|
|
|
|
// 资产部调查列表
|
|
|
|
|
IPage<AssetsInvestigationListResponse> positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<AssetsInvestigationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(assetsInvestigationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = assetsInvestigationListResponse.getBusinessId(); |
|
|
|
|
Integer status = assetsInvestigationListResponse.getStatus(); |
|
|
|
|
String name = assetsInvestigationListResponse.getName(); |
|
|
|
|
Integer operatingStatus = assetsInvestigationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = assetsInvestigationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(3); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//信息经理角色、信息专员角色、信息领导角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.XX_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_LD_ID))) { |
|
|
|
|
// 信息部调查列表
|
|
|
|
|
IPage<MessageInvestigationListResponse> positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<MessageInvestigationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(messageInvestigationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = messageInvestigationListResponse.getBusinessId(); |
|
|
|
|
Integer status = messageInvestigationListResponse.getStatus(); |
|
|
|
|
String name = messageInvestigationListResponse.getName(); |
|
|
|
|
Integer operatingStatus = messageInvestigationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = messageInvestigationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(4); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//信息经理角色、信息专员角色、信息领导角色
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.XX_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_LD_ID))) { |
|
|
|
|
// 信息部调查列表
|
|
|
|
|
IPage<MessageInvestigationListResponse> positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<MessageInvestigationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(messageInvestigationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = messageInvestigationListResponse.getBusinessId(); |
|
|
|
|
Integer status = messageInvestigationListResponse.getStatus(); |
|
|
|
|
String name = messageInvestigationListResponse.getName(); |
|
|
|
|
Integer operatingStatus = messageInvestigationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = messageInvestigationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(4); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//担保部A/B角、法规经理角色、法规部C角、法规部分管领导
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_C_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_LD_ID))) { |
|
|
|
|
// 合规调查列表
|
|
|
|
|
DgComplianceInvestigationRequest dgComplianceInvestigationRequest = new DgComplianceInvestigationRequest(); |
|
|
|
|
IPage<DgComplianceInvestigationResponse> list = complianceInvestigationMapper.list(new Page(1, size), dgComplianceInvestigationRequest, roleList, currentUser); |
|
|
|
|
List<DgComplianceInvestigationResponse> records = list.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(dgComplianceInvestigationResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgComplianceInvestigationResponse.getBusinessId(); |
|
|
|
|
String name = dgComplianceInvestigationResponse.getName(); |
|
|
|
|
Integer status = dgComplianceInvestigationResponse.getAuditStatus(); |
|
|
|
|
Integer operatingStatus = dgComplianceInvestigationResponse.getOperationStatus(); |
|
|
|
|
Integer businessStatus = dgComplianceInvestigationResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(5); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//担保部A/B角、法规经理角色、法规部C角、法规部分管领导
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_C_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_LD_ID))) { |
|
|
|
|
// 合规调查列表
|
|
|
|
|
DgComplianceInvestigationRequest dgComplianceInvestigationRequest = new DgComplianceInvestigationRequest(); |
|
|
|
|
IPage<DgComplianceInvestigationResponse> list = complianceInvestigationMapper.list(new Page(1, size), dgComplianceInvestigationRequest, roleList, currentUser); |
|
|
|
|
List<DgComplianceInvestigationResponse> records = list.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(dgComplianceInvestigationResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgComplianceInvestigationResponse.getBusinessId(); |
|
|
|
|
String name = dgComplianceInvestigationResponse.getName(); |
|
|
|
|
Integer status = dgComplianceInvestigationResponse.getAuditStatus(); |
|
|
|
|
Integer operatingStatus = dgComplianceInvestigationResponse.getOperationStatus(); |
|
|
|
|
Integer businessStatus = dgComplianceInvestigationResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(5); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//工作会
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.GZU_ID))) { |
|
|
|
|
IPage<DgWorkConferencePO> list = workConferenceConsiderMapper.list(new Page(1, size), "", roleList, currentUser); |
|
|
|
|
List<DgWorkConferencePO> records = list.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(dgWorkConferencePO -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgWorkConferencePO.getBusinessId(); |
|
|
|
|
String name = dgWorkConferencePO.getName(); |
|
|
|
|
Integer status = dgWorkConferencePO.getAuditStatus(); |
|
|
|
|
Integer operatingStatus = dgWorkConferencePO.getOperationStatus(); |
|
|
|
|
Integer businessStatus = dgWorkConferencePO.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(6); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//工作会
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.GZU_ID))) { |
|
|
|
|
IPage<DgWorkConferencePO> list = workConferenceConsiderMapper.list(new Page(1, size), "", roleList, currentUser); |
|
|
|
|
List<DgWorkConferencePO> records = list.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(dgWorkConferencePO -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgWorkConferencePO.getBusinessId(); |
|
|
|
|
String name = dgWorkConferencePO.getName(); |
|
|
|
|
Integer status = dgWorkConferencePO.getAuditStatus(); |
|
|
|
|
Integer operatingStatus = dgWorkConferencePO.getOperationStatus(); |
|
|
|
|
Integer businessStatus = dgWorkConferencePO.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(6); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//担保部A/B角、贷审会
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DSH_ID))) { |
|
|
|
|
IPage<DgLoanCommitteeConsiderResponse> list = loanCommitteeConsiderMapper.list(new Page(1, size), "", roleList, currentUser); |
|
|
|
|
List<DgLoanCommitteeConsiderResponse> records = list.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(dgLoanCommitteeConsiderResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgLoanCommitteeConsiderResponse.getBusinessId(); |
|
|
|
|
Integer status = dgLoanCommitteeConsiderResponse.getStatus(); |
|
|
|
|
String name = dgLoanCommitteeConsiderResponse.getName(); |
|
|
|
|
Integer operatingStatus = dgLoanCommitteeConsiderResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = dgLoanCommitteeConsiderResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(7); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//担保部A/B角、贷审会
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DSH_ID))) { |
|
|
|
|
IPage<DgLoanCommitteeConsiderResponse> list = loanCommitteeConsiderMapper.list(new Page(1, size), "", roleList, currentUser); |
|
|
|
|
List<DgLoanCommitteeConsiderResponse> records = list.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(dgLoanCommitteeConsiderResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgLoanCommitteeConsiderResponse.getBusinessId(); |
|
|
|
|
Integer status = dgLoanCommitteeConsiderResponse.getStatus(); |
|
|
|
|
String name = dgLoanCommitteeConsiderResponse.getName(); |
|
|
|
|
Integer operatingStatus = dgLoanCommitteeConsiderResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = dgLoanCommitteeConsiderResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(7); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//法规经理、担保部A/B角、资产部经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) ) { |
|
|
|
|
//担保函
|
|
|
|
|
IPage<GuaranteeLetterListResponse> iPage = guaranteeLetterAssignUserMapper.pageByCondition(new Page(1, size), currentUser, roleIdList, null, null); |
|
|
|
|
List<GuaranteeLetterListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(guaranteeLetterListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = guaranteeLetterListResponse.getName(); |
|
|
|
|
Integer businessId = guaranteeLetterListResponse.getBusinessId(); |
|
|
|
|
Integer status = guaranteeLetterListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = guaranteeLetterListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = guaranteeLetterListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(8); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//法规经理、担保部A/B角、资产部经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) ) { |
|
|
|
|
//担保函
|
|
|
|
|
IPage<GuaranteeLetterListResponse> iPage = guaranteeLetterAssignUserMapper.pageByCondition(new Page(1, size), currentUser, roleIdList, null, null); |
|
|
|
|
List<GuaranteeLetterListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(guaranteeLetterListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = guaranteeLetterListResponse.getName(); |
|
|
|
|
Integer businessId = guaranteeLetterListResponse.getBusinessId(); |
|
|
|
|
Integer status = guaranteeLetterListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = guaranteeLetterListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = guaranteeLetterListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(8); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//财务部、法规经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.CWB_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { |
|
|
|
|
//回款确认
|
|
|
|
|
IPage<PaymentConfirmationListResponse> iPage = paymentConfirmationConsiderMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); |
|
|
|
|
List<PaymentConfirmationListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(paymentConfirmationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = paymentConfirmationListResponse.getName(); |
|
|
|
|
Integer businessId = paymentConfirmationListResponse.getBusinessId(); |
|
|
|
|
Integer status = paymentConfirmationListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = paymentConfirmationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = paymentConfirmationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(9); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//财务部、法规经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.CWB_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { |
|
|
|
|
//回款确认
|
|
|
|
|
IPage<PaymentConfirmationListResponse> iPage = paymentConfirmationConsiderMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); |
|
|
|
|
List<PaymentConfirmationListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(paymentConfirmationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = paymentConfirmationListResponse.getName(); |
|
|
|
|
Integer businessId = paymentConfirmationListResponse.getBusinessId(); |
|
|
|
|
Integer status = paymentConfirmationListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = paymentConfirmationListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = paymentConfirmationListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(9); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//法规经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { |
|
|
|
|
//放款通知
|
|
|
|
|
IPage<LoanNoticeListResponse> iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); |
|
|
|
|
List<LoanNoticeListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(loanNoticeListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = loanNoticeListResponse.getName(); |
|
|
|
|
Integer businessId = loanNoticeListResponse.getBusinessId(); |
|
|
|
|
Integer status = loanNoticeListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = loanNoticeListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = loanNoticeListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(10); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//法规经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { |
|
|
|
|
//放款通知
|
|
|
|
|
IPage<LoanNoticeListResponse> iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); |
|
|
|
|
List<LoanNoticeListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
records.forEach(loanNoticeListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = loanNoticeListResponse.getName(); |
|
|
|
|
Integer businessId = loanNoticeListResponse.getBusinessId(); |
|
|
|
|
Integer status = loanNoticeListResponse.getStatus(); |
|
|
|
|
Integer operatingStatus = loanNoticeListResponse.getOperatingStatus(); |
|
|
|
|
Integer businessStatus = loanNoticeListResponse.getBusinessStatus(); |
|
|
|
|
statusPO.setBusinessStatus(businessStatus); |
|
|
|
|
statusPO.setOperatingStatus(operatingStatus); |
|
|
|
|
statusPO.setProcessId(10); |
|
|
|
|
statusPO.setName(name); |
|
|
|
|
statusPO.setStatus(status); |
|
|
|
|
hashMap.put(businessId, statusPO); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//再次循环,拼接数据
|
|
|
|
|
efficiencyList.forEach(personalEfficiencyListResponse -> { |
|
|
|
|
Integer businessId = personalEfficiencyListResponse.getBusinessId(); |
|
|
|
|
Object o = hashMap.get(businessId); |
|
|
|
|
//有数据
|
|
|
|
|
if (ObjectUtil.isNotNull(o)){ |
|
|
|
|
//强制转换
|
|
|
|
|
if (o instanceof StatusPO){ |
|
|
|
|
StatusPO statusPO = (StatusPO)o; |
|
|
|
|
String name = statusPO.getName(); |
|
|
|
|
Integer operatingStatus = statusPO.getOperatingStatus(); |
|
|
|
|
Integer processId = statusPO.getProcessId(); |
|
|
|
|
Integer status = statusPO.getStatus(); |
|
|
|
|
Integer businessStatus = statusPO.getBusinessStatus(); |
|
|
|
|
personalEfficiencyListResponse.setTaskNode(String.valueOf(processId)); |
|
|
|
|
personalEfficiencyListResponse.setBusinessStatus(businessStatus); |
|
|
|
|
personalEfficiencyListResponse.setOperatingStatus(operatingStatus); |
|
|
|
|
personalEfficiencyListResponse.setApproveStatus(status); |
|
|
|
|
personalEfficiencyListResponse.setClientName(name); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
String timeConsuming = personalEfficiencyListResponse.getTimeConsuming(); |
|
|
|
|
String totalTimeConsuming = countTime(timeConsuming); |
|
|
|
|
personalEfficiencyListResponse.setTimeConsuming(totalTimeConsuming); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//遍历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 companyId = dgApplyAmountInfo.getCompanyId(); |
|
|
|
|
//提单人id
|
|
|
|
|
Integer presenterId = dgApplyAmountInfo.getPresenterId(); |
|
|
|
|
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)); |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|