lc/lc123/cloud/app/plugin/operate/pm/PurRefundApplyValidOpPlugin...

48 lines
1.7 KiB
Java
Raw Normal View History

2025-11-17 10:17:39 +00:00
package tqq9.lc123.cloud.app.plugin.operate.pm;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.dataentity.utils.StringUtils;
import kd.bos.entity.ExtendedDataEntity;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.args.BeforeOperationArgs;
import kd.bos.entity.validate.AbstractValidator;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.sdk.plugin.Plugin;
import tqq9.lc123.cloud.app.plugin.utils.AutoFixLinkUtil;
import java.util.stream.Collectors;
/**
* 采购退货单保存操作插件
*/
public class PurRefundApplyValidOpPlugin extends AbstractOperationServicePlugIn implements Plugin {
private final static Log logger = LogFactory.getLog(PurRefundApplyValidOpPlugin.class);
@Override
public void onAddValidators(AddValidatorsEventArgs e) {
super.onAddValidators(e);
e.addValidator(new AbstractValidator() {
@Override
public void validate() {
ExtendedDataEntity[] dataEntities = this.getDataEntities();
for (ExtendedDataEntity extendeDataEntity : dataEntities) {
DynamicObject dataEntity = extendeDataEntity.getDataEntity();
DynamicObjectCollection billentry = dataEntity.getDynamicObjectCollection("billentry");
DynamicObjectCollection tqq9_entryentity = dataEntity.getDynamicObjectCollection("tqq9_entryentity");
}
}
});
}
}