356 lines
11 KiB
XML
356 lines
11 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.LabResultMapper">
|
|
<select id="getLabResult" parameterType="com.czlis.common.core.domain.entity.lis.LabResult" resultType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
select *
|
|
from lab_result
|
|
<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="getLabResultList" parameterType="com.czlis.common.core.domain.entity.lis.LabResult" resultType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
select
|
|
lab_result.jyrq, lab_result.yq, lab_result.ybh, lab_result.xmdh, wyh, csjg, od, cutoff, lab_result.jgbz, bz1, bz2, yhdh, instrid, operdt,
|
|
operna, refs, flag, lab_result.dw, result_flag, alarm_flag, redo_flag, sqxmdh, redo_text,xm_info.xmmc,xm_info.ygzq,xm_info.ygzd
|
|
,textresult
|
|
from lab_result join xm_info on xm_info.yq=lab_result.yq and xm_info.xmdh=lab_result.xmdh
|
|
<where>
|
|
<if test="jyrq != null ">
|
|
and lab_result.jyrq = #{jyrq}
|
|
</if>
|
|
<if test="yq != null and yq != ''">
|
|
and lab_result.yq = #{yq}
|
|
</if>
|
|
<if test="ybh != null and ybh != ''">
|
|
and lab_result.ybh = #{ybh}
|
|
</if>
|
|
</where> ORDER BY xm_info.dyxh
|
|
</select>
|
|
<delete id="delLabResult" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
delete from lab_result
|
|
where jyrq = #{jyrq}
|
|
and yq = #{yq,jdbcType=CHAR}
|
|
and ybh = #{ybh,jdbcType=VARCHAR}
|
|
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
|
</delete>
|
|
<delete id="delNullLabResult" >
|
|
delete from lab_result
|
|
where jyrq = #{jyrq}
|
|
and yq = #{yq,jdbcType=CHAR}
|
|
and ybh = #{ybh,jdbcType=VARCHAR}
|
|
and (rtrim(csjg) ='' or csjg is null)
|
|
</delete>
|
|
<insert id="insertLabResult" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
insert into lab_result (jyrq, yq, ybh,
|
|
xmdh, wyh, csjg, od,
|
|
cutoff, jgbz, bz1, bz2,
|
|
yhdh, instrid, operdt,
|
|
operna, refs, flag,
|
|
dw, result_flag, alarm_flag,
|
|
redo_flag, sqxmdh, redo_text,
|
|
bz3, textresult)
|
|
values (#{jyrq}, #{yq,jdbcType=CHAR}, #{ybh,jdbcType=VARCHAR},
|
|
#{xmdh,jdbcType=VARCHAR}, #{wyh,jdbcType=VARCHAR}, #{csjg,jdbcType=VARCHAR}, #{od,jdbcType=VARCHAR},
|
|
#{cutoff,jdbcType=VARCHAR}, #{jgbz,jdbcType=CHAR}, #{bz1,jdbcType=VARCHAR}, #{bz2,jdbcType=VARCHAR},
|
|
#{yhdh,jdbcType=VARCHAR}, #{instrid,jdbcType=INTEGER}, #{operdt,jdbcType=TIMESTAMP},
|
|
#{operna,jdbcType=VARCHAR}, #{refs,jdbcType=VARCHAR}, #{flag,jdbcType=VARCHAR},
|
|
#{dw,jdbcType=VARCHAR}, #{resultFlag,jdbcType=CHAR}, #{alarmFlag,jdbcType=CHAR},
|
|
#{redoFlag,jdbcType=CHAR}, #{sqxmdh,jdbcType=VARCHAR}, #{redoText,jdbcType=VARCHAR},
|
|
#{bz3,jdbcType=VARCHAR}, #{textresult,jdbcType=LONGVARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
insert into lab_result
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="jyrq != null">
|
|
jyrq,
|
|
</if>
|
|
<if test="yq != null">
|
|
yq,
|
|
</if>
|
|
<if test="ybh != null">
|
|
ybh,
|
|
</if>
|
|
<if test="xmdh != null">
|
|
xmdh,
|
|
</if>
|
|
<if test="wyh != null">
|
|
wyh,
|
|
</if>
|
|
<if test="csjg != null">
|
|
csjg,
|
|
</if>
|
|
<if test="od != null">
|
|
od,
|
|
</if>
|
|
<if test="cutoff != null">
|
|
cutoff,
|
|
</if>
|
|
<if test="jgbz != null">
|
|
jgbz,
|
|
</if>
|
|
<if test="bz1 != null">
|
|
bz1,
|
|
</if>
|
|
<if test="bz2 != null">
|
|
bz2,
|
|
</if>
|
|
<if test="yhdh != null">
|
|
yhdh,
|
|
</if>
|
|
<if test="instrid != null">
|
|
instrid,
|
|
</if>
|
|
<if test="operdt != null">
|
|
operdt,
|
|
</if>
|
|
<if test="operna != null">
|
|
operna,
|
|
</if>
|
|
<if test="refs != null">
|
|
refs,
|
|
</if>
|
|
<if test="flag != null">
|
|
flag,
|
|
</if>
|
|
<if test="dw != null">
|
|
dw,
|
|
</if>
|
|
<if test="resultFlag != null">
|
|
result_flag,
|
|
</if>
|
|
<if test="alarmFlag != null">
|
|
alarm_flag,
|
|
</if>
|
|
<if test="redoFlag != null">
|
|
redo_flag,
|
|
</if>
|
|
<if test="sqxmdh != null">
|
|
sqxmdh,
|
|
</if>
|
|
<if test="redoText != null">
|
|
redo_text,
|
|
</if>
|
|
<if test="bz3 != null">
|
|
bz3,
|
|
</if>
|
|
<if test="textresult != null">
|
|
textresult,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="jyrq != null">
|
|
#{jyrq},
|
|
</if>
|
|
<if test="yq != null">
|
|
#{yq,jdbcType=CHAR},
|
|
</if>
|
|
<if test="ybh != null">
|
|
#{ybh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="xmdh != null">
|
|
#{xmdh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="wyh != null">
|
|
#{wyh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="csjg != null">
|
|
#{csjg,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="od != null">
|
|
#{od,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="cutoff != null">
|
|
#{cutoff,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="jgbz != null">
|
|
#{jgbz,jdbcType=CHAR},
|
|
</if>
|
|
<if test="bz1 != null">
|
|
#{bz1,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="bz2 != null">
|
|
#{bz2,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="yhdh != null">
|
|
#{yhdh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="instrid != null">
|
|
#{instrid,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="operdt != null">
|
|
#{operdt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="operna != null">
|
|
#{operna,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="refs != null">
|
|
#{refs,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="flag != null">
|
|
#{flag,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="dw != null">
|
|
#{dw,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="resultFlag != null">
|
|
#{resultFlag,jdbcType=CHAR},
|
|
</if>
|
|
<if test="alarmFlag != null">
|
|
#{alarmFlag,jdbcType=CHAR},
|
|
</if>
|
|
<if test="redoFlag != null">
|
|
#{redoFlag,jdbcType=CHAR},
|
|
</if>
|
|
<if test="sqxmdh != null">
|
|
#{sqxmdh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="redoText != null">
|
|
#{redoText,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="bz3 != null">
|
|
#{bz3,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="textresult != null">
|
|
#{textresult,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
update lab_result
|
|
<set>
|
|
<if test="wyh != null">
|
|
wyh = #{wyh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="csjg != null">
|
|
csjg = #{csjg,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="od != null">
|
|
od = #{od,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="cutoff != null">
|
|
cutoff = #{cutoff,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="jgbz != null">
|
|
jgbz = #{jgbz,jdbcType=CHAR},
|
|
</if>
|
|
<if test="bz1 != null">
|
|
bz1 = #{bz1,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="bz2 != null">
|
|
bz2 = #{bz2,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="yhdh != null">
|
|
yhdh = #{yhdh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="instrid != null">
|
|
instrid = #{instrid,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="operdt != null">
|
|
operdt = #{operdt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="operna != null">
|
|
operna = #{operna,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="refs != null">
|
|
refs = #{refs,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="flag != null">
|
|
flag = #{flag,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="dw != null">
|
|
dw = #{dw,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="resultFlag != null">
|
|
result_flag = #{resultFlag,jdbcType=CHAR},
|
|
</if>
|
|
<if test="alarmFlag != null">
|
|
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
|
</if>
|
|
<if test="redoFlag != null">
|
|
redo_flag = #{redoFlag,jdbcType=CHAR},
|
|
</if>
|
|
<if test="sqxmdh != null">
|
|
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="redoText != null">
|
|
redo_text = #{redoText,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="bz3 != null">
|
|
bz3 = #{bz3,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="textresult != null">
|
|
textresult = #{textresult,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
where jyrq = #{jyrq}
|
|
and yq = #{yq,jdbcType=CHAR}
|
|
and ybh = #{ybh,jdbcType=VARCHAR}
|
|
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
|
</update>
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
update lab_result
|
|
set wyh = #{wyh,jdbcType=VARCHAR},
|
|
csjg = #{csjg,jdbcType=VARCHAR},
|
|
od = #{od,jdbcType=VARCHAR},
|
|
cutoff = #{cutoff,jdbcType=VARCHAR},
|
|
jgbz = #{jgbz,jdbcType=CHAR},
|
|
bz1 = #{bz1,jdbcType=VARCHAR},
|
|
bz2 = #{bz2,jdbcType=VARCHAR},
|
|
yhdh = #{yhdh,jdbcType=VARCHAR},
|
|
instrid = #{instrid,jdbcType=INTEGER},
|
|
operdt = #{operdt,jdbcType=TIMESTAMP},
|
|
operna = #{operna,jdbcType=VARCHAR},
|
|
refs = #{refs,jdbcType=VARCHAR},
|
|
flag = #{flag,jdbcType=VARCHAR},
|
|
dw = #{dw,jdbcType=VARCHAR},
|
|
result_flag = #{resultFlag,jdbcType=CHAR},
|
|
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
|
redo_flag = #{redoFlag,jdbcType=CHAR},
|
|
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
|
redo_text = #{redoText,jdbcType=VARCHAR},
|
|
bz3 = #{bz3,jdbcType=VARCHAR},
|
|
textresult = #{textresult,jdbcType=LONGVARCHAR}
|
|
where jyrq = #{jyrq}
|
|
and yq = #{yq,jdbcType=CHAR}
|
|
and ybh = #{ybh,jdbcType=VARCHAR}
|
|
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
|
</update>
|
|
<update id="updateLabResult" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
update lab_result
|
|
set wyh = #{wyh,jdbcType=VARCHAR},
|
|
csjg = #{csjg,jdbcType=VARCHAR},
|
|
od = #{od,jdbcType=VARCHAR},
|
|
cutoff = #{cutoff,jdbcType=VARCHAR},
|
|
jgbz = #{jgbz,jdbcType=CHAR},
|
|
bz1 = #{bz1,jdbcType=VARCHAR},
|
|
bz2 = #{bz2,jdbcType=VARCHAR},
|
|
yhdh = #{yhdh,jdbcType=VARCHAR},
|
|
instrid = #{instrid,jdbcType=INTEGER},
|
|
operdt = #{operdt,jdbcType=TIMESTAMP},
|
|
operna = #{operna,jdbcType=VARCHAR},
|
|
refs = #{refs,jdbcType=VARCHAR},
|
|
flag = #{flag,jdbcType=VARCHAR},
|
|
dw = #{dw,jdbcType=VARCHAR},
|
|
result_flag = #{resultFlag,jdbcType=CHAR},
|
|
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
|
redo_flag = #{redoFlag,jdbcType=CHAR},
|
|
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
|
redo_text = #{redoText,jdbcType=VARCHAR},
|
|
bz3 = #{bz3,jdbcType=VARCHAR}
|
|
where jyrq = #{jyrq}
|
|
and yq = #{yq,jdbcType=CHAR}
|
|
and ybh = #{ybh,jdbcType=VARCHAR}
|
|
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
|
</update>
|
|
</mapper> |