From c1e349393997e66d9fc4db7733e1ca5bdf142302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B4=B5=E5=BC=BA?= Date: Wed, 29 Oct 2025 11:29:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E7=A5=A8=E7=99=BB=E8=AE=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AE=A2=E6=88=B7=E6=98=A0=E5=B0=84=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/convert/RecPayerConvertPlugin.java | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/convert/RecPayerConvertPlugin.java b/main/java/shjh/jhzj7/fi/fi/plugin/convert/RecPayerConvertPlugin.java index f3c39ec..4a312f9 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/convert/RecPayerConvertPlugin.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/convert/RecPayerConvertPlugin.java @@ -33,6 +33,8 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug e.addSrcField("company"); //交票人类型 e.addSrcField("payeetype"); + //不遵循客户映射-默认关闭————即需要执行 + e.addSrcField("shjh_khys"); } @Override @@ -48,7 +50,8 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug // 获取单据数据包 DynamicObject bill = billEntity.getDataEntity(); String payeetype = (String) this.getSourceData(billEntity, fldProperties, "payeetype"); - if ("cdm_receivablebill".equals(bill.getString("sourcebilltype"))&&"bd_customer".equals(payeetype)){ + Boolean shjh_khys = (Boolean) this.getSourceData(billEntity, fldProperties, "shjh_khys"); + if ("cdm_receivablebill".equals(bill.getString("sourcebilltype"))&&"bd_customer".equals(payeetype)&&!shjh_khys){ this.carryCustomerRule(bill,billEntity,fldProperties); } @@ -74,20 +77,20 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug return; } DynamicObject company = BusinessDataServiceHelper.loadSingle(companyId, "bos_org"); - QFilter qFilter = new QFilter("shjh_dfhm", QCP.equals, accountName); - //新增收款入账中心-资金组织&&映射表组织过滤 - qFilter.and(new QFilter("shjh_org.id", QCP.equals, companyId)); - qFilter.and(new QFilter("enable", QCP.equals, "1")); - //1.对方户名与客户名称映射表 shjh_dfhmcust - DynamicObject shjhDfhmcust = BusinessDataServiceHelper.loadSingle("shjh_dfhmcust", qFilter.toArray()); - if (null != shjhDfhmcust) { - DynamicObject shjhCustomer = shjhDfhmcust.getDynamicObject("shjh_customer"); - if (null != shjhCustomer) { - bill.set("payer", shjhCustomer.getPkValue()); //付款人id - bill.set("payernumber", shjhCustomer.getString("number")); //付款人编码 - bill.set("payername", shjhCustomer.getString("name")); //付款人名称 - } - } else { +// QFilter qFilter = new QFilter("shjh_dfhm", QCP.equals, accountName); +// //新增收款入账中心-资金组织&&映射表组织过滤 +// qFilter.and(new QFilter("shjh_org.id", QCP.equals, companyId)); +// qFilter.and(new QFilter("enable", QCP.equals, "1")); +// //1.对方户名与客户名称映射表 shjh_dfhmcust +// DynamicObject shjhDfhmcust = BusinessDataServiceHelper.loadSingle("shjh_dfhmcust", qFilter.toArray()); +// if (null != shjhDfhmcust) { +// DynamicObject shjhCustomer = shjhDfhmcust.getDynamicObject("shjh_customer"); +// if (null != shjhCustomer) { +// bill.set("payer", shjhCustomer.getPkValue()); //付款人id +// bill.set("payernumber", shjhCustomer.getString("number")); //付款人编码 +// bill.set("payername", shjhCustomer.getString("name")); //付款人名称 +// } +// } else { //2.规则生单未配置客户——>取收款入账中心客户 QFilter customerFilter = new QFilter("name", QCP.equals, accountName); customerFilter.and(new QFilter("group.name", QCP.not_equals, "员工")); @@ -144,7 +147,7 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug } } - } + // } bill.set("shjh_xdgzkh", true);//设置收款单标记位 从规则携带客户等信息 为true }