自动化立体仓库 - WMS系统
#
zyx
2023-11-20 7b26abe9d5e833901783613bbb3cfa27fa75a346
src/main/resources/mapper/LocDetlMapper.xml
@@ -44,6 +44,7 @@
        <result column="appe_user" property="appeUser" />
        <result column="appe_time" property="appeTime" />
        <result column="memo" property="memo" />
        <result column="stock_freeze" property="stockFreeze" />
    </resultMap>
    <sql id="batchSeq">
@@ -63,6 +64,14 @@
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <choose>
            <when test="suppCode != null and suppCode != ''">
                and supp_code = #{suppCode}
            </when>
<!--            <otherwise>-->
<!--                and (supp_code IS NULL OR supp_code = '')-->
<!--            </otherwise>-->
        </choose>
        <include refid="batchSeq"></include>
    </select>
@@ -72,6 +81,7 @@
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
        <include refid="locdetlCondition"></include>
    </delete>
    <update id="updateAnfme">
@@ -81,8 +91,21 @@
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <include refid="locdetlCondition"></include>
        <include refid="batchSeq"></include>
    </update>
    <sql id="locdetlCondition">
        <if test="threeCode!=null and threeCode!='' ">
            and three_code = #{threeCode}
        </if>
        <if test="suppCode!=null and suppCode!='' ">
            and supp_code = #{suppCode}
        </if>
        <if test="deadTime!=null and deadTime!='' ">
            and dead_time = #{deadTime}
        </if>
    </sql>
    <sql id="stockOutCondition">
        <if test="loc_no!=null and loc_no!='' ">
@@ -347,4 +370,13 @@
        where 1=1
        and loc_no = #{locNo}
    </select>
    <update id="updateStockFreeze">
        update asr_loc_detl
        set stock_freeze = #{stockFreeze}
        , modi_time = getdate()
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
    </update>
</mapper>