| | |
| | | </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 > #{startRow} AND row1 < #{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 > #{startRow} AND row1 < #{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 > #{startRow} AND row1 < #{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 > #{startRow} AND row1 < #{endRow} |
| | | </if> |
| | | ) AS a |
| | | </select> |
| | | |
| | | </mapper> |