From 672ce84d5ce6545a0e81709ea736c69cbbef8c1a Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期四, 24 四月 2025 18:12:47 +0800
Subject: [PATCH] zjh20250424

---
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java |   62 ++++++++++++++----------------
 1 files changed, 29 insertions(+), 33 deletions(-)

diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
index 5e22811..1575abc 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
@@ -217,40 +217,36 @@
                                                   @Param("nn")String nn);
 
     @DataSource(value = DataSourceType.SLAVE_PACS)
-    @Select({"<script>" +
-                "select * from V_JCBGLBHIS where mzh is not null " +
-//                "<when test='name != null'>" +
-//                "and name = #{name}" +
-//                "</when>" +
-//                "<when test='mzh != null'>" +
-//                "and mzh = #{mzh}" +
-                "and (mzh = #{mzh} or name like CONCAT('%', #{name}, '%') )" +
-//                "</when>" +
-//                "<when test='start != null and end != null'>" +
-//                "and examinationDate between #{start} and #{end}" +
-//                "</when>" +
-                "order by examinationDate" +
+//    @Select({"<script>" +
+//                "select * from V_JCBGLBHIS where mzh is not null " +
+//                "and (mzh = #{mzh} or name = #{name} )" +
+//                "order by examinationDate" +
+//            "</script>"})
+    @Select({"<script>",
+            "SELECT * FROM V_JCBGLBHIS ",
+            "WHERE name = #{name} ",
+            "<if test='mzh != null and mzh != \"\"'>",
+            "   OR mzh = #{mzh} ",
+            "</if>",
+            "ORDER BY examinationDate",
             "</script>"})
-    List<Map<String ,Object>> getPacsJcList(@Param("name")String name,@Param("mzh")String mzh,@Param("start")String start,@Param("end")String end);
+    List<Map<String, Object>> getPacsJcList(@Param("name") String name, @Param("mzh") String mzh, @Param("start") String start, @Param("end") String end);
+
 
     @DataSource(value = DataSourceType.SLAVE_HIS)
-    @Select({"<script>" +
-            "select * from V_JYBGHIS where mzh is not null " +
-//            "<when test='name != null'>" +
-//            "and name = #{name}" +
-//            "</when>" +
-//            "<when test='mzh != null'>" +
-//            "and mzh = #{mzh}" +
-            "and (mzh = #{mzh} or name like CONCAT('%', #{name}, '%') )" +
-//            "</when>" +
-//            "<when test='start != null and end != null'>" +
-//            "and examinationDate between #{start} and #{end}" +
-//            "</when>" +
-            "order by examinationDate" +
+//    @Select({"<script>" +
+//            "select * from V_JYBGHIS where mzh is not null " +
+//            "and (mzh = #{mzh} or name = #{name} )" +
+//            "order by examinationDate" +
+//            "</script>"})
+    @Select({"<script>",
+            "select * from V_JYBGHIS where name = #{name}",
+            "<if test='mzh != null and mzh != \"\"'>",
+            "   OR mzh = #{mzh} ",
+            "</if>",
+            "order by examinationDate",
             "</script>"})
     List<Map<String ,Object>> getLisJyList(@Param("name")String name,@Param("mzh")String mzh,@Param("start")String start,@Param("end")String end);
-
-
 
     @DataSource(value = DataSourceType.SLAVE_LIS)
     @Select("select t.* from vi_his_patientresult t \n" +
@@ -278,8 +274,8 @@
             "  \n" +
             "FROM\n" +
             "  vi_his_patientinfo a\n" +
-            "WHERE  a.PATIENTTYPE=3 AND a.GH_PATIENTNO =#{tjNum}")
-    List<LtkjHysqd> getCcXZxYyLtkjHysqdByLisVi(String tjNum);
+            "WHERE  a.PATIENTTYPE=3 AND a.GH_PATIENTNO =#{tjNum}  AND a.HOSPITALID =#{dqyyyqbm}")
+    List<LtkjHysqd> getCcXZxYyLtkjHysqdByLisVi(@Param("tjNum") String tjNum,@Param("dqyyyqbm") String dqyyyqbm);
 
 
 
@@ -383,8 +379,8 @@
             "  SYSDATE create_time\n" +
             "   \n" +
             "FROM\n" +
-            "  ris.V_TJ_JCBGXX_NEWTJ a  WHERE trim(a.HIS_ID)=#{tjNum}")
-    List<LtkjExamJcsqd> getCcXZxYyPacsLtkjExamJcsqd(String tjNum);
+            "  ris.V_TJ_JCBGXX_NEWTJ a  WHERE trim(a.HIS_ID)=#{tjNum}   AND a.HOSTPITALID =#{dqyyyqbm} ")
+    List<LtkjExamJcsqd> getCcXZxYyPacsLtkjExamJcsqd(@Param("tjNum") String tjNum,@Param("dqyyyqbm") String dqyyyqbm);
 
 
     @DataSource(value = DataSourceType.SLAVE_PACS)

--
Gitblit v1.8.0