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
{
///
/// PDA货架绑定解绑 相关接口
///
[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 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 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 shelfLocationUnBind(ShelfLocationBindUnbindRequest request)
{
try
{
return await _pdaShelfLocationBindUnbindService.shelfLocationUnBind(request);
}
catch (Exception ex)
{
return new ResponseCommon()
{
Code = 201,
Message = "解绑失败:" + ex.Message,
Data = null,
};
}
}
}
}