云平台单帧测试

master
lxw 5 months ago
parent 50768d2550
commit 2c4da93638

@ -2,6 +2,7 @@ using Entity.DbModel.Station;
using HybirdFrameworkCore.Entity; using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Repository.Station; using Repository.Station;
using Service.Cloud.Client;
using Service.Cloud.Msg.Cloud.Resp; using Service.Cloud.Msg.Cloud.Resp;
using Service.Execute.Api; using Service.Execute.Api;
using Service.Execute.Model; using Service.Execute.Model;
@ -42,7 +43,6 @@ public class GenController : ControllerBase
Console.WriteLine("生成完毕"); Console.WriteLine("生成完毕");
} }
/*
[HttpGet("CloudTestVelCheck")] [HttpGet("CloudTestVelCheck")]
public Result<VehicleCertificationResp> CloudTestVelCheck() public Result<VehicleCertificationResp> CloudTestVelCheck()
{ {
@ -50,13 +50,63 @@ public class GenController : ControllerBase
{ {
//VelMac = "111", //VelMac = "111",
VelNo = "晋C03733D", VelNo = "晋C03733D",
// VelVin = "LC1HMYBF6R0004575", VelVin = "LZ5NB6D38RB000421",
}, new SwapOrder() }, new SwapOrder()
{ {
VehicleEnterTime = DateTime.Now VehicleEnterTime = DateTime.Now
}); });
return Result<VehicleCertificationResp>.Success(vehicleCertificationResp); return Result<VehicleCertificationResp>.Success(vehicleCertificationResp);
}*/ }
[HttpGet("CloudTestUploadSwapOrder")]
public Result<VehicleCertificationResp> CloudTestUploadSwapOrder()
{
var uploadSwapOrder = CloudApi.UploadSwapOrder(new SwapOrder()
{
VehicleEnterTime = DateTime.Now,
CloudSn = "T20240701102224000002fc",
VehicleVin = "LZ5NB6D38RB000421",
SwapResult = 1,
SwapBeginTime = DateTime.Now,
SwapEndTime = DateTime.Now,
VehicleLeaveTime = DateTime.Now,
},
1,
new SwapOrderBattery()
{
DownBatteryNo = "123", DownBatterySoc = 30, DownBatteryBinNo = 2, UpBatteryNo = "456",
UpBatterySoc = 100, UpBatteryBinNo = 3
}, 1, new SwapOrderReportCloud()
{
});
return Result<VehicleCertificationResp>.Success();
}
[HttpGet("CloudTestUploadChargeOrder")]
public Result<VehicleCertificationResp> CloudTestUploadChargeOrder()
{
List<ChargeOrder> chargeOrders = new List<ChargeOrder>()
{
new()
{
BatteryNo = "123",
CloudChargeOrder = "HNGX0002C20012406210913551911",
StartTime = DateTime.Now,
StartSoc = 30,
},
new()
{
EndTime = DateTime.Now,
StopSoc = 100,
}
};
CloudClientMgr.CloudClient?.PublishChargeOrder(chargeOrders, 1);
return Result<VehicleCertificationResp>.Success();
}
[HttpGet("test115")] [HttpGet("test115")]
public void Test115() public void Test115()
@ -72,7 +122,7 @@ public class GenController : ControllerBase
Group = 2, Group = 2,
}; };
var groups = new List<BatteryGroup>() { group, batteryGroup }; var groups = new List<BatteryGroup>() { group, batteryGroup };
_batteryGroupRepository.Insert(groups ); _batteryGroupRepository.Insert(groups);
BatteryGroup batteryGroups = _batteryGroupRepository.QueryByClause(i => i.Group == 1); BatteryGroup batteryGroups = _batteryGroupRepository.QueryByClause(i => i.Group == 1);
/* /*
/*BatteryGroup batteryGroup = batteryGroups[0]; /*BatteryGroup batteryGroup = batteryGroups[0];

Loading…
Cancel
Save