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.
60 lines
1.7 KiB
C#
60 lines
1.7 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.Areas.Wms.Controllers.NC
|
|
{
|
|
[Route("wms/[controller]")]
|
|
[ApiController]
|
|
public class StockQueryController : WmsBaseController
|
|
{
|
|
private IStockQueryService service;
|
|
|
|
// GET: LoginController
|
|
public StockQueryController(IStockQueryService _service)
|
|
{
|
|
service = _service;
|
|
}
|
|
|
|
[HttpPost("GetStockQueryList")]
|
|
public IActionResult GetStockQueryList(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string partSpec = jobj["partSpec"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.GetStockQueryList(partSpec);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("GetLocateListByScan")]
|
|
public IActionResult GetLocateListByScan(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string partSpec = jobj["partSpec"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.GetLocateListByScan(partSpec);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
}
|
|
}
|