From 4f4270e97ecdfe8b890fdb17676ce2b258d65100 Mon Sep 17 00:00:00 2001 From: ljw Date: Mon, 6 Jan 2025 19:04:14 +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 | 38 +++++++------------ 1 file changed, 13 insertions(+), 25 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 6e4d728b..493759d7 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,19 @@ 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"; } //多功能配置分录行获取 DynamicObjectCollection multiconfig = null; @@ -160,21 +158,19 @@ 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); multiconfigIndex++; - } else { - multiconfigIndex++; } } } - } else { + }else { setPriceNow(multiconfig, dataMap, rowInfo, models); } } @@ -206,7 +202,7 @@ public class ClientUtils { else if (("yem_im_clientdeman_zj".equals(yem_billtype) || "yem_im_inclientdeman_zj".equals(yem_billtype) || ("yem_es_salesorder_ZJ".equals(yem_billtype)) || "yem_es_salesorder_nmzj".equals(yem_billtype) || "yem_es_xsalesorder_zj".equals(yem_billtype) || "yem_es_xsalesorder_nmzj".equals(yem_billtype)) - && "P".equals(businesssort) && yem_linetype.equals("add")) { + && "P".equals(businesssort) && !yem_linetype.equals("add")) { // else if (("yem_im_clientdeman_zj".equals(yem_billtype) || "yem_im_inclientdeman_zj".equals(yem_billtype) || ("yem_es_salesorder_ZJ".equals(yem_billtype)) || "yem_es_salesorder_nmzj".equals(yem_billtype)) && "P".equals(businesssort)) { pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid); } @@ -216,7 +212,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++; @@ -370,15 +366,7 @@ 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++; - } - } + } /** @@ -2011,13 +1999,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");