现场测试提交

master
lxw 6 months ago
parent 8e0a780252
commit 7f7a9ad088

@ -236,6 +236,8 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
} }
public void Publish<T>(T data) where T : ICmd public void Publish<T>(T data) where T : ICmd
{
if (MqttClient.IsConnected)
{ {
Model<T> model = new Model<T> Model<T> model = new Model<T>
{ {
@ -271,6 +273,8 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
MqttClient.PublishAsync(appMsg); MqttClient.PublishAsync(appMsg);
} }
}
private string SignData<T>(Model<T> model) where T : ICmd private string SignData<T>(Model<T> model) where T : ICmd
{ {
var settings = new JsonSerializerSettings() var settings = new JsonSerializerSettings()

@ -57,7 +57,7 @@ public abstract class CloudApi
UploadSwapOrder uploadSwapOrder = new() UploadSwapOrder uploadSwapOrder = new()
{ {
sn=StaticStationInfo.StationNo, sn=StaticStationInfo.StationNo,
son = swapOrder.CloudSn, son = swapOrder.Sn,
cn = swapOrder.VehicleNo, cn = swapOrder.VehicleNo,
so = seq, so = seq,
ct = swapOrder.VehicleEnterTime, ct = swapOrder.VehicleEnterTime,

@ -91,9 +91,14 @@ public class TBoxApi
{ {
Thread.Sleep(100); Thread.Sleep(100);
var unLockCar = await UnLockCar(carNo); var unLockCar = await UnLockCar(carNo);
if (unLockCar)
{
bools.Add(unLockCar); bools.Add(unLockCar);
} }
}
return bools.Select(i => i).Count() > _successTimes; return bools.Select(i => i).Count() > _successTimes;
} }
@ -105,8 +110,12 @@ public class TBoxApi
{ {
Thread.Sleep(100); Thread.Sleep(100);
var unLockCar = await LockCar(carNo); var unLockCar = await LockCar(carNo);
if (unLockCar)
{
bools.Add(unLockCar); bools.Add(unLockCar);
} }
}
return bools.Select(i => i).Count() > _successTimes; return bools.Select(i => i).Count() > _successTimes;

Loading…
Cancel
Save