| | |
| | | public class LiKu : System.Web.Services.WebService |
| | | { |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 涓婃父WMS绯荤粺璋冪敤绔嬪簱WMS鎺ュ彛 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | //[WebMethod] |
| | | //public string AcceptWMSRequest(string funcName, string data) |
| | | //{ |
| | | // new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "璇锋眰", $"{data}"); |
| | | // string url = ConfigurationManager.AppSettings["WMS"]; |
| | | // if (funcName == "freezeByCustomer")// 绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅 |
| | | // { |
| | | // var response = HttpHelper.Post<freezeByCustomerResponse>(url + "api/StockInfo/freezeByCustomer", data, "绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅"); |
| | | // string res = JsonConvert.SerializeObject(response); |
| | | // new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | // return res; |
| | | // } |
| | | // else if (funcName == "InventoryQuery")//搴撳瓨淇℃伅 |
| | | // { |
| | | // var response = HttpHelper.Post<InventoryQueryResponse>(url + "api/StockInfo/inventoryQuery", data, "搴撳瓨淇℃伅"); |
| | | // string res = JsonConvert.SerializeObject(response); |
| | | // new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | // return res; |
| | | // } |
| | | // else if (funcName == "returnInventory")//浣欐枡鍥炲簱淇℃伅 |
| | | // { |
| | | // var response = HttpHelper.Post<ReturnInventoryResponse>(url + "api/InboundOrder/returnInventory", data, "浣欐枡鍥炲簱淇℃伅"); |
| | | // string res = JsonConvert.SerializeObject(response); |
| | | // new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | // return res; |
| | | // } |
| | | // else |
| | | // { |
| | | |
| | | // new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"涓嶆敮鎸佽璇锋眰"); |
| | | // return "涓嶆敮鎸佽璇锋眰"; |
| | | // } |
| | | |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [WebMethod] |
| | | public string AcceptWMSRequest(string funcName,string data) |
| | | public string freezeByCustomer(string data) |
| | | { |
| | | string funcName = "freezeByCustomer"; |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "璇锋眰", $"{data}"); |
| | | string url = ConfigurationManager.AppSettings["WMS"]; |
| | | if (funcName == "freezeByCustomer")// 绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅 |
| | | { |
| | | var response = HttpHelper.Post<freezeByCustomerResponse>(url + "api/StockInfo/freezeByCustomer", data, "绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅"); |
| | | string res = JsonConvert.SerializeObject(response); |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | return res; |
| | | } |
| | | else if(funcName == "InventoryQuery")//搴撳瓨淇℃伅 |
| | | { |
| | | var response = HttpHelper.Post<InventoryQueryResponse>(url + "api/StockInfo/inventoryQuery", data, "搴撳瓨淇℃伅"); |
| | | string res = JsonConvert.SerializeObject(response); |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | return res; |
| | | } |
| | | else if(funcName == "returnInventory")//浣欐枡鍥炲簱淇℃伅 |
| | | { |
| | | var response = HttpHelper.Post<ReturnInventoryResponse>(url + "api/InboundOrder/returnInventory", data, "浣欐枡鍥炲簱淇℃伅"); |
| | | string res = JsonConvert.SerializeObject(response); |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | return res; |
| | | } |
| | | else |
| | | { |
| | | |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"涓嶆敮鎸佽璇锋眰"); |
| | | return "涓嶆敮鎸佽璇锋眰"; |
| | | } |
| | | var response = HttpHelper.Post<freezeByCustomerResponse>(url + "api/StockInfo/freezeByCustomer", data, "绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅"); |
| | | string res = JsonConvert.SerializeObject(response); |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | return res; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 浣欐枡鍥炲簱淇℃伅 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [WebMethod] |
| | | public string returnInventory(string data) |
| | | { |
| | | string funcName = "returnInventory"; |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "璇锋眰", $"{data}"); |
| | | string url = ConfigurationManager.AppSettings["WMS"]; |
| | | var response = HttpHelper.Post<ReturnInventoryResponse>(url + "api/InboundOrder/returnInventory", data, "浣欐枡鍥炲簱淇℃伅"); |
| | | string res = JsonConvert.SerializeObject(response); |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | return res; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 搴撳瓨淇℃伅 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [WebMethod] |
| | | public string InventoryQuery(string data) |
| | | { |
| | | string funcName = "InventoryQuery"; |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "璇锋眰", $"{data}"); |
| | | string url = ConfigurationManager.AppSettings["WMS"]; |
| | | var response = HttpHelper.Post<InventoryQueryResponse>(url + "api/StockInfo/inventoryQuery", data, "搴撳瓨淇℃伅"); |
| | | string res = JsonConvert.SerializeObject(response); |
| | | new LogFactory().GetLog("鎺ュ彛").InfoFormat(true, funcName, "鍝嶅簲", $"{res}"); |
| | | return res; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |