合同审核返利规则一并审核

This commit is contained in:
sez 2025-11-17 15:41:30 +08:00
parent afaddaa18f
commit 582366f9d8
1 changed files with 13 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.operation.OperationServiceHelper;
import tqq9.lc123.cloud.app.api.utils.Constants;
@ -32,12 +33,21 @@ public class PurconmAuditToFLOp extends AbstractOperationServicePlugIn {
DynamicObjectCollection tqq9_entryentity = dynamicObject.getDynamicObjectCollection("tqq9_entryentity");
for (DynamicObject object : tqq9_entryentity) {
DynamicObject tqq9_pur_rebate = object.getDynamicObject("tqq9_pur_rebate");
OperateOption operateOption = OperateOption.create();
OperationResult auditResult = OperationServiceHelper.executeOperate(Constants.TYPE_AUDIT, "tqq9_pur_rebate", new DynamicObject[]{tqq9_pur_rebate}, operateOption);
if (null != tqq9_pur_rebate) {
tqq9_pur_rebate = BusinessDataServiceHelper.loadSingle(tqq9_pur_rebate.getLong("id"), "tqq9_pur_rebate");
OperateOption operateOption = OperateOption.create();
OperationResult auditResult = OperationServiceHelper.executeOperate(Constants.TYPE_AUDIT, "tqq9_pur_rebate", new DynamicObject[]{tqq9_pur_rebate}, operateOption);
if (!auditResult.isSuccess()) {
StringBuilder message = new StringBuilder();
auditResult.getAllErrorOrValidateInfo().forEach((error) -> {
message.append(error.getMessage());
});
logger.info("返利规则:" + tqq9_pur_rebate.getString("number") + "审批失败:" + message);
}
}
}
}
}