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