| | |
| | | String ids = idList.stream().map(String::valueOf).collect(Collectors.joining("','")); |
| | | ids = "'"+ ids + "'"; |
| | | Map<String, Object> term = new HashMap<>(); |
| | | term.put("mainId", caseId); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term, caseId); |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term); |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseId.equals(fileInfo.getOwnerId())){ |
| | | caseInfoDTO.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | for(CasePerson casePerson: casePersonList){ |
| | | //把附件根据编号放入 |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(casePerson.getId().equals(fileInfo.getOwnerId())){ |
| | | casePerson.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | for(CaseAgent caseAgent: caseAgentList){ |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseAgent.getId().equals(fileInfo.getOwnerId())){ |
| | | caseAgent.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | caseInfoDTO.setPersonList(casePersonList); |
| | | caseInfoDTO.setAgentList(caseAgentList); |
| | | } |
| | | return caseInfoDTO; |
| | | } |
| | | |
| | | /** |
| | | * PC端-查询纠纷信息 |
| | | * @param caseId 纠纷编号 |
| | | * @return CaseInfo 纠纷信息 |
| | | */ |
| | | public CaseInfoDTO getCaseArchivesInfo(String caseId){ |
| | | CaseInfo caseInfo = mapper.selectById(caseId); |
| | | CaseInfoDTO caseInfoDTO = new CaseInfoDTO(); |
| | | if (ObjectUtils.isNotEmpty(caseInfo)) { |
| | | |
| | | BeanUtils.copyProperties(caseInfo, caseInfoDTO); |
| | | //查询所有当事人 |
| | | QueryWrapper<CasePerson> personQueryWrapper = new QueryWrapper<>(); |
| | | personQueryWrapper.eq("case_id", caseId); |
| | | List<CasePerson> casePersonList = personService.list(personQueryWrapper); |
| | | |
| | | //查询所有代理人 |
| | | QueryWrapper<CaseAgent> caseAgentQueryWrapper = new QueryWrapper<>(); |
| | | caseAgentQueryWrapper.eq("case_id", caseId); |
| | | List<CaseAgent> caseAgentList = agentService.list(caseAgentQueryWrapper); |
| | | List<String> idList = new ArrayList<>(); |
| | | |
| | | idList.add(caseId); |
| | | idList.addAll(casePersonList.stream().map(CasePerson::getId).collect(Collectors.toList())); |
| | | idList.addAll(caseAgentList.stream().map(CaseAgent::getId).collect(Collectors.toList())); |
| | | String ids = idList.stream().map(String::valueOf).collect(Collectors.joining("','")); |
| | | ids = "'"+ ids + "'"; |
| | | Map<String, Object> term = new HashMap<>(); |
| | | term.put("mainId", caseId); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term); |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseId.equals(fileInfo.getOwnerId())){ |
| | | caseInfoDTO.setFileInfoList(fileInfo.getFileList()); |