using Microsoft.AspNetCore.Mvc; using ZR.Service.mes.wms.IService; namespace ZR.Admin.WebApi.Controllers.mes.wms { /// /// 退库模块 /// [Route("/mes/wm/exitwarehouse")] public class WMExitwarehouseController : BaseController { private readonly IWMExitwarehouseService Exitwarehouse; public WMExitwarehouseController(IWMExitwarehouseService Exitwarehouse) { this.Exitwarehouse = Exitwarehouse; } /// /// 一般退库 /// /// /// [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)); } /// /// 7 判断箱子是否存在成品库仓库里 /// /// /// [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)); } } }