From 09880cbc5f587010e94666aa9051bb87d512547c Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Tue, 30 Apr 2024 15:10:44 +0800 Subject: [PATCH] 123 --- Infrastructure/Helper/HttpHelper.cs | 7 ++++++- .../Controllers/mes/mm/MaterialInputController.cs | 2 +- ZR.Service/mes/mm/MaterialInputService.cs | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Infrastructure/Helper/HttpHelper.cs b/Infrastructure/Helper/HttpHelper.cs index 75ac10d5..c01003b1 100644 --- a/Infrastructure/Helper/HttpHelper.cs +++ b/Infrastructure/Helper/HttpHelper.cs @@ -19,7 +19,12 @@ namespace Infrastructure public static string HttpPost(string url, string postData = null, string contentType = null, int timeOut = 30, Dictionary headers = null) { postData ??= ""; - using HttpClient client = new HttpClient(); + var httpClientHandler = new HttpClientHandler + { + ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true //忽略掉证书异常 + }; + + using HttpClient client = new HttpClient(httpClientHandler); client.Timeout = new TimeSpan(0, 0, timeOut); if (headers != null) { diff --git a/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs b/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs index 1d3e6c66..dfcaf204 100644 --- a/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs @@ -152,7 +152,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm { if (string.IsNullOrEmpty(reqCode)) { - SUCCESS(null); + return SUCCESS(null); } var response = materialInputService.EmergencyStopAgv(reqCode); diff --git a/ZR.Service/mes/mm/MaterialInputService.cs b/ZR.Service/mes/mm/MaterialInputService.cs index 1783a41d..ad95ef67 100644 --- a/ZR.Service/mes/mm/MaterialInputService.cs +++ b/ZR.Service/mes/mm/MaterialInputService.cs @@ -226,7 +226,7 @@ namespace ZR.Service.mes.mm /// public string[] Getfabgopoints() { - return Context.Queryable().Where(it => it.AreaCode == 3).Where(it => it.Status == 0) + return Context.Queryable().Where(it => it.AreaCode == 3) .Select(it => it.Coordinate).ToArray(); } @@ -284,6 +284,7 @@ namespace ZR.Service.mes.mm /// public string EmergencyStopAgv(string reqCode) { + logger.Info("\n 0.取消任务taskcode= "+ reqCode); string url = "https://192.168.60.1:443/rcms/services/rest/hikRpcService/cancelTask"; logger.Info(" 1.紧急终止AGV请求url " + url);