| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Agv; |
| | | using WIDESEAWCS_Common.APIEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | string apiAddress = AppSettings.Get(APIEnum.AgvSendTask.ToString()); |
| | | string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSendTask.ToString())?.ApiAddress; |
| | | if (string.IsNullOrEmpty(apiAddress)) |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); // AppSettings.Get(APIEnum.AgvSendTask.ToString()); |
| | | string response = HttpHelper.Post(apiAddress, taskModel.Serialize()); |
| | | AgvResponseContent agvContent= response.DeserializeObject<AgvResponseContent>(); |
| | | if (agvContent.Code=="200") |
| | | AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); |
| | | if (agvContent.Code == "0") |
| | | { |
| | | content.OK(agvContent.Message); |
| | | content.OK(data: agvContent.Data); |
| | | } |
| | | else |
| | | { |
| | |
| | | /// </summary> |
| | | public AgvResponseContent AgvSecureApply(AgvSecureApplyDTO secureApplyModel) |
| | | { |
| | | |
| | | return new AgvResponseContent(); |
| | | } |
| | | /// <summary> |
| | | /// å®å
¨ä¿¡å·åå¤ WCS-AGV |
| | | /// å®å
¨ä¿¡å·åå¤ WCS-AGV //AGVä»»å¡ç»§ç»æ§è¡ |
| | | /// </summary> |
| | | /// <param name="secureModel"></param> |
| | | /// <returns></returns> |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | string apiAddress = AppSettings.Get(APIEnum.AgvSecureReply.ToString()); |
| | | string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSecureReply.ToString())?.ApiAddress; |
| | | if (string.IsNullOrEmpty(apiAddress)) |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); // AppSettings.Get(APIEnum.AgvSendTask.ToString());// AppSettings.Get(APIEnum.AgvSecureReply.ToString()); |
| | | string response = HttpHelper.Post(apiAddress, secureReplyModel.Serialize()); |
| | | AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); |
| | | if (agvContent.Code == "200") |
| | | if (agvContent.Code == "0") |
| | | { |
| | | content.OK(agvContent.Message); |
| | | } |
| | |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// AGVä»»å¡ç¶æå·æ° |
| | | /// AGVä»»å¡ç¶æå·æ°/AGVä»»å¡å®æ |
| | | /// </summary> |
| | | /// <param name="agvUpdateModel"></param> |
| | | /// <returns></returns> |
| | | public AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel) |
| | | { |
| | | |
| | | return new AgvResponseContent(); |
| | | } |
| | | } |