Files
wcs/WCS.WebApi/Controllers/PDAShelfLocationBindUnbindController.cs
hehaibing-1996 d9d7d2108d 1.PDA界面:货架位置绑定解绑界面支持手动输入
2.PDA界面:物料绑定
2025-03-11 13:58:11 +08:00

83 lines
2.6 KiB
C#

using Microsoft.AspNetCore.Mvc;
using WCS.BLL.Services.IService;
using WCS.BLL.Services.Service;
using WCS.Model;
using WCS.Model.ApiModel.MatBaseInfo;
using WCS.Model.ApiModel.PDAShelfLocationBindUnbind;
using WCS.Model.ApiModel.Stocktaking;
namespace WCS.WebApi.Controllers
{
/// <summary>
/// PDA货架绑定解绑 相关接口
/// </summary>
[ApiController]
[Route("[controller]")]
public class PDAShelfLocationBindUnbindController : ControllerBase
{
public IPDAShelfLocationBindUnbindService _pdaShelfLocationBindUnbindService { get; set; }
public PDAShelfLocationBindUnbindController(IPDAShelfLocationBindUnbindService pdaShelfLocationBindUnbindService)
{
_pdaShelfLocationBindUnbindService = pdaShelfLocationBindUnbindService;
}
[Route("getLocationInfoByShelfCode")]
[HttpPost(Name = "getLocationInfoByShelfCode")]
public async Task<ResponseBase> getLocationInfoByShelfCode(ShelfLocationBindUnbindRequest request)
{
try
{
return await _pdaShelfLocationBindUnbindService.getLocationInfoByShelfCode(request);
}
catch (Exception ex)
{
return new ResponseCommon()
{
Code = 201,
Message = "获取失败:" + ex.Message,
Data = null,
};
}
}
[Route("shelfLocationBind")]
[HttpPost(Name = "shelfLocationBind")]
public async Task<ResponseBase> shelfLocationBind(ShelfLocationBindUnbindRequest request)
{
try
{
return await _pdaShelfLocationBindUnbindService.shelfLocationBind(request);
}
catch (Exception ex)
{
return new ResponseCommon()
{
Code = 201,
Message = "发生异常," + ex.Message,
Data = null,
};
}
}
[Route("shelfLocationUnBind")]
[HttpPost(Name = "shelfLocationUnBind")]
public async Task<ResponseBase> shelfLocationUnBind(ShelfLocationBindUnbindRequest request)
{
try
{
return await _pdaShelfLocationBindUnbindService.shelfLocationUnBind(request);
}
catch (Exception ex)
{
return new ResponseCommon()
{
Code = 201,
Message = "解绑失败:" + ex.Message,
Data = null,
};
}
}
}
}