List<ReserveLinkSelectRow> lstConvertInfo = new List<ReserveLinkSelectRow>();
//构建预留转移参数
ReserveArgs<ReserveLinkSelectRow> convertArgs = new ReserveArgs<ReserveLinkSelectRow>();
ReserveLinkSelectRow seleRow = new ReserveLinkSelectRow();
//处理seleRow 需求单据参数赋值
List<ReserveLinkSupplyRow> supplyRows = new List<ReserveLinkSupplyRow>();
//处理supplyRows 供应单据参数赋值
row.LinkType = Enums.PLN_ReserveModel.Enu_ReserveBuildType.KdByManual;
supplyRows.Add(row);
seleRow.SupplyRows.AddRange(supplyRows);
lstConvertInfo.Add(seleRow);
//把预留转移行的信息赋给参数
convertArgs.SelectRows = lstConvertInfo;
//创建预留服务
IReserveLinkService linkService = AppServiceContext.GetService<IReserveLinkService>();
//调用预留创建接口
ReserveOperationResult resR = linkService.ReserveLinkCreate(ctx, convertArgs, OperateOption.Create());
封装成自定义API接口直接调用
预留创建参数.docx(119.24KB)