| | |
| | | for (int i = 0; i < projectDtoList.size(); i ++) { |
| | | // 项目 |
| | | ProjectDto projectDto = projectDtoList.get(i); |
| | | // 负责人ID列表 |
| | | List<Long> liableUserIdList = new ArrayList<>(); |
| | | // 负责人ID |
| | | String handleLiableUserId = projectDto.getLiableUserId().replace("-", ""); |
| | | // 负责人ID列表 |
| | | String[] handleLiableUserIdList = handleLiableUserId.split(","); |
| | | // 循环负责人ID列表 |
| | | for (String liableUserId : handleLiableUserIdList) { |
| | | |
| | | if (projectDto.getLiableUserId() != null && !"".equals(projectDto.getLiableUserId())) { |
| | | // 负责人ID列表 |
| | | liableUserIdList.add(Long.valueOf(liableUserId)); |
| | | List<Long> liableUserIdList = new ArrayList<>(); |
| | | // 负责人ID |
| | | String handleLiableUserId = projectDto.getLiableUserId().replace("-", ""); |
| | | // 负责人ID列表 |
| | | String[] handleLiableUserIdList = handleLiableUserId.split(","); |
| | | // 循环负责人ID列表 |
| | | for (String liableUserId : handleLiableUserIdList) { |
| | | // 负责人ID列表 |
| | | liableUserIdList.add(Long.valueOf(liableUserId)); |
| | | } |
| | | // 负责人ID列表 |
| | | projectDto.setLiableUserIdList(liableUserIdList); |
| | | } |
| | | // 负责人ID列表 |
| | | projectDto.setLiableUserIdList(liableUserIdList); |
| | | } |
| | | return projectDtoList; |
| | | } |
| | |
| | | String unitCurrency = project.getUnitCurrency() != null ? dictDetailRepository.findByDictNameAndValue(Constant.STANDARD_UNIT_CURRENCY, project.getUnitCurrency()).getLabel() : ""; |
| | | // 负责人名称 |
| | | String liableUserName = null; |
| | | // 处理后负责人ID |
| | | String handleLiableUserId = project.getLiableUserId().replace("-", ""); |
| | | // 处理后负责人ID列表 |
| | | String[] handleLiableUserIdList = handleLiableUserId.split(","); |
| | | // 循环处理后负责人ID列表 |
| | | for (String liableUserId : handleLiableUserIdList) { |
| | | // 根据负责人ID查询用户信息 |
| | | User user = userRepository.findById(Long.valueOf(liableUserId)).orElseGet(User::new); |
| | | // 判断负责人名称 |
| | | liableUserName = liableUserName == null ? user.getNickName() : liableUserName + "," + user.getNickName(); |
| | | |
| | | if (project.getLiableUserId() != null && !"".equals(project.getLiableUserId())) { |
| | | // 处理后负责人ID |
| | | String handleLiableUserId = project.getLiableUserId().replace("-", ""); |
| | | // 处理后负责人ID列表 |
| | | String[] handleLiableUserIdList = handleLiableUserId.split(","); |
| | | // 循环处理后负责人ID列表 |
| | | for (String liableUserId : handleLiableUserIdList) { |
| | | // 根据负责人ID查询用户信息 |
| | | User user = userRepository.findById(Long.valueOf(liableUserId)).orElseGet(User::new); |
| | | // 判断负责人名称 |
| | | liableUserName = liableUserName == null ? user.getNickName() : liableUserName + "," + user.getNickName(); |
| | | } |
| | | } |
| | | |
| | | Map<String,Object> map = new LinkedHashMap<>(); |