From d6de287e5cf7683dc09bf7c398d77a838caadcc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Tue, 7 Sep 2021 16:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=B6=E4=BB=B6=E5=8A=A0=E5=B7=A5=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/ReportMapper.xml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index ad4e9c45..9ef25062 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -44,7 +44,8 @@ ZNU.FULL_NAME OPERATION_USER,ZSD.SFC SFC, CASE WHEN S2.STATUS = '405' THEN '是' ELSE '否' END DISPATCH_STATUS, ZSD.EARLIEST_START_DATE EARLIEST_START_DATE,ZSD.LATEST_END_DATE LATEST_END_DATE, - ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE + ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE, + CF2.VALUE WORK_ORDER FROM SFC S INNER JOIN SHOP_ORDER SO ON SO.HANDLE = S.SHOP_ORDER_BO INNER JOIN ITEM I ON I.HANDLE = SO.ITEM_BO @@ -56,6 +57,7 @@ SELECT MAX(ZSD2.DISPATCH_SEQ) FROM Z_SFC_DISPATCH ZSD2 WHERE S.SFC = ZSD2.SFC AND S.SITE = ZSD2.SITE ) LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = S.SHOP_ORDER_BO AND CF."ATTRIBUTE" = 'ITEM_NUMBER' + LEFT JOIN CUSTOM_FIELDS CF2 ON CF2.HANDLE = S.SHOP_ORDER_BO AND CF2."ATTRIBUTE" = 'WORK_ORDER' INNER JOIN STATUS S2 ON S2.HANDLE = S.STATUS_BO S.SITE = #{site} @@ -72,6 +74,21 @@ AND IT.DESCRIPTION LIKE '%${param.itemDescription}%' + + AND (O.OPERATION LIKE '%${param.operation}%' + OR OT.DESCRIPTION LIKE '%${param.operation}%') + + + AND CF2.VALUE = #{param.workOrder} + + + + AND S2.STATUS = '405' + + + AND S2.STATUS != '405' + + AND ZSD.ACTUAL_START_DATE >= TO_DATE(#{param.startDateTime}, 'YYYY-MM-DD HH24:MI:SS') @@ -84,6 +101,7 @@ AND ZSD.ACTUAL_COMPLETE_DATE <= TO_DATE(#{param.endDateTime}, 'YYYY-MM-DD HH24:MI:SS') +