| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | <select id="weldSeamStat" > |
| | | |
| | | <select id="weldSeamStat" parameterType="java.util.List" resultType="com.aps.core.domain.ApsWeldSeamStatistics"> |
| | | SELECT produce_year as year, |
| | | produce_month as month, |
| | | production_base as productionBase, |
| | | SUM ( CASE WHEN work_order_type = '0' AND classification = '1' THEN production_quantity ELSE 0 END ) AS pipingOrderRequirement, |
| | | SUM ( CASE WHEN work_order_type = '0' AND classification = '0' THEN production_quantity ELSE 0 END ) AS gasOrderRequirement, |
| | | SUM ( CASE WHEN work_order_type = '1' AND classification = '1' THEN production_quantity ELSE 0 END ) AS pipingPredictionRequirement, |
| | | SUM ( CASE WHEN work_order_type = '1' AND classification = '0' THEN production_quantity ELSE 0 END ) AS gasPredictionRequirement |
| | | FROM |
| | | "aps_weld_seam" |
| | | where 1=1 |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | or ( produce_year=#{item.produceYear} and produce_month=#{item.produceMonth} and production_base=#{item.productionBase}) |
| | | </foreach> |
| | | GROUP BY |
| | | produce_year, |
| | | produce_month, |
| | | production_base |
| | | </select> |
| | | </mapper> |