| | |
| | | </delete> |
| | | <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 |
| | | produce_month as month, |
| | | production_base as productionBase, |
| | | SUM ( CASE WHEN work_order_type = '0' AND classification = '1' THEN total_weld_seam ELSE 0 END ) AS pipingOrderRequirement, |
| | | SUM ( CASE WHEN work_order_type = '0' AND classification = '0' THEN total_weld_seam ELSE 0 END ) AS gasOrderRequirement, |
| | | SUM ( CASE WHEN work_order_type = '1' AND classification = '1' THEN total_weld_seam ELSE 0 END ) AS pipingPredictionRequirement, |
| | | SUM ( CASE WHEN work_order_type = '1' AND classification = '0' THEN total_weld_seam ELSE 0 END ) AS gasPredictionRequirement |
| | | FROM |
| | | aps_weld_seam |
| | | where 1=1 |