修复多次驳回问题

master
river 4 years ago
parent f928d1855b
commit e6f13ca034
  1. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanCommitteeConsiderMapper.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java
  4. 28
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  5. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java
  6. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  7. 2
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  8. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  9. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml
  10. 8
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  11. 4
      dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java

@ -71,6 +71,8 @@ public interface DgComplianceInvestigationMapper extends BaseMapper<DgCompliance
Integer countWorkConferenceConsider(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId); Integer countWorkConferenceConsider(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId);
Integer countComplianceInvestigation(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId);
Boolean updateWorkConferenceConsider(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId, Boolean updateWorkConferenceConsider(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId,
@Param("auditStatus") Integer auditStatus, @Param("operationStatus") Integer operationStatus); @Param("auditStatus") Integer auditStatus, @Param("operationStatus") Integer operationStatus);

@ -55,4 +55,6 @@ public interface DgLoanCommitteeConsiderMapper extends BaseMapper<DgLoanCommitte
Integer getAuditStatus(Integer id); Integer getAuditStatus(Integer id);
Boolean updateLoanCommitteeConsiderUserIdById(@Param("id") Integer id, @Param("userId") Integer userId); Boolean updateLoanCommitteeConsiderUserIdById(@Param("id") Integer id, @Param("userId") Integer userId);
Integer countGuaranteeLetterAssignUser(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId);
} }

