换电订单金额导出转元

master
tq 1 month ago
parent 2257aa9755
commit 4ed084a220

@ -65,6 +65,34 @@ public class SwapOrderController : ControllerBase
PackageSwapOrder(swapOrderResp); PackageSwapOrder(swapOrderResp);
List<SwapOrderResp>? list = swapOrderResp.Rows; List<SwapOrderResp>? list = swapOrderResp.Rows;
if (list!=null)
{
foreach (var swapOrder in list)
{
if (swapOrder.ServiceTotalFee.HasValue && swapOrder.ServiceTotalFee.Value != 0)
{
swapOrder.ServiceTotalFee = swapOrder.ServiceTotalFee / 100;
}
if (swapOrder.ElectricityTotalFee.HasValue && swapOrder.ElectricityTotalFee.Value != 0)
{
swapOrder.ElectricityTotalFee = swapOrder.ElectricityTotalFee / 100;
}
if (swapOrder.AppendTotalFee.HasValue && swapOrder.AppendTotalFee.Value != 0)
{
swapOrder.AppendTotalFee = swapOrder.AppendTotalFee / 100;
}
if (swapOrder.TotalFee.HasValue && swapOrder.TotalFee.Value != 0)
{
swapOrder.TotalFee = swapOrder.TotalFee / 100;
}
}
}
List<string> vehicleNoList = list?.Select(resp => resp.VehicleNo).ToList() ?? new List<string>(); List<string> vehicleNoList = list?.Select(resp => resp.VehicleNo).ToList() ?? new List<string>();
// 查询车辆的部门 // 查询车辆的部门
List<BaseVehicle> vehicleList = await _baseVehicleRepository List<BaseVehicle> vehicleList = await _baseVehicleRepository
@ -140,6 +168,33 @@ public class SwapOrderController : ControllerBase
Log.Info($"查询换电订单 SwapOrderController end QueryPage swapOrderService.QuerySwapOrder req={req}"); Log.Info($"查询换电订单 SwapOrderController end QueryPage swapOrderService.QuerySwapOrder req={req}");
PackageSwapOrder(swapOrderResp); PackageSwapOrder(swapOrderResp);
List<SwapOrderResp>? list = swapOrderResp.Rows;
if (list!=null)
{
foreach (var swapOrder in list)
{
if (swapOrder.ServiceTotalFee.HasValue && swapOrder.ServiceTotalFee.Value != 0)
{
swapOrder.ServiceTotalFee = swapOrder.ServiceTotalFee / 100;
}
if (swapOrder.ElectricityTotalFee.HasValue && swapOrder.ElectricityTotalFee.Value != 0)
{
swapOrder.ElectricityTotalFee = swapOrder.ElectricityTotalFee / 100;
}
if (swapOrder.AppendTotalFee.HasValue && swapOrder.AppendTotalFee.Value != 0)
{
swapOrder.AppendTotalFee = swapOrder.AppendTotalFee / 100;
}
if (swapOrder.TotalFee.HasValue && swapOrder.TotalFee.Value != 0)
{
swapOrder.TotalFee = swapOrder.TotalFee / 100;
}
}
}
return Result<PageResult<SwapOrderResp>>.Success(swapOrderResp); return Result<PageResult<SwapOrderResp>>.Success(swapOrderResp);
} }
@ -411,7 +466,29 @@ public class SwapOrderController : ControllerBase
var language = Request.Headers["Accept-Language"].ToString().ToLower(); var language = Request.Headers["Accept-Language"].ToString().ToLower();
List<SwapOrder> orderList = await swapOrderService.QuerySwapOrderListAsync(req); List<SwapOrder> orderList = await swapOrderService.QuerySwapOrderListAsync(req);
foreach (var swapOrder in orderList)
{
if (swapOrder.ServiceTotalFee.HasValue && swapOrder.ServiceTotalFee.Value != 0)
{
swapOrder.ServiceTotalFee = swapOrder.ServiceTotalFee / 100;
}
if (swapOrder.ElectricityTotalFee.HasValue && swapOrder.ElectricityTotalFee.Value != 0)
{
swapOrder.ElectricityTotalFee = swapOrder.ElectricityTotalFee / 100;
}
if (swapOrder.AppendTotalFee.HasValue && swapOrder.AppendTotalFee.Value != 0)
{
swapOrder.AppendTotalFee = swapOrder.AppendTotalFee / 100;
}
if (swapOrder.TotalFee.HasValue && swapOrder.TotalFee.Value != 0)
{
swapOrder.TotalFee = swapOrder.TotalFee / 100;
}
}
// 获取所有订单号 // 获取所有订单号
var orderSns = orderList.Select(row => row.Sn).ToList(); var orderSns = orderList.Select(row => row.Sn).ToList();

Loading…
Cancel
Save