1.增加手动自检功能,主页增加状态显示

This commit is contained in:
hehaibing-1996
2024-06-11 14:03:06 +08:00
parent a87a93ea11
commit 95437c2ccf
24 changed files with 576 additions and 123 deletions

View File

@ -19,10 +19,12 @@ namespace WCS.WebApi.Controllers
public class HomeController : ControllerBase
{
public IHomerService _homerService { get; set; }
public ISelfCheckService _selfCheckService { get; set; }
public HomeController(IHomerService homerService)
public HomeController(IHomerService homerService, ISelfCheckService selfCheckService)
{
_homerService = homerService;
_selfCheckService = selfCheckService;
}
[Route("getShelfTypes")]
@ -74,13 +76,14 @@ namespace WCS.WebApi.Controllers
{
Code = 200,
Message = "success",
Data = shelfs.Select(t => new Shelf
Data = shelfs.Select(t => new ShelfModel
{
ShelfId = t.ShelfId,
ShelfCode = t.ShelfCode,
CurentMode = (int)t.CurrentMode,
ModulesStr = t.ModulesStr,
GroupName = t.GroupName
GroupName = t.GroupName,
OrderNumber = t.OrderNumber,
}).ToList(),
};
}
@ -94,6 +97,31 @@ namespace WCS.WebApi.Controllers
}
}
[Route("shelfCheckAll")]
[HttpPost(Name = "shelfCheckAll")]
public async Task<ResponseBase> shelfCheckAll(GetShelfStatusRequest request)
{
try
{
//var shelfs = ShelfManager.Shelves
// .WhereIF(request.GroupNames?.Count > 0, t => request.GroupNames!.Contains(t.GroupName))
// .Select(t => t.ShelfCode)
// .ToList();
//直接返回当前内存中缓存的货架和状态
return await _selfCheckService.StartSelfCheckByGroupName(request.GroupNames);
}
catch (Exception ex)
{
return new ResponseBase()
{
Code = 300,
Message = "操作失败:" + ex.Message,
};
}
}
/// <summary>
/// 重置货架的状态 使其回到待机模式
/// </summary>

View File

@ -195,6 +195,25 @@ namespace WebApi.Controllers
}
}
[Route("getOutOrderDetailSingleLight")]
[HttpPost(Name = "getOutOrderDetailSingleLight")]
public async Task<ResponseBase> getOutOrderDetailSingleLight(GetOutOrderDetailRequest request)
{
try
{
return await _outstoreService.GetOutOrderDetailSingleLight(request);
}
catch (Exception ex)
{
return new ResponseBase()
{
Code = 300,
Message = "<22><>ѯʧ<D1AF>ܣ<EFBFBD>" + ex.Message,
};
}
}
/// <summary>
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><E2B5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ
/// </summary>