@ -39,6 +39,9 @@ public class GuaranteeDetailResponse implements Serializable {
@ApiModelProperty(value = "附件详细") @ApiModelProperty(value = "附件详细")
private DgEnclosureInfoResponse dgEnclosureInfo; private DgEnclosureInfoResponse dgEnclosureInfo;
/**
* 担保详情
*/
@ApiModelProperty(value = "担保详细") @ApiModelProperty(value = "担保详细")
private DgGuaranteeAssignUser assignUser; private DgGuaranteeAssignUser assignUser;

@ -4,13 +4,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.feign.HrmsFeignService; import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgAssetsInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper; import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgGuaranteeAssignUserMapper; import com.daqing.financial.guarantee.mapper.DgGuaranteeAssignUserMapper;
import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest; import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.AssetsDetailResponse; import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationInfoResponse;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService; import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService; import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -66,6 +64,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
@Autowired @Autowired
private IDgAssetsInvestigationService dgAssetsInvestigationService; private IDgAssetsInvestigationService dgAssetsInvestigationService;
@Autowired
private DgAssetsInvestigationMapper dgAssetsInvestigationMapper;
/** /**
* 列表 * 列表
*/ */
@ -228,7 +229,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (Objects.equals(operationStatus, StatusCode.CZ_ON_HAND)) { if (Objects.equals(operationStatus, StatusCode.CZ_ON_HAND)) {
// 查询业务流程表,找出该业务id的最新操作记录的角色名称 // 查询业务流程表,找出该业务id的最新操作记录的角色名称
String roleName = this.getBaseMapper().getAuditProcessLatestNameByBusinessId(this.getComplianceInvestigation(iid).getBusinessId()); String roleName = this.getBaseMapper().getAuditProcessLatestNameByBusinessId(this.getComplianceInvestigation(iid).getBusinessId());
if (PromptSuccess.DB_AB_NAME.equals(roleName)) { if (PromptSuccess.DB_A_NAME.equals(roleName) || PromptSuccess.DB_B_NAME.equals(roleName)) {
// 1.1.若最新操作人为A/B角,表示为驳回给AB角之后直接返回的数据 // 1.1.若最新操作人为A/B角,表示为驳回给AB角之后直接返回的数据
// 同意 // 同意
if (status == 1) { if (status == 1) {
@ -295,13 +296,14 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
// 1.2.若最新操作人为C角或法规部领导,表示C角调查通过后发送过来的数据或者法规部领导驳回的数据 // 1.2.若最新操作人为C角或法规部领导,表示C角调查通过后发送过来的数据或者法规部领导驳回的数据
// 同意 // 同意
if (status == 1) { if (status == 1) {
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(), // 此条业务id下的法规领导数据是否存在
PromptSuccess.FG_JL_ID); Integer count = this.getBaseMapper().countComplianceInvestigation(this.getComplianceInvestigation(iid).getBusinessId(),
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), PromptSuccess.FG_LD_ID);
StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId)); Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), StatusCode.SP_IN_REVIEW,
StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
if (result) { if (result) {
Boolean result1; Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) { if (count > 0) {
// 表示为法规部领导驳回的数据,先更新审批状态为审核中 // 表示为法规部领导驳回的数据,先更新审批状态为审核中
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(), Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_IN_REVIEW); StatusCode.SP_IN_REVIEW);
@ -494,6 +496,12 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (dgAssetsInvestigationId != null) { if (dgAssetsInvestigationId != null) {
// 资产详情 // 资产详情
AssetsDetailResponse assetsDetailResponse = dgAssetsInvestigationService.assetsDetail(dgAssetsInvestigationId); AssetsDetailResponse assetsDetailResponse = dgAssetsInvestigationService.assetsDetail(dgAssetsInvestigationId);
// 资产领导审核时填写的审核金额与期限
DgAssetsInvestigationResponse dgAssetsInvestigationResponse = dgAssetsInvestigationMapper.selectInfoById(dgAssetsInvestigationId);
if (dgAssetsInvestigationResponse != null) {
assetsDetailResponse.getAssetsResponse().setAmount(dgAssetsInvestigationResponse.getAmount());
assetsDetailResponse.getAssetsResponse().setTerm(dgAssetsInvestigationResponse.getTerm());
}
dgComplianceInvestigationInfoResponse.setAssetsResponse(assetsDetailResponse.getAssetsResponse()); dgComplianceInvestigationInfoResponse.setAssetsResponse(assetsDetailResponse.getAssetsResponse());
} }
// 合规调查附件和意见 // 合规调查附件和意见

@ -108,8 +108,6 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
|| dgLoanCommitteeConsiderRequest.getFileUrls().length == 0) { || dgLoanCommitteeConsiderRequest.getFileUrls().length == 0) {
ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL); ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL);
} }
// 获取贷审会当前的审核状态
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId());
// 将文件数组拼接为文件字符串形式 // 将文件数组拼接为文件字符串形式
String fileUrl = dgComplianceInvestigationService.getFileUrl(dgLoanCommitteeConsiderRequest.getFileUrls()); String fileUrl = dgComplianceInvestigationService.getFileUrl(dgLoanCommitteeConsiderRequest.getFileUrls());
DgLoanCommitteeConsiderConsent consent = new DgLoanCommitteeConsiderConsent(); DgLoanCommitteeConsiderConsent consent = new DgLoanCommitteeConsiderConsent();
@ -119,6 +117,10 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons())); consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons()));
consent.setFileUrl(fileUrl); consent.setFileUrl(fileUrl);
Boolean result = this.getBaseMapper().check(consent, Integer.parseInt(userId), StatusCode.SP_REVIEWED, StatusCode.CZ_PROCESSED, new Date()); Boolean result = this.getBaseMapper().check(consent, Integer.parseInt(userId), StatusCode.SP_REVIEWED, StatusCode.CZ_PROCESSED, new Date());
// 判断该业务id下担保函数据是否存在
Integer count = this.getBaseMapper().countGuaranteeLetterAssignUser(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
PromptSuccess.FG_JL_ID);
if (result) { if (result) {
// 更新贷审会的审核状态为已审核 // 更新贷审会的审核状态为已审核
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId( Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(
@ -126,7 +128,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
StatusCode.SP_REVIEWED); StatusCode.SP_REVIEWED);
if (result2) { if (result2) {
Boolean result1; Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) { if (count > 0) {
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,改变担保函的法规部经理的操作状态为待处理,审核状态为审核中 // 当前贷审会的操作状态为驳回,表示为担保函驳回数据,改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser( result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
@ -138,7 +140,6 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
.getBusinessId()); .getBusinessId());
guaranteeLetterAssignUser.setCompanyId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()) guaranteeLetterAssignUser.setCompanyId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId())
.getCompanyId()); .getCompanyId());
System.out.println(guaranteeLetterAssignUser);
result1 = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser); result1 = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser);
} }
if (result1) { if (result1) {

@ -92,7 +92,8 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
} }
IPage<DgWorkConferencePO> list = this.getBaseMapper().list(new Page(page, size), codeOrName, roleList, Integer.parseInt(userId)); IPage<DgWorkConferencePO> list = this.getBaseMapper().list(new Page(page, size), codeOrName, roleList, Integer.parseInt(userId));
List<DgWorkConferencePO> dgWorkConferencePOS = list.getRecords(); List<DgWorkConferencePO> dgWorkConferencePOS = list.getRecords();
System.out.println(dgWorkConferencePOS); List<DgWorkConferenceResponse> listResponse = new ArrayList<>();
if (dgWorkConferencePOS != null && dgWorkConferencePOS.size() != 0) {
Integer[] userIds = new Integer[dgWorkConferencePOS.size() * 5]; Integer[] userIds = new Integer[dgWorkConferencePOS.size() * 5];
// 获取所有的userId // 获取所有的userId
for (int i = 0; i < userIds.length; i += 5) { for (int i = 0; i < userIds.length; i += 5) {
@ -106,7 +107,6 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
} }
// 根据userId获取对应的员工姓名 // 根据userId获取对应的员工姓名
ResponseResult<List<EmployeeVO>> responseResult = hrmsFeignService.listEmpNameByUserId(userIds); ResponseResult<List<EmployeeVO>> responseResult = hrmsFeignService.listEmpNameByUserId(userIds);
List<DgWorkConferenceResponse> listResponse = new ArrayList<>();
if (responseResult.getData() != null) { if (responseResult.getData() != null) {
// 将对应的userId转换为name // 将对应的userId转换为name
listResponse = this.transitionUserName(dgWorkConferencePOS, responseResult.getData()); listResponse = this.transitionUserName(dgWorkConferencePOS, responseResult.getData());
@ -117,6 +117,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
listResponse.add(workConference); listResponse.add(workConference);
} }
} }
}
// 分页属性复制并返回 // 分页属性复制并返回
IPage<DgWorkConferenceResponse> iPage = new Page<>(); IPage<DgWorkConferenceResponse> iPage = new Page<>();
BeanUtils.copyProperties(list, iPage); BeanUtils.copyProperties(list, iPage);

