This commit is contained in:
qianhao.xu 2024-04-30 15:10:44 +08:00
parent 3852de24f9
commit 09880cbc5f
3 changed files with 9 additions and 3 deletions

View File

@ -19,7 +19,12 @@ namespace Infrastructure
public static string HttpPost(string url, string postData = null, string contentType = null, int timeOut = 30, Dictionary<string, string> headers = null) public static string HttpPost(string url, string postData = null, string contentType = null, int timeOut = 30, Dictionary<string, string> headers = null)
{ {
postData ??= ""; 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); client.Timeout = new TimeSpan(0, 0, timeOut);
if (headers != null) if (headers != null)
{ {

View File

@ -152,7 +152,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm
{ {
if (string.IsNullOrEmpty(reqCode)) if (string.IsNullOrEmpty(reqCode))
{ {
SUCCESS(null); return SUCCESS(null);
} }
var response = materialInputService.EmergencyStopAgv(reqCode); var response = materialInputService.EmergencyStopAgv(reqCode);

View File

@ -226,7 +226,7 @@ namespace ZR.Service.mes.mm
/// <returns></returns> /// <returns></returns>
public string[] Getfabgopoints() public string[] Getfabgopoints()
{ {
return Context.Queryable<MmAgvLocation>().Where(it => it.AreaCode == 3).Where(it => it.Status == 0) return Context.Queryable<MmAgvLocation>().Where(it => it.AreaCode == 3)
.Select(it => it.Coordinate).ToArray(); .Select(it => it.Coordinate).ToArray();
} }
@ -284,6 +284,7 @@ namespace ZR.Service.mes.mm
/// <param name="reqCode"></param> /// <param name="reqCode"></param>
public string EmergencyStopAgv(string reqCode) public string EmergencyStopAgv(string reqCode)
{ {
logger.Info("\n 0.取消任务taskcode= "+ reqCode);
string url = "https://192.168.60.1:443/rcms/services/rest/hikRpcService/cancelTask"; string url = "https://192.168.60.1:443/rcms/services/rest/hikRpcService/cancelTask";
logger.Info(" 1.紧急终止AGV请求url " + url); logger.Info(" 1.紧急终止AGV请求url " + url);