From 3fce8a3a3b442d9e485fff2ddf3af2ee636f1f9e Mon Sep 17 00:00:00 2001 From: "lidy@connor.net.cn" Date: Thu, 6 Jun 2024 17:02:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=89=BA=E8=B7=AF=E7=BA=BF=E6=8C=87?= =?UTF-8?q?=E6=B4=BE=E5=8A=9F=E8=83=BD=E6=9F=A5=E6=89=BEP=E7=89=A9?= =?UTF-8?q?=E6=96=99=E9=A1=B6=E5=B1=82=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connor/chint/yunpi/command/AssignProcess.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/AssignProcess.java b/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/AssignProcess.java index ce12486..54b7a0d 100644 --- a/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/AssignProcess.java +++ b/com.connor.chint.wuhan/src/com/connor/chint/yunpi/command/AssignProcess.java @@ -79,7 +79,7 @@ public class AssignProcess extends KCommand { revPs.add(revP); } } - + boolean find = true; for (TCComponentItemRevision revP : revPs) { if (revPs.size() > 1) { // TCComponentItemRevision revP = (TCComponentItemRevision)whereUsed[i]; @@ -88,11 +88,23 @@ public class AssignProcess extends KCommand { continue; } } + find = false; TCComponentItemRevision item = getTopZzItem(revP); if (item != null) { return item; } } + if(find) { + //lidy20240605如果选中的物料通过使用找到多个物料,且都没有P,那么找一个最新的物料版本,向上找P即可 + for (TCComponentItemRevision revP : revPs) { + if(revP != revP.getItem().getLatestItemRevision()) + continue; + TCComponentItemRevision item = getTopZzItem(revP); + if (item != null) { + return item; + } + } + } } } catch (Exception e) { // Auto-generated catch block