You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
3.4 KiB
107 lines
3.4 KiB
using Newtonsoft.Json.Linq;
|
|
using Newtonsoft.Json;
|
|
using NFine.Application.WMS;
|
|
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using NFine.Application.OMAY;
|
|
|
|
namespace NFine.Web.Areas.OMAY.Controllers
|
|
{
|
|
public class ICSInvCodeHCController : ControllerBase
|
|
{
|
|
ICSInvCodeHCApp App = new ICSInvCodeHCApp();
|
|
// GET: OMAY/ICSInvCodeHC
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
//包装容器关联条码
|
|
public ActionResult GetSendContainerLot(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetSendContainerLot(ref pagination, queryJson);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
//副产品调用接口来显示本次可生产数量
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetLotInfo(string keyValue)
|
|
{
|
|
var rows = App.GetLotInfo(keyValue);
|
|
|
|
return Content(rows.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetLotLocationCode( string keySendLocationCode)
|
|
{
|
|
var rows = App.GetLotLocationCode( keySendLocationCode);
|
|
|
|
return Content(rows.ToJson());
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult BindingICSInvCodeHC(string ICSASN)
|
|
{
|
|
string msg = App.BindingICSInvCodeHC(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("回仓成功!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 获取库位条码信息调接口
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
//public ActionResult GetLocationAndBarCodeInformation(int id)
|
|
//{
|
|
|
|
// string json = JsonConvert.SerializeObject(list);
|
|
// string msg = "";
|
|
// string APIURL = ConfigurationManager.ConnectionStrings["ERPAPIURL"].ConnectionString + "BarCodeInformation/Get";
|
|
// string result = DeciliterApp.HttpPost(APIURL, json);
|
|
// JObject Obj = (JObject)JsonConvert.DeserializeObject(result);//或者JObject jo = JObject.Parse(jsonText);
|
|
// string MessAge = Obj["Message"].ToString();
|
|
// string Success = Obj["Success"].ToString();
|
|
// if (Success.ToUpper() == "FALSE")
|
|
// {
|
|
// throw new Exception(MessAge);
|
|
// }
|
|
// string Data = Obj["Data"].ToString();
|
|
// if (string.IsNullOrWhiteSpace(Data))
|
|
// {
|
|
// throw new Exception("获取现存量失败!");
|
|
// }
|
|
// var dataSet = JsonConvert.DeserializeObject<DataSet>(Data);
|
|
// DataTable dt = dataSet.Tables[0];
|
|
// var JsonData = new
|
|
// {
|
|
// Flag = true,
|
|
// msg = msg,
|
|
// FileName = FileName,
|
|
// PathName = PathName,
|
|
// Type = Type,
|
|
// };
|
|
// return Content(JsonData.ToJson());
|
|
//}
|
|
}
|
|
}
|