@ -39,7 +39,7 @@ spring.servlet.multipart.max-request-size=10MB
# 单个文件的最大值 # 单个文件的最大值
spring.servlet.multipart.max-file-size=10MB spring.servlet.multipart.max-file-size=10MB
# 正式环境(prod) #正式环境(prod)
#服务名称 #服务名称
#spring.application.name=dq-financial-guarantee #spring.application.name=dq-financial-guarantee
##配置中心地址 ##配置中心地址

@ -23,8 +23,10 @@
FROM dg_compliance_investigation AS i FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = i.business_id ON a.id = i.business_id
LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON a.company_id = c.id ON c.id = cc.customer_id
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE c.del_or_not = 0
@ -50,8 +52,10 @@
FROM dg_compliance_investigation AS i FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = i.business_id ON a.id = i.business_id
LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON a.company_id = c.id ON c.id = cc.customer_id
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE c.del_or_not = 0
@ -163,6 +167,11 @@
SELECT COUNT(id) FROM dg_work_conference_consider WHERE business_id = #{businessId} AND role_id = #{roleId} SELECT COUNT(id) FROM dg_work_conference_consider WHERE business_id = #{businessId} AND role_id = #{roleId}
</select> </select>
<!-- 根据业务id和角色id判断合规调查该条数据是否存在 -->
<select id="countComplianceInvestigation" resultType="integer">
SELECT COUNT(id) FROM dg_compliance_investigation WHERE business_id = #{businessId} AND role_id = #{roleId}
</select>
<!-- 更新工作会的审核状态和操作状态 --> <!-- 更新工作会的审核状态和操作状态 -->
<update id="updateWorkConferenceConsider"> <update id="updateWorkConferenceConsider">
UPDATE dg_work_conference_consider SET audit_status = #{auditStatus},operation_status = #{operationStatus} UPDATE dg_work_conference_consider SET audit_status = #{auditStatus},operation_status = #{operationStatus}

@ -26,8 +26,10 @@
FROM dg_loan_committee_consider AS l FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = l.business_id ON a.id = l.business_id
LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON a.company_id = c.id ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE c.del_or_not = 0
@ -49,8 +51,10 @@
FROM dg_loan_committee_consider AS l FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = l.business_id ON a.id = l.business_id
LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON a.company_id = c.id ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE c.del_or_not = 0
@ -142,4 +146,9 @@
UPDATE dg_loan_committee_consider SET consider_id = #{userId} WHERE id = #{id} UPDATE dg_loan_committee_consider SET consider_id = #{userId} WHERE id = #{id}
</update> </update>
<!-- 根据业务id和角色id判断该条数据是否存在 -->
<select id="countGuaranteeLetterAssignUser" resultType="integer">
SELECT COUNT(id) FROM dg_guarantee_letter_assign_user WHERE business_id = #{businessId} AND role_id = #{roleId}
</select>
</mapper> </mapper>

@ -22,8 +22,10 @@
FROM dg_work_conference_consider AS w FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = w.business_id ON a.id = w.business_id
LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON a.company_id = c.id ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A, LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A,
@ -59,8 +61,10 @@
FROM dg_work_conference_consider AS w FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = w.business_id ON a.id = w.business_id
LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON a.company_id = c.id ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A, LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A,

@ -92,5 +92,7 @@ public class PromptSuccess {
public static final String DSH_NAME = "贷审会"; // 贷审会 public static final String DSH_NAME = "贷审会"; // 贷审会
public static final String DB_AB_NAME = "担保部A/B角"; // 担保部A/B角 public static final String DB_A_NAME = "担保部A角"; // 担保部A角
public static final String DB_B_NAME = "担保部B角"; // 担保部B角
} }

Loading…
Cancel
Save