From c42f62b32bac302a7ac9fcde7489f7c5fc6e11aa Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期五, 06 十二月 2024 15:35:17 +0800 Subject: [PATCH] zjh20241205-3 --- ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java | 125 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 124 insertions(+), 1 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 ebab4bb..4150ea3 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 @@ -3,7 +3,6 @@ import com.ltkj.common.annotation.DataSource; import com.ltkj.common.enums.DataSourceType; import com.ltkj.hosp.sqlDomain.*; -import com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -83,6 +82,13 @@ @Param("orderId")String orderId, @Param("tjnum")String tjnum, @Param("dockerId")String dockerId); + + @DataSource(value = DataSourceType.MASTER) +// @Select("call tj_update_detatil_by_vi(#{tjnum,mode=IN}") + public void tjUpdateDetatilByVi(Map<String,Object> map); + + + @DataSource(value = DataSourceType.MASTER) @Select("call tj_jc_update_detatil(#{cardId,mode=IN},#{orderId,mode=IN},#{tjnum,mode=IN},#{dockerId,mode=IN})") @@ -208,4 +214,121 @@ public List<Map<String,Object>> getTjYxjcList(@Param("patname")String patname, @Param("sex")String sex, @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}" + + "</when>" + + "<when test='start != null and end != null'>" + + "and examinationDate between #{start} and #{end}" + + "</when>" + + "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) + @Select("select t.* from vi_his_patientresult t \n" + + "\tjoin(select * from vi_his_patientinfo t where t.HOSPITALID='chkwyy' and t.PATIENTNO like '800%') b on b.SAMPLEID = t.SAMPLEID") + List<Map<String, Object>> getCcXZxYyLisJgSt(); + + + @DataSource(value = DataSourceType.SLAVE_LIS) + @Select("SELECT\n" + + " a.GH_PATIENTNO tjh,\n" + + " a.SAMPLEID tmh,\n" + + " NULL bbbh,\n" + + " NULL bbmc,\n" + + " a.SFXMID xmid,\n" + + " REPLACE(a.SFXMNAME,'tj_','') xmmc,\n" + + " a.SENDDATE sqsj,\n" + + " a.SENDDOCTOR sqys,\n" + + " a.CHECKDATE jgsj,\n" + + " a.TXM sqdh,\n" + + " a.SENDDOCTOR sqrxm,\n" + + " '8001' sqrdm,\n" + + " a.AUDITDOCTOR shrxm,\n" + + " '宸插' jybgjg\n" + + " \n" + + "FROM\n" + + " vi_his_patientinfo a\n" + + "WHERE a.HOSPITALID='chkwyy' AND a.PATIENTTYPE=3 AND a.GH_PATIENTNO =#{tjNum}") + List<LtkjHysqd> getCcXZxYyLtkjHysqdByLisVi(String tjNum); + + + @DataSource(value = DataSourceType.SLAVE_LIS) + @Select("SELECT\n" + + " a.SAMPLEID tmh,\n" + + " a.ITEMCODE jcxmid,\n" + + " a.ITEMNAME jcxm,\n" + + " NULL tdh,\n" + + " a.RESULT jyjg,\n" + + " a.UNIT jgdw,\n" + + " a.RANGEDOWN fwzdz,\n" + + " a.RANGEUP fwzgz,\n" + + " CONCAT(a.RANGEDOWN,'-',a.RANGEUP) fwz,\n" + + " b.CHECKDATE jysj,\n" + + " b.CHECKER jyys,\n" + + " b.AUDITDATE shsj,\n" + + " NULL shys,\n" + + " b.AUDITDOCTOR shysmc,\n" + + " NULL tpurl,\n" + + " a.JUDGE ycbz\n" + + "FROM\n" + + " vi_his_patientresult a JOIN vi_his_patientinfo b ON b.SAMPLEID=a.SAMPLEID\n" + + "WHERE b.HOSPITALID='chkwyy' AND b.PATIENTTYPE=3 AND\n" + + " a.SAMPLEID = #{tmh}") + List<LtkjHybgd> getCcXZxYyLtkjHybgdByLisVi(String tmh); + + + + @DataSource(value = DataSourceType.SLAVE_PACS) + @Select("SELECT * FROM ris.V_TJ_JCBGXX_NEWTJ") + List<Map<String, Object>> getCcXZxYyPacsJgSt(); + + @DataSource(value = DataSourceType.SLAVE_PACS) + @Select("SELECT\n" + + " a.HIS_ID tjh,\n" + + " a.HIS_ID tmh,\n" + + " a.JCLX jclx,\n" + + " NULL jczlx,\n" + + " a.BGYS bgys,\n" + + " NULL bgysid,\n" + + " a.SQRJ sqsj,\n" + + " a.BGSJ jgsj,\n" + + " REPLACE(a.JCMC,'tj_','') jcxmmc,\n" + + " a.JCMCID jcxmid,\n" + + " a.JCBW bw,\n" + + " TRIM(a.JCJL) jgzt,\n" + + " TRIM(a.JCSJ) jgbx\n" + + " \n" + + "FROM\n" + + " ris.V_TJ_JCBGXX_NEWTJ a WHERE a.HIS_ID=#{tjNum}") + List<LtkjExamJcsqd> getCcXZxYyPacsLtkjExamJcsqd(String tjNum); + + + @DataSource(value = DataSourceType.SLAVE_PACS) + @Select(" SELECT\n" + + " a.HIS_ID tjh,\n" + + " a.HIS_ID tmh,\n" + + " a.JCMCID xmdm,\n" + + " a.JCMC xmmc,\n" + + " NULL bg_mig,\n" + + " NULL bg_url,\n" + + " TRIM(a.JCSJ) bg_nr,\n" + + " a.SHYS shysdm,\n" + + " a.SHYS shysxm,\n" + + " TRIM(a.JCJL) yxbx,\n" + + " a.BGSJ zdsj,\n" + + " a.SQRJ sqsj,\n" + + " a.JCBW jcbw\n" + + "FROM\n" + + " ris.V_TJ_JCBGXX_NEWTJ a WHERE a.HIS_ID=#{tjNum}") + List<LtkjExamJcbgd> getCcXZxYyPacsLtkjExamJcbgd(String tjNum); } -- Gitblit v1.8.0