Merge remote-tracking branch 'origin/master'

master
river 4 years ago
commit c33b006a3f
  1. 8
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  2. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerWorkbenchDao.java
  3. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java
  4. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCompanyPersonalServiceImpl.java
  5. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  6. 15
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java
  7. 19
      dq-financial-crms/src/main/resources/mapper/crms/CustomerWorkbenchDao.xml
  8. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java
  9. 43
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  10. 130
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  11. 154
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  12. 94
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  13. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml
  14. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java
  15. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java
  16. 98
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CustomerEntityResponse.java
  17. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CustomerWorkbenchListVO.java

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -60,7 +61,12 @@ public class CrmsCompanyPersonalController {
if(crmsCustomerRelated.getRelatedId()!=null && crmsCustomerRelated.getCustomerId()!=null){
boolean bindRelated = crmsCustomerRelatedService.save(crmsCustomerRelated);
}
return result ? ResponseResult.SUCCESS("返回的关联人id="+crmsCompanyPersonal.getId()) : ResponseResult.FAIL();
//获取返回列表
CrmsCompanyPersonal companyPersonal = crmsCompanyPersonalService.selectById(crmsCompanyPersonal.getId());
List<CrmsCompanyPersonal> companyPersonalList = new ArrayList();
companyPersonalList.add(companyPersonal);
return result ? ResponseResult.SUCCESS(companyPersonalList) : ResponseResult.FAIL();
}
/**

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.request.CustomerWorkbenchRequest;
import com.daqing.framework.domain.crms.response.CustomerEntityResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -15,7 +16,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface CustomerWorkbenchDao extends BaseMapper<CustomerEntity> {
IPage<CustomerEntity> queryList(Page page, @Param("cr")CustomerWorkbenchRequest customerWorkbenchRequest);
IPage<CustomerEntityResponse> queryList(Page page, @Param("cr")CustomerWorkbenchRequest customerWorkbenchRequest);
Boolean passById(@Param("id")Long id,@Param("manager")Long manager);
}

@ -17,4 +17,6 @@ public interface ICrmsCompanyPersonalService extends IService<CrmsCompanyPersona
PageUtils queryPage(Integer page, Integer size, Integer customerId);
boolean updateIsExistRelated(Integer id, Integer isExistRelated);
CrmsCompanyPersonal selectById(Long id);
}

@ -37,4 +37,9 @@ public class CrmsCompanyPersonalServiceImpl extends ServiceImpl<CrmsCompanyPerso
public boolean updateIsExistRelated(Integer id, Integer isExistRelated) {
return this.getBaseMapper().updateIsExistRelated(id,isExistRelated);
}
@Override
public CrmsCompanyPersonal selectById(Long id) {
return this.getBaseMapper().selectById(id);
}
}

@ -615,7 +615,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
if(relatedList.size()>0){
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if(customer==true && company>0){
return true;
}

@ -11,6 +11,7 @@ import com.daqing.financial.crms.service.CustomerWorkbenchService;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.ext.*;
import com.daqing.framework.domain.crms.request.CustomerWorkbenchRequest;
import com.daqing.framework.domain.crms.response.CustomerEntityResponse;
import com.daqing.framework.domain.crms.response.CustomerWorkbenchListVO;
import com.daqing.framework.domain.hrms.EmployeeEntity;
import com.daqing.framework.domain.hrms.ext.EmployeeTO;
@ -56,12 +57,14 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
}
// 校验时间参数
this.timeCheckout(cwr.getCreateTime(), cwr.getStartTime(), cwr.getEndTime(), cwr);
IPage<CustomerEntity> customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr);
List<CustomerEntity> customers = customerEntityIPage.getRecords();
//IPage<CustomerEntity> customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr);
//List<CustomerEntity> customers = customerEntityIPage.getRecords();
IPage<CustomerEntityResponse> customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr);
List<CustomerEntityResponse> customers = customerEntityIPage.getRecords();
// 获取所有的客户经理id
Long[] managerIds = customers.stream().map(CustomerEntity::getManager).toArray(Long[]::new);
Long[] managerIds = customers.stream().map(CustomerEntityResponse::getManager).toArray(Long[]::new);
// 获取所有的客户id
Long[] customerIds = customers.stream().map(CustomerEntity::getId).toArray(Long[]::new);
Long[] customerIds = customers.stream().map(CustomerEntityResponse::getId).toArray(Long[]::new);
// 返回列表实体类集合
List<CustomerWorkbenchListVO> customerWorkbenchListVOS = new ArrayList<>();
for (int i = 0; i < customers.size(); i++) {
@ -248,11 +251,11 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
/**
* 拼接客户及其对应的客户经理及部门信息
*/
private List<CustomerWorkbenchListVO> jointCustomerEmployee(List<CustomerEntity> customers, List<EmployeeTO> employeeTO) {
private List<CustomerWorkbenchListVO> jointCustomerEmployee(List<CustomerEntityResponse> customers, List<EmployeeTO> employeeTO) {
List<CustomerWorkbenchListVO> customerWorkbenchListVOS = new ArrayList<>();// 用于拼装客户信息和员工及部门信息的集合
CustomerWorkbenchListVO customerWorkbenchListVO;
// 将客户信息和客户经理及部门信息拼装起来
for (CustomerEntity customer : customers) {
for (CustomerEntityResponse customer : customers) {
// 每一个客户对应一个不同的对象
customerWorkbenchListVO = new CustomerWorkbenchListVO();
for (EmployeeTO anEmployeeTO : employeeTO) {

@ -21,23 +21,24 @@
</resultMap>
<!-- 查询客户列表(所有)、根据创建时间筛选、根据客户类型筛选、根据客户编号或者名称搜索 -->
<select id="queryList" parameterType="com.daqing.framework.domain.crms.request.CustomerWorkbenchRequest" resultType="com.daqing.framework.domain.crms.CustomerEntity">
SELECT id,code,type,name,phone,manager
FROM crms_customer
WHERE del_or_not = 0
<select id="queryList" parameterType="com.daqing.framework.domain.crms.request.CustomerWorkbenchRequest" resultType="com.daqing.framework.domain.crms.response.CustomerEntityResponse">
SELECT cc.id,cc.code,cc.type,cc.name,cc.phone,cc.manager,ccc.id as companyId
FROM crms_customer cc
LEFT JOIN crms_company_customer ccc on ccc.customer_id=cc.id
WHERE cc.del_or_not = 0
<if test="cr.codeOrName != null and cr.codeOrName != '' ">
AND (name LIKE CONCAT('%',#{cr.codeOrName},'%') OR code LIKE CONCAT('%',#{cr.codeOrName},'%'))
AND (cc.name LIKE CONCAT('%',#{cr.codeOrName},'%') OR cc.code LIKE CONCAT('%',#{cr.codeOrName},'%'))
</if>
<if test="cr.customerType != null">
AND type = #{cr.customerType}
AND cc.type = #{cr.customerType}
</if>
<if test="cr.startTime != null and cr.startTime != '' ">
AND create_time &gt;= #{cr.startTime}
AND cc.create_time &gt;= #{cr.startTime}
</if>
<if test="cr.endTime != null and cr.endTime != '' ">
AND create_time &lt;= #{cr.endTime}
AND cc.create_time &lt;= #{cr.endTime}
</if>
ORDER BY create_time DESC
ORDER BY cc.create_time DESC
</select>
<update id="passById">

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
@ -38,5 +39,8 @@ public class GuaranteeDetailResponse implements Serializable {
@ApiModelProperty(value = "附件详细")
private DgEnclosureInfoResponse dgEnclosureInfo;
@ApiModelProperty(value = "担保详细")
private DgGuaranteeAssignUser assignUser;
}

@ -112,7 +112,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//申请贷款相关信息
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId());
dgApplyAmountInfo.setPresenterId(5);//Integer.parseInt(userId)
dgApplyAmountInfo.setPresenterId(Integer.parseInt(userId));
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
@ -128,8 +128,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//新增到业务列表
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
dgApplyAmountList.setBusinessId(dgApplyAmountInfo.getId());
dgApplyAmountList.setPresenterId(5);//Integer.parseInt(userId)
dgApplyAmountList.setEmpId(5);//Integer.parseInt(userId)
dgApplyAmountList.setPresenterId(Integer.parseInt(userId));
dgApplyAmountList.setEmpId(Integer.parseInt(userId));
dgApplyAmountList.setRoleId(PromptSuccess.DB_YWY_ID);
dgApplyAmountList.setType(1);//类型为担保业务员
@ -476,26 +476,47 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",dgApplyAmountList1.getBusinessId()));
//如果是A,B角驳回的情况,此处审核通过之后不经过指派A,B角的操作,直接到调查
//根据业务id查询A,B角的操作状态是否是已处理,如果是,则为A,B角已驳回的数据
DgGuaranteeAssignUser assignUser = dgGuaranteeAssignUserMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", dgApplyAmountList1.getBusinessId()).eq("type", 1));
DgGuaranteeAssignUser assignUser2 = dgGuaranteeAssignUserMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", dgApplyAmountList1.getBusinessId()).eq("type", 2));
if(status.equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(dgApplyAmountList1.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
if(status.equals(StatusCode.SP_REJECT)){//状态为驳回情况
}else if(status.equals(StatusCode.SP_REJECT)){//状态为驳回情况
//担保业务员状态改为驳回,操作状态为已处理
DgApplyAmountList applyAmount = new DgApplyAmountList();
applyAmount.setStatus(status);
applyAmount.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态改为待处理
dgApplyAmountListMapper.update(applyAmount,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1));
}
//如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){
}else if(assignUser != null && assignUser2 != null){
if((assignUser.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)&& assignUser.getStatus().equals(StatusCode.SP_REJECT))
||(assignUser2.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)) && assignUser2.getStatus().equals(StatusCode.SP_REJECT)){
//此处为AB角驳回情况,如果审核通过,则修改A,B角操作状态为待处理,状态为审核中
if(status.equals(StatusCode.SP_REVIEWED)){
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);
user.setStatus(StatusCode.SP_IN_REVIEW);
dgGuaranteeAssignUserMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1));
dgGuaranteeAssignUserMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",2));
//担保部经理处,驳回状态改为审核中
DgGuaranteeAssignUser user2 = new DgGuaranteeAssignUser();
user2.setStatus(StatusCode.SP_IN_REVIEW);
dgGuaranteeAssignUserMapper.update(user2,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",3));
}
}
}else if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){
//如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审
//新增一条记录到担保部
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id

@ -24,6 +24,7 @@ import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -139,16 +140,19 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id", assetsResponse.getBusinessId()).eq("type", 1));
// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
// assetsResponse.setAmount(assetsInvestigation.getAmount());
// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
// assetsResponse.setApplyContent(assetsInvestigation.getApplyContent());
// assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode());
// assetsResponse.setAssetsName(assetsInvestigation.getAssetsName());
// assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime());
// assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount());
// assetsResponse.setAuditCode(assetsInvestigation.getAuditCode());
// assetsResponse.setAuditName(assetsInvestigation.getAuditName());
if(assetsInvestigation != null){
BeanUtils.copyProperties(assetsInvestigation,assetsResponse);
}
/* assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
assetsResponse.setAmount(assetsInvestigation.getAmount());
assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
assetsResponse.setApplyContent(assetsInvestigation.getApplyContent());
assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode());
assetsResponse.setAssetsName(assetsInvestigation.getAssetsName());
assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime());
assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount());
assetsResponse.setAuditCode(assetsInvestigation.getAuditCode());
assetsResponse.setAuditName(assetsInvestigation.getAuditName());*/
//结束---------------------------------------------------------------------
//根据业务id查询评估价值List
@ -217,6 +221,25 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
assetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2));
DgAssetsMoney money = new DgAssetsMoney();
money.setBusinessId(dgAssetsInvestigation.getBusinessId());
money.setHouseMoney(investigateAssetsRequest.getHouseMoney());
money.setCarMoney(investigateAssetsRequest.getCarMoney());
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney());
money.setOtherMoney(investigateAssetsRequest.getOtherMoney());
dgAssetsMoneyMapper.update(money,new QueryWrapper<DgAssetsMoney>()
.eq("business_id",dgAssetsInvestigation.getBusinessId()));
}else{
//根据业务id批量新增数据到评估价值列表
//dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
DgAssetsMoney money = new DgAssetsMoney();
money.setBusinessId(dgAssetsInvestigation.getBusinessId());
money.setHouseMoney(investigateAssetsRequest.getHouseMoney());
money.setCarMoney(investigateAssetsRequest.getCarMoney());
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney());
money.setOtherMoney(investigateAssetsRequest.getOtherMoney());
dgAssetsMoneyMapper.insert(money);
}
//资产部调查员调查,修改审核意见以及状态,修改其他数据
@ -244,17 +267,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(investigateAssetsRequest.getEnGuaranteeMeasures()));
dgApplyAmountInfoMapper.updateById(dgApplyAmountInfo);
//根据业务id批量新增数据到评估价值列表
//dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
DgAssetsMoney money = new DgAssetsMoney();
money.setBusinessId(dgAssetsInvestigation.getBusinessId());
money.setHouseMoney(investigateAssetsRequest.getHouseMoney());
money.setCarMoney(investigateAssetsRequest.getCarMoney());
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney());
money.setOtherMoney(investigateAssetsRequest.getOtherMoney());
dgAssetsMoneyMapper.insert(money);
//判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理
if(investigateAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW){//状态为审核中
DgAssetsInvestigation assetsInvestigation2= new DgAssetsInvestigation();
@ -276,20 +288,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据主键id查询资产部记录
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectById(approvalAssetsRequest.getId());
//此处为资产部经理审核的操作
//如果数据为驳回状态,审核通过,则处理资产部调查下该业务的审批状态为审核中,设置资产部领导的操作状态为待处理
if(assetsInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalAssetsRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && assetsInvestigation.getType()==2){
DgAssetsInvestigation assets = new DgAssetsInvestigation();
assets.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()));
DgAssetsInvestigation assets2 = new DgAssetsInvestigation();
assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(assets2,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3));
}
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setId(approvalAssetsRequest.getId());
dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
@ -303,16 +301,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据主键id修改资产部记录
this.baseMapper.updateById(dgAssetsInvestigation);
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(assetsInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
DgAssetsInvestigation dgAssets = new DgAssetsInvestigation();
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回
dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
//驳回情况
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT)){
//驳回情况
//修改资产部调查下该业务的所有审批状态为驳回
DgAssetsInvestigation assets = new DgAssetsInvestigation();
assets.setStatus(StatusCode.SP_REJECT);//驳回
@ -320,24 +314,36 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
.eq("business_id",assetsInvestigation.getBusinessId()));
}
DgAssetsInvestigation dgAssets = new DgAssetsInvestigation();
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回
dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
//资产部经理驳回情况
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){
//此处为资产部经理审核的操作
//如果数据为驳回状态,审核通过,则处理资产部调查下该业务的审批状态为审核中,设置资产部领导的操作状态为待处理
if(assetsInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalAssetsRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && assetsInvestigation.getType()==2){
DgAssetsInvestigation assets = new DgAssetsInvestigation();
assets.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()));
DgAssetsInvestigation assets2 = new DgAssetsInvestigation();
assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(assets2,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3));
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(assetsInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){
//资产部经理驳回情况
//资产部专员调查审批状态为驳回,操作状态为待处理
this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",1));
}
//资产部领导驳回情况
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){
//资产部领导驳回情况
//资产部经理审批状态设置为驳回,操作状态设置为待处理
this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",2));
}
//如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
}else if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
//如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
//根据主键id查询业务id
DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId());
@ -354,12 +360,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部经理",approvalAssetsRequest.getApplyContent(),3);
}
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//待完善
if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过
}else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
DgAssetsInvestigation investigationAssets = new DgAssetsInvestigation();
investigationAssets.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(investigationAssets,new QueryWrapper<DgAssetsInvestigation>().eq("business_id",assetsInvestigation.getBusinessId()));
//查看担保部分管领导是否审核通过
int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",assetsInvestigation.getBusinessId())
@ -374,7 +380,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//新增记录到合规调查
DgComplianceInvestigation compliance =new DgComplianceInvestigation();
compliance.setCompanyId(assetsInvestigation.getCompanyId());//企业id
compliance.setRoleId(assetsInvestigation.getRoleId());//角色id
compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id
compliance.setBusinessId(assetsInvestigation.getBusinessId());//业务id
compliance.setOperationStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派

