diff --git a/WebStarter/Controllers/Test/GenController.cs b/WebStarter/Controllers/Test/GenController.cs index 3341f87..db3c8ab 100644 --- a/WebStarter/Controllers/Test/GenController.cs +++ b/WebStarter/Controllers/Test/GenController.cs @@ -2,6 +2,7 @@ using Entity.DbModel.Station; using HybirdFrameworkCore.Entity; using Microsoft.AspNetCore.Mvc; using Repository.Station; +using Service.Cloud.Client; using Service.Cloud.Msg.Cloud.Resp; using Service.Execute.Api; using Service.Execute.Model; @@ -42,7 +43,6 @@ public class GenController : ControllerBase Console.WriteLine("生成完毕"); } - /* [HttpGet("CloudTestVelCheck")] public Result CloudTestVelCheck() { @@ -50,13 +50,63 @@ public class GenController : ControllerBase { //VelMac = "111", VelNo = "晋C03733D", - // VelVin = "LC1HMYBF6R0004575", + VelVin = "LZ5NB6D38RB000421", }, new SwapOrder() { VehicleEnterTime = DateTime.Now }); return Result.Success(vehicleCertificationResp); - }*/ + } + + [HttpGet("CloudTestUploadSwapOrder")] + public Result 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.Success(); + } + + + [HttpGet("CloudTestUploadChargeOrder")] + public Result CloudTestUploadChargeOrder() + { + List chargeOrders = new List() + { + new() + { + BatteryNo = "123", + CloudChargeOrder = "HNGX0002C20012406210913551911", + StartTime = DateTime.Now, + StartSoc = 30, + }, + new() + { + EndTime = DateTime.Now, + StopSoc = 100, + } + }; + CloudClientMgr.CloudClient?.PublishChargeOrder(chargeOrders, 1); + + return Result.Success(); + } + [HttpGet("test115")] public void Test115() @@ -72,7 +122,7 @@ public class GenController : ControllerBase Group = 2, }; var groups = new List() { group, batteryGroup }; - _batteryGroupRepository.Insert(groups ); + _batteryGroupRepository.Insert(groups); BatteryGroup batteryGroups = _batteryGroupRepository.QueryByClause(i => i.Group == 1); /* /*BatteryGroup batteryGroup = batteryGroups[0];