From a71a6adf42bc7ed5ff771d987eecfbfea9651c83 Mon Sep 17 00:00:00 2001 From: 25655 <2565550274@qq.com> Date: Sat, 1 Mar 2025 15:57:21 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=201.=E8=AE=A2=E8=88=B1=E4=B8=8A?= =?UTF-8?q?=E5=87=BA=E5=8F=A3=E6=8A=A5=E5=85=B3=E9=87=91=E9=A2=9D=E5=B7=AE?= =?UTF-8?q?=E5=80=BC=E5=8F=AA=E8=A6=81=E5=90=88=E8=AE=A1=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E5=B0=B1=E5=8F=AF=E4=BB=A5=E5=85=81=E8=AE=B8=E4=B8=8B=E6=8E=A8?= =?UTF-8?q?=EF=BC=8C=202.=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8D=95=E5=8F=B0=E8=B5=A0=E9=80=81=E9=85=8D=E4=BB=B6?= =?UTF-8?q?=E9=87=91=E9=A2=9D=EF=BC=8C=E5=90=88=E5=90=8C=E4=B8=80=E8=B7=AF?= =?UTF-8?q?=E6=90=BA=E5=B8=A6=EF=BC=8C=E5=87=BA=E5=BA=93=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=B5=A0=E9=80=81=E9=85=8D=E4=BB=B6=E4=BF=A1=E6=81=AF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=95=B0=E9=87=8F=E6=A0=B9=E6=8D=AE=E6=9C=BA=E5=9E=8B?= =?UTF-8?q?+=E5=8D=95=E5=8F=B0=E8=B5=A0=E9=80=81=E9=85=8D=E4=BB=B6?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E6=B1=87=E6=80=BB=EF=BC=88=E5=90=8C=E5=90=88?= =?UTF-8?q?=E5=90=8C=E9=80=BB=E8=BE=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storagetrans/form/StorageTransEdit.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/yem/wm/es/storagetrans/form/StorageTransEdit.java b/src/main/java/com/yem/wm/es/storagetrans/form/StorageTransEdit.java index 55253e09..c50d55cb 100644 --- a/src/main/java/com/yem/wm/es/storagetrans/form/StorageTransEdit.java +++ b/src/main/java/com/yem/wm/es/storagetrans/form/StorageTransEdit.java @@ -235,11 +235,13 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele String yemProducts = loadSingle.getString("yem_products.number"); String aLong = loadSingle.getString("yem_productmodel.yem_products.number"); BigDecimal yemQty = loadSingle.getBigDecimal("yem_qty"); - if (map.get(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong) != null) { - BigDecimal bigDecimal = map.get(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong); - map.put(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong, bigDecimal.add(yemQty)); - } else { - map.put(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong, yemQty); + BigDecimal yemSinglepartgiftmat = loadSingle.getBigDecimal("yem_singlepartgiftmat"); + if (yemSinglepartgiftmat.compareTo(BigDecimal.ZERO) != 0) { + if (map.get(yemContractnumbersM + yemShipmentnumbersM + yemProducts + aLong) != null) { + map.compute(yemContractnumbersM + yemShipmentnumbersM + yemProducts + aLong, (k, bigDecimal) -> bigDecimal.add(yemQty)); + } else { + map.put(yemContractnumbersM + yemShipmentnumbersM + yemProducts + aLong, yemQty); + } } } DynamicObjectCollection yemEsSalesorderL = this.getModel().getEntryEntity("yem_es_salesorder_l"); @@ -1285,9 +1287,9 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele String name = dataEntity.getDataEntityType().getName(); DynamicObjectCollection materialinfo = dataEntity.getDynamicObjectCollection("yem_es_materialinfo"); BigDecimal sum = BigDecimal.ZERO; - boolean allonPush = true; + BigDecimal allonPush = BigDecimal.ZERO; +// boolean allonPush = true; for (DynamicObject dynamicObject : materialinfo) { - BigDecimal adstamount = dynamicObject.getBigDecimal("yem_adstamount"); // 销售出库金额-提交 BigDecimal saamtpriceclause; if ("yem_es_declaredocx".equals(name)) { @@ -1299,13 +1301,18 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele } BigDecimal amt = adstamount.subtract(saamtpriceclause); - if (amt.compareTo(BigDecimal.ZERO) != 0) { - allonPush = false; + BigDecimal yemExportmat = dynamicObject.getBigDecimal("yem_exportmat"); + if (yemExportmat.compareTo(BigDecimal.ZERO) > 0) { + allonPush = allonPush.add(yemExportmat); } sum = sum.add(amt); dynamicObject.set("yem_exportmat", amt); } dataEntity.set("yem_exportmatsum", sum); - dataEntity.set("yem_allonpush", allonPush); + if (allonPush.compareTo(BigDecimal.ZERO) == 0) { + dataEntity.set("yem_allonpush", true); + }else { + dataEntity.set("yem_allonpush", false); + } } }