|
|
|
@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; |
|
|
|
|
import com.daqing.financial.guarantee.feign.HrmsFeignService; |
|
|
|
|
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper; |
|
|
|
|
import com.daqing.financial.guarantee.mapper.DgGuaranteeAssignUserMapper; |
|
|
|
@ -14,6 +15,7 @@ import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService; |
|
|
|
|
import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService; |
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService; |
|
|
|
|
import com.daqing.financial.guarantee.util.AuditProcessUtil; |
|
|
|
|
import com.daqing.framework.domain.crms.response.CrmsCode; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider; |
|
|
|
@ -122,7 +124,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
Boolean result2 = (Boolean) responseResult.getData(); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在审核进程表中插入一条指派成功的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, null, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -160,7 +163,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
StatusCode.CZ_ON_HAND, PromptSuccess.FG_JL_ID); |
|
|
|
|
// 在业务流程表中插入一条调查成功的数据
|
|
|
|
|
if (result2) { |
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_C_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -186,7 +190,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
.getBusinessId(), StatusCode.CZ_ON_HAND); |
|
|
|
|
if (result3) { |
|
|
|
|
// 在业务流程表中插入一条驳回成功的数据(记得带上驳回的意见)
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_C_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -211,7 +216,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
// 1.待处理,表示业务进行到法规经理审核
|
|
|
|
|
if (Objects.equals(operationStatus, StatusCode.CZ_ON_HAND)) { |
|
|
|
|
// 查询业务流程表,找出该业务id的最新操作记录的角色id
|
|
|
|
|
Integer roleId = 70; |
|
|
|
|
Integer roleId = 69; |
|
|
|
|
if (roleId.equals(PromptSuccess.DB_A_ID) || roleId.equals(PromptSuccess.DB_B_ID)) { |
|
|
|
|
// 1.1.若为A/B角,表示为驳回数据
|
|
|
|
|
// 同意
|
|
|
|
@ -224,7 +229,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
StatusCode.CZ_ON_HAND, PromptSuccess.FG_C_ID); |
|
|
|
|
if (result1) { |
|
|
|
|
// 在业务流程表中插入一条法规经理同意的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -245,7 +251,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
StatusCode.CZ_ON_HAND, PromptSuccess.FG_C_ID); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在业务流程表中插入一条法规经理驳回的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -267,7 +274,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -290,7 +298,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
Boolean result1 = this.getBaseMapper().assign(complianceInvestigation); |
|
|
|
|
if (result1) { |
|
|
|
|
// 在业务流程表中插入一条法规经理审核成功的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -311,7 +320,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
StatusCode.CZ_ON_HAND, PromptSuccess.FG_C_ID); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在业务流程表中插入一条法规经理驳回的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -333,7 +343,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -347,20 +358,29 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), StatusCode.SP_REVIEWED, |
|
|
|
|
StatusCode.CZ_PROCESSED, Integer.parseInt(userId)); |
|
|
|
|
if (result) { |
|
|
|
|
// 在工作会表中插入一条数据;
|
|
|
|
|
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid); |
|
|
|
|
DgWorkConferenceConsider workConferenceConsider = new DgWorkConferenceConsider(); |
|
|
|
|
workConferenceConsider.setCompanyId(complianceInvestigation.getCompanyId()); |
|
|
|
|
workConferenceConsider.setBusinessId(complianceInvestigation.getBusinessId()); |
|
|
|
|
workConferenceConsider.setRoleId(PromptSuccess.GZU_ID); |
|
|
|
|
workConferenceConsider.setAuditStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
workConferenceConsider.setOperationStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
workConferenceConsider.setCreateTime(new Date()); |
|
|
|
|
workConferenceConsider.setUpdateTime(new Date()); |
|
|
|
|
Boolean result1 = this.getBaseMapper().insertWorkConferenceConsider(workConferenceConsider); |
|
|
|
|
Integer count = this.getBaseMapper().countWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID); |
|
|
|
|
Boolean result1; |
|
|
|
|
if (count > 0) { |
|
|
|
|
// 工作会该条数据存在,表示是工作会驳回的数据
|
|
|
|
|
result1 = this.getBaseMapper().updateWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID, |
|
|
|
|
StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND); |
|
|
|
|
} else { |
|
|
|
|
// 工作会该条数据不存在,表示不是工作会驳回数据,需要新增一条
|
|
|
|
|
DgWorkConferenceConsider workConferenceConsider = new DgWorkConferenceConsider(); |
|
|
|
|
workConferenceConsider.setCompanyId(complianceInvestigation.getCompanyId()); |
|
|
|
|
workConferenceConsider.setBusinessId(complianceInvestigation.getBusinessId()); |
|
|
|
|
workConferenceConsider.setRoleId(PromptSuccess.GZU_ID); |
|
|
|
|
workConferenceConsider.setAuditStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
workConferenceConsider.setOperationStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
workConferenceConsider.setCreateTime(new Date()); |
|
|
|
|
workConferenceConsider.setUpdateTime(new Date()); |
|
|
|
|
result1 = this.getBaseMapper().insertWorkConferenceConsider(workConferenceConsider); |
|
|
|
|
} |
|
|
|
|
if (result1) { |
|
|
|
|
// 在业务流程表中插入一条法规领导审核成功的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_LD_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -381,7 +401,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
StatusCode.CZ_ON_HAND, PromptSuccess.FG_LD_ID); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在业务流程表中插入一条法规领导驳回的数据
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_LD_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -403,7 +424,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED); |
|
|
|
|
if (result2) { |
|
|
|
|
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
|
|
|
|
|
return true; |
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
PromptSuccess.FG_LD_NAME, opinion, PromptSuccess.HG_PROCESS_ID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -430,11 +452,11 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
AssetsDetailResponse assetsDetailResponse = dgAssetsInvestigationService.assetsDetail(dgAssetsInvestigationId); |
|
|
|
|
// 合规附件和意见
|
|
|
|
|
DgComplianceInvestigation dgComplianceInvestigation = this.getBaseMapper().queryDgComplianceInvestigation(iid); |
|
|
|
|
if (dgComplianceInvestigation.getFile() != null) { |
|
|
|
|
if (dgComplianceInvestigation.getFile() != null && dgComplianceInvestigation.getFile().length() != 0) { |
|
|
|
|
String[] fileUrls = dgComplianceInvestigation.getFile().split(","); |
|
|
|
|
dgComplianceInvestigationInfoResponse.setFileUrls(fileUrls); |
|
|
|
|
} |
|
|
|
|
if (dgComplianceInvestigation.getOpinion() != null) { |
|
|
|
|
if (dgComplianceInvestigation.getOpinion() != null && dgComplianceInvestigation.getOpinion().length() != 0) { |
|
|
|
|
dgComplianceInvestigationInfoResponse.setOpinion(dgComplianceInvestigation.getOpinion()); |
|
|
|
|
} |
|
|
|
|
// 统一返回
|
|
|
|
@ -472,14 +494,13 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
@Override |
|
|
|
|
public String getFileUrl(String[] fileUrls) { |
|
|
|
|
StringBuilder fileUrl = new StringBuilder(); |
|
|
|
|
if (null == fileUrls || fileUrls.length == 0) { |
|
|
|
|
return fileUrl.toString(); |
|
|
|
|
} |
|
|
|
|
for (int i = 0; i < fileUrls.length; i++) { |
|
|
|
|
if (i == fileUrls.length - 1) { |
|
|
|
|
fileUrl.append(fileUrls[i]); |
|
|
|
|
} else { |
|
|
|
|
fileUrl.append(fileUrls[i]).append(","); |
|
|
|
|
if (null != fileUrls && fileUrls.length != 0) { |
|
|
|
|
for (int i = 0; i < fileUrls.length; i++) { |
|
|
|
|
if (i == fileUrls.length - 1) { |
|
|
|
|
fileUrl.append(fileUrls[i]); |
|
|
|
|
} else { |
|
|
|
|
fileUrl.append(fileUrls[i]).append(","); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return fileUrl.toString(); |
|
|
|
|