From 604d12c236459345406453bd54783ce6f7f269fb Mon Sep 17 00:00:00 2001 From: rszn <645583145@qq.com> Date: Mon, 1 Jul 2024 20:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E8=AE=A2=E5=8D=95cmd?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Charger/Handler/FinishStartChargingHandler.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Service/Charger/Handler/FinishStartChargingHandler.cs b/Service/Charger/Handler/FinishStartChargingHandler.cs index fcbe2b6..9b149fa 100644 --- a/Service/Charger/Handler/FinishStartChargingHandler.cs +++ b/Service/Charger/Handler/FinishStartChargingHandler.cs @@ -2,6 +2,7 @@ using DotNetty.Transport.Channels; using Entity.DbModel.Station; using HybirdFrameworkCore.Autofac.Attribute; +using HybirdFrameworkCore.Utils; using log4net; using Repository.Station; using Service.Charger.Client; @@ -85,6 +86,13 @@ namespace HybirdFrameworkServices.Charger.Handler client.IsCharged = false; } + if (ObjUtils.IsNotNullOrWhiteSpace( client.ChargeOrderNo)) + { + ChargeOrderRepository.Update(it => it.CmdStatus == (msg.Result == 0 ? 1 : 2), + it => it.Sn == client.ChargeOrderNo); + } + + int update = BinInfoRepository.Update(t => t.ChargeStatus == chargeStatus, t => t.No == client.BinNo); Log.Info($"update {update} start charge finish status {chargeStatus} for {client.BinNo}");