diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalBillDto.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalBillDto.java index 27df7b40..3d214d2b 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalBillDto.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalBillDto.java @@ -44,6 +44,8 @@ public class AbnormalBillDto extends AbnormalBill { private String ncCodeDescription; + private String workOrder; + public String getSeq() { return seq; } @@ -133,4 +135,12 @@ public class AbnormalBillDto extends AbnormalBill { public void setNcCodeDescription(String ncCodeDescription) { this.ncCodeDescription = ncCodeDescription; } + + public String getWorkOrder() { + return workOrder; + } + + public void setWorkOrder(String workOrder) { + this.workOrder = workOrder; + } } diff --git a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml index 7e24585f..57d9454a 100644 --- a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml +++ b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml @@ -915,12 +915,15 @@ SELECT ROW_NUMBER() OVER(ORDER BY ZAB.ABNORMAL_NO ASC) SEQ,ZAB.ABNORMAL_NO ABNORMAL_NO, ZAB.STATUS STATUS, IT.DESCRIPTION ITEM_DESCRIPTION, ZAB.CREATED_DATE_TIME CREATED_DATE_TIME, ZAB.RESPONSE_DATE_TIME RESPONSE_DATE_TIME, - ZAB.CREATED_USER CREATED_USER, + ZNU.FULL_NAME CREATED_USER, ZAB.NC_CODE NC_CODE,ZAB.PB_DESCRIPTION PB_DESCRIPTION, SUBSTR(LISTAGG(NCT.DESCRIPTION || ',') WITHIN GROUP(ORDER BY ZAB.ABNORMAL_NO),0,LENGTH(LISTAGG(NCT.DESCRIPTION || ',') WITHIN GROUP(ORDER BY ZAB.ABNORMAL_NO))-1) NC_CODE_DESCRIPTION FROM Z_ABNORMAL_BILL ZAB LEFT JOIN ITEM I ON ZAB.ITEM_BO = I.HANDLE LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO AND IT.LOCALE = #{language} + LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZAB.CREATED_USER AND ZNU.SITE = ZAB.SITE + LEFT JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZAB.SHOP_ORDER AND SO.SITE = ZAB.SITE + LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER' LEFT JOIN Z_ABNORMAL_NC_CODE ZANC ON ZANC.ABNORMAL_BILL_BO = ZAB.HANDLE LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = 'NCCodeBO:'|| ZAB.SITE || ',' || ZANC.NC_CODE AND NCT.LOCALE = #{language} @@ -955,10 +958,13 @@ AND zab.REPORT_FROM = #{abnormalBill.reportFrom} + + AND CF.VALUE = #{abnormalBill.workOrder} + GROUP BY zab.ABNORMAL_NO,zab.STATUS,it.DESCRIPTION,zab.CREATED_DATE_TIME,zab.RESPONSE_DATE_TIME, - zab.CREATED_USER,zab.NC_CODE,zab.PB_DESCRIPTION + ZNU.FULL_NAME,zab.NC_CODE,zab.PB_DESCRIPTION