计费优化

master
tq 1 month ago
parent ba42ca9786
commit 500d246e91

@ -38,7 +38,7 @@ public class SwapOrderSettleAnAccountTask : ITask
public int Interval()
{
return 1000 * 60;
return 1000 * 2;
}
public void Handle()
@ -73,6 +73,9 @@ public class SwapOrderSettleAnAccountTask : ITask
decimal serviceTotalFee = StaticStationInfo.ServiceTotalFee;
// 附加费用
decimal appendTotalFee = StaticStationInfo.AppendTotalFee;
List<SwapOrderBattery> updateSwapOrderBatteryList = new List<SwapOrderBattery>();
List<SwapOrder> updateSwapOrderList = new List<SwapOrder>();
foreach (var swapOrderBattery in listSwapOrderBattery)
{
// 换上的满电包soc*满电包的电池标量
@ -95,12 +98,23 @@ public class SwapOrderSettleAnAccountTask : ITask
matchingOrder.AppendTotalFee;
// 标记换电订单已经算了订单价钱
swapOrderBattery.SettleAnAccountFlag = 1;
updateSwapOrderBatteryList.Add(swapOrderBattery);
updateSwapOrderList.Add(matchingOrder);
}
}
}
SwapOrderRepository.Update(swapOrderList);
SwapOrderBatteryRepository.Update(listSwapOrderBattery);
if (updateSwapOrderBatteryList.Count>0)
{
SwapOrderBatteryRepository.Update(updateSwapOrderBatteryList);
}
if (updateSwapOrderList.Count>0)
{
SwapOrderRepository.Update(updateSwapOrderList);
}
}
}

Loading…
Cancel
Save