diff --git a/BPASmartClient.AgvApi/Controllers/robotjobController.cs b/BPASmartClient.AgvApi/Controllers/robotjobController.cs
index eb93958d..686278d0 100644
--- a/BPASmartClient.AgvApi/Controllers/robotjobController.cs
+++ b/BPASmartClient.AgvApi/Controllers/robotjobController.cs
@@ -15,13 +15,26 @@ namespace BPASmartClient.AgvApi.Controllers
///
///
[HttpPost("report")]
- public string report(AGVToUpSystem ent)
+ public string report(string ent)
{
if (ent != null)
{
- Factory.GetInstance.SendReport(ent);
+ try
+ {
+ var res = JsonConvert.DeserializeObject(ent);
+ if (res != null)
+ {
+ Factory.GetInstance.SendReport(res);
+ return "SUCCESS";
+ }
+ }
+ catch (Exception ex)
+ {
+ return ex.ToString();
+ }
+
}
- return "SUCCESS";
+ return "Error";
}
///
@@ -30,13 +43,27 @@ namespace BPASmartClient.AgvApi.Controllers
///
///
[HttpPost("upstreamrequest")]
- public string upstreamrequest(Upstreamrequest upstreamrequest)
+ public string upstreamrequest(string upstreamrequest)
{
if (upstreamrequest != null)
{
- Factory.GetInstance.SendUpstreamrequest(upstreamrequest);
+ try
+ {
+ var res = JsonConvert.DeserializeObject(upstreamrequest);
+ if (res != null)
+ {
+ Factory.GetInstance.SendUpstreamrequest(upstreamrequest);
+ return "SUCCESS";
+ }
+ }
+ catch (Exception ex)
+ {
+ return ex.ToString();
+ }
+
}
- return "SUCCESS";
+ return "Error";
}
+
}
}
diff --git a/BPASmartClient.AgvApi/Program.cs b/BPASmartClient.AgvApi/Program.cs
index 14bbd05e..353c3635 100644
--- a/BPASmartClient.AgvApi/Program.cs
+++ b/BPASmartClient.AgvApi/Program.cs
@@ -1,6 +1,8 @@
using BPASmartClient.AgvApi;
using Microsoft.AspNetCore.Cors.Infrastructure;
+
+
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
diff --git a/BPASmartClient.HubHelper/HubHelper.cs b/BPASmartClient.HubHelper/HubHelper.cs
index 4ac3c138..eac1b90b 100644
--- a/BPASmartClient.HubHelper/HubHelper.cs
+++ b/BPASmartClient.HubHelper/HubHelper.cs
@@ -15,9 +15,7 @@ namespace BPASmartClient.HubHelper
public void Connect()
{
- hubConnection = new HubConnectionBuilder().WithAutomaticReconnect().WithUrl("http://localhost:5175/personhub").Build();//连接
-
-
+ hubConnection = new HubConnectionBuilder().WithAutomaticReconnect().WithUrl("http://localhost:8089/personhub").Build();//连接
hubConnection.On