diff --git a/Service/Execute/Mgr/CommonMgr.cs b/Service/Execute/Mgr/CommonMgr.cs
index 3528001..5c1e9b7 100644
--- a/Service/Execute/Mgr/CommonMgr.cs
+++ b/Service/Execute/Mgr/CommonMgr.cs
@@ -203,6 +203,8 @@ public class CommonMgr
///
public void UpdateSwapOrder(SwappingStateMachine machine)
{
+ SwapOrder swapOrder = _swapOrderRepository.QueryById(machine.SwapOrder.Id);
+ machine.SwapOrder.CloudReportStatus = swapOrder.CloudReportStatus;
_swapOrderRepository.Update(machine.SwapOrder);
}
diff --git a/Service/Execute/Step/CancelState.cs b/Service/Execute/Step/CancelState.cs
index a36ce40..bfa31d7 100644
--- a/Service/Execute/Step/CancelState.cs
+++ b/Service/Execute/Step/CancelState.cs
@@ -4,13 +4,14 @@ using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac;
using log4net;
using Repository.Station;
+using Service.Execute.Utils;
using Service.Mgr;
namespace Service.Execute.Step;
public class CancelState : IState
{
- private readonly SwapOrderRepository _swapOrderRepository = AppInfo.Container.Resolve();
+ private readonly CommonMgr _CommonMgr = AppInfo.Container.Resolve();
private readonly SwapAmtOrderRepository _swapAmtOrderRepository =
AppInfo.Container.Resolve();
@@ -37,7 +38,7 @@ public class CancelState : IState
if (machine.SwapOrder != null)
{
machine.SwapOrder.SwapResult = (byte)InfoEnum.SwapOrderResult.Fail;
- _swapOrderRepository.Update(machine.SwapOrder);
+ _CommonMgr.UpdateSwapOrder(machine);
}
_manualOperationRecordRepository.Insert(new ManualOperationRecord()
diff --git a/Service/Execute/Step/ManualSuccState.cs b/Service/Execute/Step/ManualSuccState.cs
index 91ad0e6..be10007 100644
--- a/Service/Execute/Step/ManualSuccState.cs
+++ b/Service/Execute/Step/ManualSuccState.cs
@@ -4,6 +4,7 @@ using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac;
using log4net;
using Repository.Station;
+using Service.Execute.Utils;
using Service.Mgr;
namespace Service.Execute.Step;
@@ -13,11 +14,11 @@ namespace Service.Execute.Step;
///
public class ManualSuccState : IState
{
- private readonly SwapOrderRepository _swapOrderRepository = AppInfo.Container.Resolve();
private readonly SwapAmtOrderRepository _swapAmtOrderRepository =
AppInfo.Container.Resolve();
+ private readonly CommonMgr _CommonMgr = AppInfo.Container.Resolve();
private static readonly ILog _log = LogManager.GetLogger(typeof(CancelState));
private static readonly ManualOperationRecordRepository _manualOperationRecordRepository =
AppInfo.Container.Resolve();
@@ -37,7 +38,7 @@ public class ManualSuccState : IState
{
machine.SwapOrder.SwapResult = (byte)InfoEnum.SwapOrderResult.Success;
machine.SwapOrder.VehicleLeaveTime = DateTime.Now;
- _swapOrderRepository.Update(machine.SwapOrder);
+ _CommonMgr.UpdateSwapOrder(machine);
}
_manualOperationRecordRepository.Insert(new ManualOperationRecord()
diff --git a/Service/Mgr/SwapOrderMgr.cs b/Service/Mgr/SwapOrderMgr.cs
index 967544a..7c24e6a 100644
--- a/Service/Mgr/SwapOrderMgr.cs
+++ b/Service/Mgr/SwapOrderMgr.cs
@@ -78,16 +78,19 @@ public class SwapOrderMgr
{
swapOrder.CloudReportStatus = 1;
updateDbOrder.Add(swapOrder);
-
value.CloudReportStatus = 1000;
value.UploadTime = DateTime.Now;
- updateDbCloudReport.Add(value);
+
+
}
else
{
//当 cloudReportStatus >=100 就不需要上传了
value.CloudReportStatus++;
+
}
+ updateDbCloudReport.Add(value);
+
}
if (updateDbOrder.Count > 0)