|
@@ -11,7 +11,10 @@ import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
@AllArgsConstructor
|
|
@@ -44,4 +47,45 @@ public class ArchiveInspectionServiceImpl extends BaseServiceImpl<ArchiveInspect
|
|
|
archiveInspectionDTO.setAllOpinion(allOpinion);
|
|
|
return archiveInspectionDTO;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String,Map<String,Object>> getAllopinion(String fileIds) {
|
|
|
+
|
|
|
+ LambdaQueryWrapper<ArchiveInspection> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.in(ArchiveInspection::getFileId, fileIds.split(","))
|
|
|
+ .eq(ArchiveInspection::getIsDeleted, 0);
|
|
|
+ List<ArchiveInspection> archiveInspectionList = archiveInspectionMapper.selectList(queryWrapper);
|
|
|
+ if(archiveInspectionList == null || archiveInspectionList.isEmpty()) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ Map<String,List<ArchiveInspection>> listMap = new HashMap<>();
|
|
|
+ for(ArchiveInspection archiveInspection : archiveInspectionList){
|
|
|
+ List<ArchiveInspection> list = null;
|
|
|
+ if(listMap.get(archiveInspection.getFileId().toString()) != null){
|
|
|
+ list = listMap.get(archiveInspection.getFileId().toString());
|
|
|
+ }else{
|
|
|
+ list = new ArrayList<>();
|
|
|
+ }
|
|
|
+ list.add(archiveInspection);
|
|
|
+ listMap.put(archiveInspection.getFileId().toString(),list);
|
|
|
+ }
|
|
|
+ Map<String,Map<String,Object>> map = new HashMap<>();
|
|
|
+ String allOpinion = "";
|
|
|
+ for(String key : listMap.keySet()) {
|
|
|
+ List<ArchiveInspection> inspections = listMap.get(key);
|
|
|
+ int count = 1;
|
|
|
+ for (ArchiveInspection archiveInspection : inspections) {
|
|
|
+ String opinion = archiveInspection.getOpinion();
|
|
|
+ if (opinion != null && !opinion.trim().isEmpty()) {
|
|
|
+ allOpinion += count + ". " + opinion.trim() + " ; ";
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Map<String,Object> map1 = new HashMap<>();
|
|
|
+ map1.put("allOpinion",allOpinion);
|
|
|
+ map1.put("ArchiveName",inspections.get(0).getArchiveName());
|
|
|
+ map.put(key,map1);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|