diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index cd32401a..3e0ed24c 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -1,6 +1,9 @@ package com.daqing.financial.guarantee.controller; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi; import com.daqing.financial.guarantee.feign.CrmsFeignService; import com.daqing.financial.guarantee.feign.HrmsFeignService; @@ -16,6 +19,8 @@ import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; import com.daqing.financial.guarantee.service.IDgApplyAmountListService; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; +import com.daqing.framework.domain.hrms.UserEntity; +import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.util.JwtUtils; @@ -169,7 +174,8 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA public ResponseResult businessApplicationList(@RequestParam(value="page",required=false) Integer page,@RequestParam(value="size",required=false) Integer size, @RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName){ //获取当前登录用户id - String userId = getUserId(); + //String userId = getUserId(); + String userId ="9"; //根据角色查询资产部调查列表 String roleIds = RedisUtil.get("dq:userRole:" + userId); @@ -182,19 +188,47 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA } //遍历data里面的数据提单人id,找出匹配id,将用户名以及部门名称赋值进去 - List list = (List) data.getList(); - if(list.size()>0){ - Integer presenterId = list.get(0).getPresenterId(); - //根据提单人id查询其部门名称 - ResponseResult employeeMessage = hrmsFeignService.getAccountAndDeptNameById(presenterId.longValue()); - - for (BusinessApplicationListResponse response:list) { - if(employeeMessage.getData() != null){ - if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果提单人id相同情况下,就往对象里面赋值 - response.setAccount(employeeMessage.getData().getAccount()); - response.setDeptName(employeeMessage.getData().getDeptName()); - } + if(data != null){ + List list = (List) data.getList(); + if(list.size()>0){ + List arr = new ArrayList<>(); + for (BusinessApplicationListResponse res : list) { + arr.add(res.getPresenterId()); + } + //根据提单人id查询其部门名称 + ResponseResult responseResult = hrmsFeignService.getAccountAndDeptNameById(arr); + List employeeMessage = null; + if(responseResult.getData() != null){ + employeeMessage = (List) responseResult.getData(); + } + System.out.println("employeeMessage============"+employeeMessage); + List empList = new ArrayList<>(); + for (EmployeeMessageResponse resq : employeeMessage) { + empList.add(resq.getId().toString()); + } + + /* List strList = new ArrayList<>(); + String temp = null; + for (int n=0; n employeelist = JSONObject.parseArray(employeeMessage,EmployeeMessageResponse.class); + +/* for (BusinessApplicationListResponse response:list) { + for(EmployeeMessageResponse res : employeelist){ + if(response.getPresenterId().equals(res.getId())){//如果提单人id相同情况下,就往对象里面赋值 + response.setAccount(res.getAccount()); + response.setDeptName(res.getDeptName()); + } + } + // i++; + }*/ } } return new ResponseResult().SUCCESS(data); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java index 29ff2f2e..1920641b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java @@ -40,8 +40,8 @@ public interface HrmsFeignService { /** * 根据userId获取用户名以及部门名称 */ - @GetMapping("hrms/employee/getAccountAndDeptNameById") - ResponseResult getAccountAndDeptNameById(@RequestParam("userId") Long userId); + @PostMapping("hrms/employee/getAccountAndDeptNameById") + ResponseResult getAccountAndDeptNameById(@RequestBody List ids); /** * 新增用户角色 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index 01349ceb..0126ab7d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -399,7 +399,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl ids, HttpServletResponse response) { - //根据ids查询业务申请列表信息 + /* //根据ids查询业务申请列表信息 ListapplyList = this.baseMapper.selectListByIds(ids); System.out.println("applyList==========================="+applyList); Listlist2= new ArrayList<>(); @@ -430,7 +430,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() + .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()); + //结束--------------------------------------------------------------------- + //根据业务id查询评估价值List /* List assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList( new QueryWrapper().eq("business_id",assetsResponse.getBusinessId())); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java index 2a27e974..b80a6bb2 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java @@ -105,7 +105,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() - .eq("business_id",messageInvestigation.getBusinessId()).eq("type",3)); + .eq("business_id",messageInvestigation.getBusinessId()).eq("type",3 )); } DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation(); diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java index cfb942b4..6f4f7e44 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java @@ -237,12 +237,12 @@ public class EmployeeController implements EmployeeControllerApi { /** * 根据userId获取用户名以及部门名称 * - * @param userId + * @param ids * @return */ - @GetMapping("/getAccountAndDeptNameById") - public ResponseResult getAccountAndDeptNameById(@RequestParam("userId") Long userId) { - return new ResponseResult().SUCCESS(employeeService.getAccountAndDeptNameById(userId)); + @PostMapping("/getAccountAndDeptNameById") + public ResponseResult getAccountAndDeptNameById(@RequestBody List ids) { + return new ResponseResult<>().SUCCESS(employeeService.getAccountAndDeptNameById(ids)); } /** diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java index 61f56768..02196017 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java @@ -98,7 +98,7 @@ public interface EmployeeDao extends BaseMapper { EmployeeRepetition getEmployeeRepetitionByEmpId(Long empId); - EmployeeMessageResponse getAccountAndDeptNameById(Long userId); + List getAccountAndDeptNameById(@Param("ids")List ids); boolean insertUserRole(Long userId, Long roleId); diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java index 98b9c22f..b2494f7f 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java @@ -64,7 +64,7 @@ public interface EmployeeService extends IService { EmployeeEntity getEmployeeByUserId(Long userId); - EmployeeMessageResponse getAccountAndDeptNameById(Long userId); + List getAccountAndDeptNameById(List ids); boolean insertUserRole(Long userId, Long roleId); diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java index 9df7ce4c..d16b8787 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java @@ -592,8 +592,8 @@ public class EmployeeServiceImpl extends ServiceImpl getAccountAndDeptNameById(List ids) { + return this.getBaseMapper().getAccountAndDeptNameById(ids); } @Override diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml index 659de7e2..b0f79610 100644 --- a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml +++ b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml @@ -210,16 +210,25 @@ @@ -569,14 +578,18 @@ AND e.id = #{empId} - \ No newline at end of file