This commit is contained in:
yanghongwei 2024-09-01 18:11:20 +08:00
commit b250b0a297
2 changed files with 12 additions and 10 deletions

View File

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

View File

@ -119,11 +119,13 @@ namespace langguanApi.Service
{ {
if (!string.IsNullOrWhiteSpace(input.startTime)) 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)) 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(); result.cleans = result.cleans.Skip(input.current - 1).Take(input.pageSize).ToList();
} }