From ddffedd80508b813414b726c36ffa4a1ff624e86 Mon Sep 17 00:00:00 2001 From: tq <1916474859@qq,com> Date: Mon, 14 Oct 2024 09:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E8=B4=B9=E6=9F=A5=E8=AF=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/MyTask/SwapOrderSettleAnAccountTask.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Service/MyTask/SwapOrderSettleAnAccountTask.cs b/Service/MyTask/SwapOrderSettleAnAccountTask.cs index 3c45470..9fe9501 100644 --- a/Service/MyTask/SwapOrderSettleAnAccountTask.cs +++ b/Service/MyTask/SwapOrderSettleAnAccountTask.cs @@ -38,7 +38,7 @@ public class SwapOrderSettleAnAccountTask : ITask public int Interval() { - return 1000 * 2; + return 1000 * 60; } public void Handle() @@ -46,7 +46,11 @@ public class SwapOrderSettleAnAccountTask : ITask Log.Info("Begin SwapOrderSettleAnAccountTask"); List listSwapOrderBattery = SwapOrderBatteryRepository.QueryListByClause(i => - i.DownNominalEnergy >0 && i.UpNominalEnergy >0 && i.SettleAnAccountFlag == null); + i.DownNominalEnergy >0 && + i.UpNominalEnergy >0 && + i.UpBatterySoc >0 && + i.DownBatterySoc >0 && + i.SettleAnAccountFlag == null); if (listSwapOrderBattery.Count > 0) { @@ -56,6 +60,11 @@ public class SwapOrderSettleAnAccountTask : ITask .Queryable() .In(swapOrder => swapOrder.Sn, list) .ToList(); + + if (swapOrderList.Count<=0) + { + return; + } // 电费单价 decimal electricityTotalFee = StaticStationInfo.ElectricityTotalFee; // 换电服务费用