1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using ServiceCenter.WebApi;
- using WCS.WorkEngineering.WebApi.Models.WMS.Request;
- using WCS.WorkEngineering.WebApi.Models.WMS.Response;
- using WCS.WorkEngineering.Worlds.Logs;
- namespace WCS.WorkEngineering.WebApi.Controllers
- {
- /// <summary>
- /// AGV相关接口控制器
- /// </summary>
- public static class WmsApi
- {
- private static string Url = "http://192.168.249.150:8026";
- private static string wareHouseId = "opphouse";
- /// <summary>
- /// 分配货位
- /// </summary>
- /// <param name="wcsTaskNum">WMS任务ID</param>
- /// <param name="tunnel">巷道</param>
- /// <param name="device">设备号</param>
- /// <returns></returns>
- /// <exception cref="Exception"></exception>
- public static I_WCS_GetWareCellResponse GetLocalIn(int wcsTaskNum, string tunnel, string device)
- {
- var res = APICaller.CallApi2<I_WCS_GetWareCellResponse>(Url + "/api/Task/I_WCS_GetWareCell", new I_WCS_GetWareCellRequest
- {
- PickUpEquipmentNo = device,
- TunnelNum = tunnel.Last().ToString(),
- WCSTaskNum = wcsTaskNum.ToString(),
- });
- if (!res.ResType)
- {
- throw new KnownException(res.ResMessage, LogLevelEnum.High);
- }
- return res;
- }
- }
- }
|