diff --git a/common/src/main/resources/mapper/ProdReadyTaskMapper.xml b/common/src/main/resources/mapper/ProdReadyTaskMapper.xml index 9f9f31d9..c862d0d1 100644 --- a/common/src/main/resources/mapper/ProdReadyTaskMapper.xml +++ b/common/src/main/resources/mapper/ProdReadyTaskMapper.xml @@ -650,7 +650,7 @@ JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE JOIN SFC_ROUTER SR2 ON SR.HANDLE =SR2.SFC_ROUTING_BO AND SR2.IN_USE = 'true' LEFT JOIN SFC_STEP SS ON SR2.HANDLE =SS.SFC_ROUTER_BO AND (SS.QTY_IN_QUEUE>0 or SS.QTY_IN_WORK>0) - LEFT JOIN ( + JOIN ( SELECT zprt.HANDLE,C3.VALUE TEXTURE,c4.VALUE MAT_SPEC, ROW_NUMBER() OVER(PARTITION BY zprt.HANDLE ORDER BY C3.VALUE,c4.VALUE ) SEQ FROM Z_PROD_READY_TASK zprt JOIN SFC S ON ZPRT.SFC=S.SFC AND s.SITE=ZPRT.SITE @@ -660,6 +660,7 @@ LEFT JOIN ITEM_T CT ON CT.ITEM_BO = CP.HANDLE AND CT.LOCALE = 'zh' LEFT JOIN CUSTOM_FIELDS C3 ON C3.HANDLE = CP.HANDLE AND C3.ATTRIBUTE = 'TEXTTURE' LEFT JOIN CUSTOM_FIELDS C4 ON C4.HANDLE = CP.HANDLE AND C4.ATTRIBUTE = 'MAT_SPEC' + WHERE zprt.SITE=#{entity.site} AND C4.VALUE =#{entity.matSpec} AND C3.VALUE LIKE '%${entity.texture}%' ) CF on CF.HANDLE=zprt.HANDLE AND CF.SEQ='1'