修改全流程

master
zby 2 months ago
parent 45fdfa875d
commit 7146351f4f

@ -220,5 +220,6 @@ namespace Entity.Api.Resp
/// 电量 /// 电量
/// </summary> /// </summary>
public string ElectricQuantity { get; set; } public string ElectricQuantity { get; set; }
} }
} }

@ -16,13 +16,6 @@ public class SwapOrderDto
[ExporterHeader(DisplayName = "站号", IsBold = true)] [ExporterHeader(DisplayName = "站号", IsBold = true)]
public string StationNumber { get; set; } public string StationNumber { get; set; }
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "订单编号", IsBold = true)]
public string Sn { get; set; }
/// <summary> /// <summary>
/// Desc:车牌号 /// Desc:车牌号
@ -121,6 +114,98 @@ public class SwapOrderDto
public string FailReason { get; set; } public string FailReason { get; set; }
/// <summary>
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int? SwapWay { get; set; }
/// <summary>
/// Desc:亏电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "电池编号(存)", IsBold = true)]
public string? DownBatteryNo { get; set; }
/// <summary>
/// Desc:亏电包soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "soc", IsBold = true)]
public decimal? DownBatterySoc { get; set; }
/// <summary>
/// Desc:放电池仓位号 亏电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "放电池仓位号", IsBold = true)]
public int? DownBatteryBinNo { get; set; }
/// <summary>
/// Desc:取电池仓位号 满电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "取电池仓位号", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// Desc:满电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "满电包编码(取)", IsBold = true)]
public string? UpBatteryNo { get; set; }
/// <summary>
/// Desc:满电包soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "满电包soc", IsBold = true)]
public decimal? UpBatterySoc { get; set; }
/// <summary>
/// 满电包电量
/// </summary>
[ExporterHeader(DisplayName = "电池电量(取)", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
/// <summary>
/// 亏电包电量
/// </summary>
[ExporterHeader(DisplayName = "电池电量(存)", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
/// <summary>
/// 电量差
/// </summary>
[ExporterHeader(DisplayName = "电池差值", IsBold = true)]
public string ElectricQuantity { get; set; }
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "订单编号", IsBold = true)]
public string Sn { get; set; }
/// <summary> /// <summary>
/// Desc:上传云平台状态;0-未上传1-已上传 /// Desc:上传云平台状态;0-未上传1-已上传
/// Default:0 /// Default:0
@ -140,6 +225,10 @@ public class SwapOrderDto
} }
} }
// [ExporterHeader(DisplayName = "上传云平台状态", IsBold = true)] // [ExporterHeader(DisplayName = "上传云平台状态", IsBold = true)]
[ExporterHeader(IsIgnore = true)] public int? CloudReportStatus { get; set; } [ExporterHeader(IsIgnore = true)] public int? CloudReportStatus { get; set; }
@ -170,25 +259,6 @@ public class SwapOrderDto
} }
/// <summary>
/// Desc:换电类型:;1自动换电;2手动换电
/// Default:0
/// Nullable:True
/// </summary>
[ExporterHeader(IsIgnore = true)]
public int? SwapWay { get; set; }
/// <summary>
/// Desc:亏电包soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "亏电包soc", IsBold = true)]
public decimal? DownBatterySoc { get; set; }
/// <summary> /// <summary>
/// Desc:亏电包真实soc /// Desc:亏电包真实soc
/// Default: /// Default:
@ -198,6 +268,9 @@ public class SwapOrderDto
public decimal? DownBatteryRealSoc { get; set; } public decimal? DownBatteryRealSoc { get; set; }
/// <summary> /// <summary>
/// Desc:亏电包上次换电结算时soc /// Desc:亏电包上次换电结算时soc
/// Default: /// Default:
@ -207,76 +280,22 @@ public class SwapOrderDto
public decimal? DownBatteryLastSoc { get; set; } public decimal? DownBatteryLastSoc { get; set; }
/// <summary> /// <summary>
/// Desc:亏电包编码 /// Desc:满电包真实soc
/// Default: /// Default:
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "亏电包编码", IsBold = true)] [ExporterHeader(DisplayName = "满电包真实soc", IsBold = true)]
public decimal? UpBatteryRealSoc { get; set; }
public string? DownBatteryNo { get; set; }
/// <summary>
/// Desc:满电包编码
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "满电包编码", IsBold = true)]
public string? UpBatteryNo { get; set; }
/// <summary>
/// Desc:满电包soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "满电包soc", IsBold = true)]
public decimal? UpBatterySoc { get; set; }
/// <summary>
/// Desc:满电包真实soc
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "满电包真实soc", IsBold = true)]
public decimal? UpBatteryRealSoc { get; set; }
/// <summary>
/// Desc:放电池仓位号 亏电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "放电池仓位号", IsBold = true)]
public int? DownBatteryBinNo { get; set; }
/// <summary>
/// Desc:取电池仓位号 满电包仓号
/// Default:
/// Nullable:True
/// </summary>
[ExporterHeader(DisplayName = "取电池仓位号", IsBold = true)]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// 电量
/// </summary>
[ExporterHeader(DisplayName = "电量", IsBold = true)]
public string ElectricQuantity { get; set; }
/// <summary>
/// 亏电包电量
/// </summary>
[ExporterHeader(DisplayName = "Down Battery Electric Quantity", IsBold = true)]
public string? DownBatteryElectricQuantity { get; set; }
/// <summary>
/// 满电包电量
/// </summary>
[ExporterHeader(DisplayName = "Up Battery Electric Quantity", IsBold = true)]
public string? UpBatteryElectricQuantity { get; set; }
} }

