From a5f32b5795d2d018d5e9444649f22fea0ea3ba80 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Wed, 9 Dec 2020 14:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86bug,?= =?UTF-8?q?=E5=8C=85=E6=8B=AC=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=AE=A1=E7=90=86=E7=B3=BB=E7=BB=9F=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E4=B8=9A=E5=8A=A1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crms/dao/CustomerWorkbenchDao.java | 3 +- .../service/impl/CustomerServiceImpl.java | 5 +- .../impl/CustomerWorkbenchServiceImpl.java | 15 +-- .../mapper/crms/CustomerWorkbenchDao.xml | 19 ++-- .../DgAssetsInvestigationServiceImpl.java | 2 +- .../DgGuaranteeAssignUserServiceImpl.java | 44 +++++---- .../DgMessageInvestigationServiceImpl.java | 2 +- .../crms/response/CustomerEntityResponse.java | 98 +++++++++++++++++++ .../response/CustomerWorkbenchListVO.java | 3 + 9 files changed, 154 insertions(+), 37 deletions(-) create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CustomerEntityResponse.java diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerWorkbenchDao.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerWorkbenchDao.java index 57e72cd8..b61a6a11 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerWorkbenchDao.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerWorkbenchDao.java @@ -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 { - IPage queryList(Page page, @Param("cr")CustomerWorkbenchRequest customerWorkbenchRequest); + IPage queryList(Page page, @Param("cr")CustomerWorkbenchRequest customerWorkbenchRequest); Boolean passById(@Param("id")Long id,@Param("manager")Long manager); } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java index 7115e4ee..d6eaba47 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java @@ -615,7 +615,10 @@ public class CustomerServiceImpl extends ServiceImpl0){ + crmsCustomerRelatedService.insertCustomerRelated(relatedList); + } + if(customer==true && company>0){ return true; } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java index 5954364d..b8872bd2 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java @@ -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 customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr); - List customers = customerEntityIPage.getRecords(); + //IPage customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr); + //List customers = customerEntityIPage.getRecords(); + IPage customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr); + List 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 customerWorkbenchListVOS = new ArrayList<>(); for (int i = 0; i < customers.size(); i++) { @@ -248,11 +251,11 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl jointCustomerEmployee(List customers, List employeeTO) { + private List jointCustomerEmployee(List customers, List employeeTO) { List customerWorkbenchListVOS = new ArrayList<>();// 用于拼装客户信息和员工及部门信息的集合 CustomerWorkbenchListVO customerWorkbenchListVO; // 将客户信息和客户经理及部门信息拼装起来 - for (CustomerEntity customer : customers) { + for (CustomerEntityResponse customer : customers) { // 每一个客户对应一个不同的对象 customerWorkbenchListVO = new CustomerWorkbenchListVO(); for (EmployeeTO anEmployeeTO : employeeTO) { diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CustomerWorkbenchDao.xml b/dq-financial-crms/src/main/resources/mapper/crms/CustomerWorkbenchDao.xml index 008f5b68..2473c92f 100644 --- a/dq-financial-crms/src/main/resources/mapper/crms/CustomerWorkbenchDao.xml +++ b/dq-financial-crms/src/main/resources/mapper/crms/CustomerWorkbenchDao.xml @@ -21,23 +21,24 @@ - + 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 - 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},'%')) - AND type = #{cr.customerType} + AND cc.type = #{cr.customerType} - AND create_time >= #{cr.startTime} + AND cc.create_time >= #{cr.startTime} - AND create_time <= #{cr.endTime} + AND cc.create_time <= #{cr.endTime} - ORDER BY create_time DESC + ORDER BY cc.create_time DESC diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java index e1d22e08..bc1f317b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java @@ -380,7 +380,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl().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().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().eq("business_id",guaranteeAssignUser.getBusinessId()) + .eq("type",3)); + //} + + } + //上传附件信息 DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo(); dgEnclosureInfo.setBusinessId(guaranteeAssignUser.getBusinessId());//业务id @@ -255,21 +278,6 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().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().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){ - 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().eq("business_id",guaranteeAssignUser.getBusinessId()) - .eq("type",3)); - } - //同时往审核流程进程表新增一条记录 String account = dgApplyAmountInfoController.getAccount(); AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部A/B角",investigateGuaranteeRequest.getApplyContent(),2); @@ -375,7 +383,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl