自动化立体仓库 - WMS系统
#
Administrator
2026-04-20 5a245bb923395c83f471e8c296814709f8be167a
src/main/resources/mapper/ViewInOutMapper.xml
@@ -61,5 +61,58 @@
   ]]>
</where>
</select>
    <select id="selectWorkCountInSum" resultType="java.lang.Integer">
      SELECT SUM(anfme) 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="selectWorkCountOutSum" resultType="java.lang.Integer">
      SELECT SUM(anfme) 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>
   <select id="selectlocChartPieArea" resultType="com.zy.asrs.entity.LocChartPie">
      SELECT   SUM(fqty) AS fqty, SUM(oqty) AS oqty, SUM(uqty) AS uqty, SUM(xqty) AS xqty
      FROM      (SELECT   COUNT(*) AS fqty, 0 AS oqty, 0 AS uqty, 0 AS xqty
      FROM      dbo.asr_loc_mast
      WHERE ((loc_sts = 'F') OR (loc_sts = 'D'))
      <if test="startRow != null and endRow != null">
         AND row1 &gt; #{startRow} AND row1 &lt; #{endRow}
      </if>
      UNION ALL
      SELECT   0 AS Expr1, COUNT(*) AS Expr2, 0 AS Expr3, 0 AS Expr4
      FROM      dbo.asr_loc_mast AS asr_loc_mast_3
      WHERE   (loc_sts = 'O')
      <if test="startRow != null and endRow != null">
         AND row1 &gt; #{startRow} AND row1 &lt; #{endRow}
      </if>
      UNION ALL
      SELECT   0 AS Expr1, 0 AS Expr2, COUNT(*) AS Expr3, 0 AS Expr4
      FROM      dbo.asr_loc_mast AS asr_loc_mast_2
      WHERE ((loc_sts = 'P') OR
      (loc_sts = 'Q') OR
      (loc_sts = 'R') OR
      (loc_sts = 'S'))
      <if test="startRow != null and endRow != null">
         AND row1 &gt; #{startRow} AND row1 &lt; #{endRow}
      </if>
      UNION ALL
      SELECT   0 AS Expr1, 0 AS Expr2, 0 AS Expr3, COUNT(*) AS Expr4
      FROM      dbo.asr_loc_mast AS asr_loc_mast_1
      WHERE  (loc_sts = 'X')
      <if test="startRow != null and endRow != null">
         AND row1 &gt; #{startRow} AND row1 &lt; #{endRow}
      </if>
      ) AS a
   </select>
</mapper>