From 1917e1b69a8480654c086df54e32b0be94a88e7d Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期一, 17 三月 2025 17:51:35 +0800
Subject: [PATCH] zjh20250317

---
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java |   30 +++++++-----------------------
 1 files changed, 7 insertions(+), 23 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 c577c8a..fef5a9f 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
@@ -219,31 +219,15 @@
     @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}" +
-                "</when>" +
-                "<when test='start != null and end != null'>" +
-                "and examinationDate between #{start} and #{end}" +
-                "</when>" +
+                "and (mzh = #{mzh} or name = #{name} )" +
                 "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);
 
-    @DataSource(value = DataSourceType.SLAVE_LIS)
+    @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}" +
-            "</when>" +
-            "<when test='start != null and end != null'>" +
-            "and examinationDate between #{start} and #{end}" +
-            "</when>" +
+            "and (mzh = #{mzh} or name = #{name} )" +
             "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);
@@ -276,8 +260,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);
 
 
 
@@ -381,8 +365,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