From fabd08d87d00bfdf1aacf473fd905fdd3c903ed3 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期五, 02 九月 2022 10:10:14 +0800
Subject: [PATCH] Merge branches 'genchuang' and 'master' of https://sinanoaq.cn:8888/r/safePlatform-out into genchuang

---
 goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java
index d4b353d..2ad8d65 100644
--- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java
+++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java
@@ -16,7 +16,6 @@
 import com.gkhy.safePlatform.targetDuty.service.CommonService;
 import com.gkhy.safePlatform.targetDuty.service.ExamineMngService;
 import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService;
-import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import com.gkhy.safePlatform.commons.enums.ResultCodes;
@@ -88,7 +87,7 @@
             List<CurrentExamineDto> list = JSONObject.parseArray( dto.getNumberDetailJson(), CurrentExamineDto.class);
             List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList());
 
-            if (!idList.isEmpty()){
+            if(!idList.isEmpty()){
                 List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList);
                 Map<Long,ExamineItem> itemMap = itemList.stream().collect(
                         Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1));
@@ -138,20 +137,21 @@
         //获取打分明细
         List<CurrentExamineDto> list = JSONObject.parseArray( examineMng.getNumberDetailJson(), CurrentExamineDto.class);
         List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList());
+        if (idList.isEmpty()){
+            List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList);
+            Map<Long,ExamineItem> itemMap = itemList.stream().collect(
+                    Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1));
 
-        List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList);
-        Map<Long,ExamineItem> itemMap = itemList.stream().collect(
-                Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1));
-
-        if(itemMap != null){
-            list.forEach(f->{
-                ExamineItem item = itemMap.get(f.getId());
-                if(item != null){
-                    f.setItemDetail(item.getItemDetail());
-                    f.setContent(item.getContent());
-                    f.setJudgeStandard(item.getJudgeStandard());
-                }
-            });
+            if(itemMap != null){
+                list.forEach(f->{
+                    ExamineItem item = itemMap.get(f.getId());
+                    if(item != null){
+                        f.setItemDetail(item.getItemDetail());
+                        f.setContent(item.getContent());
+                        f.setJudgeStandard(item.getJudgeStandard());
+                    }
+                });
+            }
         }
         dto.setCurrentExamineDtoList(list);
 

--
Gitblit v1.9.2