using NPOI.SS.Formula.Functions; using ServiceCenter.WebApi; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WCS.WorkEngineering { public class WMS { static string Url = "http://10.30.44.3:8011/"; public static Response 帘线扫码(string dev, string barcode) { var res = APICaller.CallApi2>(Url + "api/Sx/ApplyFloor", new { EquNo = dev, Code = barcode }); if (!res.Success) { //throw new Exception(res.ResMsg); } return res; } public static Response 分配巷道(string floor, string barcode) { var res = APICaller.CallApi2>(Url + "api/Sx/GetTunnelPriorityList", new { Floor = floor, Code = barcode }); if (!res.Success) { throw new Exception(res.ResMsg); } return res; } public static Response> 入库分配(int[] tasks,int tunnel,int floor) { var res = APICaller.CallApi2>>(Url + "api/Sx/ApplyStockInLoc", new { TaskNum = tasks, TunnelNum = tunnel,Floor=floor }); if (!res.Success) { throw new Exception(res.ResMsg); } return res; } public static Response 堆垛机完成(int task) { var res = APICaller.CallApi2(Url + "api/Sx/SrmCompleted", new { TaskNum = task, OperationType = 1, WCSUpdateName = "WCS" }); if (!res.Success) { throw new Exception(res.ResMsg); } return res; } public static Response 补料(int task,string devCode) { var res = APICaller.CallApi2(Url + "api/Sx/PalletizingPatchWheel", new { TaskNum = task, Equip=devCode }); if (!res.Success) { throw new Exception(res.ResMsg); } return res; } public static Response 抓取完成(int[] tasks, string devCode) { var res = APICaller.CallApi2(Url + "api/Sx/Palletizinginfobinde", new { TaskNum = tasks, Equip = devCode }); if (!res.Success) { throw new Exception(res.ResMsg); } return res; } public static Response 码垛完成(string devCode) { var res = APICaller.CallApi2(Url + "api/Sx/CompletePalletizingTask", new { Equip = devCode }); if (!res.Success) { //throw new Exception(res.ResMsg); } return res; } public static Response 检测回库分配楼层(int qty) { var res = APICaller.CallApi2>(Url + "api/Sx/TorsChkFloor", new { Count = qty }); if (!res.Success) { throw new Exception(res.ResMsg); } return res; } } }