人工确实失败和成功bug

master
lxw 5 months ago
parent d1b5db4b24
commit 84580ebc79

@ -41,14 +41,21 @@ public class CancelState : IState
_CommonMgr.UpdateSwapOrder(machine);
}
_manualOperationRecordRepository.Insert(new ManualOperationRecord()
var manualOperationRecord = new ManualOperationRecord()
{
Type = 2,
CreatedBy = UserManager.Account,
UpdatedBy = UserManager.Account,
Operator = machine.OperateModel.Operator,
Reason = machine.OperateModel.Reason,
});
};
if (machine.SwapOrder != null)
{
manualOperationRecord.SwapOrderSn = machine.SwapOrder.Sn;
}
_manualOperationRecordRepository.Insert(manualOperationRecord);
machine.Reset();

@ -41,14 +41,23 @@ public class ManualSuccState : IState
_CommonMgr.UpdateSwapOrder(machine);
}
_manualOperationRecordRepository.Insert(new ManualOperationRecord()
var manualOperationRecord = new ManualOperationRecord()
{
Type = 2,
Type = 1,
CreatedBy = UserManager.Account,
UpdatedBy = UserManager.Account,
Operator = machine.OperateModel.Operator,
Reason = machine.OperateModel.Reason,
});
};
if (machine.SwapOrder != null)
{
manualOperationRecord.SwapOrderSn = machine.SwapOrder.Sn;
}
_manualOperationRecordRepository.Insert(manualOperationRecord);
;
machine.Reset();
}
catch (Exception e)

@ -55,7 +55,7 @@ public class SwapOrderService : BaseServices<SwapOrder>
SwapOrderReportCloudRepository.QueryListByClause(i => i.CloudReportStatus < 100 && i.SwapOrderId == id);
if (list.Count <= 0)
{
{
return Result<bool>.Fail("当前换电订单不满足上报云平台的条件");
}

Loading…
Cancel
Save