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.
106 lines
3.5 KiB
C#
106 lines
3.5 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.OutStock
|
|
{
|
|
[Route("wms/[controller]")]
|
|
[ApiController]
|
|
public class SaleBatchController : WmsBaseController
|
|
{
|
|
private ISaleBatchService service;
|
|
|
|
// GET: LoginController
|
|
public SaleBatchController(ISaleBatchService _service)
|
|
{
|
|
service = _service;
|
|
}
|
|
|
|
[HttpPost("GetSaleBatchOrderList")]
|
|
public IActionResult GetSaleBatchOrderList(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string orderNo = jobj["orderNo"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.GetSaleBatchOrderList(orderNo);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("GetSaleBatchOrderListByOrderNo")]
|
|
public IActionResult GetSaleBatchOrderListByOrderNo(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string orderNo = jobj["orderNo"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.GetSaleBatchOrderListByOrderNo(orderNo);
|
|
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 orderNo = jobj["orderNo"].ToString().Trim();
|
|
string isSplit = jobj["isSplit"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.CheckStockByCartonAlocate(cartonNo, orderNo, isSplit);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("doSaleBatch")]
|
|
public IActionResult doSaleBatch(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string cartonNo = jobj["cartonNo"].ToString().Trim();
|
|
string orderNo = jobj["orderNo"].ToString().Trim();
|
|
string groupNo = jobj["groupNo"].ToString().Trim();
|
|
string isSplit = jobj["isSplit"].ToString().Trim();
|
|
string loginId = jobj["loginId"].ToString().Trim();
|
|
string customBarcode = jobj["customBarcode"].ToString().Trim();
|
|
|
|
SetObjectDetail obj = service.doSaleBatch(cartonNo, orderNo, groupNo, isSplit, loginId, customBarcode);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
}
|
|
}
|