工作台客户列表

master
river 4 years ago
parent 25b3c960c5
commit b0c11c5e1d
  1. 42
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  4. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml

@ -50,12 +50,12 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
@Override @Override
public PageUtils list(Integer page, Integer size, CustomerWorkbenchRequest cwr) { public PageUtils list(Integer page, Integer size, CustomerWorkbenchRequest cwr) {
// 分页参数 // 分页参数
if (page == null || size == null){ if (page == null || size == null) {
page = 1; page = 1;
size = 10; size = 10;
} }
// 校验时间参数 // 校验时间参数
this.timeCheckout(cwr.getCreateTime(),cwr.getStartTime(),cwr.getEndTime(),cwr); this.timeCheckout(cwr.getCreateTime(), cwr.getStartTime(), cwr.getEndTime(), cwr);
IPage<CustomerEntity> customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr); IPage<CustomerEntity> customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr);
List<CustomerEntity> customers = customerEntityIPage.getRecords(); List<CustomerEntity> customers = customerEntityIPage.getRecords();
// 获取所有的客户经理id // 获取所有的客户经理id
@ -64,28 +64,34 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
Long[] customerIds = customers.stream().map(CustomerEntity::getId).toArray(Long[]::new); Long[] customerIds = customers.stream().map(CustomerEntity::getId).toArray(Long[]::new);
// 返回列表实体类集合 // 返回列表实体类集合
List<CustomerWorkbenchListVO> customerWorkbenchListVOS = new ArrayList<>(); List<CustomerWorkbenchListVO> customerWorkbenchListVOS = new ArrayList<>();
BeanUtils.copyProperties(customers,customerWorkbenchListVOS); for (int i = 0; i < customers.size(); i++) {
if (managerIds.length != 0){ CustomerWorkbenchListVO customerWorkbenchListVO = new CustomerWorkbenchListVO();
BeanUtils.copyProperties(customers.get(i), customerWorkbenchListVO);
customerWorkbenchListVOS.add(customerWorkbenchListVO);
}
System.out.println(customerWorkbenchListVOS);
if (managerIds.length != 0) {
// 远程调用查询客户对应的客户经理信息 // 远程调用查询客户对应的客户经理信息
ResponseResult responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds); ResponseResult responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds);
List<EmployeeTO> employeeTOs = (List<EmployeeTO>) responseResult.getData(); List<EmployeeTO> employeeTOs = (List<EmployeeTO>) responseResult.getData();
if (employeeTOs != null){ if (employeeTOs != null) {
customerWorkbenchListVOS = this.jointCustomerEmployee(customers, employeeTOs); customerWorkbenchListVOS = this.jointCustomerEmployee(customers, employeeTOs);
} }
} }
if (customerIds.length != 0){ if (customerIds.length != 0) {
// TODO:远程调用担保服务查询每个客户的审批状态 // TODO:远程调用担保服务查询每个客户的审批状态
for (CustomerWorkbenchListVO customerWorkbenchListVO : customerWorkbenchListVOS) { for (CustomerWorkbenchListVO customerWorkbenchListVO : customerWorkbenchListVOS) {
customerWorkbenchListVO.setStatus(2); customerWorkbenchListVO.setStatus(2);
} }
if (cwr.getStatus() != null && (cwr.getStatus() == 0 || cwr.getStatus() == 1 || cwr.getStatus() == 2)){ if (cwr.getStatus() != null && (cwr.getStatus() == 0 || cwr.getStatus() == 1 || cwr.getStatus() == 2)) {
// 筛选状态 // 筛选状态
customerWorkbenchListVOS.removeIf(customerWorkbenchListVO -> !Objects.equals(customerWorkbenchListVO.getStatus(),cwr.getStatus())); customerWorkbenchListVOS.removeIf(customerWorkbenchListVO -> !Objects.equals(customerWorkbenchListVO.getStatus(), cwr.getStatus()));
} }
} }
System.out.println(customerWorkbenchListVOS);
// 属性拷贝,将泛型为CustomerEntity类型的IPage的属性拷贝给泛型为CustomerTO类型的IPage,才能赋值给PageUtils // 属性拷贝,将泛型为CustomerEntity类型的IPage的属性拷贝给泛型为CustomerTO类型的IPage,才能赋值给PageUtils
IPage<CustomerWorkbenchListVO> iPage = new Page<>(); IPage<CustomerWorkbenchListVO> iPage = new Page<>();
BeanUtils.copyProperties(customerEntityIPage,iPage); BeanUtils.copyProperties(customerEntityIPage, iPage);
iPage.setRecords(customerWorkbenchListVOS); iPage.setRecords(customerWorkbenchListVOS);
return new PageUtils(iPage); return new PageUtils(iPage);
@ -170,21 +176,23 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
/** /**
* 通过审核 * 通过审核
* @param id 当前客户id *
* @param id 当前客户id
* @param manager 客户经理id * @param manager 客户经理id
* @return * @return
*/ */
@Override @Override
public Boolean pass(Long id, Long manager) { public Boolean pass(Long id, Long manager) {
if (id == null || manager == null){ if (id == null || manager == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM); ExceptionCast.cast(CommonCode.INVALID_PARAM);
} }
return this.getBaseMapper().passById(id,manager); return this.getBaseMapper().passById(id, manager);
} }
/** /**
* 不通过审核 * 不通过审核
* @param id 当前客户id *
* @param id 当前客户id
* @param cause 原因 * @param cause 原因
* @return * @return
*/ */
@ -249,14 +257,14 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
customerWorkbenchListVO = new CustomerWorkbenchListVO(); customerWorkbenchListVO = new CustomerWorkbenchListVO();
for (EmployeeTO anEmployeeTO : employeeTO) { for (EmployeeTO anEmployeeTO : employeeTO) {
if (Objects.equals(customer.getManager(), anEmployeeTO.getId())) { if (Objects.equals(customer.getManager(), anEmployeeTO.getId())) {
BeanUtils.copyProperties(customer,customerWorkbenchListVO); BeanUtils.copyProperties(customer, customerWorkbenchListVO);
customerWorkbenchListVO.setManager(anEmployeeTO.getEmpName()); customerWorkbenchListVO.setManager(anEmployeeTO.getEmpName());
customerWorkbenchListVO.setDepartments(anEmployeeTO.getDeptNames()); customerWorkbenchListVO.setDepartments(anEmployeeTO.getDeptNames());
customerWorkbenchListVOS.add(customerWorkbenchListVO); customerWorkbenchListVOS.add(customerWorkbenchListVO);
} }
} }
if (!Objects.equals(customerWorkbenchListVO.getId(), customer.getId())) { if (!Objects.equals(customerWorkbenchListVO.getId(), customer.getId())) {
BeanUtils.copyProperties(customer,customerWorkbenchListVO); BeanUtils.copyProperties(customer, customerWorkbenchListVO);
customerWorkbenchListVOS.add(customerWorkbenchListVO); customerWorkbenchListVOS.add(customerWorkbenchListVO);
} }
} }
@ -266,10 +274,10 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
/** /**
* 获取当前登录用户信息 * 获取当前登录用户信息
*/ */
private String getUserId(){ private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token"); String token = request.getHeader("token");
return RedisUtil.get("dq:token:"+token); return RedisUtil.get("dq:token:" + token);
} }
/** /**

@ -51,7 +51,7 @@ public interface DgComplianceInvestigationMapper extends BaseMapper<DgCompliance
Integer getOperationStatusByBusinessId(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId); Integer getOperationStatusByBusinessId(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId);
Integer getAuditStatusByBusinessId(@Param("businessId") Integer businessId); Integer getAuditStatusByBusinessId(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId);
DgComplianceInvestigation queryDgComplianceInvestigation(Integer iid); DgComplianceInvestigation queryDgComplianceInvestigation(Integer iid);

@ -287,7 +287,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), Boolean result = this.getBaseMapper().check(iid, opinion, new Date(),
StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId)); StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
if (result) { if (result) {
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId()); Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(), PromptSuccess.FG_JL_ID);
Boolean result1; Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)){ if (StatusCode.SP_REJECT.equals(auditStatus)){
// 表示为法规部领导驳回的数据,先更新审批状态为审核中 // 表示为法规部领导驳回的数据,先更新审批状态为审核中

@ -103,7 +103,7 @@
<!-- 根据业务id获取当前数据的审核状态 --> <!-- 根据业务id获取当前数据的审核状态 -->
<select id="getAuditStatusByBusinessId" resultType="integer"> <select id="getAuditStatusByBusinessId" resultType="integer">
SELECT audit_status FROM dg_compliance_investigation WHERE business_id = #{businessId} SELECT audit_status FROM dg_compliance_investigation WHERE business_id = #{businessId} AND role_id = #{roleId}
</select> </select>
<!-- 根据id查询合规调查表详情 --> <!-- 根据id查询合规调查表详情 -->

Loading…
Cancel
Save