@ -158,10 +158,15 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
System.out.println("附件详细=============="+dgEnclosureInfo);
//查询担保部经理审核的金额和期限
DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3));
GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse();
guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo);
guaranteeDetailResponse.setLinkedHashMap(linkedList);
guaranteeDetailResponse.setAssignUser(assignUser);
return guaranteeDetailResponse;
}
@ -171,22 +176,29 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据主键id查询业务id
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId());
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
int i = 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));
int n = 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));
int sum = i+n;
//如果是属于驳回的数据,并且调查通过
//如果是属于被驳回的数据,并且调查通过(同意)
if(guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(StatusCode.SP_REJECT);//状态为驳回(只有A,B角同时)
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
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));
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));
int sum = i+n;
//如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理
if(sum == 1){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setId(investigateGuaranteeRequest.getId());//主键id
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.updateById(assignUser);
}
//判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中
if(sum == 2){
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
@ -194,6 +206,14 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeAssignUser.getBusinessId()));
}
}else{
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
}
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况处理
@ -217,6 +237,28 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
.eq("business_id",guaranteeAssignUser.getBusinessId()));
}
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
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));
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));
int sum2 = a+b;
if(sum2==2){
/* if(){//合规调查驳回情况处理
}else if(){//贷审会业务流程驳回情况处理
}else{//正常情况处理*/
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",3));
//}
}
//上传附件信息
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
dgEnclosureInfo.setBusinessId(guaranteeAssignUser.getBusinessId());//业务id
@ -236,17 +278,6 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//附件新增
dgEnclosureInfoMapper.insert(dgEnclosureInfo);
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
if(sum==2){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",3));
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部A/B角",investigateGuaranteeRequest.getApplyContent(),2);
@ -261,18 +292,6 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据主键id查询担保部记录
DgGuaranteeAssignUser guaranteeUser = this.baseMapper.selectById(approvalGuaranteeRequest.getId());
//如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
if(guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType()==3){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4));
}
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId());
dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
@ -286,16 +305,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据主键id修改担保部记录
this.baseMapper.updateById(dgGuaranteeAssignUser);
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(guaranteeUser.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
DgGuaranteeAssignUser dgAssignUser = new DgGuaranteeAssignUser();
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
//驳回情况
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况
//修改担保部调查下该业务的所有审批状态为驳回
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
@ -303,25 +317,36 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
.eq("business_id",guaranteeUser.getBusinessId()));
}
DgGuaranteeAssignUser dgAssignUser = new DgGuaranteeAssignUser();
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
//担保部经理驳回情况
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){
//如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
if(guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType()==3){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(guaranteeUser.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){
//担保部经理驳回情况
//A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",1));
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",2));
}
//担保部领导驳回情况
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>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",3));
}
//如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
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
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId());
@ -338,11 +363,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部经理",approvalGuaranteeRequest.getApplyContent(),2);
}
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//待完善
if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==4) {//担保部领导审核通过
}else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==4) {//担保部领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
//查看信息部分管领导是否审核通过
int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",guaranteeUser.getBusinessId())
@ -357,7 +383,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//新增记录到合规调查
DgComplianceInvestigation compliance =new DgComplianceInvestigation();
compliance.setCompanyId(guaranteeUser.getCompanyId());//企业id
compliance.setRoleId(guaranteeUser.getRoleId());//角色id
compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id
compliance.setBusinessId(guaranteeUser.getBusinessId());//业务id
compliance.setOperationStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派

@ -224,8 +224,24 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
dgMessageInvestigation.setFile(ArraysUtil.toString(investigateMessageRequest.getFile()));
this.baseMapper.updateById(dgMessageInvestigation);
//判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理
if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){
//如果是信息部经理驳回情况
if(messageInvestigation.getOperatingStatus().equals(StatusCode.CZ_ON_HAND) && messageInvestigation.getStatus().equals(StatusCode.SP_REJECT)){
//修改信息部调查员的审批状态为审核中,操作状态为已处理
DgMessageInvestigation investigation = new DgMessageInvestigation();
investigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//已处理
investigation.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(investigation,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",1));
//修改信息部经理的审核状态为审核中,操作状态为待处理
DgMessageInvestigation dgInvestigation = new DgMessageInvestigation();
dgInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
dgInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(dgInvestigation,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",2));
}else if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){
//判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理
DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation();
messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND);
this.baseMapper.update(messageInvestigation2,new QueryWrapper<DgMessageInvestigation>()
@ -247,19 +263,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//根据主键id查询信息部记录
DgMessageInvestigation messageInvestigation = this.baseMapper.selectById(approvalMessageRequest.getId());
//如果数据为驳回状态,审核通过,则处理信息部调查下该业务的审批状态为审核中,设置信息部领导的操作状态为待处理
if(messageInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && messageInvestigation.getType()==2){
DgMessageInvestigation message = new DgMessageInvestigation();
message.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(message,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()));
DgMessageInvestigation message2 = new DgMessageInvestigation();
message2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(message,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",3 ));
}
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setId(approvalMessageRequest.getId());
dgMessageInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
@ -269,17 +272,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//根据主键id修改信息部记录
this.baseMapper.updateById(dgMessageInvestigation);
DgMessageInvestigation dgMessage = new DgMessageInvestigation();
dgMessage.setStatus(StatusCode.SP_REJECT);//驳回
dgMessage.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(messageInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
//驳回情况
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT)){
//驳回情况
//修改信息部调查下该业务的所有审批状态为驳回
DgMessageInvestigation message = new DgMessageInvestigation();
message.setStatus(StatusCode.SP_REJECT);//驳回
@ -287,24 +285,35 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
.eq("business_id",messageInvestigation.getBusinessId()));
}
DgMessageInvestigation dgMessage = new DgMessageInvestigation();
dgMessage.setStatus(StatusCode.SP_REJECT);//驳回
dgMessage.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
//信息部经理驳回情况
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==2){
//如果数据为驳回状态,审核通过,则处理信息部调查下该业务的审批状态为审核中,设置信息部领导的操作状态为待处理
if(messageInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && messageInvestigation.getType()==2){
DgMessageInvestigation message = new DgMessageInvestigation();
message.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(message,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()));
DgMessageInvestigation message2 = new DgMessageInvestigation();
message2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(message2,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",3 ));
}else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(messageInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==2){
//信息部经理驳回情况
//信息部专员审批状态设置为驳回,操作状态为待处理
this.baseMapper.update(dgMessage,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",1));
}
//信息部领导驳回情况
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==3){
}else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==3){
//信息部领导驳回情况
//信息部经理审批状态设置为驳回,操作状态为待处理
this.baseMapper.update(dgMessage,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",2));
}
//如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核
if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过
}else if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过
//如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核
//根据主键id查询业务id
DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId());
@ -321,11 +330,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation2.getBusinessId(),account,"信息部经理",approvalMessageRequest.getRemark(),4);
}
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//待完善
if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过
}else if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过
//如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
DgMessageInvestigation investigation = new DgMessageInvestigation();
investigation.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(investigation,new QueryWrapper<DgMessageInvestigation>().eq("business_id",messageInvestigation.getBusinessId()));
//查看担保部分管领导是否审核通过
int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",messageInvestigation.getBusinessId())
@ -340,7 +350,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//新增记录到合规调查
DgComplianceInvestigation compliance =new DgComplianceInvestigation();
compliance.setCompanyId(messageInvestigation.getCompanyId());//企业id
compliance.setRoleId(messageInvestigation.getRoleId());//角色id
compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id
compliance.setBusinessId(messageInvestigation.getBusinessId());//业务id
compliance.setOperationStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派

@ -33,7 +33,7 @@
AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%'))
</if>
<if test="userId != null and userId != ''">
AND (au.emp_id =#{userId} or au.emp_id is null)
AND (au.emp_id =#{userId} or au.emp_id is null or au.emp_id ='')
</if>
</where>
</select>

@ -99,7 +99,7 @@ public class CompanyCustomerEntity implements Serializable {
private String registerAddr;
@ApiModelProperty(value = "法人-身份证号")
private Integer legalIdNumber;
private String legalIdNumber;
@ApiModelProperty(value = "法人-户口所在地")
private String legalHukouAddr;

@ -115,7 +115,7 @@ public class CustomerCompanyDTO implements Serializable {
private String legalName;
@ApiModelProperty(value = "法人-性别 1、男,0、女")
private String legalGender;
private Integer legalGender;
@ApiModelProperty(value = "法人-身份证号")
private String legalIdNumber;

@ -0,0 +1,98 @@
package com.daqing.framework.domain.crms.response;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 记录客户基本信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 11:23:28
*/
@Data
public class CustomerEntityResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@NotNull(message = "id不能为空")
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 客户编号
*/
@ApiModelProperty(value = "客户编号")
private String code;
/**
* 客户类型1企业类型0个人类型
*/
@NotNull(message = "客户类型不能为空")
@ApiModelProperty(value = "客户类型")
//@Pattern(regexp = "^\\\\d+$",message = "成立年限只能为整形数字")
private Integer type;
/**
* 客户的经理人id
*/
@ApiModelProperty(value = "客户经理人id")
private Long manager;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String name;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
private String addr;
/**
* 联系电话
*/
@NotNull(message = "联系电话不能为空")
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 密码
*/
@ApiModelProperty(value = "密码")
private String password;
/**
* 微信唯一标识
*/
@ApiModelProperty(value = "微信唯一标识")
private String wechatId;
/**
* 0未删除1已删除
*/
@ApiModelProperty(value = "是否删除")
private Integer delOrNot;
/**
* 0启用1禁用
*/
@ApiModelProperty(value = "是否禁用")
private Integer status;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@ApiModelProperty(value = "修改时间")
private Date motifyTime;
@ApiModelProperty(value = "企业id")
private Long companyId;
}

@ -40,4 +40,7 @@ public class CustomerWorkbenchListVO implements Serializable {
@ApiModelProperty(value = "审批状态(0:通过,1:未通过,2:带审核)")
private Integer status;
@ApiModelProperty(value = "企业id")
private Long companyId;
}

Loading…
Cancel
Save