From fba64a7ecd8fa037d51f510c8919a8d05e236ec1 Mon Sep 17 00:00:00 2001
From: 侯瑞军 <411269194@kidgrow.com>
Date: Tue, 14 Apr 2020 18:54:25 +0800
Subject: [PATCH] 1.修改医院列表,增加科室,区域数据列 2.增加区域数据联动js插件(area.js),并书写使用说明

---
 kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
index 0026ee8..00c963b 100644
--- a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
+++ b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
@@ -129,4 +129,56 @@
         <include refid="where"/>
         order by id desc
     </select>
+    <sql id="whereList">
+        <where>
+            DEP.is_del = 0
+            AND HOS.is_del = 0
+            <if test="p.isScreen != null and p.isScreen !=''">
+                and is_screen = #{p.isScreen}
+            </if>
+            <if test="p.isAnswer != null and p.isAnswer !=''">
+                and is_answer = #{p.isAnswer}
+            </if>
+            <if test="p.hospitalState != null and p.hospitalState !=''">
+                and hospital_state = #{p.hospitalState}
+            </if>
+            <if test="p.hospitalProvince != null and p.hospitalProvince !=''">
+                and hospital_province = #{p.hospitalProvince}
+            </if>
+            <if test="p.hospitalCity != null and p.hospitalCity !=''">
+                and hospital_city = #{p.hospitalCity}
+            </if>
+            <if test="p.hospitalArea != null and p.hospitalArea !=''">
+                and hospital_area = #{p.hospitalArea}
+            </if>
+            <if test="p.hospitalName != null and p.hospitalName !=''">
+                and hospital_name LIKE concat('%',#{p.hospitalName},'%')
+            </if>
+        </where>
+    </sql>
+    <select id="findHospitalList" resultType="com.kidgrow.usercenter.vo.HospitalListVo">
+        SELECT
+        DEP.department_name,
+        DEP.id department_id,
+        DEP.server_user_name,
+        DEP.server_user_id,
+        DEP.org_id,
+        HOS.id hospital_id,
+        HOS.hospital_name,
+        HOS.hospital_code,
+        HOS.hospital_province,
+        HOS.hospital_city,
+        HOS.hospital_area,
+        HOS.hospital_tel,
+        HOS.hospital_state,
+        HOS.hospital_link,
+        HOS.is_screen,
+        HOS.is_answer,
+        HOS.create_time
+        FROM
+	sys_department DEP
+	LEFT JOIN sys_hospital HOS ON DEP.hospital_id = HOS.id
+        <include refid="whereList"/>
+        order by create_time  desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0