Browse Source

Merge branch 'dev-1.2' of http://192.168.2.236:10080/louhr/qc into dev-1.2

louhr 5 years ago
parent
commit
426f8432ed

+ 45 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/consultation/CON0382.java

@@ -0,0 +1,45 @@
+package com.lantone.qc.kernel.catalogue.consultation;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.CrisisValueReportDoc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 化验结果为危急值的,6小时内危急值记录中没有体现危急值记录
+ * 在没有化验报告单之前,以记录时间和接收时间的比较为准
+ * @author: Mark
+ * @time: 2020/6/19 13:34
+ */
+@Component
+public class CON0382 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        List<CrisisValueReportDoc> crisisValueReportDocs = inputInfo.getCrisisValueReportDocs();
+        if (ListUtil.isNotEmpty(crisisValueReportDocs)) {
+            crisisValueReportDocs.forEach(crisisValueReportDoc -> {
+                if (StringUtil.isBlank(crisisValueReportDoc.getStructureMap().get("危急值记录内容"))) {
+                    String record_time = crisisValueReportDoc.getStructureMap().get("记录时间");
+                    String receive_time = crisisValueReportDoc.getStructureMap().get("接收时间");
+                    String crisisVal = crisisValueReportDoc.getStructureMap().get("危急值记录内容").trim();
+
+                    Date record = StringUtil.parseDateTime(record_time);
+                    Date receive = StringUtil.parseDateTime(receive_time);
+                    if (crisisVal.length()==0 || CatalogueUtil.compareTime(receive, record, 6*60L) ) {
+                        status.set("-1");
+                    }
+                }
+            });
+        }
+    }
+
+}

+ 8 - 4
trans/src/main/java/com/lantone/qc/trans/shaoyf/ShaoyfTransferRecordDocTrans.java

@@ -36,8 +36,12 @@ public class ShaoyfTransferRecordDocTrans extends ModelDocTrans {
         List<Map<String, Object>> into = (List) contentMap.get("转入记录");
         List<Map<String, Object>> out = (List) contentMap.get("转出记录");
         List<Map<String, Object>> all = new ArrayList<>();
-        all.addAll(into);
-        all.addAll(out);
+        if (ListUtil.isNotEmpty(into)) {
+            all.addAll(into);
+        }
+        if (ListUtil.isNotEmpty(out)) {
+            all.addAll(out);
+        }
         Map<String, TransferIntoDoc> transferIntoDocMap = getTransferIntoDocMap(into);
         Map<String, TransferOutDoc> transferOutDocMap = getTransferOutDocMap(out);
         Map<String, TransferRecordDoc> transferAllDocMap = getTransferAllDocMap(all);
@@ -142,7 +146,7 @@ public class ShaoyfTransferRecordDocTrans extends ModelDocTrans {
         TransferIntoDoc transferIntoDoc = new TransferIntoDoc();
         transferIntoDoc.setText(content);
         transferIntoDoc.setStructureMap(structureMap);
-        transferIntoDoc.setPageData((Map) sourceMap);
+        transferIntoDoc.setPageData((Map) structureMap);
 
         return transferIntoDoc;
     }
@@ -216,7 +220,7 @@ public class ShaoyfTransferRecordDocTrans extends ModelDocTrans {
         TransferOutDoc transferOutDoc = new TransferOutDoc();
         transferOutDoc.setText(content);
         transferOutDoc.setStructureMap(structureMap);
-        transferOutDoc.setPageData((Map) sourceMap);
+        transferOutDoc.setPageData((Map) structureMap);
 
         return transferOutDoc;
     }