112 lines
4.0 KiB
XML
Raw Normal View History

2025-09-19 22:50:07 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.czlis.interfaceCommon.mapper.LabResultMedMapper">
<select id="getLabResultMed" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
select *
from lab_resultmed
<where>
<if test="jyrq != null ">
and jyrq = #{jyrq}
</if>
<if test="yq != null and yq != ''">
and yq = #{yq}
</if>
<if test="ybh != null and ybh != ''">
and ybh = #{ybh}
</if>
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
2025-10-31 16:55:06 +08:00
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
2025-09-19 22:50:07 +08:00
</where>
</select>
2025-10-31 16:55:06 +08:00
2025-09-19 22:50:07 +08:00
<select id="getLabResultMedCount" resultType="int">
select count(1)
from lab_resultmed
<where>
<if test="jyrq != null ">
and jyrq = #{jyrq}
</if>
<if test="yq != null and yq != ''">
and yq = #{yq}
</if>
<if test="ybh != null and ybh != ''">
and ybh = #{ybh}
</if>
2025-10-31 16:55:06 +08:00
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
2025-09-19 22:50:07 +08:00
</where>
</select>
2025-10-17 18:25:22 +08:00
<delete id="delLabResultMed" >
delete from lab_resultmed
2025-10-31 16:55:06 +08:00
<where>
<if test="jyrq != null ">
and jyrq = #{jyrq}
</if>
<if test="yq != null and yq != ''">
and yq = #{yq}
</if>
<if test="ybh != null and ybh != ''">
and ybh = #{ybh}
</if>
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
</where>
2025-10-17 18:25:22 +08:00
</delete>
2025-10-30 18:44:48 +08:00
<insert id="insertLabResultMed" parameterType="com.czlis.common.core.domain.entity.lis.LabResultMed">
insert into lab_resultmed (jyrq, yq, ybh,
xmdh, xh, ywdh, mic,
rad, csjg, jgbz, bz,
txtresult)
values (#{jyrq}, #{yq}, #{ybh},
#{xmdh}, #{xh}, #{ywdh}, #{mic},
#{rad}, #{csjg}, #{jgbz}, #{bz},
#{txtresult})
</insert>
<insert id="insertLabResultMedAll" parameterType="java.util.List">
insert into lab_resultmed (jyrq, yq, ybh,xmdh, xh, ywdh, mic,rad, csjg, jgbz, bz,txtresult)
SELECT jyrq, yq, ybh,xmdh, xh, ywdh, mic,rad, csjg, jgbz, bz,txtresult
FROM (
<foreach collection="list" item="item" separator="UNION ALL">
SELECT #{item.jyrq}, #{item.yq}, #{item.ybh},
#{item.xmdh}, #{item.xh}, #{item.ywdh}, #{item.item.mic},
#{item.rad}, #{item.csjg}, #{item.jgbz}, #{item.bz},#{item.txtresult}
</foreach>
) AS temp
</insert>
2025-10-31 16:55:06 +08:00
<update id="updateLabResultMed" parameterType="com.czlis.common.core.domain.entity.lis.LabResultMed">
update lab_resultmed
set xh=#{xh},ywdh=#{ywdh}, mic=#{mic},rad=#{rad}, csjg=#{csjg},
jgbz=#{jgbz},bz=#{bz},txtresult=#{txtresult}
<where>
<if test="jyrq != null ">
and jyrq = #{jyrq}
</if>
<if test="yq != null and yq != ''">
and yq = #{yq}
</if>
<if test="ybh != null and ybh != ''">
and ybh = #{ybh}
</if>
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
</where>
</update>
2025-10-30 18:44:48 +08:00
2025-09-19 22:50:07 +08:00
</mapper>