|
|
|
@ -77,6 +77,10 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
|
|
|
|
|
|
|
|
|
|
private final ModelAtomicResultService modelAtomicResultService;
|
|
|
|
|
|
|
|
|
|
private final ComDictionaryService comDictionaryService;
|
|
|
|
|
|
|
|
|
|
private final CasePersonService casePersonService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class)
|
|
|
|
@ -222,10 +226,20 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
|
|
|
|
|
List<String> fileIdList = list.stream().map(NoteRecord::getFileIds).filter(StringUtils::isNotEmpty)
|
|
|
|
|
.flatMap(s -> Arrays.stream(s.split(","))).distinct().toList();
|
|
|
|
|
|
|
|
|
|
Map<String, String> caseRoleDicMap = comDictionaryService.getDictionaryMap("case_role");
|
|
|
|
|
Map<String, CasePerson> casePersonMap = casePersonService.list(new LambdaQueryWrapper<CasePerson>().eq(CasePerson::getCaseId, noteRecords.getCaseId()))
|
|
|
|
|
.stream().collect(Collectors.toMap(CasePerson::getId, v -> v));
|
|
|
|
|
Map<String, MinioFile> fileMap = minioService.listMinioFile(fileIdList).stream().collect(Collectors.toMap(MinioFile::getId, Function.identity()));
|
|
|
|
|
|
|
|
|
|
// LinkedHashMap 保障顺序
|
|
|
|
|
Map<String, List<NoteRecordDetailDTO>> nameMap = list.stream().filter(item -> StringUtils.isNotBlank(item.getName())).map(item -> new NoteRecordDetailDTO(item, fileMap))
|
|
|
|
|
Map<String, List<NoteRecordDetailDTO>> nameMap = list.stream().filter(item -> StringUtils.isNotBlank(item.getName())).map(item -> {
|
|
|
|
|
NoteRecordDetailDTO noteRecordDetailDTO = new NoteRecordDetailDTO(item, fileMap);
|
|
|
|
|
noteRecordDetailDTO.setRoleName(caseRoleDicMap.get(item.getRole()));
|
|
|
|
|
if (Objects.nonNull(casePersonMap.get(item.getCasePersonId()))){
|
|
|
|
|
noteRecordDetailDTO.setPersonIdCard(casePersonMap.get(item.getCasePersonId()).getIdCard());
|
|
|
|
|
}
|
|
|
|
|
return noteRecordDetailDTO;
|
|
|
|
|
})
|
|
|
|
|
.collect(Collectors.groupingBy(NoteRecordDetailDTO::getName, LinkedHashMap::new, Collectors.toList()));
|
|
|
|
|
// 获取所有的task任务
|
|
|
|
|
List<CaseTaskRecord> taskList = caseTaskRecordService.lambdaQuery().eq(CaseTaskRecord::getCaseId, noteRecords.getCaseId()).list();
|
|
|
|
@ -237,6 +251,14 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
|
|
|
|
|
noteRecordDetailDTO.setName(name);
|
|
|
|
|
|
|
|
|
|
List<NoteRecordDetailDTO> noteRecordDetailDTOS = nameMap.get(name);
|
|
|
|
|
NoteRecordDetailDTO first = CollUtil.getFirst(noteRecordDetailDTOS);
|
|
|
|
|
if (Objects.nonNull(first)){
|
|
|
|
|
noteRecordDetailDTO.setPersonId(first.getPersonId());
|
|
|
|
|
noteRecordDetailDTO.setRole(first.getRole());
|
|
|
|
|
noteRecordDetailDTO.setRoleName(caseRoleDicMap.get(first.getRole()));
|
|
|
|
|
noteRecordDetailDTO.setPersonIdCard(first.getPersonIdCard());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int fileCount = 0;
|
|
|
|
|
for (NoteRecordDetailDTO recordDetailDTO : noteRecordDetailDTOS) {
|
|
|
|
|
fileCount = fileCount + recordDetailDTO.getFileList().size();
|
|
|
|
|