From 7d69ef38902e0598d26c0ee7ec7dfb973e25b677 Mon Sep 17 00:00:00 2001
From: philip <244793088@qq.com>
Date: Fri, 3 Sep 2021 15:41:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=89=8D=E5=87=86=E5=A4=87=E6=9D=90?=
=?UTF-8?q?=E8=B4=A8=E8=A7=84=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/src/main/resources/mapper/ProdReadyTaskMapper.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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'