|
|
|
@ -135,6 +135,23 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
|
log.error("LogAspect 操作失败:" + e.getMessage()); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//根据社会统一信用代码判断是否可以申请业务,同一客户如果有一笔业务在业务流程在进行中,则不能再申请
|
|
|
|
|
//首先根据统一社会信用代码查询备份企业业务关联表中的业务id
|
|
|
|
|
List<DgBusinessCompany> businessCompanyList = dgBusinessCompanyMapper.selectList(new QueryWrapper<DgBusinessCompany>() |
|
|
|
|
.eq("social_unified_code", businessApplication.getSocialUnifiedCode())); |
|
|
|
|
List<Integer> businessIds = new ArrayList<Integer>(); |
|
|
|
|
for (DgBusinessCompany businessCompany:businessCompanyList) { |
|
|
|
|
businessIds.add(businessCompany.getBusinessId()); |
|
|
|
|
} |
|
|
|
|
//根据业务id查询dg_business_process_status表中是否存在业务为进行中的记录
|
|
|
|
|
Integer businessStatus=StatusCode.YW_IN_PROGRESS;//进行中
|
|
|
|
|
int count2 = dgBusinessProcessStatusMapper.selectBybusinessIdAndStatus(businessIds,businessStatus); |
|
|
|
|
//如果存在,则不能再申请业务
|
|
|
|
|
if(count2>0){ |
|
|
|
|
ExceptionCast.cast(GuaranteeCode.REPEAT_BUSINESS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//申请贷款相关信息
|
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
|
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId()); |
|
|
|
|