This commit is contained in:
dev02 2023-10-02 09:25:57 +08:00
commit 6bcaaef80f

View File

@ -97,7 +97,7 @@ namespace BackendWorkerService.Quartz.Jobs
{ {
var tagName = selectedMapping.system_value; var tagName = selectedMapping.system_value;
var apiFormat = @"{0}obix/config/Arena/{1}/{2}/{3}/{4}/{5}/CV/set"; var apiFormat = @"{0}obix/config/Arena/{1}/{2}/{3}/{4}/{5}/CV/set";
var tagNameSplit = tagName.Split("_"); var tagNameSplit = tagName.Split("_");
var parames = new List<object>(); var parames = new List<object>();
@ -106,14 +106,14 @@ namespace BackendWorkerService.Quartz.Jobs
{ {
if (i != tagNameSplit.Length - 1) if (i != tagNameSplit.Length - 1)
{ {
parames.Add(tagNameSplit[i]); parames.Add(tagNameSplit[i]); // tag 前 4段
} }
else else
{ {
parames.Add(tagName); parames.Add(tagName); // 第五段 完整 tag
} }
} }
logger.LogError(@$"【ParkingJob】【停車場剩餘車位】{apiFormat}");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format(apiFormat, parames.ToArray())); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format(apiFormat, parames.ToArray()));
request.Method = "POST"; request.Method = "POST";
request.Headers.Add("Authorization", "Basic " + encoded); request.Headers.Add("Authorization", "Basic " + encoded);