From d866e43afbe901bfc640776e02f767b9045acbc2 Mon Sep 17 00:00:00 2001
From: 赵文轩 <1652863494@qq.com>
Date: 星期三, 12 六月 2024 09:04:56 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peis

---
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAskHistorysMapper.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAskHistorysMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAskHistorysMapper.java
index d26f34f..eb65560 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAskHistorysMapper.java
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAskHistorysMapper.java
@@ -4,6 +4,11 @@
 import com.ltkj.hosp.domain.TjAdvice;
 import com.ltkj.hosp.domain.TjAskHistorys;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Company: 瑗垮畨璺嘲绉戞妧鏈夐檺鍏徃
@@ -12,4 +17,18 @@
  */
 @Mapper
 public interface TjAskHistorysMapper extends BaseMapper<TjAskHistorys> {
+
+
+    @Select({"<script>", "select", "GROUP_CONCAT(pro_name ORDER BY pro_name) AS names", "from dict_zhengzhuang", "where id in",
+            "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
+            "#{id}",
+            "</foreach>",
+            "</script>" })
+    String getZhengZhuangStr(@Param("ids")List<String> ids);
+
+
+    @Select("SELECT IF((SELECT COUNT(*) from (SELECT b.* FROM tj_ask_medical_history a left join tj_ask_historys b on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�') c where c.icd_id IN ('376','11907','30123','11197','15435'))>0,(SELECT REPLACE((SELECT REPLACE((SELECT REPLACE((SELECT REPLACE((SELECT REPLACE('1銆佹棤寮傚父2銆佽倽鐐�3銆佽偤缁撴牳4銆佺毊鑲よ繃鏁�5銆佸績鑴忕柧鐥�6銆侀珮琛�鍘�',(SELECT IFNULL((SELECT c.disease_name from (SELECT b.* FROM tj_ask_medical_history a left join tj_ask_historys b on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�') c where c.icd_id='11197'),'') aaa),'楂樿鍘嬧垰')),(SELECT IFNULL((SELECT c.disease_name from (SELECT b.* FROM tj_ask_medical_history a left join tj_ask_historys b on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�') c where c.icd_id='15435'),'') aaa),'鑲濈値鈭�') as a),(SELECT IFNULL((SELECT c.disease_name from (SELECT b.* FROM tj_ask_medical_history a left join tj_ask_historys b on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�') c where c.icd_id='376'),'') aaa),'鑲虹粨鏍糕垰') as bb),(SELECT IFNULL((SELECT c.disease_name from (SELECT b.* FROM tj_ask_medical_history a left join tj_ask_historys b\n" +
+            "on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�') c where c.icd_id='30123'),'') aaa) ,'鐨偆杩囨晱鈭�')),(SELECT IFNULL((SELECT c.disease_name from (SELECT b.* FROM tj_ask_medical_history a left join tj_ask_historys b on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�') c where c.icd_id='11907'),'') aaa),'蹇冭剰鐤剧梾鈭�')  '鏃㈠線鐥呭彶'),'1銆佹棤寮傚父鈭� 2銆佽倽鐐� 3銆佽偤缁撴牳 4銆佺毊鑲よ繃鏁� 5銆佸績鑴忕柧鐥� 6銆侀珮琛�鍘�') '鏃㈠線鐥呭彶'  ,\n" +
+            "(SELECT GROUP_CONCAT(hh.a SEPARATOR ',')  from (SELECT b.disease_name a FROM tj_ask_medical_history a left join tj_ask_historys b on a.ask_id=b.ask_id where a.tj_num='${tjNumber}' and b.type='鏃㈠線鐥�' and b.icd_id not IN ('376','11907','30123','11197','15435')) hh) '鍏朵粬'")
+    Map<String,String> jiwangbingshi(String tjNumber);
 }

--
Gitblit v1.8.0