| | |
| | | { |
| | | x.AGVArea = agvDescription; |
| | | }); |
| | | string address = AppSettings.Get("WCSApiAddress"); |
| | | if (string.IsNullOrEmpty(address)) |
| | | string url = AppSettings.Get("WCS"); |
| | | if(string.IsNullOrEmpty(url)) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WCSApiå°å"); |
| | | throw new Exception($"æªæ¾å°WCSAApiå°å,è¯·æ£æ¥é
ç½®æä»¶"); |
| | | } |
| | | string response = HttpHelper.Post($"{address}/api/Task/ReceiveTask", taskDTOs.Serialize()); |
| | | string response = HttpHelper.Post($"{url}/api/Task/ReceiveTask", taskDTOs.Serialize()); |
| | | |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("è¿åé误"); |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | string address = AppSettings.Get("WCSApiAddress"); |
| | | if (string.IsNullOrEmpty(address)) |
| | | string url = AppSettings.Get("WCS"); |
| | | if (string.IsNullOrEmpty(url)) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WCSApiå°å"); |
| | | throw new Exception($"æªæ¾å°WCSAApiå°å,è¯·æ£æ¥é
ç½®æä»¶"); |
| | | } |
| | | string response = HttpHelper.Post($"{address}/api/CTU_AGV/PutFinish?code=" + code); |
| | | string response = HttpHelper.Post($"{url}/api/CTU_AGV/PutFinish", code); |
| | | |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("è¿åé误"); |
| | | } |