| | |
| | | * @return |
| | | */ |
| | | private String getReplyDeptName(WorkReportVo detail) { |
| | | List<String> replyDeptIds = Arrays.asList(detail.getReplyDeptIds().split(",")); |
| | | StringBuilder replyDeptNameInfo = new StringBuilder(); |
| | | for (String deptId : replyDeptIds) { |
| | | //查询接收人单位信息 |
| | | Dept deptDetail = deptService.getById(Long.parseLong(deptId)); |
| | | replyDeptNameInfo = replyDeptNameInfo.append(deptDetail.getDeptName()).append(","); |
| | | |
| | | if (null!=detail.getReplyDeptIds() && detail.getReplyDeptIds()!="" && !detail.getReplyDeptIds().isEmpty()) { |
| | | List<String> replyDeptIds = Arrays.asList(detail.getReplyDeptIds().split(",")); |
| | | StringBuilder replyDeptNameInfo = new StringBuilder(); |
| | | for (String deptId : replyDeptIds) { |
| | | //查询接收人单位信息 |
| | | Dept deptDetail = deptService.getById(Long.parseLong(deptId)); |
| | | replyDeptNameInfo = replyDeptNameInfo.append(deptDetail.getDeptName()).append(","); |
| | | } |
| | | //截取 |
| | | return replyDeptNameInfo.substring(0, replyDeptNameInfo.length() - 1); |
| | | } |
| | | //截取 |
| | | return replyDeptNameInfo.substring(0, replyDeptNameInfo.length() - 1); |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | for (String userId : userIds) { |
| | | //查询接收人单位信息 |
| | | User userDetail = userService.getById(userId); |
| | | list.add(userDetail.getDeptId()); |
| | | if (null!=userDetail){ |
| | | list.add(userDetail.getDeptId()); |
| | | } |
| | | } |
| | | //去重 |
| | | List<String> collect = list.stream().distinct().collect(Collectors.toList()); |
| | |
| | | // user.setCardid(idCardNo); |
| | | // User userDetail = userService.getOne(Condition.getQueryWrapper(user)); |
| | | User userDetail = userService.getById(userId); |
| | | replyRealNameInfo = replyRealNameInfo.append(userDetail.getRealName()).append(","); |
| | | if(null!=userDetail) { |
| | | replyRealNameInfo = replyRealNameInfo.append(userDetail.getRealName()).append(","); |
| | | } |
| | | |
| | | } |
| | | //截取 |
| | | return replyRealNameInfo.substring(0, replyRealNameInfo.length() - 1); |
| | | if (replyRealNameInfo.toString().length()>0) { |
| | | return replyRealNameInfo.substring(0, replyRealNameInfo.length() - 1); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |