自动化立体仓库 - WMS系统
zjj
2025-02-17 8aa26cdd7fd9c4ed2d9fc56be0f9c9c05f531b18
src/main/resources/mapper/ViewStockUseMapper.xml
@@ -50,5 +50,67 @@
   ]]>
</where>
</select>
    <select id="selectWorkCountIn" resultType="com.zy.asrs.entity.ViewWorkCountInView">
      SELECT *
      FROM (
      select
         ROW_NUMBER() OVER(Order by a.oneday desc) as row
      , *
      FROM(
      SELECT * FROM asr_wrkin_count_view
               WHERE
               1 = 1 AND
               (oneday > #{start}
               AND
            oneday &lt; #{end})
               <if test="matnr != null and matnr !=''">
                and matnr = #{matnr}
             </if>
              ) a ) b
      WHERE 1=1 and b.row between ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit})
   </select>
   <select id="selectWorkCountInTotal" resultType="java.lang.Integer">
      SELECT COUNT(*) FROM asr_wrkin_count_view
      WHERE 1= 1 AND
      (oneday > #{start}
      AND
      oneday &lt; #{end})
      <if test="matnr != null and matnr !='' ">
         and matnr = #{matnr}
      </if>
   </select>
   <select id="selectWorkCountOut" resultType="com.zy.asrs.entity.ViewWorkCountInView">
      SELECT *
      FROM (
             select
                ROW_NUMBER() OVER(Order by a.oneday desc) as row
      , *
             FROM(
                   SELECT * FROM asr_wrkout_count_view
      WHERE
      1 = 1 AND
      (oneday > #{start}
      AND
      oneday &lt; #{end})
      <if test="matnr != null and matnr !=''">
         and matnr = #{matnr}
      </if>
      ) a ) b
      WHERE 1=1 and b.row between ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit})
   </select>
   <select id="selectWorkCountOutTotal" resultType="java.lang.Integer">
      SELECT COUNT(*) FROM asr_wrkout_count_view
      WHERE 1= 1 AND
      (oneday > #{start}
      AND
      oneday &lt; #{end})
      <if test="matnr != null and matnr !='' ">
         and matnr = #{matnr}
      </if>
   </select>
</mapper>