|
|
@ -5,8 +5,7 @@ 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.feign.CrmsFeignService; |
|
|
|
import com.daqing.financial.guarantee.feign.CrmsFeignService; |
|
|
|
import com.daqing.financial.guarantee.feign.HrmsFeignService; |
|
|
|
import com.daqing.financial.guarantee.feign.HrmsFeignService; |
|
|
|
import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper; |
|
|
|
import com.daqing.financial.guarantee.mapper.*; |
|
|
|
import com.daqing.financial.guarantee.mapper.DgEnclosureInfoMapper; |
|
|
|
|
|
|
|
import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; |
|
|
|
import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; |
|
|
|
import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; |
|
|
|
import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; |
|
|
|
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; |
|
|
|
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; |
|
|
@ -18,10 +17,11 @@ import com.daqing.financial.guarantee.util.ArraysUtil; |
|
|
|
import com.daqing.framework.domain.crms.CrmsCustomerRelated; |
|
|
|
import com.daqing.framework.domain.crms.CrmsCustomerRelated; |
|
|
|
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.DgApplyAmountInfo; |
|
|
|
import com.daqing.framework.domain.guarantee.*; |
|
|
|
import com.daqing.framework.domain.guarantee.DgEnclosureInfo; |
|
|
|
|
|
|
|
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; |
|
|
|
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; |
|
|
|
import com.daqing.framework.exception.ExceptionCast; |
|
|
|
import com.daqing.framework.exception.ExceptionCast; |
|
|
|
|
|
|
|
import com.daqing.framework.model.StatusCode; |
|
|
|
|
|
|
|
import com.daqing.framework.model.response.PromptSuccess; |
|
|
|
import com.daqing.framework.model.response.ResponseResult; |
|
|
|
import com.daqing.framework.model.response.ResponseResult; |
|
|
|
import com.daqing.framework.util.RandomUtil; |
|
|
|
import com.daqing.framework.util.RandomUtil; |
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
@ -66,6 +66,18 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HrmsFeignService hrmsFeignService; |
|
|
|
private HrmsFeignService hrmsFeignService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DgAssetsInvestigationMapper dgAssetsInvestigationMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DgMessageInvestigationMapper dgMessageInvestigationMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DgApplyAmountListMapper dgApplyAmountListMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
@ -82,8 +94,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
log.error("LogAspect 操作失败:" + e.getMessage()); |
|
|
|
log.error("LogAspect 操作失败:" + e.getMessage()); |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
System.out.println("反担保措施======"+ Arrays.toString(businessApplication.getEnGuaranteeMeasures())); |
|
|
|
|
|
|
|
System.out.println("反担保措施======"+ ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures())); |
|
|
|
|
|
|
|
//申请贷款相关信息
|
|
|
|
//申请贷款相关信息
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId()); |
|
|
|
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId()); |
|
|
@ -97,16 +107,26 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
|
|
|
|
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
|
|
|
|
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
|
|
|
|
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
|
|
|
|
dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12)); |
|
|
|
dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12)); |
|
|
|
dgApplyAmountInfo.setCreateTime(new Date()); |
|
|
|
|
|
|
|
dgApplyAmountInfo.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
if(businessApplication.isSaveOrCommit()==true){ |
|
|
|
|
|
|
|
dgApplyAmountInfo.setStatus(1);//状态设置为审核中
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
dgApplyAmountInfo.setStatus(0);//保存为草稿
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo); |
|
|
|
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增到业务列表
|
|
|
|
|
|
|
|
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); |
|
|
|
|
|
|
|
dgApplyAmountList.setBusinessId(dgApplyAmountInfo.getId()); |
|
|
|
|
|
|
|
dgApplyAmountList.setPresenterId(5);//Integer.parseInt(userId)
|
|
|
|
|
|
|
|
dgApplyAmountList.setRoleId(PromptSuccess.DB_YWY_ID); |
|
|
|
|
|
|
|
dgApplyAmountList.setType(1);//类型为担保业务员
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(businessApplication.getIsSaveOrCommit()==1){//提交
|
|
|
|
|
|
|
|
dgApplyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//审批状态 设置为审核中
|
|
|
|
|
|
|
|
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_LAUNCH);//操作状态设置为已发起
|
|
|
|
|
|
|
|
}else{//保存
|
|
|
|
|
|
|
|
dgApplyAmountList.setStatus(StatusCode.SP_DRAFT);//审批状态 保存为草稿
|
|
|
|
|
|
|
|
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_TO_BE_SUBMITTED);//操作状态设置为待提交
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
dgApplyAmountListMapper.insert(dgApplyAmountList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//修改是否存在关联人
|
|
|
|
//修改是否存在关联人
|
|
|
|
crmsFeignService.updateIsExistRelated(dgApplyAmountInfo.getCompanyId(),businessApplication.getIsExistRelated()); |
|
|
|
crmsFeignService.updateIsExistRelated(dgApplyAmountInfo.getCompanyId(),businessApplication.getIsExistRelated()); |
|
|
|
|
|
|
|
|
|
|
@ -134,7 +154,21 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
dgEnclosureInfo.setAssessmentReport(ArraysUtil.toString(businessApplication.getAssessmentReport()));//反担保资料和评估报告
|
|
|
|
dgEnclosureInfo.setAssessmentReport(ArraysUtil.toString(businessApplication.getAssessmentReport()));//反担保资料和评估报告
|
|
|
|
dgEnclosureInfo.setConversationSummary(ArraysUtil.toString(businessApplication.getConversationSummary())); |
|
|
|
dgEnclosureInfo.setConversationSummary(ArraysUtil.toString(businessApplication.getConversationSummary())); |
|
|
|
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos())); |
|
|
|
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos())); |
|
|
|
return dgEnclosureInfoMapper.insert(dgEnclosureInfo); |
|
|
|
dgEnclosureInfoMapper.insert(dgEnclosureInfo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果审批状态为审核中,操作状态为已发起,则往担保部经理添加一条待审核的记录
|
|
|
|
|
|
|
|
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_IN_REVIEW) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)){ |
|
|
|
|
|
|
|
DgApplyAmountList applyAmountList = new DgApplyAmountList(); |
|
|
|
|
|
|
|
applyAmountList.setBusinessId(dgApplyAmountInfo.getId());//主键id
|
|
|
|
|
|
|
|
applyAmountList.setPresenterId(5);//Integer.parseInt(userId) 提单人id
|
|
|
|
|
|
|
|
applyAmountList.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理角色id
|
|
|
|
|
|
|
|
applyAmountList.setType(2);//设置类型
|
|
|
|
|
|
|
|
applyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
|
|
|
|
|
|
|
|
applyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
|
|
|
|
|
|
|
|
dgApplyAmountListMapper.insert(applyAmountList); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -153,9 +187,11 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public BusinessApplicationDetailResponse businessApplicationDetail(Integer id) { |
|
|
|
public BusinessApplicationDetailResponse businessApplicationDetail(Integer id) { |
|
|
|
|
|
|
|
//根据id查询业务id
|
|
|
|
|
|
|
|
DgApplyAmountList dgApplyAmountList = dgApplyAmountListMapper.selectById(id); |
|
|
|
//根据主键id查询业务申请详细信息
|
|
|
|
//根据主键id查询业务申请详细信息
|
|
|
|
//DgApplyAmountInfo dgApplyAmountInfo = this.baseMapper.selectById(id);
|
|
|
|
//DgApplyAmountInfo dgApplyAmountInfo = this.baseMapper.selectById(id);
|
|
|
|
DgApplyAmountInfoResponse dgApplyAmountInfo = this.baseMapper.selectApplyAmountInfoById(id); |
|
|
|
DgApplyAmountInfoResponse dgApplyAmountInfo = this.baseMapper.selectApplyAmountInfoById(dgApplyAmountList.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); |
|
|
@ -176,7 +212,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
System.out.println("企业详细============"+linkedList); |
|
|
|
System.out.println("企业详细============"+linkedList); |
|
|
|
|
|
|
|
|
|
|
|
//查询附件详细,附件关联业务主键id
|
|
|
|
//查询附件详细,附件关联业务主键id
|
|
|
|
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(id); |
|
|
|
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgApplyAmountList.getBusinessId()); |
|
|
|
|
|
|
|
|
|
|
|
List<String>list = new ArrayList<>(); |
|
|
|
List<String>list = new ArrayList<>(); |
|
|
|
list.add(dgEnclosureInfo.getAccountingFirm()); |
|
|
|
list.add(dgEnclosureInfo.getAccountingFirm()); |
|
|
@ -244,8 +280,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
public int updateBusinessApplication(BusinessApplicationRequest businessApplication) { |
|
|
|
public int updateBusinessApplication(BusinessApplicationRequest businessApplication) { |
|
|
|
//申请贷款相关信息
|
|
|
|
//申请贷款相关信息
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
dgApplyAmountInfo.setId(businessApplication.getId()); |
|
|
|
dgApplyAmountInfo.setId(businessApplication.getBusinessId()); |
|
|
|
dgApplyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); |
|
|
|
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId()); |
|
|
|
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
|
|
|
|
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
|
|
|
|
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
|
|
|
|
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
|
|
|
|
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
|
|
|
|
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
|
|
|
@ -254,7 +290,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施
|
|
|
|
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施
|
|
|
|
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
|
|
|
|
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
|
|
|
|
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
|
|
|
|
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
|
|
|
|
dgApplyAmountInfo.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
//根据业务id修改申请贷款信息
|
|
|
|
//根据业务id修改申请贷款信息
|
|
|
|
this.baseMapper.updateById(dgApplyAmountInfo); |
|
|
|
this.baseMapper.updateById(dgApplyAmountInfo); |
|
|
|
|
|
|
|
|
|
|
@ -271,7 +306,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
|
|
|
|
|
|
|
|
//上传附件信息
|
|
|
|
//上传附件信息
|
|
|
|
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo(); |
|
|
|
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo(); |
|
|
|
dgEnclosureInfo.setBusinessId(businessApplication.getId());//业务id
|
|
|
|
dgEnclosureInfo.setBusinessId(businessApplication.getBusinessId());//业务id
|
|
|
|
dgEnclosureInfo.setCompanyId(businessApplication.getCompanyId());//企业Id
|
|
|
|
dgEnclosureInfo.setCompanyId(businessApplication.getCompanyId());//企业Id
|
|
|
|
dgEnclosureInfo.setBusinessLicense(ArraysUtil.toString(businessApplication.getBusinessLicense()));//营业执照复印件
|
|
|
|
dgEnclosureInfo.setBusinessLicense(ArraysUtil.toString(businessApplication.getBusinessLicense()));//营业执照复印件
|
|
|
|
dgEnclosureInfo.setLegalCardCopy(ArraysUtil.toString(businessApplication.getLegalCardCopy()));//上传法定代表人夫妻及企业实际经营者身份证复印件
|
|
|
|
dgEnclosureInfo.setLegalCardCopy(ArraysUtil.toString(businessApplication.getLegalCardCopy()));//上传法定代表人夫妻及企业实际经营者身份证复印件
|
|
|
@ -289,18 +324,33 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos())); |
|
|
|
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos())); |
|
|
|
|
|
|
|
|
|
|
|
//根据业务id删除对应的附件信息
|
|
|
|
//根据业务id删除对应的附件信息
|
|
|
|
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getId())); |
|
|
|
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getBusinessId())); |
|
|
|
//附件新增
|
|
|
|
//附件新增
|
|
|
|
return dgEnclosureInfoMapper.insert(dgEnclosureInfo); |
|
|
|
return dgEnclosureInfoMapper.insert(dgEnclosureInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public int revokeBusinessApplication(Integer id) { |
|
|
|
public int revokeBusinessApplication(Integer id) { |
|
|
|
|
|
|
|
//根据id查询业务id
|
|
|
|
|
|
|
|
DgApplyAmountList dgApplyAmountList1 = dgApplyAmountListMapper.selectById(id); |
|
|
|
//根据id修改当前业务状态
|
|
|
|
//根据id修改当前业务状态
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); |
|
|
|
dgApplyAmountInfo.setStatus(5);//状态为已撤销
|
|
|
|
dgApplyAmountList.setId(id); |
|
|
|
dgApplyAmountInfo.setUpdateTime(new Date()); |
|
|
|
dgApplyAmountList.setStatus(StatusCode.SP_RESCINDED);//状态为已撤销
|
|
|
|
return this.baseMapper.update(dgApplyAmountInfo, new QueryWrapper<DgApplyAmountInfo>().eq("id", id)); |
|
|
|
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_TO_BE_SUBMITTED);//操作状态为待提交
|
|
|
|
|
|
|
|
dgApplyAmountListMapper.updateById(dgApplyAmountList); |
|
|
|
|
|
|
|
//修改担保部经理审核状态
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DgApplyAmountList applyAmountList = new DgApplyAmountList(); |
|
|
|
|
|
|
|
applyAmountList.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id
|
|
|
|
|
|
|
|
applyAmountList.setType(2);//类型为担保部经理审核
|
|
|
|
|
|
|
|
applyAmountList.setStatus(StatusCode.SP_RESCINDED);//状态为已撤销
|
|
|
|
|
|
|
|
applyAmountList.setOperatingStatus(StatusCode.CZ_TO_BE_DEFINED);//操作状态为待定义,目前前端不展示
|
|
|
|
|
|
|
|
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>() |
|
|
|
|
|
|
|
.eq("business_id",applyAmountList.getBusinessId()).eq("type",applyAmountList.getType())); |
|
|
|
|
|
|
|
//将业务流程状态设置为已撤销
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
@ -336,8 +386,9 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public int approvalBusinessApplication(Integer id, Integer status, String remark) { |
|
|
|
public int approvalBusinessApplication(Integer id, Integer status, String remark, Integer companyId) { |
|
|
|
//获取当前登录用户(审批人)id
|
|
|
|
//获取当前登录用户(审批人)id
|
|
|
|
String userId = null; |
|
|
|
String userId = null; |
|
|
|
try{ |
|
|
|
try{ |
|
|
@ -348,13 +399,47 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
//根据id修改当前业务状态
|
|
|
|
//根据dg_apply_amount_list表的id修改当前业务状态
|
|
|
|
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); |
|
|
|
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); |
|
|
|
dgApplyAmountInfo.setStatus(status); |
|
|
|
dgApplyAmountList.setStatus(status); |
|
|
|
dgApplyAmountInfo.setRemark(remark); |
|
|
|
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态改为已处理
|
|
|
|
dgApplyAmountInfo.setApprovalId(Integer.parseInt(userId)); |
|
|
|
dgApplyAmountList.setApplyContent(remark); |
|
|
|
dgApplyAmountInfo.setUpdateTime(new Date()); |
|
|
|
dgApplyAmountList.setEmpId(5);//Integer.parseInt(userId)
|
|
|
|
return dgApplyAmountInfoMapper.update(dgApplyAmountInfo,new QueryWrapper<DgApplyAmountInfo>().eq("id",id)); |
|
|
|
dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper<DgApplyAmountList>().eq("id",id)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审
|
|
|
|
|
|
|
|
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){ |
|
|
|
|
|
|
|
//新增一条记录到担保部
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
guaranteeAssignUser.setBusinessId(id);//业务id
|
|
|
|
|
|
|
|
guaranteeAssignUser.setCompanyId(companyId);//企业id
|
|
|
|
|
|
|
|
guaranteeAssignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理角色id
|
|
|
|
|
|
|
|
guaranteeAssignUser.setType(3);//角色类型
|
|
|
|
|
|
|
|
guaranteeAssignUser.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派
|
|
|
|
|
|
|
|
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
|
|
|
|
|
|
|
|
dgGuaranteeAssignUserMapper.insert(guaranteeAssignUser); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增一条记录到资产部
|
|
|
|
|
|
|
|
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation(); |
|
|
|
|
|
|
|
dgAssetsInvestigation.setBusinessId(id);//业务id
|
|
|
|
|
|
|
|
dgAssetsInvestigation.setCompanyId(companyId);//企业id
|
|
|
|
|
|
|
|
dgAssetsInvestigation.setRoleId(PromptSuccess.ZC_JL_ID);//资产部经理角色id
|
|
|
|
|
|
|
|
dgAssetsInvestigation.setType(2);//角色类型
|
|
|
|
|
|
|
|
dgAssetsInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派
|
|
|
|
|
|
|
|
dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
|
|
|
|
|
|
|
|
dgAssetsInvestigationMapper.insert(dgAssetsInvestigation); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增一条记录到信息部
|
|
|
|
|
|
|
|
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation(); |
|
|
|
|
|
|
|
dgMessageInvestigation.setBusinessId(id);//业务id
|
|
|
|
|
|
|
|
dgMessageInvestigation.setCompanyId(companyId);//企业id
|
|
|
|
|
|
|
|
dgMessageInvestigation.setRoleId(PromptSuccess.XX_JL_ID);//信息部经理角色id
|
|
|
|
|
|
|
|
dgMessageInvestigation.setType(2);//角色类型
|
|
|
|
|
|
|
|
dgMessageInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派
|
|
|
|
|
|
|
|
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
|
|
|
|
|
|
|
|
dgMessageInvestigationMapper.insert(dgMessageInvestigation); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|