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.
143 lines
4.3 KiB
C#
143 lines
4.3 KiB
C#
using Estsh.Core.Wms.IServices;
|
|
using Estsh.Core.Model.Result;
|
|
using Estsh.Core.Util;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Estsh.Core.Models;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Estsh.Core.Controllers;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Estsh.Core.Web.Areas.Wms.Controllers.Qc
|
|
{
|
|
[Route("wms/[controller]")]
|
|
[ApiController]
|
|
public class QcController : WmsBaseController
|
|
{
|
|
private IQcService service;
|
|
|
|
// GET: LoginController
|
|
public QcController(IQcService _service)
|
|
{
|
|
service = _service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取质检单信息
|
|
/// </summary>
|
|
/// <returns>工厂代码1002</returns>
|
|
[HttpPost("GetQCListing")]
|
|
public IActionResult GetQCListing()
|
|
{
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
List<WmsQcDetail> obj = service.GetQCListing();
|
|
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
/// <summary>
|
|
/// 订单质检情况
|
|
/// </summary>
|
|
/// <param name="jobj"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("GetShowList")]
|
|
public IActionResult GetShowList(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string receving = jobj["receving"].ToString();
|
|
string loginId = jobj["loginId"].ToString();
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
List<WmsQcShowList> obj = service.GetShowList(receving, loginId);
|
|
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 完成质检
|
|
/// </summary>
|
|
/// <param name="jobj"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("CheckQc")]
|
|
public IActionResult CheckQc(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string receving = jobj["receving"].ToString();
|
|
string loginId = jobj["loginId"].ToString();
|
|
string remark = jobj["remark"].ToString();
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string obj = service.CheckQc(receving,loginId,remark);
|
|
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("CheckCartonStatus")]
|
|
public IActionResult CheckCartonStatus(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string cartonNo = jobj["cartonNo"].ToString();
|
|
string loginId = jobj["loginId"].ToString();
|
|
string orderNo = jobj["orderNo"].ToString();
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string obj = service.CheckCartonStatus(cartonNo, loginId, orderNo);
|
|
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
|
|
[HttpPost("CheckQcCarton")]
|
|
public IActionResult CheckQcCarton(Newtonsoft.Json.Linq.JObject jobj)
|
|
{
|
|
string QcCartonNo = jobj["QcCartonNo"].ToString();
|
|
string MAXmessage = jobj["MAXmessage"].ToString();
|
|
string loginId = jobj["loginId"].ToString();
|
|
string Remark = jobj["Remark"].ToString();
|
|
string receving = jobj["receving"].ToString();
|
|
WmsResponseResult result = new WmsResponseResult();
|
|
try
|
|
{
|
|
string obj = service.CheckQcCarton(QcCartonNo,MAXmessage,loginId,Remark,receving);
|
|
|
|
result.Success = true;
|
|
result.Data = obj;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
result.Msg = ex.Message;
|
|
}
|
|
return Json(result);
|
|
}
|
|
}
|
|
|
|
}
|