111 lines
4.1 KiB
XML
111 lines
4.1 KiB
XML
<?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 a.*,b.ywmc
|
|
from lab_resultmed a,xm_med b where a.ywdh = b.ywdh
|
|
<if test="jyrq != null ">
|
|
and a.jyrq = #{jyrq}
|
|
</if>
|
|
<if test="yq != null and yq != ''">
|
|
and a.yq = #{yq}
|
|
</if>
|
|
<if test="ybh != null and ybh != ''">
|
|
and a.ybh = #{ybh}
|
|
</if>
|
|
<if test="xmdh != null and xmdh != ''">
|
|
and a.xmdh = #{xmdh}
|
|
</if>
|
|
<if test="ywdh != null and ywdh != ''">
|
|
and a.ywdh = #{ywdh}
|
|
</if>
|
|
|
|
</select>
|
|
|
|
<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>
|
|
<if test="xmdh != null and xmdh != ''">
|
|
and xmdh = #{xmdh}
|
|
</if>
|
|
<if test="ywdh != null and ywdh != ''">
|
|
and ywdh = #{ywdh}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<delete id="delLabResultMed" >
|
|
delete 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>
|
|
<if test="ywdh != null and ywdh != ''">
|
|
and ywdh = #{ywdh}
|
|
</if>
|
|
</where>
|
|
</delete>
|
|
<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} as jyrq, #{item.yq} as yq, #{item.ybh} as ybh,
|
|
#{item.xmdh} as xmdh, #{item.xh} as xh, #{item.ywdh} as ywdh, #{item.mic} as mic,
|
|
#{item.rad} as rad, #{item.csjg} as csjg, #{item.jgbz} as jgbz, #{item.bz} as bz,#{item.txtresult} as txtresult
|
|
</foreach>
|
|
) AS temp
|
|
</insert>
|
|
<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>
|
|
|
|
</mapper> |