自动化立体仓库 - WMS系统
#
LSH
2023-12-11 474e784866712af99abe3e92710c1f2948a2c38e
src/main/resources/mapper/LocDetlMapper.xml
@@ -722,5 +722,91 @@
        desc
    </select>
    <select id="selectOwnerAllAnfme" resultType="com.zy.asrs.entity.result.LocDetlAll">
        select SUM(anfme) as anfme,owner from asr_loc_detl_all GROUP BY owner ORDER BY anfme DESC
    </select>
    <sql id="wrkDetlLogAllViewParamCondition">
        <if test="matnr!=null and maktx!='' ">
            and a.matnr = #{matnr}
        </if>
        <if test="year!=null and year!='' ">
            and a.year = #{year}
        </if>
        <if test="month!=null and month!='' ">
            and a.month = #{month}
        </if>
        <if test="day!=null and day!='' ">
            and a.day=#{day}
        </if>
        <if test="kun !=null and kun!='' ">
            and a.kun =  #{kun}
        </if>
        <if test="upDown !=null and upDown!='' ">
            and a.up_down =  #{upDown}
        </if>
    </sql>
    <select id="selectAllWrkDetlLogAllViewParam" parameterType="java.util.Map" resultType="com.zy.asrs.entity.param.WrkDetlLogAllViewParam">
        select t.* from
        (
            SELECT ROW_NUMBER() over (order by SUM(a.anfme) desc) as row,SUM(a.anfme) as anfme,a.year,a.month,a.day,a.kun,a.up_down as upDown
            from asr_wrk_out_in_all_view as a
            where 1=1
            <include refid="wrkDetlLogAllViewParamCondition"></include>
            group by a.[year],a.[month],a.[day],a.kun,a.up_down
        ) t
        where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="selectAllWrkDetlLogAllViewParamE" parameterType="java.util.Map" resultType="com.zy.asrs.entity.param.WrkDetlLogAllViewParam">
        SELECT ROW_NUMBER() over (order by SUM(a.anfme) desc) as row,SUM(a.anfme) as anfme,a.year,a.month,a.day,a.kun,a.up_down as upDown
        from asr_wrk_out_in_all_view as a
        where 1=1
        <include refid="wrkDetlLogAllViewParamCondition"></include>
        group by a.[year],a.[month],a.[day],a.kun,a.up_down
    </select>
    <select id="selectAllWrkDetlLogAllViewParamCount" parameterType="java.util.Map" resultType="java.lang.Integer">
        select count(1) from
        (
        SELECT ROW_NUMBER() over (order by SUM(a.anfme) desc) as row,SUM(a.anfme) as anfme,a.year,a.month,a.day,a.kun,a.up_down as upDown
        from asr_wrk_out_in_all_view as a
        where 1=1
        <include refid="wrkDetlLogAllViewParamCondition"></include>
        group by a.[year],a.[month],a.[day],a.kun,a.up_down
        ) t
    </select>
    <select id="selectAllWrkDetlLogAllViewParamByMatnr" parameterType="java.util.Map" resultType="com.zy.asrs.entity.param.WrkDetlLogAllViewParam">
        select t.* from
        (
        SELECT ROW_NUMBER() over (order by SUM(a.anfme) desc) as row,SUM(a.anfme) as anfme,a.matnr,a.year,a.month,a.day,a.kun,a.up_down as upDown
        from asr_wrk_out_in_all_view as a
        where 1=1
        <include refid="wrkDetlLogAllViewParamCondition"></include>
        group by a.matnr,a.[year],a.[month],a.[day],a.kun,a.up_down
        ) t
        where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="selectAllWrkDetlLogAllViewParamByMatnrE" parameterType="java.util.Map" resultType="com.zy.asrs.entity.param.WrkDetlLogAllViewParam">
        SELECT ROW_NUMBER() over (order by SUM(a.anfme) desc) as row,SUM(a.anfme) as anfme,a.matnr,a.year,a.month,a.day,a.kun,a.up_down as upDown
        from asr_wrk_out_in_all_view as a
        where 1=1
        <include refid="wrkDetlLogAllViewParamCondition"></include>
        group by a.matnr,a.[year],a.[month],a.[day],a.kun,a.up_down
    </select>
    <select id="selectAllWrkDetlLogAllViewParamByMatnrCount" parameterType="java.util.Map" resultType="java.lang.Integer">
        select count(1) from
        (
        SELECT ROW_NUMBER() over (order by SUM(a.anfme) desc) as row,SUM(a.anfme) as anfme,a.matnr,a.year,a.month,a.day,a.kun,a.up_down as upDown
        from asr_wrk_out_in_all_view as a
        where 1=1
        <include refid="wrkDetlLogAllViewParamCondition"></include>
        group by a.matnr,a.[year],a.[month],a.[day],a.kun,a.up_down
        ) t
    </select>
</mapper>