取消任务回调 取消任务 更新货架信息

This commit is contained in:
hehaibing-1996
2025-03-05 11:35:03 +08:00
parent 976f883642
commit a3a9b9c838
2 changed files with 16 additions and 1 deletions

View File

@ -68,7 +68,8 @@ namespace WCS.BLL.Manager
{
var shelf = DbHelp.db.Queryable<ShelfInfo>()
.Where(t => t.ShelfCode == tasks[i].ShelfCode)
.Where(t => t.CurrentLocationId == tasks[i].StratLocationId && t.DestinationLocationId == tasks[i].EndLocationId)
.Where(t => t.CurrentTaskCode == tasks[i].TaskCode)
.Where(t => t.DestinationLocationId == tasks[i].EndLocationId)
.First();
if (shelf != null)
{

View File

@ -89,6 +89,20 @@ namespace WCS.WebApi.Controllers
DbHelp.db.Updateable(shelf).ExecuteCommand();
}
if (shelf != null && request.method == "cancel" && shelf.TransStatus == TransStatusEnum.)
{
//shelf.CurrentLocationId = 0;
//shelf.CurrentLocaiotnCode = string.Empty;
shelf.DestinationLocationId = 0;
shelf.DestinationLocaiotnCode = string.Empty;
shelf.TransStatus = TransStatusEnum.;
shelf.CurrentTaskCode = string.Empty;
DbHelp.db.Updateable(shelf).ExecuteCommand();
}
if (shelf != null && request.method == "end" && shelf.TransStatus == TransStatusEnum.)
{
task.TaskStatus = TaskStatusEnum.;