添加日志

This commit is contained in:
xuhaihui 2025-06-17 18:31:27 +08:00
parent e49011a7e7
commit d12eac307b
1 changed files with 8 additions and 0 deletions

View File

@ -16,17 +16,22 @@ import kd.bos.dataentity.resource.ResManager;
import kd.bos.dataentity.utils.StringUtils;
import kd.bos.entity.ExtendedDataEntity;
import kd.bos.entity.validate.AbstractValidator;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.QueryServiceHelper;
import kd.ec.basedata.common.enums.BillStatusEnum;
import zcgj.zcdev.zcdev.pr.plugin.form.MaterialInbFinaceConfirmeInvoicePlugin;
class PaymentApplyInvoiceValidator extends AbstractValidator {
private static final Log log = LogFactory.getLog(PaymentApplyInvoiceValidator.class);
PaymentApplyInvoiceValidator() {
}
public void validate() {
String operateKey = this.getOperateKey();
if (StringUtils.equals(operateKey, "submit")) {
log.info("进入PaymentApplyInvoiceValidator插件开始调用二开逻辑");
this.validateMultiRateContract();
this.validateInvoiceSumAmount();
this.validateInvoiceApplyAmount();
@ -35,6 +40,7 @@ class PaymentApplyInvoiceValidator extends AbstractValidator {
}
protected void validateMultiRateContract() {
log.info("PaymentApplyInvoiceValidator插件调用validateMultiRateContract方法");
ExtendedDataEntity[] dataEntities = this.getDataEntities();
ExtendedDataEntity[] var2 = dataEntities;
int var3 = dataEntities.length;
@ -44,6 +50,7 @@ class PaymentApplyInvoiceValidator extends AbstractValidator {
DynamicObject bill = dataEntity.getDataEntity();
int a = 0;
String sourcetype = bill.getString("sourcetype");//付款类型
log.info("调用PaymentApplyInvoiceValidator插件判断付款类型值:" +sourcetype);
if (StringUtils.equals(sourcetype, "01")) {
//非合同付款
a++;
@ -53,6 +60,7 @@ class PaymentApplyInvoiceValidator extends AbstractValidator {
for (int i = 0; i < entries.size(); ++i) {
DynamicObject entry = entries.get(i);
DynamicObject contract = null;
log.info("调用PaymentApplyInvoiceValidator插件进行跳过合同内容");
if (a == 0) {
//合同付款
contract = entry.getDynamicObject("contract");