|
@@ -0,0 +1,172 @@
|
|
|
+<?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.ruoyi.ams.qc.mapper.DocQcDetailsMapper">
|
|
|
+
|
|
|
+ <resultMap type="DocQcDetails" id="DocQcDetailsResult">
|
|
|
+ <result property="qcno" column="qcno" />
|
|
|
+ <result property="qclineno" column="qclineno" />
|
|
|
+ <result property="linestatus" column="linestatus" />
|
|
|
+ <result property="palineno" column="palineno" />
|
|
|
+ <result property="customerid" column="customerid" />
|
|
|
+ <result property="sku" column="sku" />
|
|
|
+ <result property="lotnum" column="lotnum" />
|
|
|
+ <result property="paqtyExpected" column="paqty_expected" />
|
|
|
+ <result property="qcqtyExpected" column="qcqty_expected" />
|
|
|
+ <result property="qcqtyCompleted" column="qcqty_completed" />
|
|
|
+ <result property="userdefine1" column="userdefine1" />
|
|
|
+ <result property="userdefine2" column="userdefine2" />
|
|
|
+ <result property="userdefine3" column="userdefine3" />
|
|
|
+ <result property="userdefine4" column="userdefine4" />
|
|
|
+ <result property="userdefine5" column="userdefine5" />
|
|
|
+ <result property="qcdescr" column="qcdescr" />
|
|
|
+ <result property="qcresult" column="qcresult" />
|
|
|
+ <result property="filecontent" column="filecontent" />
|
|
|
+ <result property="notes" column="notes" />
|
|
|
+ <result property="addtime" column="addtime" />
|
|
|
+ <result property="addwho" column="addwho" />
|
|
|
+ <result property="edittime" column="edittime" />
|
|
|
+ <result property="editwho" column="editwho" />
|
|
|
+ <result property="packid" column="packid" />
|
|
|
+ <result property="transactionid" column="transactionid" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectDocQcDetailsVo">
|
|
|
+ select qcno, qclineno, linestatus, palineno, customerid, sku, lotnum, paqty_expected, qcqty_expected, qcqty_completed, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5, qcdescr, qcresult, filecontent, notes, addtime, addwho, edittime, editwho, packid, transactionid from doc_qc_details
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectDocQcDetailsList" parameterType="DocQcDetails" resultMap="DocQcDetailsResult">
|
|
|
+ <include refid="selectDocQcDetailsVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="linestatus != null and linestatus != ''"> and linestatus = #{linestatus}</if>
|
|
|
+ <if test="palineno != null "> and palineno = #{palineno}</if>
|
|
|
+ <if test="customerid != null and customerid != ''"> and customerid = #{customerid}</if>
|
|
|
+ <if test="sku != null and sku != ''"> and sku = #{sku}</if>
|
|
|
+ <if test="lotnum != null and lotnum != ''"> and lotnum = #{lotnum}</if>
|
|
|
+ <if test="paqtyExpected != null "> and paqty_expected = #{paqtyExpected}</if>
|
|
|
+ <if test="qcqtyExpected != null "> and qcqty_expected = #{qcqtyExpected}</if>
|
|
|
+ <if test="qcqtyCompleted != null "> and qcqty_completed = #{qcqtyCompleted}</if>
|
|
|
+ <if test="userdefine1 != null and userdefine1 != ''"> and userdefine1 = #{userdefine1}</if>
|
|
|
+ <if test="userdefine2 != null and userdefine2 != ''"> and userdefine2 = #{userdefine2}</if>
|
|
|
+ <if test="userdefine3 != null and userdefine3 != ''"> and userdefine3 = #{userdefine3}</if>
|
|
|
+ <if test="userdefine4 != null and userdefine4 != ''"> and userdefine4 = #{userdefine4}</if>
|
|
|
+ <if test="userdefine5 != null and userdefine5 != ''"> and userdefine5 = #{userdefine5}</if>
|
|
|
+ <if test="qcdescr != null and qcdescr != ''"> and qcdescr = #{qcdescr}</if>
|
|
|
+ <if test="qcresult != null and qcresult != ''"> and qcresult = #{qcresult}</if>
|
|
|
+ <if test="filecontent != null and filecontent != ''"> and filecontent = #{filecontent}</if>
|
|
|
+ <if test="notes != null and notes != ''"> and notes = #{notes}</if>
|
|
|
+ <if test="addtime != null "> and addtime = #{addtime}</if>
|
|
|
+ <if test="addwho != null and addwho != ''"> and addwho = #{addwho}</if>
|
|
|
+ <if test="edittime != null "> and edittime = #{edittime}</if>
|
|
|
+ <if test="editwho != null and editwho != ''"> and editwho = #{editwho}</if>
|
|
|
+ <if test="packid != null and packid != ''"> and packid = #{packid}</if>
|
|
|
+ <if test="transactionid != null and transactionid != ''"> and transactionid = #{transactionid}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectDocQcDetailsByQcno" parameterType="String" resultMap="DocQcDetailsResult">
|
|
|
+ <include refid="selectDocQcDetailsVo"/>
|
|
|
+ where qcno = #{qcno}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertDocQcDetails" parameterType="DocQcDetails">
|
|
|
+ insert into doc_qc_details
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="qcno != null">qcno,</if>
|
|
|
+ <if test="qclineno != null">qclineno,</if>
|
|
|
+ <if test="linestatus != null">linestatus,</if>
|
|
|
+ <if test="palineno != null">palineno,</if>
|
|
|
+ <if test="customerid != null">customerid,</if>
|
|
|
+ <if test="sku != null">sku,</if>
|
|
|
+ <if test="lotnum != null">lotnum,</if>
|
|
|
+ <if test="paqtyExpected != null">paqty_expected,</if>
|
|
|
+ <if test="qcqtyExpected != null">qcqty_expected,</if>
|
|
|
+ <if test="qcqtyCompleted != null">qcqty_completed,</if>
|
|
|
+ <if test="userdefine1 != null">userdefine1,</if>
|
|
|
+ <if test="userdefine2 != null">userdefine2,</if>
|
|
|
+ <if test="userdefine3 != null">userdefine3,</if>
|
|
|
+ <if test="userdefine4 != null">userdefine4,</if>
|
|
|
+ <if test="userdefine5 != null">userdefine5,</if>
|
|
|
+ <if test="qcdescr != null">qcdescr,</if>
|
|
|
+ <if test="qcresult != null">qcresult,</if>
|
|
|
+ <if test="filecontent != null">filecontent,</if>
|
|
|
+ <if test="notes != null">notes,</if>
|
|
|
+ <if test="addtime != null">addtime,</if>
|
|
|
+ <if test="addwho != null">addwho,</if>
|
|
|
+ <if test="edittime != null">edittime,</if>
|
|
|
+ <if test="editwho != null">editwho,</if>
|
|
|
+ <if test="packid != null">packid,</if>
|
|
|
+ <if test="transactionid != null">transactionid,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="qcno != null">#{qcno},</if>
|
|
|
+ <if test="qclineno != null">#{qclineno},</if>
|
|
|
+ <if test="linestatus != null">#{linestatus},</if>
|
|
|
+ <if test="palineno != null">#{palineno},</if>
|
|
|
+ <if test="customerid != null">#{customerid},</if>
|
|
|
+ <if test="sku != null">#{sku},</if>
|
|
|
+ <if test="lotnum != null">#{lotnum},</if>
|
|
|
+ <if test="paqtyExpected != null">#{paqtyExpected},</if>
|
|
|
+ <if test="qcqtyExpected != null">#{qcqtyExpected},</if>
|
|
|
+ <if test="qcqtyCompleted != null">#{qcqtyCompleted},</if>
|
|
|
+ <if test="userdefine1 != null">#{userdefine1},</if>
|
|
|
+ <if test="userdefine2 != null">#{userdefine2},</if>
|
|
|
+ <if test="userdefine3 != null">#{userdefine3},</if>
|
|
|
+ <if test="userdefine4 != null">#{userdefine4},</if>
|
|
|
+ <if test="userdefine5 != null">#{userdefine5},</if>
|
|
|
+ <if test="qcdescr != null">#{qcdescr},</if>
|
|
|
+ <if test="qcresult != null">#{qcresult},</if>
|
|
|
+ <if test="filecontent != null">#{filecontent},</if>
|
|
|
+ <if test="notes != null">#{notes},</if>
|
|
|
+ <if test="addtime != null">#{addtime},</if>
|
|
|
+ <if test="addwho != null">#{addwho},</if>
|
|
|
+ <if test="edittime != null">#{edittime},</if>
|
|
|
+ <if test="editwho != null">#{editwho},</if>
|
|
|
+ <if test="packid != null">#{packid},</if>
|
|
|
+ <if test="transactionid != null">#{transactionid},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateDocQcDetails" parameterType="DocQcDetails">
|
|
|
+ update doc_qc_details
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="qclineno != null">qclineno = #{qclineno},</if>
|
|
|
+ <if test="linestatus != null">linestatus = #{linestatus},</if>
|
|
|
+ <if test="palineno != null">palineno = #{palineno},</if>
|
|
|
+ <if test="customerid != null">customerid = #{customerid},</if>
|
|
|
+ <if test="sku != null">sku = #{sku},</if>
|
|
|
+ <if test="lotnum != null">lotnum = #{lotnum},</if>
|
|
|
+ <if test="paqtyExpected != null">paqty_expected = #{paqtyExpected},</if>
|
|
|
+ <if test="qcqtyExpected != null">qcqty_expected = #{qcqtyExpected},</if>
|
|
|
+ <if test="qcqtyCompleted != null">qcqty_completed = #{qcqtyCompleted},</if>
|
|
|
+ <if test="userdefine1 != null">userdefine1 = #{userdefine1},</if>
|
|
|
+ <if test="userdefine2 != null">userdefine2 = #{userdefine2},</if>
|
|
|
+ <if test="userdefine3 != null">userdefine3 = #{userdefine3},</if>
|
|
|
+ <if test="userdefine4 != null">userdefine4 = #{userdefine4},</if>
|
|
|
+ <if test="userdefine5 != null">userdefine5 = #{userdefine5},</if>
|
|
|
+ <if test="qcdescr != null">qcdescr = #{qcdescr},</if>
|
|
|
+ <if test="qcresult != null">qcresult = #{qcresult},</if>
|
|
|
+ <if test="filecontent != null">filecontent = #{filecontent},</if>
|
|
|
+ <if test="notes != null">notes = #{notes},</if>
|
|
|
+ <if test="addtime != null">addtime = #{addtime},</if>
|
|
|
+ <if test="addwho != null">addwho = #{addwho},</if>
|
|
|
+ <if test="edittime != null">edittime = #{edittime},</if>
|
|
|
+ <if test="editwho != null">editwho = #{editwho},</if>
|
|
|
+ <if test="packid != null">packid = #{packid},</if>
|
|
|
+ <if test="transactionid != null">transactionid = #{transactionid},</if>
|
|
|
+ </trim>
|
|
|
+ where qcno = #{qcno}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteDocQcDetailsByQcno" parameterType="String">
|
|
|
+ delete from doc_qc_details where qcno = #{qcno}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteDocQcDetailsByQcnos" parameterType="String">
|
|
|
+ delete from doc_qc_details where qcno in
|
|
|
+ <foreach item="qcno" collection="array" open="(" separator="," close=")">
|
|
|
+ #{qcno}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|