master
tq 1 month ago
parent 500d246e91
commit c8acd882f1

@ -38,7 +38,7 @@ public class SwapOrderSettleAnAccountTask : ITask
public int Interval()
{
return 1000 * 2;
return 1000 * 10;
}
public void Handle()
@ -63,10 +63,11 @@ public class SwapOrderSettleAnAccountTask : ITask
.QueryListByClause(swapOrder => list.Contains(swapOrder.Sn));
if (swapOrderList.Count<=0)
if (swapOrderList.Count <= 0)
{
return;
}
// 电费单价
decimal electricityTotalFee = StaticStationInfo.ElectricityTotalFee;
// 换电服务费用
@ -105,14 +106,10 @@ public class SwapOrderSettleAnAccountTask : ITask
}
}
if (updateSwapOrderBatteryList.Count>0)
{
SwapOrderBatteryRepository.Update(updateSwapOrderBatteryList);
}
if (updateSwapOrderList.Count>0)
if (updateSwapOrderList.Count > 0 && updateSwapOrderBatteryList.Count>0)
{
SwapOrderRepository.Update(updateSwapOrderList);
SwapOrderBatteryRepository.Update(updateSwapOrderBatteryList);
}
}

Loading…
Cancel
Save