自动化立体仓库 - WMS系统
Junjie
2023-05-15 6bbaeff9658e297a6087c559352393fc732e8742
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">
@@ -314,12 +315,46 @@
            group by loc_no
        ) dual on dual.loc_no = lm.loc_no
        WHERE 1 = 1
        AND ld.maktx = #{matnr}
        AND (lm.row1 >= #{start} AND lm.row1 &lt;= #{end})
        AND ld.matnr = #{matnr}
        AND (lm.loc_sts = 'F')
        AND dual.count = 1
        ORDER BY lm.modi_time ASC
    </select>
    <select id="searchByLike" resultMap="BaseResultMap">
        select *
        from asr_loc_detl
        where
        1 = 1
        <if test="orderNo != null and orderNo != ''">
            and order_no like '%' + #{orderNo} + '%'
        </if>
        <if test="locNo != null and locNo != ''">
            and loc_no like '%' + #{locNo} + '%'
        </if>
        <if test="specs != null and specs != ''">
            and specs like '%' + #{specs} + '%'
        </if>
        <if test="matnr != null and matnr != ''">
            and matnr like '%' + #{matnr} + '%'
        </if>
        <if test="maktx != null and maktx != ''">
            and maktx like '%' + #{maktx} + '%';
        </if>
    </select>
    <select id="selectByLocNo" resultMap="BaseResultMap">
        select * from asr_loc_detl
        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>