自动化立体仓库 - WMS系统
whycq
2024-07-03 7d7bb8298935b1002ee2770fdf00fc382a53864c
src/main/resources/mapper/OrderDetlMapper.xml
@@ -45,6 +45,7 @@
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
        <result column="bom_code" property="bomCode" />
    </resultMap>
@@ -142,6 +143,18 @@
            </otherwise>
        </choose>
    </select>
    <select id="selectCountToAsrByMatnr" resultType="java.lang.Long">
        SELECT ISNULL(SUM(anfme), 0) FROM asr_loc_detl WHERE matnr = #{matnr}
        <if test="batch!=null and batch!='' ">
            and batch = #{batch}
        </if>
    </select>
    <select id="selectCountToManByMatnr" resultType="java.lang.Long">
        SELECT ISNULL(SUM(anfme), 0) FROM man_loc_detl WHERE matnr = #{matnr}
        <if test="batch!=null and batch!='' ">
            and batch = #{batch}
        </if>
    </select>
    <update id="increase">
        update man_order_detl
@@ -234,4 +247,20 @@
        </choose>
    </update>
    <update id="increaseWorkQtyByOrderNo">
        update man_order_detl
        set work_qty = work_qty + #{qty}
        where 1=1
        and order_no = #{orderNo}
        and matnr = #{matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </update>
</mapper>