diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java index ec1cc6be..8464b0b7 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java @@ -87,32 +87,31 @@ public class DgCopyUserServiceImpl extends ServiceImpl copyForMeResponseList = baseMapper.selectCopyForMe(copyForMeRequest); if (copyForMeResponseList.size() > 0) { - List arr = new ArrayList<>(); - for (CopyForMeResponse res : copyForMeResponseList) { - Integer approveId = res.getApproveId(); - if (approveId!=null){ - arr.add(res.getApproveId()); - } - arr.add(res.getApplicantId()); - } + // List arr = new ArrayList<>(); + // for (CopyForMeResponse res : copyForMeResponseList) { + // Integer approveId = res.getApproveId(); + // if (approveId!=null){ + // arr.add(res.getApproveId()); + // } + // arr.add(res.getApplicantId()); + // } //去重 - List collect = arr.stream().distinct().collect(Collectors.toList()); + // List collect = arr.stream().distinct().collect(Collectors.toList()); //根据提单人id查询其部门名称 - ResponseResult responseResult = hrmsFeignService.getAccountAndDeptNameById(collect); - List employeeMessage = null; - if (responseResult.getData() != null) { - employeeMessage = (List) responseResult.getData(); - } - - if(employeeMessage != null){ - for (CopyForMeResponse response : copyForMeResponseList) { - for (LinkedHashMap res : employeeMessage) { - if (response.getApplicantId()!=null && response.getApplicantId().equals(res.get("id"))) {//如果提单人id相同情况下,就往对象里面赋值 - response.setApplicant(JSONObject.toJSONString(res.get("account")).replace("\"", "")); - } - } - } - } + // ResponseResult responseResult = hrmsFeignService.getAccountAndDeptNameById(collect); + // List employeeMessage = null; + // if (responseResult.getData() != null) { + // employeeMessage = (List) responseResult.getData(); + // } + // if(employeeMessage != null){ + // for (CopyForMeResponse response : copyForMeResponseList) { + // for (LinkedHashMap res : employeeMessage) { + // if (response.getApplicantId()!=null && response.getApplicantId().equals(res.get("id"))) {//如果提单人id相同情况下,就往对象里面赋值 + // response.setApplicant(JSONObject.toJSONString(res.get("account")).replace("\"", "")); + // } + // } + // } + // } //转换任务节点 copyForMeResponseList.forEach(copyForMeResponse -> { diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml index 12baf2fc..6a003c55 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml @@ -11,6 +11,7 @@ + @@ -34,15 +35,14 @@ resultMap="CopyForMeMap"> SELECT aai.presenter_id,aai.business_code,aai.create_time,aai.approval_id,aai.status, - aai.business_type,aai.bank,aai.business_type, - cc.name,cc.phone,cf.process_id, - cf.update_time as approve_date,cf.detail_id,cf.business_id, - bps.business_status, - lcc.loan_money,lcc.loan_tern,lcc.passing_time,lcc.file + aai.business_type,aai.bank,cc.name,cc.phone,cf.process_id,cf.update_time as approve_date, + cf.detail_id,cf.business_id,bps.business_status,lcc.loan_money,lcc.loan_tern, + lcc.passing_time,lcc.file,dq_financial_hrms.hrms_employee.name as applicant FROM dg_copy_user cu JOIN dg_copy_for cf ON cu.copy_id = cf.id LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id + LEFT JOIN dq_financial_hrms.hrms_employee on aai.presenter_id = dq_financial_hrms.hrms_employee.user_id LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id left join dg_loan_committee_consider lcc on cf.business_id = lcc.business_id LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id @@ -52,7 +52,7 @@ AND cf.update_time BETWEEN #{startTime} and #{endTime} - AND cc.name LIKE '%' #{clientName} '%' + AND concat(cc.name LIKE '%' #{clientName} '%' or dq_financial_hrms.hrms_employee.name LIKE '%' #{clientName} '%') order by aai.create_time desc limit #{page},#{size} @@ -65,6 +65,7 @@ dg_copy_user cu JOIN dg_copy_for cf ON cu.copy_id = cf.id LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id + LEFT JOIN dq_financial_hrms.hrms_employee on aai.presenter_id = dq_financial_hrms.hrms_employee.user_id LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id left join dg_loan_committee_consider lcc on cf.business_id = lcc.business_id LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id @@ -74,7 +75,7 @@ AND cf.update_time BETWEEN #{startTime} and #{endTime} - AND cc.name LIKE '%' #{clientName} '%' + AND concat(cc.name LIKE '%' #{clientName} '%' or dq_financial_hrms.hrms_employee.name LIKE '%' #{clientName} '%')