gaodm 5 лет назад
Родитель
Сommit
d375408c8b
1 измененных файлов с 12 добавлено и 6 удалено
  1. 12 6
      icss-service/src/main/java/com/diagbot/facade/PushFacade.java

+ 12 - 6
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -344,13 +344,19 @@ public class PushFacade {
      */
     public List<ConceptPushDTO> addQuestionId(List<ConceptPushDTO> concepts, Integer type) {
         QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
-        List<String> nameList = concepts.stream().map(concept -> concept.getName()).collect(Collectors.toList());
-        questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("type", type).ne("tag_type", TagTypeEnum.T8.getKey());
+        List<String> nameList = concepts.stream()
+                .map(concept -> concept.getName())
+                .collect(Collectors.toList());
+        questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("type", type)
+                .ne("tag_type", TagTypeEnum.T8.getKey());
         //化验填写单匹配name
-        if (type.equals(ConceptTypeEnum.Lis.getKey())) {
-            questionInfoQueryWrapper.in("name", nameList);
-        } else {
-            questionInfoQueryWrapper.in("tag_name", nameList);
+        if (ListUtil.isNotEmpty(nameList)) {
+            if (type.equals(ConceptTypeEnum.Lis.getKey())) {
+                questionInfoQueryWrapper.in("name", nameList);
+            } else {
+                questionInfoQueryWrapper.in("tag_name", nameList);
+            }
         }
         List<QuestionInfo> questionInfoList = questionFacade.list(questionInfoQueryWrapper);
         if (ListUtil.isNotEmpty(questionInfoList)) {