diff --git a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml index 22791d4..835d3fe 100644 --- a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml @@ -334,6 +334,10 @@ FROM C##AUCMA_SCADA.PRODUCT_OFFLINE PO LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SUBSTR(PO.PRODUCT_ORDER_NO, -8) LEFT JOIN BASE_PRODUCTLINE PL ON PL.WORK_CENTER_CODE = BO.WORK_CENTER_CODE + LEFT JOIN (SELECT BAR_CODE + FROM REPORT_QUALITY_INSPECTION + WHERE PROCESS_RESULT = 'KA' + GROUP BY BAR_CODE) KA ON KA.BAR_CODE = PO.BOX_CODE and PO.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE} @@ -350,6 +354,18 @@ AND TO_CHAR(PO.PRODUCT_SCANTIME, 'YYYY-MM-DD HH24:MI:SS') BETWEEN #{beginBeginTime} AND #{endBeginTime} + + AND SUBSTR(PO.PRODUCT_SNCODE, -4, 1) = 'A' + + + AND SUBSTR(PO.PRODUCT_SNCODE, -4, 1) != 'A' + + + AND KA.BAR_CODE IS NOT NULL + + + AND KA.BAR_CODE IS NULL +