lis8.0/liswork/src/main/resources/mapper/QcSampleMapper.xml
2026-01-13 09:03:33 +08:00

85 lines
3.5 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.liswork.mapper.QcSampleMapper">
<insert id="insert">
insert into qc_sample(
<if test="zkpph != null and zkpph != ''">zkpph,</if>
<if test="ld != null and ld != ''">ld,</if>
<if test="cv != null">cv,</if>
<if test="sd != null">sd,</if>
<if test="zkbz != null">zkbz,</if>
<if test="bc != null and bc != ''">bc,</if>
<if test="ff != null and ff != ''">ff,</if>
<if test="sjph != null and sjph != ''">sjph,</if>
<if test="sm != null and sm != ''">sm,</if>
<if test="bz1 != null and bz1 != ''">bz1,</if>
<if test="endrq != null ">endrq,</if>
<if test="standsrc != null and standsrc != ''">standsrc,</if>
<if test="outdt != null ">outdt,</if>
<if test="stopdate != null ">stopdate,</if>
<if test="qcsrc != null and qcsrc != ''">qcsrc,</if>
<if test="expiredt != null ">expiredt,</if>
<if test="qccv != null ">qccv,</if>
yq, xmdh, zkph, ksrq)
values(
<if test="zkpph != null and zkpph != ''">#{zkpph},</if>
<if test="ld != null and ld != ''">#{ld},</if>
<if test="cv != null">#{cv},</if>
<if test="sd != null">#{sd},</if>
<if test="zkbz != null">#{zkbz},</if>
<if test="bc != null and bc != ''">#{bc},</if>
<if test="ff != null and ff != ''">#{ff},</if>
<if test="sjph != null and sjph != ''">#{sjph},</if>
<if test="sm != null and sm != ''">#{sm},</if>
<if test="bz1 != null and bz1 != ''">#{bz1},</if>
<if test="endrq != null ">#{endrq},</if>
<if test="standsrc != null and standsrc != ''">#{standsrc},</if>
<if test="outdt != null ">#{outdt},</if>
<if test="stopdate != null ">#{stopdate},</if>
<if test="qcsrc != null and qcsrc != ''">#{qcsrc},</if>
<if test="expiredt != null ">#{expiredt},</if>
<if test="qccv != null ">#{qccv},</if>
#{yq},#{xmdh},#{zkph},#{ksrq}
)
</insert>
<update id="update">
update qc_sample set
zkpph = #{zkpph},
ld = #{ld},
<if test="cv != null">cv = #{cv},</if>
<if test="sd != null">sd = #{sd},</if>
zkbz = #{zkbz},
bc = #{bc},
ff = #{ff},
sjph = #{sjph},
sm = #{sm},
bz1 = #{bz1},
<if test="endrq != null ">endrq = #{endrq},</if>
standsrc = #{standsrc},
<if test="outdt != null ">outdt = #{outdt},</if>
<if test="stopdate != null ">stopdate = #{stopdate},</if>
qcsrc = #{qcsrc},
<if test="expiredt != null ">expiredt = #{expiredt},</if>
qccv = #{qccv}
where yq = #{yq} and xmdh = #{xmdh} and zkph = #{zkph} and ksrq = #{ksrq}
</update>
<update id="updatezkpph">
update qc_sample set zkpph = #{zkpph}, zkph = #{zkph}
where yq = #{yq} and zkpph = #{zkpphold} and zkph = #{zkphold}
</update>
<delete id="delete">
delete from qc_sample where yq = #{yq} and xmdh = #{xmdh} and zkph = #{zkph} and ksrq = #{ksrq}
</delete>
<delete id="deletezkpph">
delete from qc_sample where yq = #{yq} and zkpph = #{zkpph} and zkph = #{zkph}
</delete>
<select id="queryOne" resultType="com.czlis.common.core.domain.entity.lis.QcSample">
select * from qc_sample where yq = #{yq} and xmdh = #{xmdh} and zkph = #{zkph} and ksrq = #{ksrq}
</select>
</mapper>