优化代码 付款申请校验取消 合同计量优化

This commit is contained in:
xiaoshi 2024-12-30 17:08:13 +08:00
parent 82805a2a04
commit 6a5ea5764b
3 changed files with 27 additions and 4 deletions

View File

@ -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);
// }
}
// }
}

View File

@ -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);
// }
}
}

View File

@ -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<AbstractValidator> validators = e.getValidators();
// 删除标品校验器
validators.removeIf(validator -> validator instanceof PaymentMaxAmountValidator);
// 添加定制二开的校验器位置放第一位优先执行
// validators.add(0, new ContractMeasurementValidator());
}
}