修改上报集团问题

This commit is contained in:
2023-07-10 15:00:56 +08:00
parent 479f1d9d44
commit 0e6ee80134
4 changed files with 173 additions and 163 deletions
+3
View File
@@ -4,6 +4,7 @@ using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
@@ -20,6 +21,7 @@ namespace BLL
var client = new RestClient(baseurl);
client.Timeout = -1;
var request = new RestRequest(Method.POST);
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var thisUnit = UnitService.GetUnitByUnitId(Const.UnitId_CWCEC);
request.AddParameter("UnitName", thisUnit.UnitName);
request.AddParameter("CollCropCode", thisUnit.CollCropCode);
@@ -54,6 +56,7 @@ namespace BLL
var client = new RestClient(baseurl);
client.Timeout = -1;
var request = new RestRequest(Method.POST);
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var tokenItem = GetToken();
request.AddHeader("token", tokenItem.Token);
request.AddJsonBody(JsonBody);