using DS.Module.Core; using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.TaskInteraction.Dtos; using DS.WMS.Core.TaskInteraction.Interface; namespace DS.WMS.Core.TaskInteraction.Method { /// /// PA任务服务 /// public class PreAlertTaskService : TaskService, IPreAlertTaskService { const TaskBaseTypeEnum TASK_TYPE = TaskBaseTypeEnum.PRE_ALERT; /// /// 初始化 /// /// public PreAlertTaskService(IServiceProvider provider) : base(provider) { } /// /// 创建PA任务 /// /// /// /// public override async Task CreateMultipleTaskAsync(TaskCreationRequest request, bool useTransaction = true) { var orders = request.ExtraData as List; if (useTransaction) await TenantDb.Ado.BeginTranAsync(); try { if (useTransaction) await TenantDb.Ado.CommitTranAsync(); return DataResult.Success; } catch (Exception ex) { if (useTransaction) await TenantDb.Ado.RollbackTranAsync(); await ex.LogAsync(Db); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed)); } } ///// ///// 设置任务状态 ///// ///// ///// ///// //public override Task SetTaskStatusAsync(TaskUpdateRequest request, bool useTransaction = true) //{ // return base.SetTaskStatusAsync(request, useTransaction); //} } }