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.
123 lines
4.0 KiB
C#
123 lines
4.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.Areas.Wms.Controllers.OutStock
|
|
{
|
|
[Route("wms/[controller]")]
|
|
[ApiController]
|
|
public class FinishDeliveryController : WmsBaseController
|
|
{
|
|
private IFinishDeliveryService service;
|
|
|
|
// GET: LoginController
|
|
public FinishDeliveryController(IFinishDeliveryService _service)
|
|
{
|
|
service = _service;
|
|
}
|
|
|
|
[HttpPost("GetCustomer")]
|
|
public IActionResult GetCustomer(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string cartonNo = jobj["cartonNo"].ToString().Trim();
|
|
string loginId = jobj["loginId"].ToString().Trim();
|
|
|
|
SetObjectDetail obj = service.GetCustomer(cartonNo,loginId);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("ProductionCode")]
|
|
public IActionResult ProductionCode(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string cartonNo = jobj["cartonNo"].ToString().Trim();
|
|
string loginId = jobj["loginId"].ToString().Trim();
|
|
string customer = jobj["customer"].ToString().Trim();
|
|
string isComplete = jobj["isComplete"].ToString().Trim();
|
|
string deliveryNo = jobj["deliveryNo"].ToString().Trim();
|
|
|
|
SetObjectDetail obj = service.ProductionCode(cartonNo,loginId, customer, isComplete, deliveryNo);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("GetFinishDeliveryOrderList")]
|
|
public IActionResult GetFinishDeliveryOrderList(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string orderNo = jobj["orderNo"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.GetFinishDeliveryOrderList(orderNo);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("SetFinishDeliveryOrderNoSubmit")]
|
|
public IActionResult SetFinishDeliveryOrderNoSubmit(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string orderNo = jobj["orderNo"].ToString().Trim();
|
|
string loginId = jobj["loginId"].ToString().Trim();
|
|
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
SetObjectDetail obj = service.SetFinishDeliveryOrderNoSubmit(orderNo, loginId);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("GetFinishDeliveryOrderListByOrderNo")]
|
|
public IActionResult GetFinishDeliveryOrderListByOrderNo(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string orderNo = jobj["orderNo"].ToString().Trim();
|
|
|
|
SetObjectDetail obj = service.GetFinishDeliveryOrderListByOrderNo(orderNo);
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
}
|
|
}
|