model 提出 baseModel 修改createTime 数据库不插入值

master
lxw 6 months ago
parent 1397937c99
commit 11cb6c4972

@ -0,0 +1,43 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// 业务model 基类
/// </summary>
public class BaseModel
{
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
/// [SugarColumn(IsPrimaryKey = false, , ColumnDescription = "创建时间")]
[SugarColumn(ColumnName = "created_time", InsertServerTime = true)]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string? UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time", UpdateServerTime = true)]
public DateTime? UpdatedTime { get; set; } = DateTime.Now;
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电池分组表
///</summary>
[SugarTable("battery_group")]
public partial class BatteryGroup
public partial class BatteryGroup : BaseModel
{
public BatteryGroup(){
@ -47,37 +47,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="group_count")]
public int? GroupCount {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,43 +9,13 @@ namespace Entity.DbModel.Station
///电池信息表
///</summary>
[SugarTable("battery_info")]
public partial class BatteryInfo
public partial class BatteryInfo : BaseModel
{
public BatteryInfo(){
}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电池运营模型
///</summary>
[SugarTable("battery_op_model")]
public partial class BatteryOpModel
public partial class BatteryOpModel : BaseModel
{
public BatteryOpModel(){
@ -31,37 +31,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="model_id")]
public int? ModelId {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电池运营模型详情
///</summary>
[SugarTable("battery_op_model_detail")]
public partial class BatteryOpModelDetail
public partial class BatteryOpModelDetail : BaseModel
{
public BatteryOpModelDetail(){
@ -63,37 +63,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="battery_type")]
public string BatteryType {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -7,7 +7,7 @@ namespace Entity.DbModel.Station
///仓位信息表
///</summary>
[SugarTable("bin_info")]
public partial class BinInfo
public partial class BinInfo : BaseModel
{
public BinInfo()
{
@ -165,32 +165,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "status")]
public int? Status { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
/// [SugarColumn(IsPrimaryKey = false, , ColumnDescription = "创建时间")]
[SugarColumn(ColumnName = "created_time", InsertServerTime = true)]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string? UpdatedBy { get; set; }
/// <summary>
/// Desc:最后结束充电时间 结束充电后更新
/// Default:
@ -199,13 +174,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "last_charge_finish_time")]
public DateTime? LastChargeFinishTime { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time", UpdateServerTime = true)]
public DateTime? UpdatedTime { get; set; } = DateTime.Now;
/// <summary>
/// 缓存仓标记 0:不是 1:是

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///充电订单;充电订单表
///</summary>
[SugarTable("charge_order")]
public partial class ChargeOrder
public partial class ChargeOrder : BaseModel
{
public ChargeOrder()
{
@ -258,38 +258,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "cloud_report_status")]
public int? CloudReportStatus { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
/// <summary>
/// Desc:云平台订单编号
/// Default:

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电价模型板板;电价模型版本表,生失效时间左开右闭且不能重叠
///</summary>
[SugarTable("elec_price_model_version")]
public partial class ElecPriceModelVersion
public partial class ElecPriceModelVersion : BaseModel
{
public ElecPriceModelVersion(){
@ -47,37 +47,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="end_time")]
public DateTime? EndTime {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,8 +9,8 @@ namespace Entity.DbModel.Station
///电价模型详情
///</summary>
[SugarTable("elec_price_model_version_detail")]
public partial class ElecPriceModelVersionDetail
{
public partial class ElecPriceModelVersionDetail : BaseModel
{
public ElecPriceModelVersionDetail(){
@ -77,38 +77,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="type")]
public int? Type {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
/// <summary>
/// 判断一个时间段是否包含另一个时间段(包括开始和结束时间的秒数)
/// </summary>

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///设备报警记录
///</summary>
[SugarTable("equip_alarm_define")]
public partial class EquipAlarmDefine
public partial class EquipAlarmDefine : BaseModel
{
public EquipAlarmDefine()
{
@ -68,36 +68,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "process_method")]
public string ProcessMethod { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///设备报警等级
///</summary>
[SugarTable("equip_alarm_level")]
public partial class EquipAlarmLevel
public partial class EquipAlarmLevel : BaseModel
{
/// <summary>
/// 自增id
@ -17,36 +17,6 @@ namespace Entity.DbModel.Station
//TODO 数据库字段未设计完
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -9,43 +9,12 @@ namespace Entity.DbModel.Station
///设备报警处理方法
///</summary>
[SugarTable("equip_alarm_process_method")]
public partial class EquipAlarmProcessMethod
public partial class EquipAlarmProcessMethod : BaseModel
{
public EquipAlarmProcessMethod(){
}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///设备报警处理记录
///</summary>
[SugarTable("equip_alarm_process_record")]
public partial class EquipAlarmProcessRecord
public partial class EquipAlarmProcessRecord : BaseModel
{
public EquipAlarmProcessRecord()
{
@ -76,36 +76,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "process_time")]
public DateTime? ProcessTime { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///设备报警记录
///</summary>
[SugarTable("equip_alarm_record")]
public partial class EquipAlarmRecord
public partial class EquipAlarmRecord : BaseModel
{
public EquipAlarmRecord()
{
@ -68,36 +68,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "process_method")]
public string ProcessMethod { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备报警类型
///</summary>
[SugarTable("equip_alarm_type")]
public partial class EquipAlarmType
public partial class EquipAlarmType : BaseModel
{
/// <summary>
/// 自增id
@ -17,38 +17,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
public long Id { get; set; }
//TODO 数据库字段未设计完
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -9,43 +9,13 @@ namespace Entity.DbModel.Station
///设备报警类型阀值
///</summary>
[SugarTable("equip_alarm_type_value")]
public partial class EquipAlarmTypeValue
public partial class EquipAlarmTypeValue : BaseModel
{
public EquipAlarmTypeValue(){
}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备信息表
///</summary>
[SugarTable("equip_info")]
public partial class EquipInfo
public partial class EquipInfo : BaseModel
{
public EquipInfo(){
@ -55,37 +55,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="status")]
public int? Status {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备通信信息表
///</summary>
[SugarTable("equip_net_info")]
public partial class EquipNetInfo
public partial class EquipNetInfo : BaseModel
{
public EquipNetInfo(){
@ -55,37 +55,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="dest_addr")]
public string DestAddr {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备类型表
///</summary>
[SugarTable("equip_type")]
public partial class EquipType
public partial class EquipType : BaseModel
{
public EquipType(){
@ -47,37 +47,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="enabled")]
public int? Enabled {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -11,7 +11,7 @@ namespace Entity.DbModel.Station
///换电站日运行统计结果
///</summary>
[SugarTable("exchange_station_day_count_result")]
public class ExchangeStationDayRunResult
public class ExchangeStationDayRunResult : BaseModel
{
/// <summary>
/// 主键ID
@ -91,28 +91,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "toltal_time_count")]
public float ToltalTimeCount { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public string CreatedTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// 更新人
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public string UpdatedTime { get; set; }
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///选包规则表
///</summary>
[SugarTable("select_battery_rule")]
public partial class SelectBatteryRule
public partial class SelectBatteryRule : BaseModel
{
public SelectBatteryRule(){
@ -63,37 +63,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="remart")]
public string Remart {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///换电预约表
///</summary>
[SugarTable("swap_amt_order")]
public partial class SwapAmtOrder
public partial class SwapAmtOrder : BaseModel
{
public SwapAmtOrder(){
@ -119,37 +119,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="swap_order_sn")]
public string SwapOrderSn {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///换电订单表
///</summary>
[SugarTable("swap_order")]
public partial class SwapOrder
public partial class SwapOrder : BaseModel
{
public SwapOrder()
{
@ -111,37 +111,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "cloud_report_status")]
public int? CloudReportStatus { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
/// <summary>
/// 云平台订单号
/// </summary>

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///换电订单电池
///</summary>
[SugarTable("swap_order_battery")]
public partial class SwapOrderBattery
public partial class SwapOrderBattery : BaseModel
{
/// <summary>
@ -204,37 +204,5 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "up_battery_bin_no")]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string? UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///
///</summary>
[SugarTable("swap_order_report_cloud")]
public partial class SwapOrderReportCloud
public partial class SwapOrderReportCloud : BaseModel
{
public SwapOrderReportCloud(){
@ -39,38 +39,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="cloud_report_status")]
public int? CloudReportStatus {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
/// <summary>
/// Desc:云平台充电订单
/// Default:

@ -7,7 +7,7 @@ namespace Entity.DbModel.Station
///换电步序表
///</summary>
[SugarTable("swap_order_step")]
public partial class SwapOrderStep
public partial class SwapOrderStep : BaseModel
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
public int Id { get; set; }
@ -36,37 +36,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "step_name")]
public string? StepName { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string? UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
/// <summary>

@ -11,22 +11,16 @@ namespace Service.Execute.Api;
public class PlcApi
{
private const int TimeSpan = 60;
private static readonly ILog Log = LogManager.GetLogger(typeof(PlcApi));
private static readonly ILog Log = LogManager.GetLogger("PlcApi");
/// <summary>
/// PLC是否连接
/// </summary>
public static bool con;
/// <summary>
/// 数据有效时间。单位秒
/// </summary>
static int DataTimeSeconds = 2;
/// <summary>
/// 数据刷新时间
/// </summary>
public static DateTime DataValidityTime = DateTime.Now;
/// <summary>
@ -35,12 +29,17 @@ public class PlcApi
/// <returns></returns>
public static bool IsRemote()
{
return PlcMgr.IsRemote();
var isRemote = PlcMgr.IsRemote();
Log.Info($"plc IsRemove resp={isRemote}");
return isRemote;
}
public static bool IsAuto()
{
return PlcMgr.IsAuto();
var isAuto = PlcMgr.IsAuto();
Log.Info($"plc IsRemove resp={isAuto}");
return isAuto;
}
/// <summary>
@ -49,6 +48,7 @@ public class PlcApi
/// <returns></returns>
public static bool EntranceRadar()
{
return PlcMgr.EntranceRadar();
}

@ -29,4 +29,29 @@
<appender-ref ref="Console"/>
<appender-ref ref="RollingFile"/>
</root>
<logger name="PlcApi" additivity="false">
<level value="ALL" />
<appender-ref ref="Plc" />
</logger>
<appender name="Plc" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Plc.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%date 日志内容:%message%newline "/>
</layout>
</appender>
</log4net>

@ -29,4 +29,29 @@
<appender-ref ref="Console"/>
<appender-ref ref="RollingFile"/>
</root>
<logger name="PlcApi" additivity="false">
<level value="ALL" />
<appender-ref ref="Plc" />
</logger>
<appender name="Plc" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Plc.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%date 日志内容:%message%newline "/>
</layout>
</appender>
</log4net>
Loading…
Cancel
Save