From ff17b407d5cdfc906f2b65ab6158b2467e60139c Mon Sep 17 00:00:00 2001 From: tq <1916474859@qq,com> Date: Wed, 25 Sep 2024 11:13:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E7=94=B5=E8=AE=A2=E5=8D=95=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Api/Resp/SwapOrderResp.cs | 3 ++ Entity/Dto/SwapOrderDto.cs | 38 +++++++++---------- Entity/Dto/SwapOrderDto2.cs | 29 +++++++------- WebStarter/Controllers/SwapOrderController.cs | 1 - 4 files changed, 38 insertions(+), 33 deletions(-) diff --git a/Entity/Api/Resp/SwapOrderResp.cs b/Entity/Api/Resp/SwapOrderResp.cs index ef22071..57074d3 100644 --- a/Entity/Api/Resp/SwapOrderResp.cs +++ b/Entity/Api/Resp/SwapOrderResp.cs @@ -185,5 +185,8 @@ namespace Entity.Api.Resp /// public string? ManualStep { get; set; } + + public string? Remark { get; set; } + } } \ No newline at end of file diff --git a/Entity/Dto/SwapOrderDto.cs b/Entity/Dto/SwapOrderDto.cs index fc68985..c43d112 100644 --- a/Entity/Dto/SwapOrderDto.cs +++ b/Entity/Dto/SwapOrderDto.cs @@ -54,24 +54,7 @@ public class SwapOrderDto [ExporterHeader(DisplayName = "所属部门", IsBold = true)] public string? Departments {get;set;} - /// - /// Desc:换电类型:;1自动换电;2手动换电 - /// Default:0 - /// Nullable:True - /// - [ExporterHeader(DisplayName = "换电模式", IsBold = true)] - public string SwapWayDisplay - { - get - { - return SwapWay switch - { - 1 => "自动换电", - 2 => "手动换电", - _ => "未知" - }; - } - } + /// /// Desc:换电类型:;1自动换电;2手动换电 /// Default:0 @@ -244,6 +227,23 @@ public class SwapOrderDto [ExporterHeader(DisplayName = "总费用", IsBold = true)] public decimal? TotalFee { get; set; } + /// + /// Desc:换电类型:;1自动换电;2手动换电 + /// Default:0 + /// Nullable:True + /// [ExporterHeader(DisplayName = "备注", IsBold = true)] - public decimal? Remark { get; set; } + public string SwapWayDisplay + { + get + { + return SwapWay switch + { + 1 => "自动换电", + 2 => "手动换电", + 3 => "半自动换电", + _ => "未知" + }; + } + } } \ No newline at end of file diff --git a/Entity/Dto/SwapOrderDto2.cs b/Entity/Dto/SwapOrderDto2.cs index be57776..4d9d406 100644 --- a/Entity/Dto/SwapOrderDto2.cs +++ b/Entity/Dto/SwapOrderDto2.cs @@ -48,19 +48,7 @@ public class SwapOrderDto2 public DateTime? SwapEndTime { get; set; } - [ExporterHeader(DisplayName = "Swap Type", IsBold = true)] - public string SwapWayDisplay - { - get - { - return SwapWay switch - { - 1 => "Automatic Swap", - 2 => "Manual Swap", - _ => "Unknown" - }; - } - } + [ExporterHeader(IsIgnore = true)] public int? SwapWay { get; set; } @@ -131,4 +119,19 @@ public class SwapOrderDto2 /// [ExporterHeader(DisplayName = "TOTAL COST", IsBold = true)] public decimal? TotalFee { get; set; } + + [ExporterHeader(DisplayName = "REMARK", IsBold = true)] + public string SwapWayDisplay + { + get + { + return SwapWay switch + { + 1 => "Automatic Swap", + 2 => "Manual Swap", + 3 => "SEMI AUTOMATIC SWITCHING", + _ => "Unknown" + }; + } + } } \ No newline at end of file diff --git a/WebStarter/Controllers/SwapOrderController.cs b/WebStarter/Controllers/SwapOrderController.cs index 7e7fc22..acc08a3 100644 --- a/WebStarter/Controllers/SwapOrderController.cs +++ b/WebStarter/Controllers/SwapOrderController.cs @@ -401,7 +401,6 @@ public class SwapOrderController : ControllerBase List swapOrderBattery = mapper.Map>(batteryList); // 换电订单 List swapOrderResp = mapper.Map>(orderList); - foreach (var orderResp in swapOrderResp) { if (orderResp.ServiceTotalFee.HasValue)