|
@@ -145,7 +145,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//查询反担保人信息
|
|
|
List<GuaranteeInfo> guaranteeInfos = guaranteeInfoMapper.selectGuaranteeInfoListByLoanApplicationId(loanApplicationId);
|
|
|
//查询对应的附件
|
|
|
- if (guaranteeInfos != null && guaranteeInfos.size() > 0){
|
|
|
+ if (guaranteeInfos != null && guaranteeInfos.size() > 0) {
|
|
|
for (GuaranteeInfo guaranteeInfo : guaranteeInfos) {
|
|
|
GuaranteeInfoFj guaranteeInfoFj = new GuaranteeInfoFj();
|
|
|
guaranteeInfoFj.setLoanApplicationId(loanApplicationId);
|
|
@@ -198,9 +198,9 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
loanApplication.setUserId(user.getUserId());
|
|
|
}
|
|
|
List<LoanApplication> loanApplications = new ArrayList<>();
|
|
|
- if("druid".equals(RuoYiConfig.getIsYml())){
|
|
|
+ if ("druid".equals(RuoYiConfig.getIsYml())) {
|
|
|
loanApplications = loanApplicationMapper.conferenceList(loanApplication);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
loanApplications = loanApplicationMapper.conferenceProdList(loanApplication);
|
|
|
}
|
|
|
|
|
@@ -339,12 +339,12 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//新增新增的附件
|
|
|
loanApplicationFjMapper.batchLoanApplicationFj(loanApplicationFjsInsert);
|
|
|
}
|
|
|
- if (loanApplicationFjsInsert.size() > 0 || (loanApplicationFjIdList !=null && loanApplicationFjIdList.length > 0)) {
|
|
|
+ if (loanApplicationFjsInsert.size() > 0 || (loanApplicationFjIdList != null && loanApplicationFjIdList.length > 0)) {
|
|
|
AsyncManager.me().execute(AsyncFactory.createPdfFromImages(loanApplicationFjList, loanApplication.getLoanApplicationNumber()));
|
|
|
}
|
|
|
}
|
|
|
//需要删除附件表数据
|
|
|
- if (loanApplicationFjIdList!=null && loanApplicationFjIdList.length > 0) {
|
|
|
+ if (loanApplicationFjIdList != null && loanApplicationFjIdList.length > 0) {
|
|
|
loanApplicationFjMapper.deleteLoanApplicationFjByFjIds(loanApplicationFjIdList);
|
|
|
}
|
|
|
|
|
@@ -355,7 +355,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
// shareholderFjMapper.batchShareholderFj(shareholderFjList);
|
|
|
}
|
|
|
//需要删除股东附件表数据
|
|
|
- if (shareholderFjIdList!=null && shareholderFjIdList.length > 0) {
|
|
|
+ if (shareholderFjIdList != null && shareholderFjIdList.length > 0) {
|
|
|
shareholderFjMapper.deleteShareholderFjByShareholderFjIds(shareholderFjIdList);
|
|
|
}
|
|
|
|
|
@@ -369,7 +369,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//判断有反担保信息表id的进行修改,没有的进行新增
|
|
|
List<GuaranteeInfo> guaranteeInfosInsert = guaranteeInfoList.stream().filter(e -> ObjectUtils.isEmpty(e.getGuaranteeInfoId())).collect(Collectors.toList());
|
|
|
List<GuaranteeInfo> guaranteeInfosUpdate = guaranteeInfoList.stream().filter(e -> ObjectUtils.isNotEmpty(e.getGuaranteeInfoId())).collect(Collectors.toList());
|
|
|
- if (guaranteeInfosInsert.size() > 0){
|
|
|
+ if (guaranteeInfosInsert.size() > 0) {
|
|
|
guaranteeInfoMapper.batchGuaranteeInfo(guaranteeInfosInsert);
|
|
|
}
|
|
|
if (guaranteeInfosUpdate.size() > 0) {
|
|
@@ -382,10 +382,10 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
AsyncManager.me().execute(AsyncFactory.createPdfFromImagesGuaranteeInfo(guaranteeInfoList, loanApplication.getLoanApplicationNumber()));
|
|
|
}
|
|
|
|
|
|
- if (guaranteeInfoFjIdList!=null && guaranteeInfoFjIdList.length > 0){
|
|
|
+ if (guaranteeInfoFjIdList != null && guaranteeInfoFjIdList.length > 0) {
|
|
|
guaranteeInfoFjMapper.deleteGuaranteeInfoFjByGuaranteeInfoFjIds(guaranteeInfoFjIdList);
|
|
|
}
|
|
|
- if (guaranteeInfoIdList!=null && guaranteeInfoIdList.length > 0){
|
|
|
+ if (guaranteeInfoIdList != null && guaranteeInfoIdList.length > 0) {
|
|
|
guaranteeInfoMapper.deleteGuaranteeInfoByGuaranteeInfoIds(guaranteeInfoIdList);
|
|
|
guaranteeInfoFjMapper.deleteGuaranteeInfoFjByGuaranteeInfoIds(guaranteeInfoIdList);
|
|
|
}
|
|
@@ -423,12 +423,12 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//新增新增的附件
|
|
|
loanApplicationFjMapper.batchLoanApplicationFj(loanApplicationFjsInsert);
|
|
|
}
|
|
|
- if (loanApplicationFjsInsert.size() > 0 || (loanApplicationFjIdList !=null && loanApplicationFjIdList.length > 0)) {
|
|
|
+ if (loanApplicationFjsInsert.size() > 0 || (loanApplicationFjIdList != null && loanApplicationFjIdList.length > 0)) {
|
|
|
AsyncManager.me().execute(AsyncFactory.createPdfFromImages(loanApplicationFjList, loanApplication.getLoanApplicationNumber()));
|
|
|
}
|
|
|
}
|
|
|
//需要删除附件表数据
|
|
|
- if (loanApplicationFjIdList!=null && loanApplicationFjIdList.length > 0) {
|
|
|
+ if (loanApplicationFjIdList != null && loanApplicationFjIdList.length > 0) {
|
|
|
loanApplicationFjMapper.deleteLoanApplicationFjByFjIds(loanApplicationFjIdList);
|
|
|
}
|
|
|
|
|
@@ -441,7 +441,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
AsyncManager.me().execute(AsyncFactory.createPdfFromImagesShareholder(shareholderFjList, loanApplication.getLoanApplicationNumber()));
|
|
|
}
|
|
|
//需要删除股东附件表数据
|
|
|
- if (shareholderFjIdList!=null && shareholderFjIdList.length > 0) {
|
|
|
+ if (shareholderFjIdList != null && shareholderFjIdList.length > 0) {
|
|
|
shareholderFjMapper.deleteShareholderFjByShareholderFjIds(shareholderFjIdList);
|
|
|
}
|
|
|
|
|
@@ -455,7 +455,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//判断有反担保信息表id的进行修改,没有的进行新增
|
|
|
List<GuaranteeInfo> guaranteeInfosInsert = guaranteeInfoList.stream().filter(e -> ObjectUtils.isEmpty(e.getGuaranteeInfoId())).collect(Collectors.toList());
|
|
|
List<GuaranteeInfo> guaranteeInfosUpdate = guaranteeInfoList.stream().filter(e -> ObjectUtils.isNotEmpty(e.getGuaranteeInfoId())).collect(Collectors.toList());
|
|
|
- if (guaranteeInfosInsert.size() > 0){
|
|
|
+ if (guaranteeInfosInsert.size() > 0) {
|
|
|
guaranteeInfoMapper.batchGuaranteeInfo(guaranteeInfosInsert);
|
|
|
}
|
|
|
if (guaranteeInfosUpdate.size() > 0) {
|
|
@@ -467,10 +467,10 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//异步插入附件
|
|
|
AsyncManager.me().execute(AsyncFactory.createPdfFromImagesGuaranteeInfo(guaranteeInfoList, loanApplication.getLoanApplicationNumber()));
|
|
|
}
|
|
|
- if (guaranteeInfoFjIdList!=null && guaranteeInfoFjIdList.length > 0){
|
|
|
+ if (guaranteeInfoFjIdList != null && guaranteeInfoFjIdList.length > 0) {
|
|
|
guaranteeInfoFjMapper.deleteGuaranteeInfoFjByGuaranteeInfoFjIds(guaranteeInfoFjIdList);
|
|
|
}
|
|
|
- if (guaranteeInfoIdList!=null && guaranteeInfoIdList.length > 0){
|
|
|
+ if (guaranteeInfoIdList != null && guaranteeInfoIdList.length > 0) {
|
|
|
guaranteeInfoMapper.deleteGuaranteeInfoByGuaranteeInfoIds(guaranteeInfoIdList);
|
|
|
guaranteeInfoFjMapper.deleteGuaranteeInfoFjByGuaranteeInfoIds(guaranteeInfoIdList);
|
|
|
}
|
|
@@ -490,8 +490,8 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
loanApplication.setAuditType(ONE);
|
|
|
//设置申请人用户ID
|
|
|
loanApplication.setUserId(SecurityUtils.getUserId());
|
|
|
- //贷款申请进度进入申报提交
|
|
|
- loanApplication.setLoanSchedule(ONE);
|
|
|
+ //贷款申请进度进入业务审核/分配
|
|
|
+ loanApplication.setLoanSchedule(TWO);
|
|
|
int rows = loanApplicationMapper.insertLoanApplication(loanApplication);
|
|
|
loanApplicationId = loanApplication.getLoanApplicationId();
|
|
|
List<LoanApplicationFj> loanApplicationFjList = loanApplication.getLoanApplicationFjList();
|
|
@@ -523,7 +523,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//判断有反担保信息表id的进行修改,没有的进行新增
|
|
|
List<GuaranteeInfo> guaranteeInfosInsert = guaranteeInfoList.stream().filter(e -> ObjectUtils.isEmpty(e.getGuaranteeInfoId())).collect(Collectors.toList());
|
|
|
List<GuaranteeInfo> guaranteeInfosUpdate = guaranteeInfoList.stream().filter(e -> ObjectUtils.isNotEmpty(e.getGuaranteeInfoId())).collect(Collectors.toList());
|
|
|
- if (guaranteeInfosInsert.size() > 0){
|
|
|
+ if (guaranteeInfosInsert.size() > 0) {
|
|
|
guaranteeInfoMapper.batchGuaranteeInfo(guaranteeInfosInsert);
|
|
|
}
|
|
|
if (guaranteeInfosUpdate.size() > 0) {
|
|
@@ -788,6 +788,27 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (auditSchedule.equals(THR)) {
|
|
|
+ //给风险角色发送待办提醒
|
|
|
+ waitRemind.setReadUserId(loanApplication.getfUserId().toString());
|
|
|
+ waitRemind.setRemindContent(enterpriseName + "有一条贷款申请需及时处理");
|
|
|
+ waitRemindList.add(waitRemind);
|
|
|
+ if (sysUserRoles != null && sysUserRoles.size() > 0) {
|
|
|
+ for (SysUserRole sysUserRole : sysUserRoles) {
|
|
|
+ WaitRemind waitRemindManager = new WaitRemind();
|
|
|
+ waitRemindManager.setLoanApplicationId(loanApplicationId);
|
|
|
+ waitRemindManager.setLoanApplicationNumber(loanApplication.getLoanApplicationNumber());
|
|
|
+ waitRemindManager.setRemindTitle("有一条【" + enterpriseName + "】的审核信息申请通过进入到下一阶段");
|
|
|
+ waitRemindManager.setRemindTime(DateUtils.getNowDate());
|
|
|
+ waitRemindManager.setRemindType(TWO);
|
|
|
+ waitRemindManager.setReadUserId(loanApplication.getaUserId().toString());
|
|
|
+ waitRemindManager.setRemindContent(enterpriseName + "有一条贷款申请审核通过进入到下一阶段");
|
|
|
+ //给管理员发送待办提醒
|
|
|
+ waitRemindManager.setReadUserId(sysUserRole.getUserId().toString());
|
|
|
+ waitRemindList.add(waitRemindManager);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//审核流程结束
|
|
|
} else {
|
|
|
loanApplication.setLoanSchedule(String.valueOf(Integer.parseInt(loanScheduleOld) + 1));
|
|
@@ -1058,6 +1079,9 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
//删掉参会人员
|
|
|
sysUserConferenceMapper.deleteSysUserConferenceByTime(loanApplicationOld.getReviewTime(), loanApplicationOld.getLoanApplicationId());
|
|
|
}
|
|
|
+ } else if (auditSchedule.equals(FOR) || auditSchedule.equals(THR)) {
|
|
|
+ loanApplication.setLoanSchedule(THR);
|
|
|
+ loanApplication.setAuditSchedule(String.valueOf(Integer.parseInt(auditSchedule) - 1));
|
|
|
} else {
|
|
|
loanApplication.setAuditSchedule(String.valueOf(Integer.parseInt(auditSchedule) - 1));
|
|
|
loanApplication.setLoanSchedule(String.valueOf(Integer.parseInt(loanSchedule) - 1));
|
|
@@ -1081,18 +1105,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
} else {
|
|
|
//进入待审核
|
|
|
loanApplication.setAuditType(ONE);
|
|
|
-
|
|
|
- }
|
|
|
-/* String type = "-1";
|
|
|
- if (auditSchedule.equals(SIX)) {
|
|
|
- type = "jzdcbg";
|
|
|
- } else if (auditSchedule.equals(FIV)) {
|
|
|
- type = "dbxmhfhgb,clhgb";
|
|
|
- } else if (auditSchedule.equals(SEV)) {
|
|
|
- type = "psyjqpb,gdhyjy";
|
|
|
}
|
|
|
- //还需要删除附件
|
|
|
- loanApplicationFjMapper.deleteLoanApplicationFjByLoanApplicationIdAndType(loanApplication.getLoanApplicationId(), type.split(","));*/
|
|
|
String enterpriseName = loanApplicationOld.getEnterpriseName();
|
|
|
String loanApplicationNumber = loanApplicationOld.getLoanApplicationNumber();
|
|
|
|
|
@@ -1122,7 +1135,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
waitRemindList.add(waitRemind);
|
|
|
}
|
|
|
}
|
|
|
- loanApplicationMapper.updateLoanApplication(loanApplication);
|
|
|
+ loanApplicationMapper.updateLoanApplication2(loanApplication);
|
|
|
|
|
|
|
|
|
//给A角色发送待办提醒
|
|
@@ -1139,21 +1152,20 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
|
|
|
waitRemind.setReadUserId(loanApplication.getaUserId().toString());
|
|
|
waitRemind.setRemindContent(loanApplication.getEnterpriseName() + "的信息进行了撤销");
|
|
|
waitRemindList.add(waitRemind);
|
|
|
- }
|
|
|
-
|
|
|
- if (sysUserRoles != null && sysUserRoles.size() > 0) {
|
|
|
- for (SysUserRole sysUserRole : sysUserRoles) {
|
|
|
- WaitRemind waitRemindManager = new WaitRemind();
|
|
|
- waitRemindManager.setLoanApplicationId(loanApplication.getLoanApplicationId());
|
|
|
- waitRemindManager.setLoanApplicationNumber(loanApplication.getLoanApplicationNumber());
|
|
|
- waitRemindManager.setRemindTitle("有一条【" + loanApplication.getEnterpriseName() + "】的信息进行了撤销");
|
|
|
- waitRemindManager.setRemindTime(DateUtils.getNowDate());
|
|
|
- waitRemindManager.setRemindType(loanSchedule);
|
|
|
- waitRemindManager.setReadUserId(loanApplication.getaUserId().toString());
|
|
|
- waitRemindManager.setRemindContent(loanApplication.getEnterpriseName() + "的信息进行了撤销");
|
|
|
- //给管理员发送待办提醒
|
|
|
- waitRemindManager.setReadUserId(sysUserRole.getUserId().toString());
|
|
|
- waitRemindList.add(waitRemindManager);
|
|
|
+ if (sysUserRoles != null && sysUserRoles.size() > 0) {
|
|
|
+ for (SysUserRole sysUserRole : sysUserRoles) {
|
|
|
+ WaitRemind waitRemindManager = new WaitRemind();
|
|
|
+ waitRemindManager.setLoanApplicationId(loanApplication.getLoanApplicationId());
|
|
|
+ waitRemindManager.setLoanApplicationNumber(loanApplication.getLoanApplicationNumber());
|
|
|
+ waitRemindManager.setRemindTitle("有一条【" + loanApplication.getEnterpriseName() + "】的信息进行了撤销");
|
|
|
+ waitRemindManager.setRemindTime(DateUtils.getNowDate());
|
|
|
+ waitRemindManager.setRemindType(loanSchedule);
|
|
|
+ waitRemindManager.setReadUserId(loanApplication.getaUserId().toString());
|
|
|
+ waitRemindManager.setRemindContent(loanApplication.getEnterpriseName() + "的信息进行了撤销");
|
|
|
+ //给管理员发送待办提醒
|
|
|
+ waitRemindManager.setReadUserId(sysUserRole.getUserId().toString());
|
|
|
+ waitRemindList.add(waitRemindManager);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
waitRemindMapper.batchWaitRemind(waitRemindList);
|