Ver código fonte

规则更新

rengb 5 anos atrás
pai
commit
c754982e00

+ 16 - 6
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0377.java

@@ -10,6 +10,7 @@ import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @Description: 配偶死亡时间未描述
@@ -21,6 +22,7 @@ public class BEH0377 extends QCCatalogue {
 
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status = "0";
         List<Family> familyList = Lists.newArrayList();
         List<Family> familiesFl = inputInfo.getBeHospitalizedDoc().getFamilyLabel().getFamilies();
         List<Family> familiesMl = inputInfo.getBeHospitalizedDoc().getMaritalLabel().getFamily();
@@ -31,7 +33,7 @@ public class BEH0377 extends QCCatalogue {
             familyList.addAll(familiesMl);
         }
 
-        long count = familyList
+        familyList = familyList
                 .stream()
                 .filter(
                         i -> i != null
@@ -39,12 +41,20 @@ public class BEH0377 extends QCCatalogue {
                                 && i.getName().indexOf("配偶") != -1
                                 && i.getDead() != null
                                 && StringUtil.isNotBlank(i.getDead().getName())
-                                && i.getDead().getPd() != null
-                                && StringUtil.isNotBlank(i.getDead().getPd().getName())
                 )
-                .count();
-        if (count > 0) {
-            status = "0";
+                .collect(Collectors.toList());
+
+        if (familyList.size() > 0) {
+            status = "-1";
+            long count = familyList
+                    .stream()
+                    .filter(
+                            i -> i.getDead().getPd() != null && StringUtil.isNotBlank(i.getDead().getPd().getName())
+                    )
+                    .count();
+            if (count > 0) {
+                status = "0";
+            }
         }
     }
 

+ 14 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0378.java

@@ -10,6 +10,7 @@ import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @Description: 配偶死亡原因未描述
@@ -32,7 +33,7 @@ public class BEH0378 extends QCCatalogue {
             familyList.addAll(familiesMl);
         }
 
-        long count = familyList
+        familyList = familyList
                 .stream()
                 .filter(
                         i -> i != null
@@ -40,12 +41,20 @@ public class BEH0378 extends QCCatalogue {
                                 && i.getName().indexOf("配偶") != -1
                                 && i.getDead() != null
                                 && StringUtil.isNotBlank(i.getDead().getName())
-                                && i.getDead().getDeadReason() != null
-                                && StringUtil.isNotBlank(i.getDead().getDeadReason().getName())
                 )
-                .count();
-        if (count > 0) {
+                .collect(Collectors.toList());
+
+        if (familyList.size() > 0) {
             status = "-1";
+            long count = familyList
+                    .stream()
+                    .filter(
+                            i -> i.getDead().getDeadReason() != null && StringUtil.isNotBlank(i.getDead().getDeadReason().getName())
+                    )
+                    .count();
+            if (count > 0) {
+                status = "0";
+            }
         }
     }