From ed721d3c77517ce4e3bcc52cad9b7f52aa865c51 Mon Sep 17 00:00:00 2001
From: zhaowenxuan <chacca165@163.com>
Date: 星期五, 01 八月 2025 17:57:49 +0800
Subject: [PATCH] pdf医师图片
---
ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 102 insertions(+), 1 deletions(-)
diff --git a/ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml b/ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml
index 8500345..edf3ce8 100644
--- a/ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml
+++ b/ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml
@@ -35,6 +35,7 @@
<result property="pym" column="pym"/>
<result property="dictCompId" column="dict_comp_id"/>
<result property="compName" column="comp_name"/>
+ <result property="hisJzkh" column="his_jzkh"/>
</resultMap>
<sql id="selectTjCustomerVo">
@@ -65,7 +66,7 @@
age_unit,
career,
dw_phone,
- pym,dict_comp_id,comp_name
+ pym,dict_comp_id,comp_name,his_jzkh,gl,wen_hua
from tj_customer
</sql>
@@ -130,6 +131,7 @@
<if test="pym != null">pym,</if>
<if test="dictCompId != null">dict_comp_id,</if>
<if test="compName != null">comp_name,</if>
+ <if test="hisJzkh != null">his_jzkh,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cusName != null and cusName != ''">#{cusName},</if>
@@ -161,6 +163,7 @@
<if test="pym != null">#{pym},</if>
<if test="dictCompId != null">#{dictCompId},</if>
<if test="compName != null">#{compName},</if>
+ <if test="hisJzkh != null">#{hisJzkh},</if>
</trim>
</insert>
@@ -196,6 +199,7 @@
<if test="pym != null">pym = #{pym},</if>
<if test="dictCompId != null">dict_comp_id = #{dictCompId},</if>
<if test="compName != null">comp_name = #{compName},</if>
+ <if test="hisJzkh != null">his_jzkh = #{hisJzkh},</if>
</trim>
where cus_id = #{cusId}
</update>
@@ -212,4 +216,101 @@
#{cusId}
</foreach>
</delete>
+
+ <select id="vcustomerlist" parameterType="string" resultType="map">
+ select * from v_customer
+ <where>
+ <if test="name != null and name != ''">and xm like concat('%', #{name}, '%')</if>
+ <if test="sjh != null and sjh != ''">and lxdh like concat('%', #{sjh}, '%')</if>
+ <if test="sfzh != null and sfzh != ''">and sfzh like concat('%', #{sfzh}, '%')</if>
+ </where>
+ </select>
+
+
+ <select id="getcusList" parameterType="TjCustomer" resultMap="TjCustomerResult">
+ <include refid="selectTjCustomerVo"/>
+ <where>
+ <if test="cusName != null and cusName != ''">and cus_name like concat('%', #{cusName}, '%')</if>
+ <if test="cusSex != null ">and cus_sex = #{cusSex}</if>
+ <if test="cusBrithday != null ">and cus_brithday = #{cusBrithday}</if>
+ <if test="cusAddr != null and cusAddr != ''">and cus_addr = #{cusAddr}</if>
+ <if test="addr != null and addr != ''">and addr = #{addr}</if>
+ <if test="cusPhone != null and cusPhone != ''">and cus_phone like concat('%',#{cusPhone}, '%') </if>
+ <if test="cusPostcode != null and cusPostcode != ''">and cus_postCode = #{cusPostcode}</if>
+ <if test="cusEmail != null and cusEmail != ''">and cus_email = #{cusEmail}</if>
+ <if test="indexCard != null and indexCard != ''">and index_card = #{indexCard}</if>
+ <if test="cusNational != null and cusNational != ''">and cus_national = #{cusNational}</if>
+ <if test="cusMarryStatus != null and cusMarryStatus != ''">and cus_marry_status = #{cusMarryStatus}</if>
+ <if test="cusIdcard != null and cusIdcard != ''">and cus_idcard like concat('%',#{cusIdcard}, '%') </if>
+ <if test="cusIntroduce != null and cusIntroduce != ''">and cus_introduce = #{cusIntroduce}</if>
+ <if test="cusNumber != null ">and cus_number = #{cusNumber}</if>
+ <if test="cusIsvip != null and cusIsvip != ''">and cus_isvip = #{cusIsvip}</if>
+ <if test="pym != null and pym != ''">and pym = #{pym}</if>
+ <if test="dictCompId != null and dictCompId != ''">and dict_comp_id = #{dictCompId}</if>
+ <if test="compName != null and compName != ''">and comp_name = #{compName}</if>
+ and deleted =0
+ </where>
+ </select>
+ <select id="getCusInfoList" resultType="java.util.Map">
+ SELECT
+ c.cus_name as name,
+ c.cus_idcard as card,
+ CASE c.cus_sex
+ WHEN 0 THEN '鐢�'
+ WHEN 1 THEN '濂�'
+ ELSE '鏈煡'
+ END AS sex,
+ c.cus_brithday as csrq,
+ o.tj_number as tjNum,
+ c.cus_phone as phone,
+ DATE_FORMAT(o.create_time, '%Y-%m-%d %H:%i:%s') as time,
+ TIMESTAMPDIFF(YEAR, c.cus_brithday, CURDATE()) -
+ CASE
+ WHEN MONTH(c.cus_brithday) > MONTH(CURDATE())
+ OR (MONTH(c.cus_brithday) = MONTH(CURDATE()) AND DAY(c.cus_brithday) > DAY(CURDATE()))
+ THEN 1
+ ELSE 0
+ END AS age,
+ CASE WHEN r.re_id IS NOT NULL THEN 1 ELSE 0 END AS type
+FROM
+ tj_order o
+ JOIN tj_customer c ON o.user_id = c.cus_id
+ LEFT JOIN tj_report r ON o.tj_number = r.tj_number
+WHERE
+ c.cus_idcard = #{card}
+ and o.create_time > #{time}
+ ORDER BY
+ o.create_time DESC
+ </select>
+ <select id="getCusInfoListByCardAndName" resultType="java.util.Map">
+ SELECT
+ c.cus_name as name,
+ c.cus_idcard as card,
+ CASE c.cus_sex
+ WHEN 0 THEN '鐢�'
+ WHEN 1 THEN '濂�'
+ ELSE '鏈煡'
+ END AS sex,
+ c.cus_brithday as csrq,
+ o.tj_number as tjNum,
+ c.cus_phone as phone,
+ DATE_FORMAT(o.create_time, '%Y-%m-%d %H:%i:%s') as time,
+ TIMESTAMPDIFF(YEAR, c.cus_brithday, CURDATE()) -
+ CASE
+ WHEN MONTH(c.cus_brithday) > MONTH(CURDATE())
+ OR (MONTH(c.cus_brithday) = MONTH(CURDATE()) AND DAY(c.cus_brithday) > DAY(CURDATE()))
+ THEN 1
+ ELSE 0
+ END AS age,
+ CASE WHEN r.re_id IS NOT NULL THEN 1 ELSE 0 END AS type
+FROM
+ tj_order o
+ JOIN tj_customer c ON o.user_id = c.cus_id
+ LEFT JOIN tj_report r ON o.tj_number = r.tj_number
+WHERE
+ c.cus_idcard = #{card} AND c.cus_name = #{name} AND c.deleted = 0
+ and o.create_time > #{time}
+ ORDER BY
+ o.create_time DESC
+ </select>
</mapper>
--
Gitblit v1.8.0