新增换电成功上报云平台数据

master
lxw 7 months ago
parent 4f3877e683
commit ef0e003a81

@ -22,6 +22,8 @@ public class CommonMgr
public SwapAmtOrderRepository _amtOrderRepository { get; set; } public SwapAmtOrderRepository _amtOrderRepository { get; set; }
public SwapOrderBatteryRepository _swapOrderBatteryRepository { get; set; } public SwapOrderBatteryRepository _swapOrderBatteryRepository { get; set; }
public SwapOrderReportCloudRepository _swapOrderReportCloudRepository { get; set; }
/// <summary> /// <summary>
/// 新增小步状态 /// 新增小步状态
/// </summary> /// </summary>
@ -234,4 +236,20 @@ public class CommonMgr
} }
/// <summary>
/// 换电完成新增上报云平台记录
/// </summary>
/// <param name="machine"></param>
public void InsertCloudReportForSwapSuccess(SwappingStateMachine machine)
{
SwapOrder? machineSwapOrder = machine.SwapOrder;
_swapOrderReportCloudRepository.Insert(new SwapOrderReportCloud()
{
SwapOrderSn = machineSwapOrder.Sn,
SwapOrderId = machineSwapOrder.Id,
CloudReportStatus = 0,
Vin = machineSwapOrder.VehicleVin
});
}
} }

@ -56,6 +56,8 @@ public class SwapDoneState : IState
return SwappingStateMachine.ReturnWithInvokeErr(existRadar, ExceptionReason.None); return SwappingStateMachine.ReturnWithInvokeErr(existRadar, ExceptionReason.None);
} }
//新增换电成功上报云平台数据
_CommonMgr.InsertCloudReportForSwapSuccess(machine);
//换电成功关于bininfo表的更新 //换电成功关于bininfo表的更新
_CommonMgr.UpdateBinInfoForSwapSuccess(machine); _CommonMgr.UpdateBinInfoForSwapSuccess(machine);

Loading…
Cancel
Save