自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-04-15 80b1853f245bf67e0145551c34915610c3438203
src/main/resources/mapper/WrkDetlMapper.xml
@@ -47,8 +47,38 @@
        <result column="memo" property="memo" />
    </resultMap>
    <sql id="batchSeq">
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </sql>
    <select id="selectByWrkNo" resultMap="BaseResultMap">
        select * from asr_wrk_detl where 1=1 and wrk_no = #{wrkNo}
    </select>
    <delete id="deleteItem">
        delete from asr_wrk_detl
        where 1=1
        and wrk_no = #{wrkNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </delete>
    <update id="updateAnfme">
        update asr_wrk_detl
        set anfme = #{anfme}
        , modi_time = getdate()
        where 1=1
        and wrk_no = #{wrkNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </update>
</mapper>