skyouc
2025-09-17 828641ce9d4178bbff9030ad19ce93d0267f185c
zy-asrs-wms/src/main/resources/mapper/asrs/ViewLocDetlMapper.xml
@@ -5,7 +5,7 @@
    <select id="queryStock" resultType="map">
        SELECT * FROM
        (
        SELECT id, loc_id, loc_no, mat_id, IFNULL(type_id, 4) AS type_id, work_qty, matnr, order_no, batch, anfme, host_id, memo,deleted, freeze
        SELECT id, loc_id, loc_no, mat_id, IFNULL(type_id, 4) AS type_id, work_qty, matnr, order_no, batch, anfme, host_id, memo,deleted,create_time, freeze
        FROM
        view_man_loc_detl
        ) t
@@ -13,7 +13,7 @@
        <if test="matnr != null and matnr != ''">
            AND t.matnr = #{matnr}
        </if>
        <if test="batch != null and batch != ''">
        <if test="batch != null">
            AND t.batch = #{batch}
        </if>
        <if test="sortParam!=null and sortParam.size()>0">
@@ -21,12 +21,14 @@
                ${item.name}  ${item.value}
            </foreach>
        </if>
        ORDER BY
        t.create_time ASC
    </select>
    <select id="getList" resultType="map">
        select * from view_man_loc_detl ld
        where matnr = #{matnr}
        <if test="batch!=null and batch != ''">
        <if test="batch!=null">
            and batch = #{batch}
        </if>
        <if test="param!=null and param.size()>0">
@@ -80,24 +82,26 @@
    <select id="queryFlatStock" resultType="map">
        SELECT * FROM
        (
            SELECT id, loc_id, loc_no, mat_id, type_id, work_qty, matnr, order_no, batch, anfme, host_id, memo, freeze
            FROM
            view_man_loc_detl
            WHERE
            deleted = 0
            AND type_id IN ( SELECT id FROM man_loc_area_type WHERE parent_id = #{typeId} OR id = #{typeId} )
        SELECT id, loc_id, loc_no, mat_id, type_id, work_qty, matnr, order_no, batch, anfme, host_id, memo,create_time,  freeze
        FROM
        view_man_loc_detl
        WHERE
        deleted = 0
        AND type_id IN ( SELECT id FROM man_loc_area_type WHERE parent_id = #{typeId} OR id = #{typeId} )
        ) t
        WHERE 1 = 1
        <if test="matnr != null and matnr != ''">
            AND t.matnr = #{matnr}
        </if>
        <if test="batch != null and batch != ''">
        <if test="batch != null">
            AND t.batch = #{batch}
        </if>
<!--        <if test="params != null and params.size() > 0">-->
<!--            <foreach collection="params" item="item" open="in " separator="," close="  ">-->
<!--                ${item.name} #{item.value}-->
<!--            </foreach>-->
<!--        </if>-->
        <!--        <if test="params != null and params.size() > 0">-->
        <!--            <foreach collection="params" item="item" open="in " separator="," close="  ">-->
        <!--                ${item.name} #{item.value}-->
        <!--            </foreach>-->
        <!--        </if>-->
        ORDER BY
        t.create_time ASC
    </select>
</mapper>