From 89711eed42467874fed6a9a67d69d2afe7682457 Mon Sep 17 00:00:00 2001 From: CZ Date: Mon, 5 Aug 2024 09:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E5=A4=96=E5=85=85=E7=94=B5=E6=9C=BA?= =?UTF-8?q?=E5=85=85=E7=94=B5=E5=8A=9F=E7=8E=87=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Msg/Host/Req/OutCharger/Req/PileAdjustPower.cs | 2 +- WebStarter/Controllers/OutChargerController.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Service/Charger/Msg/Host/Req/OutCharger/Req/PileAdjustPower.cs b/Service/Charger/Msg/Host/Req/OutCharger/Req/PileAdjustPower.cs index eb31fc0..3e9c772 100644 --- a/Service/Charger/Msg/Host/Req/OutCharger/Req/PileAdjustPower.cs +++ b/Service/Charger/Msg/Host/Req/OutCharger/Req/PileAdjustPower.cs @@ -23,7 +23,7 @@ public class PileAdjustPower: ASDU /// ///期望运行 功率 /// - [Property(8, 16, PropertyReadConstant.Bit, 0.1, 1)] + [Property(16, 16, PropertyReadConstant.Bit, 0.1, 1)] public float ExpectPower { get; set; } diff --git a/WebStarter/Controllers/OutChargerController.cs b/WebStarter/Controllers/OutChargerController.cs index 5259d02..21e90b8 100644 --- a/WebStarter/Controllers/OutChargerController.cs +++ b/WebStarter/Controllers/OutChargerController.cs @@ -6,6 +6,7 @@ using Service.Charger.Client; using Service.Charger.Common; using Service.Charger.Msg.Http.Req; using Service.Init; +using Service.Station; namespace WebStarter.Controllers; @@ -18,10 +19,11 @@ namespace WebStarter.Controllers; public class OutChargerController { private ChargeOrderRepository _chargeOrderRepository; - - public OutChargerController(ChargeOrderRepository chargeOrderRepository) + private BinInfoService _binInfoService; + public OutChargerController(ChargeOrderRepository chargeOrderRepository,BinInfoService binInfoService) { _chargeOrderRepository = chargeOrderRepository; + _binInfoService = binInfoService; } /// @@ -114,7 +116,8 @@ public class OutChargerController return Result.Fail("请选择1枪或者2枪"); } - ChargerClient? chargerClient = ClientMgr.GetBySn(code); + string _code = _binInfoService.QueryByClause(i => i.Code == code).ChargerNo; + ChargerClient? chargerClient = ClientMgr.GetBySn(_code); if (chargerClient != null) {