清洁运输加上默认值

This commit is contained in:
pangwenpeng 2024-08-28 16:15:00 +08:00
parent 44471ec932
commit 337993c243
2 changed files with 12 additions and 10 deletions

View File

@ -39,7 +39,7 @@
/// <summary>
/// 国五百分比
/// </summary>
public string V5Percent { get; set; }
public string V5Percent { get; set; } = "0";
/// <summary>
/// 国五比例数量
/// </summary>
@ -47,7 +47,7 @@
/// <summary>
/// 国五运输量百分比
/// </summary>
public string V5WeightPercent { get; set; }
public string V5WeightPercent { get; set; } = "0";
/// <summary>
/// 国五运输量比例
/// </summary>
@ -55,7 +55,7 @@
/// <summary>
/// 国六百分比
/// </summary>
public string V6Percent { get; set; }
public string V6Percent { get; set; } = "0";
/// <summary>
/// 国六运输量
/// </summary>
@ -63,7 +63,7 @@
/// <summary>
/// 国六运输量百分比
/// </summary>
public string V6WeightPercent { get; set; }
public string V6WeightPercent { get; set; } = "0";
/// <summary>
/// 国六运输量
/// </summary>
@ -71,7 +71,7 @@
/// <summary>
/// 电动百分比
/// </summary>
public string ElectricPrecent { get; set; }
public string ElectricPrecent { get; set; } = "0";
/// <summary>
/// 电动运输量
/// </summary>
@ -79,7 +79,7 @@
/// <summary>
/// 电动运输量百分比
/// </summary>
public string ElectricWeightPrecent { get; set; }
public string ElectricWeightPrecent { get; set; } = "0";
/// <summary>
/// 电动运输量
/// </summary>
@ -87,7 +87,7 @@
/// <summary>
/// 其他百分比
/// </summary>
public string OtherPrecent { get; set; }
public string OtherPrecent { get; set; } = "0";
/// <summary>
/// 其他运输量
/// </summary>
@ -95,7 +95,7 @@
/// <summary>
/// 其他运输量百分比
/// </summary>
public string OtherWeightPrecent { get; set; }
public string OtherWeightPrecent { get; set; } = "0";
/// <summary>
/// 其他运输量
/// </summary>

View File

@ -119,11 +119,13 @@ namespace langguanApi.Service
{
if (!string.IsNullOrWhiteSpace(input.startTime))
{
result.cleans.Where(p => Convert.ToDateTime(p.Time) >= Convert.ToDateTime(input.startTime)).ToList();
//c#集合筛选大于开始时间的数据
result.cleans = result.cleans.Where(p => DateTime.Parse(p.Time) >= DateTime.Parse(input.startTime)).ToList();
}
if (!string.IsNullOrWhiteSpace(input.endTime))
{
result.cleans.Where(p => Convert.ToDateTime(p.Time) <= Convert.ToDateTime(input.endTime)).ToList();
result.cleans = result.cleans.Where(p => DateTime.Parse(p.Time) <= DateTime.Parse(input.endTime)).ToList();
}
result.cleans = result.cleans.Skip(input.current - 1).Take(input.pageSize).ToList();
}