using SqlSugar;
using System;
namespace EasyTemplate.Tool.Entity.App
{
///
/// 油枪预警告统计数据(35 天累计)
///
[SugarTable("v_warning_statistics", "预警告统计视图")]
public class WarningStatistics
{
///
/// 油枪 ID
///
[SugarColumn(IsPrimaryKey = true)]
public int nozzle { get; set; }
///
/// 统计日期
///
[SugarColumn(IsPrimaryKey = true)]
public DateOnly statistics_date { get; set; }
///
/// 累计加油笔数(最近 35 天,笔数>=5 的累计)
///
public int total_count { get; set; }
///
/// 累计超标数
///
public int total_overproof { get; set; }
///
/// 累计超标率(%)
///
public int total_overproofrate { get; set; }
///
/// 累计严重超标数(overproof_alert)
///
public int total_overproof_alert { get; set; }
///
/// 累计严重超标率(%)
///
public int total_overproofrate_alert { get; set; }
///
/// 累计超标2数(overproof_2)
///
public int total_overproof_2 { get; set; }
///
/// 累计超标率2(%)
///
public int total_overproofrate_2 { get; set; }
///
/// 当天加油笔数
///
public int daily_total { get; set; }
///
/// 当天超标数
///
public int daily_overproof { get; set; }
///
/// 当天超标率(%)
///
public int daily_overproofrate { get; set; }
///
/// 当天严重超标数
///
public int daily_overproof_alert { get; set; }
///
/// 当天严重超标率(%)
///
public int daily_overproofrate_alert { get; set; }
///
/// 当天超标2数
///
public int daily_overproof_2 { get; set; }
///
/// 当天超标率2(%)
///
public int daily_overproofrate_2 { get; set; }
///
/// 是否满足累计条件(最近连续天数总笔数>=5)
///
public bool is_accumulated { get; set; }
///
/// 累计天数
///
public int accumulated_days { get; set; }
///
/// 连续超标天数(普通超标)
///
public int continue_days { get; set; }
///
/// 连续超标2天数(广东中石化)
///
public int continue_days_2 { get; set; }
///
/// 连续超标天数(严重超标)
///
public int continue_days_alert { get; set; }
///
/// 最后累计超标率(用于显示)
///
public int last_overproofrate { get; set; }
///
/// 最后超标率2(用于显示)
///
public int last_overproofrate_2 { get; set; }
///
/// 最后严重超标率(用于显示)
///
public int last_overproofrate_alert { get; set; }
}
///
/// 预警告统计查询参数
///
public class WarningStatisticsQuery
{
///
/// 油枪 ID(可选)
///
public int? NozzleId { get; set; }
///
/// 开始日期(可选)
///
public DateOnly? StartDate { get; set; }
///
/// 结束日期(可选)
///
public DateOnly? EndDate { get; set; }
///
/// 页码
///
public int PageIndex { get; set; } = 1;
///
/// 每页数量
///
public int PageSize { get; set; } = 20;
}
}