修复多次驳回问题

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. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  8. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml
  9. 8
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  10. 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 countComplianceInvestigation(@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);

@ -55,4 +55,6 @@ public interface DgLoanCommitteeConsiderMapper extends BaseMapper<DgLoanCommitte
Integer getAuditStatus(Integer id);
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 = "附件详细")
private DgEnclosureInfoResponse dgEnclosureInfo;
/**
* 担保详情
*/
@ApiModelProperty(value = "担保详细")
private DgGuaranteeAssignUser assignUser;

@ -4,13 +4,11 @@ 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.DgAssetsInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgGuaranteeAssignUserMapper;
import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.AssetsDetailResponse;
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.model.response.*;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -66,6 +64,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
@Autowired
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)) {
// 查询业务流程表,找出该业务id的最新操作记录的角色名称
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角之后直接返回的数据
// 同意
if (status == 1) {
@ -295,13 +296,14 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
// 1.2.若最新操作人为C角或法规部领导,表示C角调查通过后发送过来的数据或者法规部领导驳回的数据
// 同意
if (status == 1) {
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
PromptSuccess.FG_JL_ID);
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(),
StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
// 此条业务id下的法规领导数据是否存在
Integer count = this.getBaseMapper().countComplianceInvestigation(this.getComplianceInvestigation(iid).getBusinessId(),
PromptSuccess.FG_LD_ID);
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), StatusCode.SP_IN_REVIEW,
StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
if (result) {
Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) {
if (count > 0) {
// 表示为法规部领导驳回的数据,先更新审批状态为审核中
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_IN_REVIEW);
@ -494,6 +496,12 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (dgAssetsInvestigationId != null) {
// 资产详情
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());
}
// 合规调查附件和意见

@ -108,8 +108,6 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
|| dgLoanCommitteeConsiderRequest.getFileUrls().length == 0) {
ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL);
}
// 获取贷审会当前的审核状态
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId());
// 将文件数组拼接为文件字符串形式
String fileUrl = dgComplianceInvestigationService.getFileUrl(dgLoanCommitteeConsiderRequest.getFileUrls());
DgLoanCommitteeConsiderConsent consent = new DgLoanCommitteeConsiderConsent();
@ -119,6 +117,10 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons()));
consent.setFileUrl(fileUrl);
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) {
// 更新贷审会的审核状态为已审核
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(
@ -126,7 +128,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
StatusCode.SP_REVIEWED);
if (result2) {
Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) {
if (count > 0) {
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
@ -138,7 +140,6 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
.getBusinessId());
guaranteeLetterAssignUser.setCompanyId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId())
.getCompanyId());
System.out.println(guaranteeLetterAssignUser);
result1 = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser);
}
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));
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];
// 获取所有的userId
for (int i = 0; i < userIds.length; i += 5) {
@ -106,7 +107,6 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
}
// 根据userId获取对应的员工姓名
ResponseResult<List<EmployeeVO>> responseResult = hrmsFeignService.listEmpNameByUserId(userIds);
List<DgWorkConferenceResponse> listResponse = new ArrayList<>();
if (responseResult.getData() != null) {
// 将对应的userId转换为name
listResponse = this.transitionUserName(dgWorkConferencePOS, responseResult.getData());
@ -117,6 +117,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
listResponse.add(workConference);
}
}
}
// 分页属性复制并返回
IPage<DgWorkConferenceResponse> iPage = new Page<>();
BeanUtils.copyProperties(list, iPage);

@ -23,8 +23,10 @@
FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a
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
ON a.company_id = c.id
ON c.id = cc.customer_id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
@ -50,8 +52,10 @@
FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a
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
ON a.company_id = c.id
ON c.id = cc.customer_id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
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>
<!-- 根据业务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 dg_work_conference_consider SET audit_status = #{auditStatus},operation_status = #{operationStatus}

@ -26,8 +26,10 @@
FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a
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
ON a.company_id = c.id
ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
@ -49,8 +51,10 @@
FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a
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
ON a.company_id = c.id
ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
@ -142,4 +146,9 @@
UPDATE dg_loan_committee_consider SET consider_id = #{userId} WHERE id = #{id}
</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>

@ -22,8 +22,10 @@
FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a
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
ON a.company_id = c.id
ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b
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,
@ -59,8 +61,10 @@
FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a
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
ON a.company_id = c.id
ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b
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,

@ -92,5 +92,7 @@ public class PromptSuccess {
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