自动化立体仓库 - WMS系统
#
lty
5 天以前 d964498a12a672139ad25ec774faa054059fa736
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -33,6 +33,14 @@
    </resultMap>
    <resultMap id="CheckResultMap" type="com.zy.asrs.entity.LocCheck">
        <result column="anfme" property="anfme" />
        <result column="matnr" property="matnr" />
        <result column="maktx" property="maktx" />
        <result column="specs" property="specs" />
        <result column="batch" property="batch" />
    </resultMap>
    <sql id="locDetlCondition">
        <if test="host_id != null and host_id != ''">
            and mld.host_id = #{host_id}
@@ -200,6 +208,31 @@
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="getStockCheck" resultMap="CheckResultMap">
        select * from
        (
        select
        ROW_NUMBER() over (order by a.matnr, sum(a.anfme) desc) as row
        , a.matnr
        , sum(a.anfme) as anfme
        from asr_check_detl a
        <include refid="stockOutCondition"></include>
        group by a.matnr
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="getStockCheckCount" parameterType="java.util.Map" resultType="java.lang.Integer">
        select count(1) as count from
        (
        select
        a.matnr
        from asr_check_detl a
        where 1=1
        <include refid="stockOutCondition"></include>
        group by a.matnr
        ) b
    </select>
    <select id="getStockStatisCount" parameterType="java.util.Map" resultType="java.lang.Integer">
        select count(1) as count from
        (