From 53e43d4f6fbdfdf7d0a82d243416bf8ee6afac40 Mon Sep 17 00:00:00 2001 From: lxw Date: Wed, 29 May 2024 10:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E5=B9=B3=E5=8F=B0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Execute/Api/CloudApi.cs | 7 ++++--- Service/Execute/StationSoftMgr.cs | 1 - Service/Execute/Step/CarPrepareState.cs | 3 ++- WebStarter/Controllers/Test/GenController.cs | 21 +++++++++++++++++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Service/Execute/Api/CloudApi.cs b/Service/Execute/Api/CloudApi.cs index 8befcd1..e29c2e5 100644 --- a/Service/Execute/Api/CloudApi.cs +++ b/Service/Execute/Api/CloudApi.cs @@ -18,7 +18,7 @@ public abstract class CloudApi /// /// /// - public static int VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder) + public static VehicleCertificationResp VehicleCheck(RfidReadModel rfidReadModel, SwapOrder swapOrder) { VehicleCertification vehicleCertification = new() @@ -35,12 +35,13 @@ public abstract class CloudApi CloudClientMgr.CloudClient?.SendVehicleCertification(vehicleCertification, global::System.TimeSpan.FromSeconds(TimeSpan)); - if (sendVehicleCertification == null) + return sendVehicleCertification; + /*if (sendVehicleCertification == null) { return -1; } - return sendVehicleCertification.re; + return sendVehicleCertification.re;*/ } /// diff --git a/Service/Execute/StationSoftMgr.cs b/Service/Execute/StationSoftMgr.cs index 44f4d1a..ba5186d 100644 --- a/Service/Execute/StationSoftMgr.cs +++ b/Service/Execute/StationSoftMgr.cs @@ -42,7 +42,6 @@ namespace Service.Execute /// public static void SwappingStateMachineStart() { - SoundTool.PlayOneSound(2); SwappingStateMachine.Start(); } diff --git a/Service/Execute/Step/CarPrepareState.cs b/Service/Execute/Step/CarPrepareState.cs index 06fadd5..8abec6e 100644 --- a/Service/Execute/Step/CarPrepareState.cs +++ b/Service/Execute/Step/CarPrepareState.cs @@ -146,7 +146,8 @@ public class CarPrepareState : IState if (BaseEnumExtensions.GetEnumByCode( StaticStationInfo.StationModel) == StationConstant.StationModel.Remote) { - int vehicleCheck = CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder); + int vehicleCheck = -1; + //CloudApi.VehicleCheck(machine.RfidReadModel, machine.SwapOrder); if (vehicleCheck != 0) { diff --git a/WebStarter/Controllers/Test/GenController.cs b/WebStarter/Controllers/Test/GenController.cs index 628777a..b0d5c10 100644 --- a/WebStarter/Controllers/Test/GenController.cs +++ b/WebStarter/Controllers/Test/GenController.cs @@ -1,6 +1,10 @@ using Entity.DbModel.Station; +using HybirdFrameworkCore.Entity; using Microsoft.AspNetCore.Mvc; using Repository.Station; +using Service.Cloud.Msg.Cloud.Resp; +using Service.Execute.Api; +using Service.Execute.Model; using SqlSugar; namespace WebStarter.Controllers.Test; @@ -37,7 +41,22 @@ public class GenController : ControllerBase Console.WriteLine("生成完毕"); } - + + [HttpGet("CloudTestVelCheck")] + public Result CloudTestVelCheck() + { + VehicleCertificationResp vehicleCertificationResp = CloudApi.VehicleCheck(new RfidReadModel() + { + VelMac = "111", + VelNo = "LC1HMYBF6R0004575", + VelVin = "LC1HMYBF6R0004575", + }, new SwapOrder() + { + VehicleEnterTime = DateTime.Now + }); + return Result.Success(vehicleCertificationResp); + } + [HttpGet("test115")] public void Test115() {