74 lines
2.0 KiB
C#
74 lines
2.0 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using ZR.Service.mes.wms.IService;
|
|
|
|
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
/// 退库模块
|
|
/// </summary>
|
|
[Route("/mes/wm/exitwarehouse")]
|
|
public class WMExitwarehouseController : BaseController
|
|
{
|
|
private readonly IWMExitwarehouseService Exitwarehouse;
|
|
public WMExitwarehouseController(IWMExitwarehouseService Exitwarehouse)
|
|
{
|
|
this.Exitwarehouse = Exitwarehouse;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 一般退库
|
|
/// </summary>
|
|
/// <param name="original"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("common")]
|
|
[Log(Title = "退库", BusinessType = BusinessType.DELETE)]
|
|
public IActionResult ExitwarehouseCommmon(string originalCode)
|
|
{
|
|
string msg = null;
|
|
bool data = Exitwarehouse.ExitwarehouseCommmon(originalCode);
|
|
if (data)
|
|
{
|
|
msg = "退库成功";
|
|
}
|
|
else
|
|
{
|
|
msg = "箱子不在仓库中";
|
|
}
|
|
return ToResponse(new ApiResult(200, msg, data));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 7 判断箱子是否存在成品库仓库里
|
|
/// </summary>
|
|
/// <param name="originalCode"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("is_existed_warehouse")]
|
|
public IActionResult IsExistedWarehouse(string originalCode = "")
|
|
{
|
|
if (string.IsNullOrEmpty(originalCode))
|
|
{
|
|
|
|
return ToResponse(new ApiResult(200, "传入为空", false));
|
|
}
|
|
string msg = null;
|
|
bool data = this.Exitwarehouse.IsExistedWarehouse(originalCode);
|
|
if (data)
|
|
{
|
|
msg = "存在";
|
|
|
|
}
|
|
else
|
|
{
|
|
msg = "不存在";
|
|
}
|
|
|
|
return ToResponse(new ApiResult(200, msg, data));
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|