skyouc
2025-01-07 83b504d7a369baa08b15c741c3b6daf71f6fa1f9
zy-asrs-wms/src/main/resources/mapper/asrs/ViewLocDetlMapper.xml
@@ -16,7 +16,7 @@
        </if>
        <if test="sortParam!=null and sortParam.size()>0">
            <foreach collection="sortParam" item="item" open="order by " separator="," close="  ">
                ${item.name} ${item.value}
                ${item.name}  ${item.value}
            </foreach>
        </if>
    </select>
@@ -29,7 +29,7 @@
        </if>
        <if test="param!=null and param.size()>0">
            <foreach item="item" collection="param" index="index">
                <if test="item.value !=null and item.value != ''" >
                <if test="item.value !=null and item.value != ''">
                    and ${item.name} = #{item.value}
                </if>
            </foreach>
@@ -61,7 +61,6 @@
    </select>
    <select id="listSuitableMat" resultType="map">
        select * from view_man_loc_detl ld
        where 1=1
@@ -76,4 +75,27 @@
            </foreach>
        </if>
    </select>
    <select id="queryFlatStock" resultType="map">
        SELECT * FROM
        (
            SELECT id, loc_id, loc_no, mat_id, type_id, matnr, order_no, batch, anfme, host_id, memo, freeze
            FROM
            view_man_loc_detl
            WHERE
            deleted = 0
            AND type_id IN ( SELECT type_id FROM man_loc_area_type WHERE parent_id = 7 OR id = 7 )
        ) t
        WHERE 1 = 1
        <if test="matnr != null and matnr != ''">
            AND t.matnr  #{matnr}
        </if>
        <if test="batch != null and batch != ''">
            AND t.batch = #{batch}
        </if>
        <if test="params != null and params.size() > 0">
            <foreach collection="params" item="item" open="order by " separator="," close="  ">
                ${item.name} = #{item.value}
            </foreach>
        </if>
    </select>
</mapper>