diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java index 8a9efd4..5e8b09e 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java @@ -165,7 +165,8 @@ public class QualityReportServiceImpl implements IQualityReportService { String[] stationCodeLists = String.valueOf(hashMap.get("stationCodeList")).split(","); hashMap.put("stationCodeList", stationCodeLists); for (String station : stationCodeLists) { - if (station.equals("2001") || station.equals("2006") || station.equals("2007")) { + if (station.equals("2001") || station.equals("2006") || station.equals("2007") + || station.equals("2101") || station.equals("2106") || station.equals("2107")) { hashMap.put("leakFlag", "1"); } } @@ -360,7 +361,6 @@ public class QualityReportServiceImpl implements IQualityReportService { List weldLeakRateReports = reportMapper.weldLeakRateListMonth(hashMap); return weldLeakRateReports; } - String month = hashMap.get("month").toString(); return reportMapper.weldLeakRateList(hashMap); } diff --git a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml index b15a6c4..5022b50 100644 --- a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml @@ -806,23 +806,29 @@ WEEK_END, NVL(COUNT(*), 0) Q_SUM, NVL(SUM(LEAK_SUM), 0) LEAK_SUM, - TO_CHAR(ROUND(SUM(LEAK_SUM) / COUNT(*) * 100, 2), 'FM99990.00') REPAIR_RATE, - '二线' PRODUCT_LINE_NAME + TO_CHAR(ROUND(SUM(LEAK_SUM) / COUNT(*) * 100, 2), 'FM99990.00') REPAIR_RATE, + PRODUCT_LINE_NAME PRODUCT_LINE_NAME FROM ( SELECT TO_NUMBER(COLUMN_A) WEEK_NUMBER, COLUMN_B WEEK_START, COLUMN_C WEEK_END, + P2.PRODUCT_LINE_NAME, BAR_CODE, MAX(CASE WHEN QUALITY_DEFECT_NAME LIKE '%漏%' THEN 1 ELSE 0 END) LEAK_SUM FROM (SELECT COLUMN_A, COLUMN_B, COLUMN_C FROM TABLE (GET_YEAR_WEEK_TIME(${year}))) WEE LEFT JOIN REPORT_QUALITY_INSPECTION RQI + LEFT JOIN BASE_PRODUCTLINE BP on RQI.STATION_CODE = BP.PRODUCT_LINE_CODE + LEFT JOIN BASE_PRODUCTLINE P2 on P2.PRODUCT_LINE_CODE = BP.PARENT_ID ON RQI.BAR_CODE LIKE 'B%' AND TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD HH24:MI:SS') > WEE.COLUMN_B AND TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD HH24:MI:SS') <= WEE.COLUMN_C - GROUP BY COLUMN_A, COLUMN_B, COLUMN_C, BAR_CODE + + WHERE P2.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE} + + GROUP BY COLUMN_A, COLUMN_B, COLUMN_C, P2.PRODUCT_LINE_NAME, BAR_CODE ) - GROUP BY WEEK_NUMBER, WEEK_START, WEEK_END + GROUP BY PRODUCT_LINE_NAME, WEEK_NUMBER, WEEK_START, WEEK_END ORDER BY WEEK_NUMBER @@ -833,22 +839,25 @@ NVL(COUNT(*), 0) Q_SUM, NVL(SUM(LEAK_SUM), 0) LEAK_SUM, TO_CHAR(ROUND(SUM(LEAK_SUM) / COUNT(*) * 100, 2), 'FM99990.00') REPAIR_RATE, - '二线' PRODUCT_LINE_NAME + PRODUCT_LINE_NAME PRODUCT_LINE_NAME FROM ( SELECT TO_NUMBER(COLUMN_A) WEEK_NUMBER, COLUMN_B WEEK_START, COLUMN_C WEEK_END, + P2.PRODUCT_LINE_NAME, BAR_CODE, MAX(CASE WHEN QUALITY_DEFECT_NAME LIKE '%漏%' THEN 1 ELSE 0 END) LEAK_SUM FROM (SELECT COLUMN_A, COLUMN_B, COLUMN_C FROM TABLE (GET_YEAR_MONTH_TIME(${year}))) WEE LEFT JOIN REPORT_QUALITY_INSPECTION RQI + LEFT JOIN BASE_PRODUCTLINE BP on RQI.STATION_CODE = BP.PRODUCT_LINE_CODE + LEFT JOIN BASE_PRODUCTLINE P2 on P2.PRODUCT_LINE_CODE = BP.PARENT_ID ON RQI.BAR_CODE LIKE 'B%' AND TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD HH24:MI:SS') > WEE.COLUMN_B AND TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD HH24:MI:SS') <= WEE.COLUMN_C - GROUP BY COLUMN_A, COLUMN_B, COLUMN_C, BAR_CODE + GROUP BY COLUMN_A, COLUMN_B, COLUMN_C, P2.PRODUCT_LINE_NAME ,BAR_CODE ) - GROUP BY WEEK_NUMBER, WEEK_START, WEEK_END + GROUP BY PRODUCT_LINE_NAME, WEEK_NUMBER, WEEK_START, WEEK_END ORDER BY WEEK_NUMBER