78 lines
2.6 KiB
XML
78 lines
2.6 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.LabResultReMapper">
|
||
|
|
<select id="getLabResultRe" resultType="com.czlis.common.core.domain.entity.lis.LabResultRe">
|
||
|
|
select *
|
||
|
|
from lab_result_re
|
||
|
|
<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>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
<select id="getLabResultReAll" resultType="com.czlis.common.core.domain.entity.lis.LabResultRe">
|
||
|
|
SELECT lab_result_re.jyrq,
|
||
|
|
lab_result_re.yq,
|
||
|
|
lab_result_re.ybh,
|
||
|
|
lab_result_re.xmdh,
|
||
|
|
lab_result_re.csjg
|
||
|
|
FROM lab_result_re,
|
||
|
|
xm_info
|
||
|
|
WHERE ( lab_result_re.yq = xm_info.yq ) and
|
||
|
|
( lab_result_re.xmdh = xm_info.xmdh ) and
|
||
|
|
( ( lab_result_re.jyrq = :jyrq ) AND
|
||
|
|
( lab_result_re.yq = :yq ) AND
|
||
|
|
( lab_result_re.ybh = :ybh ) )
|
||
|
|
<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>
|
||
|
|
</where>
|
||
|
|
ORDER BY xm_info.dyxh asc
|
||
|
|
</select>
|
||
|
|
<insert id="insertLabResultRe" parameterType="com.czlis.common.core.domain.entity.lis.LabResultRe">
|
||
|
|
insert into lab_result_re (jyrq, yq, ybh,xmdh,csjg)
|
||
|
|
values (#{jyrq},#{yq},#{ybh},#{xmdh},#{csjg})
|
||
|
|
</insert>
|
||
|
|
<update id="updateLabResultRe" parameterType="com.czlis.common.core.domain.entity.lis.LabResultRe">
|
||
|
|
update lab_result_re
|
||
|
|
<set>
|
||
|
|
<if test="xmdh != null">
|
||
|
|
xmdh = #{xmdh},
|
||
|
|
</if>
|
||
|
|
<if test="csjg != null">
|
||
|
|
csjg = #{csjg},
|
||
|
|
</if>
|
||
|
|
</set>
|
||
|
|
<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>
|
||
|
|
</where>
|
||
|
|
</update>
|
||
|
|
</mapper>
|