From 6a5ea5764b55bc6172d208e2ab98688dedbb768a Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Mon, 30 Dec 2024 17:08:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=20?= =?UTF-8?q?=E4=BB=98=E6=AC=BE=E7=94=B3=E8=AF=B7=E6=A0=A1=E9=AA=8C=E5=8F=96?= =?UTF-8?q?=E6=B6=88=20=20=20=E5=90=88=E5=90=8C=E8=AE=A1=E9=87=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ContractEeasurementBillPlugin.java | 4 ++-- .../InContractMeasurementBillEditPlugin.java | 4 ++-- .../plugin/operate/PaymentApplyFundExtOp.java | 23 +++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/PaymentApplyFundExtOp.java diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractEeasurementBillPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractEeasurementBillPlugin.java index 8ac6af4..370f3b0 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractEeasurementBillPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractEeasurementBillPlugin.java @@ -40,9 +40,9 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin BigDecimal taxPrice = (BigDecimal) this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex); BigDecimal amount = taxPrice.multiply(qty); this.getModel().setValue("thisoftaxmount", amount, rowIndex, parentRowIndex); -// if (this.isInContract()) { + if (this.isInContract()) { this.countPercent(rowIndex, parentRowIndex); -// } + } // } } diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/InContractMeasurementBillEditPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/InContractMeasurementBillEditPlugin.java index e441cee..bc1b7a6 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/InContractMeasurementBillEditPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/InContractMeasurementBillEditPlugin.java @@ -38,9 +38,9 @@ public class InContractMeasurementBillEditPlugin extends InContractMeasureBillEd BigDecimal taxPrice = (BigDecimal) this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex); BigDecimal amount = taxPrice.multiply(qty); this.getModel().setValue("thisoftaxmount", amount, rowIndex, parentRowIndex); -// if (this.isInContract()) { + if (this.isInContract()) { this.countPercent(rowIndex, parentRowIndex); -// } + } } diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/PaymentApplyFundExtOp.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/PaymentApplyFundExtOp.java new file mode 100644 index 0000000..a65527b --- /dev/null +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/PaymentApplyFundExtOp.java @@ -0,0 +1,23 @@ +package zcgj.zcdev.zcdev.pr.plugin.operate; + +import kd.bos.entity.plugin.AddValidatorsEventArgs; +import kd.bos.entity.validate.AbstractValidator; +import kd.ec.contract.opplugin.fund.PaymentApplyFundOp; +import kd.ec.contract.opplugin.fund.validator.PaymentMaxAmountValidator; +import kd.ec.contract.opplugin.validator.ContractMeasureValidator; + +import java.util.List; + +public class PaymentApplyFundExtOp extends PaymentApplyFundOp { + + @Override + public void onAddValidators(AddValidatorsEventArgs e) { + super.onAddValidators(e); + List validators = e.getValidators(); + // 删除标品校验器 + validators.removeIf(validator -> validator instanceof PaymentMaxAmountValidator); + + // 添加定制二开的校验器(位置放第一位,优先执行) +// validators.add(0, new ContractMeasurementValidator()); + } +}