Browse Source

只有任务状态为部分完成才能终止

dev_DY_CC
周红军 11 months ago
parent
commit
7ff54321f3
  1. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs

@ -103,8 +103,19 @@ public class ThirdLocationJobAppService
{
throw new UserFriendlyException($"未找到ID为 {id} 的任务");
}
else
{
if (thirdLocationJob.JobStatus == EnumJobStatus.Partial)
{
await _thirdLocationJobManager.CloseAsync(thirdLocationJob).ConfigureAwait(false);
}
else
{
throw new UserFriendlyException($"【{thirdLocationJob.JobStatus.GetDisplayName()}】状态不允许终止");
}
}
await _thirdLocationJobManager.CloseAsync(thirdLocationJob).ConfigureAwait(false);
}
/// <summary>

Loading…
Cancel
Save