From 2c4da936387681e9bc99774776ce5f1c17507475 Mon Sep 17 00:00:00 2001 From: lxw Date: Mon, 1 Jul 2024 11:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E5=B9=B3=E5=8F=B0=E5=8D=95=E5=B8=A7?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebStarter/Controllers/Test/GenController.cs | 58 ++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) 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];