From 440a05d4a677b5003a1d9a461b22da87f56a8a3c Mon Sep 17 00:00:00 2001 From: ljw Date: Mon, 6 Jan 2025 21:41:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E5=90=88=E5=90=8C=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=A0=87=E5=87=86=E4=BB=B7=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wm/im/clientdemand/utils/ClientUtils.java | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/yem/wm/im/clientdemand/utils/ClientUtils.java b/src/main/java/com/yem/wm/im/clientdemand/utils/ClientUtils.java index 822a163f..985ba886 100644 --- a/src/main/java/com/yem/wm/im/clientdemand/utils/ClientUtils.java +++ b/src/main/java/com/yem/wm/im/clientdemand/utils/ClientUtils.java @@ -53,21 +53,21 @@ public class ClientUtils { if (!yem_linetype.equals("add")) { boolean tor = true; DynamicObjectCollection yemMulticonfig = temp.getDynamicObjectCollection("yem_multiconfig"); - if (!yemMulticonfig.isEmpty()){ + if (!yemMulticonfig.isEmpty()) { for (DynamicObject dynamicObject : yemMulticonfig) { String yemLinetypes = dynamicObject.getString("yem_linetypes"); - if ("add".equals(yemLinetypes)){ - tor= false; + if ("add".equals(yemLinetypes)) { + tor = false; } } } - if (tor){ + if (tor) { rowInfo++; continue; } } - }else { - yem_linetype="add"; + } else { + yem_linetype = "add"; } //多功能配置分录行获取 DynamicObjectCollection multiconfig = null; @@ -160,11 +160,11 @@ public class ClientUtils { } } } - if ("yem_es_xsalesorder".equals(models.getDataEntityType().getName())){ + if ("yem_es_xsalesorder".equals(models.getDataEntityType().getName())) { int multiconfigIndex = 0; if (!multiconfig.isEmpty()) { for (DynamicObject dc : multiconfig) { - if ("add".equals(dc.getString("yem_linetypes"))){ + if ("add".equals(dc.getString("yem_linetypes"))) { long configentryid = dc.getLong("yem_configentryid"); BigDecimal configentry = dataMap.get(configentryid) == null ? BigDecimal.ZERO : dataMap.get(configentryid).setScale(2); models.setValue("yem_marketraisepribase", configentry, multiconfigIndex, rowInfo); @@ -172,7 +172,7 @@ public class ClientUtils { } } } - }else { + } else { setPriceNow(multiconfig, dataMap, rowInfo, models); } } @@ -214,7 +214,7 @@ public class ClientUtils { else if (("yem_im_clientdema_pj".equals(yem_billtype) || "yem_im_inclientdema_pj".equals(yem_billtype) || "yem_es_salesorder_PJ".equals(yem_billtype) || "yem_es_salesorder_nmpj".equals(yem_billtype) || "yem_es_xsalesorder_pj".equals(yem_billtype) || "yem_es_xsalesorder_nmpj".equals(yem_billtype)) - && "P".equals(businesssort)&& yem_linetype.equals("add")) { + && "P".equals(businesssort) && yem_linetype.equals("add")) { pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid); } rowInfo++; @@ -368,7 +368,15 @@ public class ClientUtils { * 获取标准价中 给当前行标准销售加价赋值 */ public static void setPriceNow(DynamicObjectCollection multiconfig, Map dataMap, int rowInfo, IDataModel models) { - + int multiconfigIndex = 0; + if (!multiconfig.isEmpty()) { + for (DynamicObject dc : multiconfig) { + long configentryid = dc.getLong("yem_configentryid"); + BigDecimal configentry = dataMap.get(configentryid) == null ? BigDecimal.ZERO : dataMap.get(configentryid).setScale(2); + models.setValue("yem_marketraisepribase", configentry, multiconfigIndex, rowInfo); + multiconfigIndex++; + } + } } /** @@ -2001,13 +2009,13 @@ public class ClientUtils { int rowCount = model.getEntryRowCount("yem_es_materialinfo"); for (int i = 0; i < rowCount; i++) { DynamicObject d = c.get(i); - if (string.equals("yem_es_xsalesorder")){ + if (string.equals("yem_es_xsalesorder")) { String yemLinetype = d.getString("yem_linetype"); - if (!"add".equals(yemLinetype)){ + if (!"add".equals(yemLinetype)) { continue; } } - if (!"Z".equals(d.getString("yem_businesssort"))){ + if (!"Z".equals(d.getString("yem_businesssort"))) { continue; } DynamicObjectCollection subC = d.getDynamicObjectCollection("yem_multiconfig");