|
|
@ -5,8 +5,10 @@ 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.CrmsFeignService; |
|
|
|
import com.daqing.financial.guarantee.feign.CrmsFeignService; |
|
|
|
|
|
|
|
import com.daqing.financial.guarantee.feign.HrmsFeignService; |
|
|
|
import com.daqing.financial.guarantee.mapper.*; |
|
|
|
import com.daqing.financial.guarantee.mapper.*; |
|
|
|
import com.daqing.financial.guarantee.model.request.ApprovalGuaranteeRequest; |
|
|
|
import com.daqing.financial.guarantee.model.request.ApprovalGuaranteeRequest; |
|
|
|
|
|
|
|
import com.daqing.financial.guarantee.model.request.GuaranteeRequest; |
|
|
|
import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest; |
|
|
|
import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest; |
|
|
|
import com.daqing.financial.guarantee.model.response.*; |
|
|
|
import com.daqing.financial.guarantee.model.response.*; |
|
|
|
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService; |
|
|
|
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService; |
|
|
@ -16,7 +18,9 @@ import com.daqing.financial.guarantee.util.AuditProcessUtil; |
|
|
|
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; |
|
|
|
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; |
|
|
|
import com.daqing.framework.domain.crms.response.CrmsCode; |
|
|
|
import com.daqing.framework.domain.crms.response.CrmsCode; |
|
|
|
import com.daqing.framework.domain.guarantee.*; |
|
|
|
import com.daqing.framework.domain.guarantee.*; |
|
|
|
|
|
|
|
import com.daqing.framework.domain.guarantee.po.DgGuaranteePO; |
|
|
|
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; |
|
|
|
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; |
|
|
|
|
|
|
|
import com.daqing.framework.domain.hrms.response.HrmsCode; |
|
|
|
import com.daqing.framework.exception.ExceptionCast; |
|
|
|
import com.daqing.framework.exception.ExceptionCast; |
|
|
|
import com.daqing.framework.model.StatusCode; |
|
|
|
import com.daqing.framework.model.StatusCode; |
|
|
|
import com.daqing.framework.model.response.PromptSuccess; |
|
|
|
import com.daqing.framework.model.response.PromptSuccess; |
|
|
@ -70,6 +74,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper; |
|
|
|
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HrmsFeignService hrmsFeignService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) { |
|
|
|
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) { |
|
|
@ -80,7 +89,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
if (size <= 0) { |
|
|
|
if (size <= 0) { |
|
|
|
size = 10; |
|
|
|
size = 10; |
|
|
|
} |
|
|
|
} |
|
|
|
IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status); |
|
|
|
IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size), customerNumberOrName, roleIdlist, userId, status); |
|
|
|
|
|
|
|
|
|
|
|
return new PageUtils(positionVO); |
|
|
|
return new PageUtils(positionVO); |
|
|
|
} |
|
|
|
} |
|
|
@ -92,29 +101,29 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
|
|
|
|
|
|
|
|
//根据业务id查询业务申请详细信息
|
|
|
|
//根据业务id查询业务申请详细信息
|
|
|
|
DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(guaranteeAssignUser.getBusinessId()); |
|
|
|
DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(guaranteeAssignUser.getBusinessId()); |
|
|
|
String measures=dgApplyAmountInfo.getEnGuaranteeMeasures(); |
|
|
|
String measures = dgApplyAmountInfo.getEnGuaranteeMeasures(); |
|
|
|
if(measures.length()>0){ |
|
|
|
if (measures.length() > 0) { |
|
|
|
String a = measures.substring(1,measures.length()-1); |
|
|
|
String a = measures.substring(1, measures.length() - 1); |
|
|
|
String arry[]=a.split(","); |
|
|
|
String arry[] = a.split(","); |
|
|
|
List<String> demoList = Arrays.asList(arry); |
|
|
|
List<String> demoList = Arrays.asList(arry); |
|
|
|
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList); |
|
|
|
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList); |
|
|
|
System.out.println("arry==============="+demoList); |
|
|
|
System.out.println("arry===============" + demoList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("业务申请详细========="+dgApplyAmountInfo); |
|
|
|
System.out.println("业务申请详细=========" + dgApplyAmountInfo); |
|
|
|
|
|
|
|
|
|
|
|
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); |
|
|
|
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); |
|
|
|
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); |
|
|
|
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); |
|
|
|
//根据企业id查询企业详情
|
|
|
|
//根据企业id查询企业详情
|
|
|
|
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); |
|
|
|
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); |
|
|
|
|
|
|
|
|
|
|
|
LinkedHashMap linkedList = (LinkedHashMap)result.getData(); |
|
|
|
LinkedHashMap linkedList = (LinkedHashMap) result.getData(); |
|
|
|
System.out.println("企业详细============"+linkedList); |
|
|
|
System.out.println("企业详细============" + linkedList); |
|
|
|
|
|
|
|
|
|
|
|
//查询附件详细,附件关联业务主键id
|
|
|
|
//查询附件详细,附件关联业务主键id
|
|
|
|
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId()); |
|
|
|
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId()); |
|
|
|
|
|
|
|
|
|
|
|
List<String>list = new ArrayList<>(); |
|
|
|
List<String> list = new ArrayList<>(); |
|
|
|
list.add(dgEnclosureInfo.getAccountingFirm()); |
|
|
|
list.add(dgEnclosureInfo.getAccountingFirm()); |
|
|
|
list.add(dgEnclosureInfo.getAssessmentReport()); |
|
|
|
list.add(dgEnclosureInfo.getAssessmentReport()); |
|
|
|
list.add(dgEnclosureInfo.getBusinessLicense()); |
|
|
|
list.add(dgEnclosureInfo.getBusinessLicense()); |
|
|
@ -132,16 +141,16 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
|
|
|
|
|
|
|
|
List arr1List2 = new ArrayList<>(); |
|
|
|
List arr1List2 = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<list.size();i++){ |
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
List<String> arr1List; |
|
|
|
List<String> arr1List; |
|
|
|
if(list.get(i)!=null){ |
|
|
|
if (list.get(i) != null) { |
|
|
|
String a1 = list.get(i).substring(1,list.get(i).length()-1); |
|
|
|
String a1 = list.get(i).substring(1, list.get(i).length() - 1); |
|
|
|
String arr1[]=a1.split(","); |
|
|
|
String arr1[] = a1.split(","); |
|
|
|
arr1List = Arrays.asList(arr1); |
|
|
|
arr1List = Arrays.asList(arr1); |
|
|
|
arr1List2.add(i,arr1List); |
|
|
|
arr1List2.add(i, arr1List); |
|
|
|
System.out.println("arr1LIst===="+arr1List); |
|
|
|
System.out.println("arr1LIst====" + arr1List); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
arr1List2.add(i,null); |
|
|
|
arr1List2.add(i, null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0)); |
|
|
|
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0)); |
|
|
@ -159,12 +168,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12)); |
|
|
|
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12)); |
|
|
|
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13)); |
|
|
|
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13)); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("附件详细=============="+dgEnclosureInfo); |
|
|
|
System.out.println("附件详细==============" + dgEnclosureInfo); |
|
|
|
|
|
|
|
|
|
|
|
//查询担保部经理审核的金额和期限
|
|
|
|
//查询担保部经理审核的金额和期限
|
|
|
|
DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3)); |
|
|
|
GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse(); |
|
|
|
GuaranteeDetailResponse guaranteeDetailResponse = new GuaranteeDetailResponse(); |
|
|
|
guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); |
|
|
|
guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); |
|
|
|
guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); |
|
|
|
guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); |
|
|
|
guaranteeDetailResponse.setLinkedHashMap(linkedList); |
|
|
|
guaranteeDetailResponse.setLinkedHashMap(linkedList); |
|
|
@ -179,7 +188,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId()); |
|
|
|
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId()); |
|
|
|
|
|
|
|
|
|
|
|
//如果是属于被驳回的数据,并且调查通过(同意)
|
|
|
|
//如果是属于被驳回的数据,并且调查通过(同意)
|
|
|
|
if(guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT) && investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){ |
|
|
|
if (guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT) && investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) { |
|
|
|
|
|
|
|
|
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
@ -189,26 +198,26 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
|
|
|
|
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
|
|
|
|
this.baseMapper.updateById(dgGuaranteeAssignUser); |
|
|
|
this.baseMapper.updateById(dgGuaranteeAssignUser); |
|
|
|
|
|
|
|
|
|
|
|
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) |
|
|
|
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
.eq("type",1).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED)); |
|
|
|
.eq("type", 1).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) |
|
|
|
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
.eq("type",2).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED)); |
|
|
|
.eq("type", 2).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
int sum = i+n; |
|
|
|
int sum = i + n; |
|
|
|
//如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理
|
|
|
|
//如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理
|
|
|
|
if(sum == 1){ |
|
|
|
if (sum == 1) { |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
assignUser.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
|
assignUser.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
|
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
this.baseMapper.updateById(assignUser); |
|
|
|
this.baseMapper.updateById(assignUser); |
|
|
|
} |
|
|
|
} |
|
|
|
//判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中
|
|
|
|
//判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中
|
|
|
|
if(sum == 2){ |
|
|
|
if (sum == 2) { |
|
|
|
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); |
|
|
|
user.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
user.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId())); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
|
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
|
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
@ -218,81 +227,92 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
this.baseMapper.updateById(dgGuaranteeAssignUser); |
|
|
|
this.baseMapper.updateById(dgGuaranteeAssignUser); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况处理
|
|
|
|
if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)) {//驳回情况处理
|
|
|
|
//业务申请部分业务专员审批状态设置为驳回,操作状态设置为待处理
|
|
|
|
//业务申请部分业务专员审批状态设置为驳回,操作状态设置为待处理
|
|
|
|
DgApplyAmountList dgApplyAmountList= new DgApplyAmountList(); |
|
|
|
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); |
|
|
|
dgApplyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
|
|
|
|
dgApplyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
|
|
|
|
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper<DgApplyAmountList>() |
|
|
|
dgApplyAmountListMapper.update(dgApplyAmountList, new QueryWrapper<DgApplyAmountList>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",1)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 1)); |
|
|
|
//业务申请部分担保部经理审批状态设置为驳回,操作状态设置为已处理
|
|
|
|
//业务申请部分担保部经理审批状态设置为驳回,操作状态设置为已处理
|
|
|
|
DgApplyAmountList applyAmountList= new DgApplyAmountList(); |
|
|
|
DgApplyAmountList applyAmountList = new DgApplyAmountList(); |
|
|
|
applyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
|
|
|
|
applyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
|
|
|
|
applyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
|
|
|
|
applyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
|
|
|
|
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>() |
|
|
|
dgApplyAmountListMapper.update(applyAmountList, new QueryWrapper<DgApplyAmountList>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",2)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 2)); |
|
|
|
|
|
|
|
|
|
|
|
//修改担保部调查下该业务的所有审批状态为驳回
|
|
|
|
//修改担保部调查下该业务的所有审批状态为驳回
|
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId())); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
|
|
|
|
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
|
|
|
|
int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) |
|
|
|
int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
.eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); |
|
|
|
.eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) |
|
|
|
int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
.eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); |
|
|
|
.eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
int sum2 = a+b; |
|
|
|
int sum2 = a + b; |
|
|
|
if(sum2==2){ |
|
|
|
if (sum2 == 2) { |
|
|
|
|
|
|
|
|
|
|
|
//如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理
|
|
|
|
//如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理
|
|
|
|
DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_C_ID)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_C_ID)); |
|
|
|
|
|
|
|
|
|
|
|
//如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理
|
|
|
|
//如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理
|
|
|
|
DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); |
|
|
|
|
|
|
|
|
|
|
|
if(investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) |
|
|
|
if (investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) |
|
|
|
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){//合规调查驳回情况处理
|
|
|
|
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//合规调查驳回情况处理
|
|
|
|
|
|
|
|
|
|
|
|
//调查通过,修改法规经理操作状态为待处理,其他子业务为审核中
|
|
|
|
//调查通过,修改法规经理操作状态为待处理,其他子业务为审核中
|
|
|
|
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){//如果调查通过
|
|
|
|
if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过
|
|
|
|
DgComplianceInvestigation dgCompliance = new DgComplianceInvestigation(); |
|
|
|
DgComplianceInvestigation dgCompliance = new DgComplianceInvestigation(); |
|
|
|
dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
dgComplianceInvestigationMapper.update(dgCompliance,new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
dgComplianceInvestigationMapper.update(dgCompliance, new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_JL_ID)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_JL_ID)); |
|
|
|
|
|
|
|
|
|
|
|
DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation(); |
|
|
|
DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation(); |
|
|
|
dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
dgComplianceInvestigationMapper.update(dgInvestigation,new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
dgComplianceInvestigationMapper.update(dgInvestigation, new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId())); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//修改担保业务审批状态为已审核
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核
|
|
|
|
|
|
|
|
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
} |
|
|
|
} |
|
|
|
}else if(consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) |
|
|
|
} else if (consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) |
|
|
|
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){//贷审会业务流程驳回情况处理
|
|
|
|
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//贷审会业务流程驳回情况处理
|
|
|
|
|
|
|
|
|
|
|
|
//调查通过,修改贷审会操作状态为待处理,其他子业务为审核中
|
|
|
|
//调查通过,修改贷审会操作状态为待处理,其他子业务为审核中
|
|
|
|
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){//如果调查通过
|
|
|
|
if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过
|
|
|
|
DgLoanCommitteeConsider dgLoanCommittee = new DgLoanCommitteeConsider(); |
|
|
|
DgLoanCommitteeConsider dgLoanCommittee = new DgLoanCommitteeConsider(); |
|
|
|
dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
dgLoanCommitteeConsiderMapper.update(dgLoanCommittee,new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
dgLoanCommitteeConsiderMapper.update(dgLoanCommittee, new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.DSH_ID)); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); |
|
|
|
|
|
|
|
|
|
|
|
DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider(); |
|
|
|
DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider(); |
|
|
|
dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
dgLoanCommitteeConsiderMapper.update(dgConsider,new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
.eq("business_id",guaranteeAssignUser.getBusinessId())); |
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{//正常情况处理
|
|
|
|
//修改担保业务审批状态为已审核
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核
|
|
|
|
|
|
|
|
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else {//正常情况处理
|
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
|
|
|
|
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
|
|
|
|
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
|
|
|
|
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
|
|
|
|
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) |
|
|
|
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
.eq("type",3)); |
|
|
|
.eq("type", 3)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -312,13 +332,20 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(investigateGuaranteeRequest.getInspectionPhotos())); |
|
|
|
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(investigateGuaranteeRequest.getInspectionPhotos())); |
|
|
|
|
|
|
|
|
|
|
|
//根据业务id删除对应的附件信息
|
|
|
|
//根据业务id删除对应的附件信息
|
|
|
|
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",guaranteeAssignUser.getBusinessId())); |
|
|
|
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
//附件新增
|
|
|
|
//附件新增
|
|
|
|
dgEnclosureInfoMapper.insert(dgEnclosureInfo); |
|
|
|
dgEnclosureInfoMapper.insert(dgEnclosureInfo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer type = guaranteeAssignUser.getType(); |
|
|
|
|
|
|
|
String deptName; |
|
|
|
|
|
|
|
if (type == 1) { |
|
|
|
|
|
|
|
deptName = "担保部A角"; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
deptName = "担保部B角"; |
|
|
|
|
|
|
|
} |
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部A/B角",investigateGuaranteeRequest.getApplyContent(),2); |
|
|
|
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(), account, deptName, investigateGuaranteeRequest.getApplyContent(), 2); |
|
|
|
|
|
|
|
|
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
@ -347,43 +374,43 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
|
|
|
|
|
|
|
|
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况
|
|
|
|
if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)) {//驳回情况
|
|
|
|
//修改担保部调查下该业务的所有审批状态为驳回
|
|
|
|
//修改担保部调查下该业务的所有审批状态为驳回
|
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId())); |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
|
|
|
|
//如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
|
|
|
|
if(guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType()==3){ |
|
|
|
if (guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType() == 3) { |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); |
|
|
|
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId())); |
|
|
|
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeUser.getBusinessId())); |
|
|
|
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); |
|
|
|
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
|
|
|
|
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
|
|
|
|
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4)); |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId()).eq("type", 4)); |
|
|
|
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
|
|
|
|
} else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)) {//如果为拒绝,业务状态则为已否决
|
|
|
|
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); |
|
|
|
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); |
|
|
|
processStatus.setBusinessId(guaranteeUser.getBusinessId()); |
|
|
|
processStatus.setBusinessId(guaranteeUser.getBusinessId()); |
|
|
|
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
|
|
|
|
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
|
|
|
|
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>() |
|
|
|
dgBusinessProcessStatusMapper.update(processStatus, new QueryWrapper<DgBusinessProcessStatus>() |
|
|
|
.eq("business_id",processStatus.getBusinessId())); |
|
|
|
.eq("business_id", processStatus.getBusinessId())); |
|
|
|
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){ |
|
|
|
} else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 3) { |
|
|
|
//担保部经理驳回情况
|
|
|
|
//担保部经理驳回情况
|
|
|
|
//A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理
|
|
|
|
//A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理
|
|
|
|
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",1)); |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId()).eq("type", 1)); |
|
|
|
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",2)); |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId()).eq("type", 2)); |
|
|
|
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){ |
|
|
|
} else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 4) { |
|
|
|
//担保部领导驳回情况
|
|
|
|
//担保部领导驳回情况
|
|
|
|
//担保部经理审批状态设置为驳回,操作状态设置为待处理
|
|
|
|
//担保部经理审批状态设置为驳回,操作状态设置为待处理
|
|
|
|
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",3)); |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId()).eq("type", 3)); |
|
|
|
}else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过
|
|
|
|
} else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 3) {//担保部经理审核通过
|
|
|
|
//如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
|
|
|
|
//如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
|
|
|
|
//根据主键id查询业务id
|
|
|
|
//根据主键id查询业务id
|
|
|
|
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); |
|
|
|
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); |
|
|
@ -396,30 +423,25 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
|
|
|
|
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
|
|
|
|
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
this.baseMapper.insert(assignUser); |
|
|
|
this.baseMapper.insert(assignUser); |
|
|
|
|
|
|
|
} else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 4) {//担保部领导审核通过
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
|
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
|
|
|
|
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部经理",approvalGuaranteeRequest.getApplyContent(),2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==4) {//担保部领导审核通过
|
|
|
|
|
|
|
|
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
|
|
|
|
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
|
|
|
|
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
|
|
|
|
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
|
|
|
|
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); |
|
|
|
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); |
|
|
|
user.setStatus(StatusCode.SP_REVIEWED);//已审核
|
|
|
|
user.setStatus(StatusCode.SP_REVIEWED);//已审核
|
|
|
|
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId())); |
|
|
|
this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeUser.getBusinessId())); |
|
|
|
//查看信息部分管领导是否审核通过
|
|
|
|
//查看信息部分管领导是否审核通过
|
|
|
|
int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>() |
|
|
|
int a = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId()) |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId()) |
|
|
|
.eq("type",3).eq("status",StatusCode.SP_REVIEWED).eq("operating_status",StatusCode.CZ_PROCESSED)); |
|
|
|
.eq("type", 3).eq("status", StatusCode.SP_REVIEWED).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
|
|
|
|
|
|
|
|
//查看资产部分管领导是否审核通过
|
|
|
|
//查看资产部分管领导是否审核通过
|
|
|
|
int b=dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
int b = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
.eq("business_id",guaranteeUser.getBusinessId()) |
|
|
|
.eq("business_id", guaranteeUser.getBusinessId()) |
|
|
|
.eq("type",3).eq("status",StatusCode.SP_REVIEWED).eq("operating_status",StatusCode.CZ_PROCESSED)); |
|
|
|
.eq("type", 3).eq("status", StatusCode.SP_REVIEWED).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
int sum = a+b; |
|
|
|
int sum = a + b; |
|
|
|
if(sum==2){ |
|
|
|
if (sum == 2) { |
|
|
|
//新增记录到合规调查
|
|
|
|
//新增记录到合规调查
|
|
|
|
DgComplianceInvestigation compliance =new DgComplianceInvestigation(); |
|
|
|
DgComplianceInvestigation compliance = new DgComplianceInvestigation(); |
|
|
|
compliance.setCompanyId(guaranteeUser.getCompanyId());//企业id
|
|
|
|
compliance.setCompanyId(guaranteeUser.getCompanyId());//企业id
|
|
|
|
compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id
|
|
|
|
compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id
|
|
|
|
compliance.setBusinessId(guaranteeUser.getBusinessId());//业务id
|
|
|
|
compliance.setBusinessId(guaranteeUser.getBusinessId());//业务id
|
|
|
@ -427,20 +449,26 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
|
|
|
|
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
|
|
|
|
dgComplianceInvestigationMapper.insert(compliance); |
|
|
|
dgComplianceInvestigationMapper.insert(compliance); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Integer type = guaranteeUser.getType(); |
|
|
|
|
|
|
|
String deptName; |
|
|
|
|
|
|
|
if (type == 3) { |
|
|
|
|
|
|
|
deptName = "担保部经理"; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
deptName = "担保部分管领导"; |
|
|
|
|
|
|
|
} |
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
AuditProcessUtil.save(guaranteeUser.getBusinessId(),account,"担保部分管领导",approvalGuaranteeRequest.getApplyContent(),2); |
|
|
|
AuditProcessUtil.save(guaranteeUser.getBusinessId(), account, deptName, approvalGuaranteeRequest.getApplyContent(), 2); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Boolean excelExport(List<String> ids, HttpServletResponse response) { |
|
|
|
public Boolean excelExport(List<String> ids, HttpServletResponse response) { |
|
|
|
//根据ids查询业务申请列表信息
|
|
|
|
//根据ids查询业务申请列表信息
|
|
|
|
List<GuaranteeListResponse>guaranteeList = this.baseMapper.selectListByIds(ids); |
|
|
|
List<GuaranteeListResponse> guaranteeList = this.baseMapper.selectListByIds(ids); |
|
|
|
System.out.println("applyList==========================="+guaranteeList); |
|
|
|
System.out.println("applyList===========================" + guaranteeList); |
|
|
|
try { |
|
|
|
try { |
|
|
|
ExcelUtil.writeExcelWithSheets(response, guaranteeList, "担保调查一览表", "businessApplication", new GuaranteeListResponse()) |
|
|
|
ExcelUtil.writeExcelWithSheets(response, guaranteeList, "担保调查一览表", "businessApplication", new GuaranteeListResponse()) |
|
|
|
.finish(); |
|
|
|
.finish(); |
|
|
@ -451,5 +479,84 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public ResponseResult assignCorners(GuaranteeRequest guaranteeRequest) { |
|
|
|
|
|
|
|
//A,B角用户id不能选择同一个人
|
|
|
|
|
|
|
|
if (guaranteeRequest.getEmpAId().equals(guaranteeRequest.getEmpBId())) { |
|
|
|
|
|
|
|
ExceptionCast.cast(HrmsCode.EMP_SAME); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//判断即将被指派成A角的用户id以及B角的用户id是否在当前业务中已被指派
|
|
|
|
|
|
|
|
//查询empAId,empBId在资产部调查中是否被指派
|
|
|
|
|
|
|
|
Integer count1 = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeRequest.getBusinessId()) |
|
|
|
|
|
|
|
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpAId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer count = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeRequest.getBusinessId()) |
|
|
|
|
|
|
|
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpBId())); |
|
|
|
|
|
|
|
if(count1 >0 || count >0){//已被指派情况下直接返回
|
|
|
|
|
|
|
|
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询empAId,empBId在信息部调查中是否被指派
|
|
|
|
|
|
|
|
Integer count2 = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeRequest.getBusinessId()) |
|
|
|
|
|
|
|
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpAId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer count3 = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeRequest.getBusinessId()) |
|
|
|
|
|
|
|
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpBId())); |
|
|
|
|
|
|
|
if(count2 >0 || count3 >0){//已被指派情况下直接返回
|
|
|
|
|
|
|
|
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
|
|
|
|
|
|
|
|
//获取当前登录用户userId
|
|
|
|
|
|
|
|
String userId = dgApplyAmountInfoController.getUserId(); |
|
|
|
|
|
|
|
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
|
|
|
|
|
|
|
|
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
|
|
|
|
|
|
|
|
guaranteeAssignUser.setEmpId(Integer.parseInt(userId)); |
|
|
|
|
|
|
|
guaranteeAssignUser.setId(guaranteeRequest.getId()); |
|
|
|
|
|
|
|
dgGuaranteeAssignUserMapper.updateById(guaranteeAssignUser); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增A角记录到担保部记录表
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setBusinessId(guaranteeRequest.getBusinessId());//业务id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setCompanyId(guaranteeRequest.getCompanyId());//企业id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setEmpId(guaranteeRequest.getEmpAId());//用户A角id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setRoleId(PromptSuccess.DB_A_ID);//角色设置为A角
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setType(1);//A角操作
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
|
|
|
|
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser); |
|
|
|
|
|
|
|
//新增B角记录到担保部记录表
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser2 = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setBusinessId(guaranteeRequest.getBusinessId());//业务id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setCompanyId(guaranteeRequest.getCompanyId());//企业id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setEmpId(guaranteeRequest.getEmpBId());//用户B角id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setRoleId(PromptSuccess.DB_B_ID);//角色设置为B角
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setType(2);//B角操作
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
|
|
|
|
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DgGuaranteePO> list = new ArrayList(); |
|
|
|
|
|
|
|
DgGuaranteePO dgGuaranteePO1 = new DgGuaranteePO(); |
|
|
|
|
|
|
|
dgGuaranteePO1.setUserId(guaranteeRequest.getEmpAId().longValue()); |
|
|
|
|
|
|
|
dgGuaranteePO1.setRoleId(PromptSuccess.DB_A_ID.longValue()); |
|
|
|
|
|
|
|
DgGuaranteePO dgGuaranteePO2 = new DgGuaranteePO(); |
|
|
|
|
|
|
|
dgGuaranteePO2.setUserId(guaranteeRequest.getEmpBId().longValue()); |
|
|
|
|
|
|
|
dgGuaranteePO2.setRoleId(PromptSuccess.DB_B_ID.longValue()); |
|
|
|
|
|
|
|
list.add(dgGuaranteePO1); |
|
|
|
|
|
|
|
list.add(dgGuaranteePO2); |
|
|
|
|
|
|
|
//批量绑定角色关系
|
|
|
|
|
|
|
|
hrmsFeignService.insertUsrRole(list); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//hrmsFeignService.insertUserRole(guaranteeRequest.getEmpAId().longValue(),PromptSuccess.DB_A_ID.longValue());
|
|
|
|
|
|
|
|
//hrmsFeignService.insertUserRole(guaranteeRequest.getEmpBId().longValue(),PromptSuccess.DB_B_ID.longValue());
|
|
|
|
|
|
|
|
return new ResponseResult(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|