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()); + } +}