|
|
|
@ -14,8 +14,10 @@ import com.daqing.financial.guarantee.service.IDgEfficiencyService; |
|
|
|
|
import com.daqing.financial.guarantee.util.DateUtils; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgAuditProcess; |
|
|
|
|
import com.daqing.framework.domain.guarantee.GuaranteeCode; |
|
|
|
|
import com.daqing.framework.domain.guarantee.po.DgWorkConferencePO; |
|
|
|
|
import com.daqing.framework.domain.guarantee.po.StatusPO; |
|
|
|
|
import com.daqing.framework.exception.ExceptionCast; |
|
|
|
|
import com.daqing.framework.model.response.PromptSuccess; |
|
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
|
|
import com.google.common.collect.Maps; |
|
|
|
@ -24,6 +26,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO; |
|
|
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
@ -118,6 +121,17 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
dgEfficiencyTeamRequest.setEndTime(null); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 处理结束时间为当前日期最后一秒
|
|
|
|
|
if (dgEfficiencyTeamRequest.getEndTime() != null && dgEfficiencyTeamRequest.getEndTime().length() != 0) { |
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
Date dateTime = null; |
|
|
|
|
try { |
|
|
|
|
dateTime = dateFormat.parse(dgEfficiencyTeamRequest.getEndTime()); |
|
|
|
|
} catch (ParseException e) { |
|
|
|
|
ExceptionCast.cast(GuaranteeCode.EFFICIENCY_TIME_ERROR); |
|
|
|
|
} |
|
|
|
|
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dateTime))); |
|
|
|
|
} |
|
|
|
|
// 查询出所有的数据
|
|
|
|
|
List<DgTeamEfficiencyPO> teamEfficiencyList = this.getBaseMapper().queryList(dgEfficiencyTeamRequest); |
|
|
|
|
List<List<DgTeamEfficiencyPO>> list = new ArrayList<>(); |
|
|
|
@ -276,7 +290,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
//业务申请列表查询
|
|
|
|
|
IPage<BusinessApplicationListResponse> positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId()); |
|
|
|
|
List<BusinessApplicationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0){ |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(businessApplicationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = businessApplicationListResponse.getBusinessId(); |
|
|
|
@ -298,7 +312,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
// 担保部调查列表
|
|
|
|
|
IPage<GuaranteeListResponse> positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<GuaranteeListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(guaranteeListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = guaranteeListResponse.getBusinessId(); |
|
|
|
@ -320,7 +334,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
// 资产部调查列表
|
|
|
|
|
IPage<AssetsInvestigationListResponse> positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<AssetsInvestigationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(assetsInvestigationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = assetsInvestigationListResponse.getBusinessId(); |
|
|
|
@ -342,7 +356,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
// 信息部调查列表
|
|
|
|
|
IPage<MessageInvestigationListResponse> positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); |
|
|
|
|
List<MessageInvestigationListResponse> records = positionVO.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(messageInvestigationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = messageInvestigationListResponse.getBusinessId(); |
|
|
|
@ -360,12 +374,12 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//担保部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))) { |
|
|
|
|
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) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(dgComplianceInvestigationResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgComplianceInvestigationResponse.getBusinessId(); |
|
|
|
@ -386,7 +400,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
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) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(dgWorkConferencePO -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgWorkConferencePO.getBusinessId(); |
|
|
|
@ -404,10 +418,10 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//担保部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))) { |
|
|
|
|
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) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(dgLoanCommitteeConsiderResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
Integer businessId = dgLoanCommitteeConsiderResponse.getBusinessId(); |
|
|
|
@ -425,11 +439,11 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//法规经理、担保部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)) ) { |
|
|
|
|
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) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(guaranteeLetterListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = guaranteeLetterListResponse.getName(); |
|
|
|
@ -447,11 +461,11 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//财务部、法规经理
|
|
|
|
|
if (roleIdList.contains(String.valueOf(PromptSuccess.CWB_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { |
|
|
|
|
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) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(paymentConfirmationListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = paymentConfirmationListResponse.getName(); |
|
|
|
@ -473,7 +487,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
//放款通知
|
|
|
|
|
IPage<LoanNoticeListResponse> iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); |
|
|
|
|
List<LoanNoticeListResponse> records = iPage.getRecords(); |
|
|
|
|
if (records!=null && records.size()!=0) { |
|
|
|
|
if (records != null && records.size() != 0) { |
|
|
|
|
records.forEach(loanNoticeListResponse -> { |
|
|
|
|
StatusPO statusPO = new StatusPO(); |
|
|
|
|
String name = loanNoticeListResponse.getName(); |
|
|
|
@ -495,10 +509,10 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
Integer businessId = personalEfficiencyListResponse.getBusinessId(); |
|
|
|
|
Object o = hashMap.get(businessId); |
|
|
|
|
//有数据
|
|
|
|
|
if (ObjectUtil.isNotNull(o)){ |
|
|
|
|
if (ObjectUtil.isNotNull(o)) { |
|
|
|
|
//强制转换
|
|
|
|
|
if (o instanceof StatusPO){ |
|
|
|
|
StatusPO statusPO = (StatusPO)o; |
|
|
|
|
if (o instanceof StatusPO) { |
|
|
|
|
StatusPO statusPO = (StatusPO) o; |
|
|
|
|
String name = statusPO.getName(); |
|
|
|
|
Integer operatingStatus = statusPO.getOperatingStatus(); |
|
|
|
|
Integer processId = statusPO.getProcessId(); |
|
|
|
@ -527,7 +541,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
wrapper.eq("business_id", businessId).orderByAsc("create_time"); |
|
|
|
|
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper); |
|
|
|
|
long countTime = 0L; |
|
|
|
|
if (auditProcessList.size()>1){ |
|
|
|
|
if (auditProcessList.size() > 1) { |
|
|
|
|
//遍历业务流程数据,统计该用户的耗时
|
|
|
|
|
for (int i = 1; i <= auditProcessList.size() - 1; i++) { |
|
|
|
|
//从第二条数据开始,获取该数据
|
|
|
|
@ -557,11 +571,11 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA |
|
|
|
|
|
|
|
|
|
public static String countTime(String totalTime) { |
|
|
|
|
long time = Long.parseLong(totalTime); |
|
|
|
|
long days = time/ (1000 * 60 * 60 * 24); |
|
|
|
|
long hours = (time% (1000 * 60 * 60 * 24)) / (1000 * 60 * 60); |
|
|
|
|
long minutes = (time% (1000 * 60 * 60)) / (1000 * 60); |
|
|
|
|
long seconds = (time% (1000 * 60)) / 1000; |
|
|
|
|
return days + "天" + hours + "小时"+ minutes +"分钟"; |
|
|
|
|
long days = time / (1000 * 60 * 60 * 24); |
|
|
|
|
long hours = (time % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60); |
|
|
|
|
long minutes = (time % (1000 * 60 * 60)) / (1000 * 60); |
|
|
|
|
long seconds = (time % (1000 * 60)) / 1000; |
|
|
|
|
return days + "天" + hours + "小时" + minutes + "分钟"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|