@ -103,11 +103,12 @@ public class RfidApi
Log.Info("RfidApi ReadRfid"); Log.Info("RfidApi ReadRfid");
string readUrl = BASE_URL + "/Api/BeginRead"; // string readUrl = BASE_URL + "/Api/BeginRead";
string url = BASE_URL + "/Api/ReadRfidData"; string url = BASE_URL + "/Api/ReadRfidData";
Log.Info($"url={url}");
try try
{ {
var vBeginRead = await _httpClient.GetStringAsync(readUrl); //var vBeginRead = await _httpClient.GetStringAsync(readUrl);
string s = await _httpClient.GetStringAsync(url); string s = await _httpClient.GetStringAsync(url);
Log.Info($"ReadRfid resp={s}"); Log.Info($"ReadRfid resp={s}");
if (s != String.Empty) if (s != String.Empty)

@ -184,7 +184,7 @@ public class SwapDoneState : IState
public InvokeStatus LockCar(SwappingStateMachine machine) public InvokeStatus LockCar(SwappingStateMachine machine)
{ {
return Invoker.Invoke("LockCar", 500, 100, machine.IsCanceled, machine.IsManualSwapSucc, return Invoker.Invoke("LockCar", 1000, 20, machine.IsCanceled, machine.IsManualSwapSucc,
() => machine.VelLockFlag, () => () => machine.VelLockFlag, () =>
{ {
Task<bool> result = TBoxApi.LockCarManyTimes(machine.RfidReadModel.VelVin); Task<bool> result = TBoxApi.LockCarManyTimes(machine.RfidReadModel.VelVin);
@ -234,7 +234,7 @@ public class SwapDoneState : IState
//TODO::加锁失败是否需要播报 //TODO::加锁失败是否需要播报
LedClient.SendMsgByKey(InfoEnum.SwapInfo.ErrLockCar.GetLed()); LedClient.SendMsgByKey(InfoEnum.SwapInfo.ErrLockCar.GetLed());
}, false, () => { machine.ExceptionReason = ExceptionReason.LockCarError; } }, false, () => { machine.ExceptionReason = ExceptionReason.LockCarError; }
, 10, InvokeStatus.None); , 3, InvokeStatus.None);
} }

@ -395,6 +395,7 @@ public class SwapOrderController : ControllerBase
dto.UpBatteryElectricQuantity = ((double)dto.UpBatterySoc * 3.75).ToString(); dto.UpBatteryElectricQuantity = ((double)dto.UpBatterySoc * 3.75).ToString();
double ElectricQuantity = ((float)(dto.UpBatterySoc - dto.DownBatterySoc)) * 3.75; double ElectricQuantity = ((float)(dto.UpBatterySoc - dto.DownBatterySoc)) * 3.75;
dto.ElectricQuantity = ElectricQuantity.ToString(); dto.ElectricQuantity = ElectricQuantity.ToString();
} }
catch (Exception e) catch (Exception e)
{ {

Loading…
Cancel
Save