You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
C#
64 lines
2.0 KiB
C#
using Estsh.Core.Wms.IServices;
|
|
using Estsh.Core.Model.Result;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Estsh.Core.Models;
|
|
using Estsh.Core.Controllers;
|
|
|
|
namespace Estsh.Core.Web.Plugin.Wms.Areas.wms.Controllers.InStock
|
|
{
|
|
[Route("wms/[controller]")]
|
|
[ApiController]
|
|
public class QuicklyInStockController : WmsBaseController
|
|
{
|
|
private IQuicklyInStockService service;
|
|
|
|
// GET: LoginController
|
|
public QuicklyInStockController(IQuicklyInStockService _service)
|
|
{
|
|
service = _service;
|
|
}
|
|
|
|
|
|
[HttpPost("GetLocateByName")]
|
|
public IActionResult GetLocateByName(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string locateName = jobj["locateName"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.GetLocateByName(locateName);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("CheckStockByCartonAlocate")]
|
|
public IActionResult CheckStockByCartonAlocate(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string cartonNo = jobj["cartonNo"].ToString().Trim();
|
|
string locateName = jobj["locateName"].ToString().Trim();
|
|
string isGroup = jobj["isGroup"].ToString().Trim();
|
|
string loginId = jobj["loginId"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.CheckStockByCartonAlocate(cartonNo, locateName, isGroup, loginId);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
}
|
|
}
|