浏览代码

电子病历质控查询

xiaochan 1 年之前
父节点
当前提交
ceeacb0f01

+ 2 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/emr/EmrControlDaoV2.java

@@ -227,7 +227,8 @@ public interface EmrControlDaoV2 {
             "  and history = 0 " +
             "  and b.del_flag = 0 " +
             "  and doctor = #{doctor} " +
-            "  and remediation_status is null and number_of_defects > 0 ;")
+            "  and remediation_status is null and number_of_defects > 0" +
+            "  and a.final_control = (select final_control from view_zy_patient_all c where c.inpatient_no = a.pat_no and c.admiss_times = a.times) ;")
     List<EmrAuditDetail> getUnprocessedRecommendationsByDoctor(String doctor);
 
 }

+ 9 - 1
src/main/java/thyyxxk/webserver/utils/StringUtil.java

@@ -284,12 +284,20 @@ public class StringUtil {
      *
      * @param fieldName 需要转化的字符串
      */
-    public static String getMethodName(String fieldName) {
+    public static String capitalizeTheFirstLetter(String fieldName) {
         char[] chars = fieldName.toCharArray();
         chars[0] = toUpperCase(chars[0]);
         return String.valueOf(chars);
     }
 
+    public static String getMethodName(String fieldName) {
+        return "get" + capitalizeTheFirstLetter(fieldName);
+    }
+
+    public static String setMethodName(String fieldName) {
+        return "set" + capitalizeTheFirstLetter(fieldName);
+    }
+
     /**
      * 字符转成大写
      *

+ 5 - 7
src/main/java/thyyxxk/webserver/utils/TreeUtil.java

@@ -1,9 +1,7 @@
 package thyyxxk.webserver.utils;
 
 import cn.hutool.core.util.ReflectUtil;
-import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
-import thyyxxk.webserver.entity.settings.IntergrationMenu;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -25,9 +23,9 @@ public class TreeUtil {
     }
 
     public static <T> List<T> ObjectSort(List<T> tempList, String sortName) {
-        String getSortName = "get" + StringUtil.getMethodName(sortName);
-        String getChildrenName = "get" + StringUtil.getMethodName("children");
-        String setChildrenName = "set" + StringUtil.getMethodName("children");
+        String getSortName = StringUtil.getMethodName(sortName);
+        String getChildrenName = StringUtil.getMethodName("children");
+        String setChildrenName = StringUtil.setMethodName("children");
         Stream<T> sorted = tempList
                 .stream()
                 .sorted((Comparator.comparing(a -> {
@@ -51,8 +49,8 @@ public class TreeUtil {
     }
 
     public static <T> List<T> ObjectTree(List<T> tempList, String id, String parentId, TowFunction<T, T> addCallback) {
-        id = "get" + StringUtil.getMethodName(id);
-        parentId = "get" + StringUtil.getMethodName(parentId);
+        id = "get" + StringUtil.capitalizeTheFirstLetter(id);
+        parentId = "get" + StringUtil.capitalizeTheFirstLetter(parentId);
 
         List<T> resultList = new LinkedList<>();
         Map<Object, T> treeMap = new HashMap<>(tempList.size());