12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- 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<TaskAndFloor> 帘线扫码(string dev, string barcode)
- {
- var res = APICaller.CallApi2<Response<TaskAndFloor>>(Url + "api/Sx/ApplyFloor", new { EquNo = dev, Code = barcode });
- if (!res.Success)
- {
- //throw new Exception(res.ResMsg);
- }
- return res;
- }
- public static Response<string> 分配巷道(string floor, string barcode)
- {
- var res = APICaller.CallApi2<Response<string>>(Url + "api/Sx/GetTunnelPriorityList", new { Floor = floor, Code = barcode });
- if (!res.Success)
- {
- throw new Exception(res.ResMsg);
- }
- return res;
- }
- public static Response<List<LocationInfo>> 入库分配(int[] tasks,int tunnel,int floor)
- {
- var res = APICaller.CallApi2<Response<List<LocationInfo>>>(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<Response>(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<Response>(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<Response>(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<Response>(Url + "api/Sx/CompletePalletizingTask", new { Equip = devCode });
- if (!res.Success)
- {
- //throw new Exception(res.ResMsg);
- }
- return res;
- }
- public static Response<int> 检测回库分配楼层(int qty)
- {
- var res = APICaller.CallApi2<Response<int>>(Url + "api/Sx/TorsChkFloor", new { Count = qty });
- if (!res.Success)
- {
- throw new Exception(res.ResMsg);
- }
- return res;
- }
- }
- }
|