贷审会更新

master
river 4 years ago
parent b0c11c5e1d
commit 2cc69af05a
  1. 7
      dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  3. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanCommitteeConsiderMapper.java
  4. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgWorkConferenceConsiderMapper.java
  5. 28
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  6. 31
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java
  7. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  8. 5
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  9. 15
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml
  10. 10
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  11. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java

@ -58,8 +58,11 @@ public interface DeptControllerApi {
/**
* 查询所有部门及部门下的员工信息
*/
/*@ApiOperation(value = "查询所有部门及部门下的员工信息", notes = "查询所有部门及部门下的员工信息")
ResponseResult trees();*/
@ApiOperation(value = "查询所有部门及部门下的员工信息(加条件限制,即担保专员、ABC角不能为同一用户)", notes = "查询所有部门及部门下的员工信息")
ResponseResult trees(String account);
@ApiOperation(value = "查询所有部门及部门下的员工信息(不加条件限制)", notes = "查询所有部门及部门下的员工信息")
ResponseResult empTrees(String account);
/**
* 查询该部门下所有子部门及部门下的的员工

@ -74,4 +74,6 @@ public interface DgComplianceInvestigationMapper extends BaseMapper<DgCompliance
@Param("auditStatus") Integer auditStatus, @Param("operationStatus") Integer operationStatus);
String getAuditProcessLatestNameByBusinessId(@Param("businessId") Integer businessId);
Boolean updateDgComplianceInvestigationUserIdById(@Param("id") Integer id, @Param("userId") Integer userId);
}

@ -34,7 +34,7 @@ public interface DgLoanCommitteeConsiderMapper extends BaseMapper<DgLoanCommitte
Boolean check(@Param("lr") DgLoanCommitteeConsiderConsent dgLoanCommitteeConsiderConsent, @Param("userId") Integer userId,
@Param("status") Integer status, @Param("operatingStatus") Integer operatingStatus, @Param("date") Date date);
Boolean TheJudgesDrawn(@Param("businessId") Integer businessId, @Param("agreePerson") String agreePerson);
Boolean TheJudgesDrawn(@Param("businessId") Integer businessId, @Param("allPerson") String allPerson);
String getJudges(Integer id);
@ -53,4 +53,6 @@ public interface DgLoanCommitteeConsiderMapper extends BaseMapper<DgLoanCommitte
@Param("auditStatus") Integer auditStatus, @Param("operatingStatus") Integer operatingStatus);
Integer getAuditStatus(Integer id);
Boolean updateLoanCommitteeConsiderUserIdById(@Param("id") Integer id, @Param("userId") Integer userId);
}

@ -42,4 +42,8 @@ public interface DgWorkConferenceConsiderMapper extends BaseMapper<DgWorkConfere
Boolean updateOperationStatusById(@Param("id") Integer id, @Param("operationStatus") Integer operationStatus,
@Param("opinion") String opinion);
Boolean updateOperationStatus(@Param("id") Integer id, @Param("operationStatus") Integer operationStatus);
Boolean updateWorkConferenceUserIdById(@Param("id") Integer id, @Param("userId") Integer userId);
}

@ -70,7 +70,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
*/
@Override
public PageUtils list(Integer page, Integer size, DgComplianceInvestigationRequest dgComplianceInvestigationRequest) {
if (page == null || size == null) {
if (page == null || size == null || page < 1 || size < 1) {
page = 1;
size = 10;
}
@ -289,7 +289,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (result) {
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(), PromptSuccess.FG_JL_ID);
Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)){
if (StatusCode.SP_REJECT.equals(auditStatus)) {
// 表示为法规部领导驳回的数据,先更新审批状态为审核中
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_IN_REVIEW);
@ -373,19 +373,18 @@ 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) {
// 更新当前审批状态为已审核
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_REVIEWED);
if (result2) {
// 判断当前业务id下的工作会数据是否存在
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid);
Integer count = this.getBaseMapper().countWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID);
Boolean result1;
if (count > 0) {
// 工作会该条数据存在,表示是工作会驳回的数据,现将当前审批状态更新为已审核
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(complianceInvestigation.getBusinessId(), StatusCode.SP_REVIEWED);
if (result2) {
// 再更新工作会的数据为待处理
result1 = this.getBaseMapper().updateWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID,
StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND);
} else {
result1 = false;
}
// 工作会该条数据存在,表示为工作会驳回数据,更新工作会的数据为审核中和待处理(工作会的业务过程中只会有一条数据)
result1 = this.getBaseMapper().updateWorkConferenceConsider(complianceInvestigation.getBusinessId(),
PromptSuccess.GZU_ID, StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND);
} else {
// 工作会该条数据不存在,表示不是工作会驳回数据,需要新增一条
DgWorkConferenceConsider workConferenceConsider = new DgWorkConferenceConsider();
@ -405,6 +404,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
}
}
}
}
// 驳回
if (status == 2) {
if (opinion == null || opinion.length() == 0) {
@ -433,6 +433,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 绑定该条数据的userId,表示该用户操作了该条数据
Boolean result3 = this.getBaseMapper().updateDgComplianceInvestigationUserIdById(iid, Integer.parseInt(userId));
if (result3) {
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_REFUSE);
@ -452,6 +455,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
}
}
}
}
return false;
}
@ -473,6 +477,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
AssetsDetailResponse assetsDetailResponse = dgAssetsInvestigationService.assetsDetail(dgAssetsInvestigationId);
// 合规附件和意见
DgComplianceInvestigation dgComplianceInvestigation = this.getBaseMapper().queryDgComplianceInvestigation(iid);
if (dgComplianceInvestigation != null) {
if (dgComplianceInvestigation.getFile() != null && dgComplianceInvestigation.getFile().length() != 0) {
String[] fileUrls = dgComplianceInvestigation.getFile().split(",");
dgComplianceInvestigationInfoResponse.setFileUrls(fileUrls);
@ -480,6 +485,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (dgComplianceInvestigation.getOpinion() != null && dgComplianceInvestigation.getOpinion().length() != 0) {
dgComplianceInvestigationInfoResponse.setOpinion(dgComplianceInvestigation.getOpinion());
}
}
// 统一返回
dgComplianceInvestigationInfoResponse.setGuaranteeDetailResponse(guaranteeDetailResponse);
dgComplianceInvestigationInfoResponse.setAssetsResponse(assetsDetailResponse.getAssetsResponse());

@ -67,7 +67,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
*/
@Override
public PageUtils list(Integer page, Integer size, String codeOrName) {
if (page == null || size == null) {
if (page == null || size == null || page < 1 || size < 1) {
page = 1;
size = 10;
}
@ -108,6 +108,8 @@ 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();
@ -116,30 +118,27 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
consent.setAgreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getAgreePersons()));
consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons()));
consent.setFileUrl(fileUrl);
Boolean result = this.getBaseMapper().check(consent, Integer.getInteger(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());
if (result) {
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId());
Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) {
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,先改变贷审会的审核状态为已审核
// 更新贷审会的审核状态为已审核
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
StatusCode.SP_REVIEWED);
if (result2) {
// 再改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) {
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
PromptSuccess.FG_JL_ID, StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND);
} else {
result1 = false;
}
} else {
// 当前贷审会的操作状态部位驳回,表示不是担保函驳回数据,在担保函表中插入一条数据
// 当前贷审会的操作状态不为驳回,表示不是担保函驳回数据,在担保函表中插入一条数据
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = new DgGuaranteeLetterAssignUser();
guaranteeLetterAssignUser.setBusinessId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId())
.getBusinessId());
guaranteeLetterAssignUser.setUserId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId())
.getCompanyId());
System.out.println(guaranteeLetterAssignUser);
result1 = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser);
}
if (result1) {
@ -150,12 +149,17 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
}
}
}
}
// 拒绝
if (dgLoanCommitteeConsiderRequest.getStatus() == 3) {
if (dgLoanCommitteeConsiderRequest.getRefuseOpinion() == null
|| dgLoanCommitteeConsiderRequest.getRefuseOpinion().length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 绑定该条数据的userId,表示该用户操作了该条数据
Boolean result3 = this.getBaseMapper().updateLoanCommitteeConsiderUserIdById(dgLoanCommitteeConsiderRequest.getId(),
Integer.parseInt(userId));
if (result3) {
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
@ -178,6 +182,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
}
}
}
}
// 驳回
if (dgLoanCommitteeConsiderRequest.getStatus() == 2) {
if (dgLoanCommitteeConsiderRequest.getRefuseOpinion() == null
@ -242,6 +247,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
}
DgLoanCommitteeConsider dgLoanCommitteeConsider = this.getBaseMapper().query(id);
DgLoanCommitteeConsiderInfoResponse dgLoanCommitteeConsiderInfoResponse = new DgLoanCommitteeConsiderInfoResponse();
if (dgLoanCommitteeConsider != null) {
// 文件数组
if (dgLoanCommitteeConsider.getFile() != null && dgLoanCommitteeConsider.getFile().length() != 0) {
dgLoanCommitteeConsiderInfoResponse.setFileUrls(dgLoanCommitteeConsider.getFile().split(","));
@ -255,6 +261,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
dgLoanCommitteeConsiderInfoResponse.setDisagreePersons(dgLoanCommitteeConsider.getDisagreePerson().split(","));
}
BeanUtils.copyProperties(dgLoanCommitteeConsider, dgLoanCommitteeConsiderInfoResponse);
}
return dgLoanCommitteeConsiderInfoResponse;
}
@ -263,7 +270,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
*/
@Override
public Boolean excelExport(HttpServletResponse response, List<String> ids) {
if (null == ids || ids.size() == 0){
if (null == ids || ids.size() == 0) {
ExceptionCast.cast(GuaranteeCode.EXCEL_ID_NOT_NULL);
}
List<Integer> idList = new ArrayList<>();

@ -16,7 +16,6 @@ import com.daqing.financial.guarantee.service.IDgWorkConferenceConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
@ -74,7 +73,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
*/
@Override
public PageUtils list(Integer page, Integer size, String codeOrName) {
if (page == null || size == null) {
if (page == null || size == null || page < 1 || size < 1) {
page = 1;
size = 10;
}
@ -95,6 +94,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
List<DgWorkConferencePO> dgWorkConferencePOS = list.getRecords();
System.out.println(dgWorkConferencePOS);
Integer[] userIds = new Integer[dgWorkConferencePOS.size() * 5];
// 获取所有的userId
for (int i = 0; i < userIds.length; i += 5) {
for (int j = i / 5; j < i / 5 + 1; j++) {
userIds[i] = dgWorkConferencePOS.get(j).getAUserId();
@ -162,6 +162,9 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 绑定该条数据的userId,表示该用户操作了该条数据
Boolean result3 = this.getBaseMapper().updateWorkConferenceUserIdById(id, Integer.parseInt(userId));
if (result3) {
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(
this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), StatusCode.SP_REFUSE);
@ -180,6 +183,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
}
}
}
}
// 驳回
if (status == 2) {
if (opinion == null || opinion.length() == 0) {
@ -248,12 +252,16 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
if (result) {
Boolean result1 = dgLoanCommitteeConsiderMapper.TheJudgesDrawn(workConferenceConsider.getBusinessId(), names.toString());
if (result1) {
// 改变自己的操作状态为已处理
Boolean result2 = this.getBaseMapper().updateOperationStatus(id, StatusCode.CZ_PROCESSED);
if (result2) {
// 在业务流程表中插入一条评委抽取成功的数据
return AuditProcessUtil.save(this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.GZU_NAME, null, PromptSuccess.GZU_PROCESS_ID);
}
}
}
}
return false;
}
@ -315,10 +323,14 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
}
DgWorkConferenceConsiderQueryResponse queryResponse = new DgWorkConferenceConsiderQueryResponse();
DgWorkConferenceConsider dgWorkConferenceConsider = this.getBaseMapper().query(id);
if (dgWorkConferenceConsider != null) {
if (dgWorkConferenceConsider.getJoinJudge() != null && dgWorkConferenceConsider.getJoinJudge().length() != 0) {
queryResponse.setJoinJudges(dgWorkConferenceConsider.getJoinJudge().split(","));
}
if (dgWorkConferenceConsider.getRemark() != null && dgWorkConferenceConsider.getRemark().length() != 0) {
queryResponse.setRemark(dgWorkConferenceConsider.getRemark());
}
}
return queryResponse;
}

@ -161,4 +161,9 @@
AND create_time = (SELECT MAX(create_time) FROM dg_audit_process WHERE business_id = #{businessId})
</select>
<!-- 根据id绑定用户id -->
<update id="updateDgComplianceInvestigationUserIdById">
UPDATE dg_compliance_investigation SET user_id = #{userId} WHERE id = #{id}
</update>
</mapper>

@ -70,16 +70,16 @@
WHERE id = #{lr.id}
</update>
<!-- 保存评委名单-->
<!-- 保存抽取的所有的评委名单 -->
<update id="TheJudgesDrawn">
UPDATE dg_loan_committee_consider
SET agree_person = #{agreePerson}
SET all_person = #{allPerson}
WHERE business_id = #{businessId}
</update>
<!-- 获取评委名单-->
<!-- 获取评委名单 -->
<select id="getJudges" parameterType="integer" resultType="string">
SELECT agree_person FROM dg_loan_committee_consider WHERE id = #{id}
SELECT all_person FROM dg_loan_committee_consider WHERE id = #{id}
</select>
<!-- 获取AB角、资产调查、信息调查、合规调查的审批意见、审批人和时间 -->
@ -113,7 +113,7 @@
</select>
<select id="getDgLoanCommitteeConsider" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider">
SELECT business_id FROM dg_loan_committee_consider WHERE id = #{id}
SELECT business_id,company_id FROM dg_loan_committee_consider WHERE id = #{id}
</select>
<!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 -->
@ -137,4 +137,9 @@
WHERE business_id = #{businessId} AND role_id = #{roleId}
</update>
<!-- 根据id绑定用户id -->
<update id="updateLoanCommitteeConsiderUserIdById">
UPDATE dg_loan_committee_consider SET user_id = #{userId} WHERE id = #{id}
</update>
</mapper>

@ -117,4 +117,14 @@
UPDATE dg_work_conference_consider SET operation_status = #{operationStatus},opinion = #{opinion} WHERE id = #{id}
</update>
<!-- 更新操作状态 -->
<update id="updateOperationStatus">
UPDATE dg_work_conference_consider SET operation_status = #{operationStatus} WHERE id = #{id}
</update>
<!-- 根据id绑定用户id -->
<update id="updateWorkConferenceUserIdById">
UPDATE dg_work_conference_consider SET user_id = #{userId} WHERE id = #{id}
</update>
</mapper>

@ -90,6 +90,11 @@ public class DgLoanCommitteeConsider implements Serializable {
*/
private String disagreePerson;
/**
* 所有的贷审委员
*/
private String allPerson;
/**
* 附件会议记录
*/

Loading…
Cancel
Save