lis8.0/liswork/src/main/resources/mapper/QcBatchnoMapper.xml
2026-01-07 16:52:06 +08:00

66 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.liswork.mapper.QcBatchnoMapper">
<select id="selectList" resultType="com.czlis.common.core.domain.entity.lis.QcBatchno">
select * from qc_batchno where yq = #{yq}
<if test="zkpph != null and zkpph != ''">and zkpph = #{zkpph}</if>
<if test="zkph != null and zkph != ''">and zkph = #{zkph}</if>
</select>
<update id="update">
update qc_batchno set
<if test="startda != null">startda = #{startda},</if>
<if test="conc != null and conc != ''">conc = #{conc},</if>
<if test="conc != null">conc = #{conc},</if>
<if test="expiredt != null">expiredt = #{expiredt},</if>
<if test="endda != null">endda = #{endda},</if>
<if test="useflag != null and useflag != ''">useflag = #{useflag},</if>
<if test="qcsrc != null and qcsrc != ''">qcsrc = #{qcsrc},</if>
<if test="standsrc != null and standsrc != ''">standsrc = #{standsrc},</if>
<if test="bk != null and bk != ''">bk = #{bk},</if>
<if test="batchno != null and batchno != ''">batchno = #{batchno},</if>
yq = #{yq}
where yq = #{yq} and zkpph = #{zkpph} and zkph = #{zkph}
</update>
<delete id="delete">
delete from qc_batchno where yq = #{yq} and zkpph = #{zkpph} and zkph = #{zkph}
</delete>
<insert id="insert">
insert into qc_batchno(yq, zkpph, zkph, startda, conc, expiredt, endda, useflag, qcsrc, standsrc, bk, batchno)
values(#{yq},#{zkpph},#{startda},#{conc},#{expiredt},#{endda},#{useflag},#{qcsrc},#{standsrc},#{bk},#{batchno})
</insert>
<select id="qcSampleList" resultType="map">
SELECT xm_info.yq,
xm_info.xmdh,
xm_info.xmmc,
qc_sample.zkph,
qc_sample.ksrq,
qc_sample.zkpph,
qc_sample.ld,
qc_sample.cv,
qc_sample.sd,
qc_sample.zkbz,
qc_sample.bc,
qc_sample.ff,
qc_sample.sjph,
qc_sample.sm,
qc_sample.bz1,
qc_sample.expiredt,
qc_sample.qcsrc,
qc_sample.standsrc,
qc_sample.outdt,
qc_sample.stopdate,qc_sample.qccv,
0 as rowid
FROM xm_info LEFT OUTER JOIN qc_sample ON xm_info.yq = qc_sample.yq and qc_sample.xmdh = '@'
WHERE ( xm_info.yq = #{yq} ) AND ( xm_info.zkxm = 'Y' )
order by xm_info.dyxh
</select>
</mapper>