From 7a671ac93e93f367235b01fac6dab6f8f0d4ce77 Mon Sep 17 00:00:00 2001 From: ljw Date: Sat, 1 Mar 2025 06:25:15 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=201.=E8=AE=A2=E8=88=B1=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=8D=95=E9=80=89=E6=8B=A9F7=E6=97=B6=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../es/salesorder/utils/SalesOrderUtils.java | 29 ++++--------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/yem/wm/es/salesorder/utils/SalesOrderUtils.java b/src/main/java/com/yem/wm/es/salesorder/utils/SalesOrderUtils.java index 5331df36..d7a5e281 100644 --- a/src/main/java/com/yem/wm/es/salesorder/utils/SalesOrderUtils.java +++ b/src/main/java/com/yem/wm/es/salesorder/utils/SalesOrderUtils.java @@ -763,17 +763,18 @@ public class SalesOrderUtils { products = (DynamicObject) model.getValue("yem_bd_products"); } + String number = products.getString("number"); + long id = 0L; QFilter qFilter = new QFilter("enable", QCP.equals, "1"); - String number = products.getString("number"); DynamicObject billtype = (DynamicObject) model.getValue("yem_billtype"); String type = billtype.getString("number"); - if (StringUtils.containsIgnoreCase(type, "zj")) { + if (StringUtils.containsIgnoreCase(type, "zj")||"yem_es_storagetrans".equals(type)) { if ("Z".equals(businesssort)) { if (YEM.isNotEmpty(productmodel)) { - id = productmodel.getLong("yem_products.id"); - qFilter.and(new QFilter("yem_bd_declarationele.yem_productstree.id", QCP.equals, id)); + id = productmodel.getLong("id"); + qFilter.and(new QFilter("yem_bd_declarationele.yem_baseproductstree.id", QCP.equals, id)); qFilter.and(new QFilter("enable", QCP.equals, "1")); } } @@ -802,30 +803,10 @@ public class SalesOrderUtils { } } - -// if (qFilter != null && YEM.isNotEmpty(products)) { -// qFilter.and(new QFilter("yem_producttype.id", QCP.equals, products.getLong("id"))); -// } - -// if ("yem_customclass".equals(currentFilterKey)) { -// if (qFilter != null) { -// return BusinessDataServiceHelper.load("yem_bd_declarationele", selectfields, qFilter.toArray()); -// } -// } - if ("yem_hscode".equals(currentFilterKey) && customclass != null) { qFilter.and(new QFilter("yem_customclass.id", QCP.equals, customclass.getLong("id"))); } -// if (qFilter != null) { -// if (customclass != null && !"yem_customclass".equals(currentFilterKey)) { -// qFilter.and(new QFilter("yem_customclass.id", QCP.equals, customclass.getLong("id"))); -// } -// -// if (hscode != null && !"yem_hscode".equals(currentFilterKey)) { -// qFilter.and(new QFilter("yem_hscodebase.id", QCP.equals, hscode.getLong("id"))); -// } -// } return BusinessDataServiceHelper.load("yem_bd_declarationele", selectfields, qFilter.toArray()); }