This commit is contained in:
qianhao.xu
2024-04-23 11:04:23 +08:00
parent dfe7c63307
commit e7c9496676

View File

@@ -131,7 +131,17 @@ namespace ZR.Service.Business
public string GenerateAgvTask(string taskid,int flag)
{
AgvTask agvTask= Context.Queryable<AgvTask>().Where(it => it.Id == taskid).First();
// 保存当前控制台文本颜色
ConsoleColor originalColor = Console.ForegroundColor;
// 设置文本颜色为红色
Console.ForegroundColor = ConsoleColor.Red;
string url = "http://192.168.60.1:443/rcms/services/rest/hikRpcService/genAgvSchedulingTask";
Console.WriteLine("=======》打印请求URL" + url);
string start_point = "";
string end_point = "";
@@ -165,10 +175,9 @@ namespace ZR.Service.Business
string postData = JsonSerializer.Serialize(task);
Console.WriteLine("=======》打印请求数据:" + postData);
string response= HttpHelper.HttpPost(url, postData);
// 保存当前控制台文本颜色
ConsoleColor originalColor = Console.ForegroundColor;
// 设置文本颜色为红色
Console.ForegroundColor = ConsoleColor.Red;
@@ -177,8 +186,8 @@ namespace ZR.Service.Business
AGV_task_third res_data= JsonSerializer.Deserialize<AGV_task_third>(response);
if(res_data!=null &&res_data.code=="0") {
Console.WriteLine("=======》打印请求数据返回2" + res_data.ToString());
if (res_data!=null &&res_data.code=="0") {
if (flag == 1)
{