自动化立体仓库 - WMS系统
zjj
2023-06-20 9e3add37778b45bc28bb932ceaa23bba3ff2810a
#平库库存数量问题优化
1个文件已修改
8 ■■■■■ 已修改文件
src/main/resources/mapper/ManLocDetlMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -77,7 +77,7 @@
        </if>
    </sql>
    <select id="listByPage" resultMap="BaseResultMap">
    <select id="listByPage" resultMap="BaseResultMap" parameterType="java.util.Map">
        select * from
        (
        SELECT
@@ -88,8 +88,7 @@
        LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
        LEFT JOIN man_tag mt ON mm.tag_id = mt.id
        WHERE 1=1
         AND (CHARINDEX(','+#{node_id}+',', ','+mn.path+',') > 0 OR mn.id = #{node_id})
         AND (CHARINDEX(','+#{tag_id}+',', ','+mt.path+',') > 0 OR mt.id = #{tag_id})
         AND (CHARINDEX(#{node_id}, mn.path) > 0 OR mn.id = #{node_id})
        <include refid="locDetlCondition"></include>
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
@@ -102,8 +101,7 @@
        LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
        LEFT JOIN man_tag mt ON mm.tag_id = mt.id
        WHERE 1=1
        AND (CHARINDEX(','+#{node_id}+',', ','+mn.path+',') > 0 OR mn.id = #{node_id})
        AND (CHARINDEX(','+#{tag_id}+',', ','+mt.path+',') > 0 OR mt.id = #{tag_id})
        AND (CHARINDEX(#{node_id}, mn.path) > 0 OR mn.id = #{node_id})
        <include refid="locDetlCondition"></include>
    </select>