diff --git a/ConsoleStarter/ConsoleStarter.csproj b/ConsoleStarter/ConsoleStarter.csproj index 57b5dae..5849726 100644 --- a/ConsoleStarter/ConsoleStarter.csproj +++ b/ConsoleStarter/ConsoleStarter.csproj @@ -16,7 +16,7 @@ - + diff --git a/Entity/DbModel/Station/BatteryGroup.cs b/Entity/DbModel/Station/BatteryGroup.cs new file mode 100644 index 0000000..e446f95 --- /dev/null +++ b/Entity/DbModel/Station/BatteryGroup.cs @@ -0,0 +1,83 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///电池分组表 + /// + [SugarTable("battery_group")] + public partial class BatteryGroup + { + public BatteryGroup(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:电池编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="battery_no")] + public string BatteryNo {get;set;} + + /// + /// Desc:电池分组编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="group")] + public int? Group {get;set;} + + /// + /// Desc:电池分组数量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="group_count")] + public int? GroupCount {get;set;} + + } +} diff --git a/Entity/DbModel/Station/BatteryInfo.cs b/Entity/DbModel/Station/BatteryInfo.cs new file mode 100644 index 0000000..59fbbf1 --- /dev/null +++ b/Entity/DbModel/Station/BatteryInfo.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///电池信息表 + /// + [SugarTable("battery_info")] + public partial class BatteryInfo + { + public BatteryInfo(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/BinInfo.cs b/Entity/DbModel/Station/BinInfo.cs new file mode 100644 index 0000000..bcb0ccf --- /dev/null +++ b/Entity/DbModel/Station/BinInfo.cs @@ -0,0 +1,195 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///仓位信息表 + /// + [SugarTable("bin_info")] + public partial class BinInfo + { + public BinInfo(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="id")] + public string Id {get;set;} + + /// + /// Desc:仓位编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="no")] + public string No {get;set;} + + /// + /// Desc:仓位编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="code")] + public string Code {get;set;} + + /// + /// Desc:仓位名称 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="name")] + public string Name {get;set;} + + /// + /// Desc:电池编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="battery_no")] + public string BatteryNo {get;set;} + + /// + /// Desc:充电机编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="charger_no")] + public string ChargerNo {get;set;} + + /// + /// Desc:充电枪编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="charger_gun_no")] + public string ChargerGunNo {get;set;} + + /// + /// Desc:水冷编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="water_cool_no")] + public string WaterCoolNo {get;set;} + + /// + /// Desc:是否有电插头;0-无电插头;1-有电插头 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="elec_plugin_flag")] + public int? ElecPluginFlag {get;set;} + + /// + /// Desc:电插头状态;0-未知;1-已经连接;2-未连接 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="elec_plugin_status")] + public string ElecPluginStatus {get;set;} + + /// + /// Desc:是否有水插头;0-无水插头;1-有水插头 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnName="water_plugin_flag")] + public string WaterPluginFlag {get;set;} + + /// + /// Desc:预约锁定;0-未锁定;1-锁定 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="amt_lock")] + public string AmtLock {get;set;} + + /// + /// Desc:soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="soc")] + public decimal? Soc {get;set;} + + /// + /// Desc:soe + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="soe")] + public decimal? Soe {get;set;} + + /// + /// Desc:soh + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="soh")] + public decimal? Soh {get;set;} + + /// + /// Desc:电池入仓顺序 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="battery_enter_seq")] + public int? BatteryEnterSeq {get;set;} + + /// + /// Desc:充电状态;0-未知;1-正在充电;2-无电池;3-禁用 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="charge_status")] + public int? ChargeStatus {get;set;} + + /// + /// Desc:仓位状态;0-禁用;1-启用 + /// Default:1 + /// Nullable:True + /// + [SugarColumn(ColumnName="status")] + public int? Status {get;set;} + + } +} diff --git a/Entity/DbModel/Station/ChargeOrder.cs b/Entity/DbModel/Station/ChargeOrder.cs new file mode 100644 index 0000000..554c981 --- /dev/null +++ b/Entity/DbModel/Station/ChargeOrder.cs @@ -0,0 +1,243 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///充电订单;充电订单表 + /// + [SugarTable("charge_order")] + public partial class ChargeOrder + { + public ChargeOrder(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:订单编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="sn")] + public string Sn {get;set;} + + /// + /// Desc:电池编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="battery_no")] + public string BatteryNo {get;set;} + + /// + /// Desc:启动报文状态;0-初始化;1-启动成功 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="cmd_status")] + public int? CmdStatus {get;set;} + + /// + /// Desc:充电机编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="charger_no")] + public string ChargerNo {get;set;} + + /// + /// Desc:充电枪编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="charger_gun_no")] + public string ChargerGunNo {get;set;} + + /// + /// Desc:充电开始时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="start_time")] + public DateTime? StartTime {get;set;} + + /// + /// Desc:充电结束时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="end_time")] + public DateTime? EndTime {get;set;} + + /// + /// Desc:充电开始soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="start_soc")] + public int? StartSoc {get;set;} + + /// + /// Desc:充电结束soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="stop_soc")] + public int? StopSoc {get;set;} + + /// + /// Desc:充电时长 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="charge_time_count")] + public string ChargeTimeCount {get;set;} + + /// + /// Desc:充电电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="elec_count")] + public decimal? ElecCount {get;set;} + + /// + /// Desc:充电开始交流表电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="start_ac_elec")] + public decimal? StartAcElec {get;set;} + + /// + /// Desc:充电结束交流表电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="stop_ac_elec")] + public decimal? StopAcElec {get;set;} + + /// + /// Desc:充电开始直流表电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="start_dc_elec")] + public decimal? StartDcElec {get;set;} + + /// + /// Desc:充电结束直流表电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="stop_dc_elec")] + public decimal? StopDcElec {get;set;} + + /// + /// Desc:停止原因;0:满电自动停止;1-人工停止 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="stop_reason")] + public int? StopReason {get;set;} + + /// + /// Desc:尖时段电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="sharp_elec_count")] + public decimal? SharpElecCount {get;set;} + + /// + /// Desc:峰时段电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="peak_elec_count")] + public decimal? PeakElecCount {get;set;} + + /// + /// Desc:平时段电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="flat_elec_count")] + public decimal? FlatElecCount {get;set;} + + /// + /// Desc:谷时段电量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="valley_elec_count")] + public decimal? ValleyElecCount {get;set;} + + /// + /// Desc:电价版本号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="elec_price_model_version")] + public string ElecPriceModelVersion {get;set;} + + /// + /// Desc:换电订单编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_order_sn")] + public string SwapOrderSn {get;set;} + + /// + /// Desc:上传云平台状态;0-未上传;1-已上传 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="cloud_report_status")] + public int? CloudReportStatus {get;set;} + + } +} diff --git a/Entity/DbModel/Station/ElecPriceModelVersion.cs b/Entity/DbModel/Station/ElecPriceModelVersion.cs new file mode 100644 index 0000000..9e0cecd --- /dev/null +++ b/Entity/DbModel/Station/ElecPriceModelVersion.cs @@ -0,0 +1,83 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///电价模型板板;电价模型版本表,生失效时间左开右闭且不能重叠 + /// + [SugarTable("elec_price_model_version")] + public partial class ElecPriceModelVersion + { + public ElecPriceModelVersion(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:主键 + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:版本号;版本号,唯一 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="version")] + public string Version {get;set;} + + /// + /// Desc:生效时间;生效时间(左开右闭) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="start_time")] + public DateTime? StartTime {get;set;} + + /// + /// Desc:失效时间;失效时间(左开右闭) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="end_time")] + public DateTime? EndTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs b/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs new file mode 100644 index 0000000..54eb48f --- /dev/null +++ b/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs @@ -0,0 +1,99 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///电价模型详情 + /// + [SugarTable("elec_price_model_version_detail")] + public partial class ElecPriceModelVersionDetail + { + public ElecPriceModelVersionDetail(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:版本号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="version")] + public string Version {get;set;} + + /// + /// Desc:开始时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="start_time")] + public DateTime? StartTime {get;set;} + + /// + /// Desc:结束时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="end_time")] + public DateTime? EndTime {get;set;} + + /// + /// Desc:价格;以分为单位存储 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="price")] + public int? Price {get;set;} + + /// + /// Desc:尖峰平谷类型;1-尖;2-峰;3-平;4-谷 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="type")] + public int? Type {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipAlarmLevel.cs b/Entity/DbModel/Station/EquipAlarmLevel.cs new file mode 100644 index 0000000..f99ca38 --- /dev/null +++ b/Entity/DbModel/Station/EquipAlarmLevel.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备报警等级 + /// + [SugarTable("equip_alarm_level")] + public partial class EquipAlarmLevel + { + public EquipAlarmLevel(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipAlarmProcessMethod.cs b/Entity/DbModel/Station/EquipAlarmProcessMethod.cs new file mode 100644 index 0000000..fac0d5b --- /dev/null +++ b/Entity/DbModel/Station/EquipAlarmProcessMethod.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备报警处理方法 + /// + [SugarTable("equip_alarm_process_method")] + public partial class EquipAlarmProcessMethod + { + public EquipAlarmProcessMethod(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipAlarmProcessRecord.cs b/Entity/DbModel/Station/EquipAlarmProcessRecord.cs new file mode 100644 index 0000000..c882ba0 --- /dev/null +++ b/Entity/DbModel/Station/EquipAlarmProcessRecord.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备报警处理记录 + /// + [SugarTable("equip_alarm_process_record")] + public partial class EquipAlarmProcessRecord + { + public EquipAlarmProcessRecord(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipAlarmRecord.cs b/Entity/DbModel/Station/EquipAlarmRecord.cs new file mode 100644 index 0000000..c6bcc7b --- /dev/null +++ b/Entity/DbModel/Station/EquipAlarmRecord.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备报警记录 + /// + [SugarTable("equip_alarm_record")] + public partial class EquipAlarmRecord + { + public EquipAlarmRecord(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipAlarmType.cs b/Entity/DbModel/Station/EquipAlarmType.cs new file mode 100644 index 0000000..e6c48f4 --- /dev/null +++ b/Entity/DbModel/Station/EquipAlarmType.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备报警类型 + /// + [SugarTable("equip_alarm_type")] + public partial class EquipAlarmType + { + public EquipAlarmType(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipAlarmTypeValue.cs b/Entity/DbModel/Station/EquipAlarmTypeValue.cs new file mode 100644 index 0000000..2afa5aa --- /dev/null +++ b/Entity/DbModel/Station/EquipAlarmTypeValue.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备报警类型阀值 + /// + [SugarTable("equip_alarm_type_value")] + public partial class EquipAlarmTypeValue + { + public EquipAlarmTypeValue(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipInfo.cs b/Entity/DbModel/Station/EquipInfo.cs new file mode 100644 index 0000000..44648c8 --- /dev/null +++ b/Entity/DbModel/Station/EquipInfo.cs @@ -0,0 +1,91 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备信息表 + /// + [SugarTable("equip_info")] + public partial class EquipInfo + { + public EquipInfo(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:设备编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="code")] + public string Code {get;set;} + + /// + /// Desc:设备名称 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="name")] + public string Name {get;set;} + + /// + /// Desc:设备类型编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="type_code")] + public string TypeCode {get;set;} + + /// + /// Desc:设备状态;0-未知;1-正常;2-报警;3-停用 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="status")] + public int? Status {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipNetInfo.cs b/Entity/DbModel/Station/EquipNetInfo.cs new file mode 100644 index 0000000..fa90aa5 --- /dev/null +++ b/Entity/DbModel/Station/EquipNetInfo.cs @@ -0,0 +1,91 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备通信信息表 + /// + [SugarTable("equip_net_info")] + public partial class EquipNetInfo + { + public EquipNetInfo(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:设备id + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="id")] + public string Id {get;set;} + + /// + /// Desc:设备编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="code")] + public string Code {get;set;} + + /// + /// Desc:连接地址 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="net_addr")] + public string NetAddr {get;set;} + + /// + /// Desc:连接端口 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="net_port")] + public string NetPort {get;set;} + + /// + /// Desc:目的地址;(十六进制,如0a,02,03,04) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="dest_addr")] + public string DestAddr {get;set;} + + } +} diff --git a/Entity/DbModel/Station/EquipType.cs b/Entity/DbModel/Station/EquipType.cs new file mode 100644 index 0000000..811002c --- /dev/null +++ b/Entity/DbModel/Station/EquipType.cs @@ -0,0 +1,83 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///设备类型表 + /// + [SugarTable("equip_type")] + public partial class EquipType + { + public EquipType(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="id")] + public string Id {get;set;} + + /// + /// Desc:类型编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="code")] + public string Code {get;set;} + + /// + /// Desc:类型名称 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="name")] + public string Name {get;set;} + + /// + /// Desc:是否启用;0-禁用;1-启用 + /// Default:1 + /// Nullable:True + /// + [SugarColumn(ColumnName="enabled")] + public int? Enabled {get;set;} + + } +} diff --git a/Entity/DbModel/Station/SelectBatteryRule.cs b/Entity/DbModel/Station/SelectBatteryRule.cs new file mode 100644 index 0000000..5b19043 --- /dev/null +++ b/Entity/DbModel/Station/SelectBatteryRule.cs @@ -0,0 +1,99 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///选包规则表 + /// + [SugarTable("select_battery_rule")] + public partial class SelectBatteryRule + { + public SelectBatteryRule(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:规则编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="code")] + public string Code {get;set;} + + /// + /// Desc:规则名称 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="name")] + public string Name {get;set;} + + /// + /// Desc:是否启用;1-启用; + /// Default:1 + /// Nullable:True + /// + [SugarColumn(ColumnName="enabled")] + public int? Enabled {get;set;} + + /// + /// Desc:限制值 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="limit_value")] + public decimal? LimitValue {get;set;} + + /// + /// Desc:备注 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="remart")] + public string Remart {get;set;} + + } +} diff --git a/Entity/DbModel/Station/SwapAmtOrder.cs b/Entity/DbModel/Station/SwapAmtOrder.cs new file mode 100644 index 0000000..002b32e --- /dev/null +++ b/Entity/DbModel/Station/SwapAmtOrder.cs @@ -0,0 +1,155 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///换电预约表 + /// + [SugarTable("swap_amt_order")] + public partial class SwapAmtOrder + { + public SwapAmtOrder(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:预约单号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="sn")] + public string Sn {get;set;} + + /// + /// Desc:支付状态 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="pay_status")] + public int? PayStatus {get;set;} + + /// + /// Desc:车辆vin码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="vin")] + public string Vin {get;set;} + + /// + /// Desc:车辆mac + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="mac")] + public string Mac {get;set;} + + /// + /// Desc:预约电池数量 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="battery_count")] + public int? BatteryCount {get;set;} + + /// + /// Desc:预约时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="amt_time")] + public DateTime? AmtTime {get;set;} + + /// + /// Desc:预约到期时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="expire_time")] + public DateTime? ExpireTime {get;set;} + + /// + /// Desc:预约状态;1:预约成功;2:预约取消;3:预约失败;4:换电完成;5:换电失败;6:换电中;7:预约过期 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="status")] + public int? Status {get;set;} + + /// + /// Desc:预约电池仓号列表 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="amt_bin_no_list")] + public string AmtBinNoList {get;set;} + + /// + /// Desc:取消时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="cancel_time")] + public DateTime? CancelTime {get;set;} + + /// + /// Desc:换电完成时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_finish_time")] + public DateTime? SwapFinishTime {get;set;} + + /// + /// Desc:换电订单编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_order_sn")] + public string SwapOrderSn {get;set;} + + } +} diff --git a/Entity/DbModel/Station/SwapOrder.cs b/Entity/DbModel/Station/SwapOrder.cs new file mode 100644 index 0000000..4c70038 --- /dev/null +++ b/Entity/DbModel/Station/SwapOrder.cs @@ -0,0 +1,147 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///换电订单表 + /// + [SugarTable("swap_order")] + public partial class SwapOrder + { + public SwapOrder(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:订单编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="sn")] + public string Sn {get;set;} + + /// + /// Desc:车牌号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="vehicle_no")] + public string VehicleNo {get;set;} + + /// + /// Desc:车辆mac + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="vehicle_mac")] + public string VehicleMac {get;set;} + + /// + /// Desc:车辆vin码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="vehicle_vin")] + public string VehicleVin {get;set;} + + /// + /// Desc:车辆进场时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="vehicle_enter_time")] + public DateTime? VehicleEnterTime {get;set;} + + /// + /// Desc:车辆离场时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="vehicle_leave_time")] + public DateTime? VehicleLeaveTime {get;set;} + + /// + /// Desc:换电开始时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_begin_time")] + public DateTime? SwapBeginTime {get;set;} + + /// + /// Desc:换电结束时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_end_time")] + public DateTime? SwapEndTime {get;set;} + + /// + /// Desc:换电结果;0-未知;1-成功;2-失败 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_result")] + public int? SwapResult {get;set;} + + /// + /// Desc:失败原因 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="fail_reason")] + public string FailReason {get;set;} + + /// + /// Desc:上传云平台状态;0-未上传;1-已上传 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="cloud_report_status")] + public int? CloudReportStatus {get;set;} + + } +} diff --git a/Entity/DbModel/Station/SwapOrderBattery.cs b/Entity/DbModel/Station/SwapOrderBattery.cs new file mode 100644 index 0000000..11393b2 --- /dev/null +++ b/Entity/DbModel/Station/SwapOrderBattery.cs @@ -0,0 +1,243 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///换电订单电池 + /// + [SugarTable("swap_order_battery")] + public partial class SwapOrderBattery + { + public SwapOrderBattery(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:换电订单编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_order_sn")] + public string SwapOrderSn {get;set;} + + /// + /// Desc:亏电包编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_no")] + public string DownBatteryNo {get;set;} + + /// + /// Desc:亏电包soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_soc")] + public decimal? DownBatterySoc {get;set;} + + /// + /// Desc:亏电包soe + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_soe")] + public decimal? DownBatterySoe {get;set;} + + /// + /// Desc:亏电包真实soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_real_soc")] + public decimal? DownBatteryRealSoc {get;set;} + + /// + /// Desc:亏电包上次换电结算时soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_last_soc")] + public decimal? DownBatteryLastSoc {get;set;} + + /// + /// Desc:亏电包上次换电结算时soe + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_last_soe")] + public decimal? DownBatteryLastSoe {get;set;} + + /// + /// Desc:亏电包站内充电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_in_chage_elec_count")] + public decimal? DownBatteryInChageElecCount {get;set;} + + /// + /// Desc:亏电包站外插枪充电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_out_chage_elec_count")] + public decimal? DownBatteryOutChageElecCount {get;set;} + + /// + /// Desc:亏电包站外回充能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_out_re_chagre_count")] + public decimal? DownBatteryOutReChagreCount {get;set;} + + /// + /// Desc:亏电包站外放电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_in_dischage_elec_count")] + public decimal? DownBatteryInDischageElecCount {get;set;} + + /// + /// Desc:亏电包站内放电电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_out_dischage_elec_count")] + public decimal? DownBatteryOutDischageElecCount {get;set;} + + /// + /// Desc:放电池仓位号 亏电包仓号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="down_battery_bin_no")] + public int? DownBatteryBinNo {get;set;} + + /// + /// Desc:满电包编码 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_no")] + public string UpBatteryNo {get;set;} + + /// + /// Desc:满电包soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_soc")] + public decimal? UpBatterySoc {get;set;} + + /// + /// Desc:满电包soe + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_soe")] + public decimal? UpBatterySoe {get;set;} + + /// + /// Desc:满电包真实soc + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_real_soc")] + public decimal? UpBatteryRealSoc {get;set;} + + /// + /// Desc:满电包站内充电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_in_chage_elec_count")] + public decimal? UpBatteryInChageElecCount {get;set;} + + /// + /// Desc:满电包站外插枪充电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_out_chage_elec_count")] + public decimal? UpBatteryOutChageElecCount {get;set;} + + /// + /// Desc:满电包站外回充能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_out_re_chagre_count")] + public decimal? UpBatteryOutReChagreCount {get;set;} + + /// + /// Desc:满电包站外放电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_in_dischage_elec_count")] + public decimal? UpBatteryInDischageElecCount {get;set;} + + /// + /// Desc:满电包站内放电电能量(累计) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_out_dischage_elec_count")] + public decimal? UpBatteryOutDischageElecCount {get;set;} + + /// + /// Desc:取电池仓位号 满电包仓号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="up_battery_bin_no")] + public int? UpBatteryBinNo {get;set;} + + } +} diff --git a/Entity/DbModel/Station/SwapOrderStep.cs b/Entity/DbModel/Station/SwapOrderStep.cs new file mode 100644 index 0000000..271c16b --- /dev/null +++ b/Entity/DbModel/Station/SwapOrderStep.cs @@ -0,0 +1,83 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.DbModel.Station +{ + /// + ///换电步序表 + /// + [SugarTable("swap_order_step")] + public partial class SwapOrderStep + { + public SwapOrderStep(){ + + + } + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string CreatedBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? CreatedTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string UpdatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? UpdatedTime {get;set;} + + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")] + public int Id {get;set;} + + /// + /// Desc:换电订单编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="swap_order_sn")] + public string SwapOrderSn {get;set;} + + /// + /// Desc:步序;0-未知;1-空闲;200-rfid扫描;300-云平台验证; + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="step")] + public int? Step {get;set;} + + /// + /// Desc:步序名称 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="step_name")] + public string StepName {get;set;} + + } +} diff --git a/Entity/Entity.csproj b/Entity/Entity.csproj index 9352d52..eaed5f7 100644 --- a/Entity/Entity.csproj +++ b/Entity/Entity.csproj @@ -7,7 +7,11 @@ - + + + + + diff --git a/Repository/Repository.csproj b/Repository/Repository.csproj index 9c691e6..e5483ac 100644 --- a/Repository/Repository.csproj +++ b/Repository/Repository.csproj @@ -8,7 +8,7 @@ - + diff --git a/Repository/Station/BatteryGroupRepository.cs b/Repository/Station/BatteryGroupRepository.cs new file mode 100644 index 0000000..b2a6175 --- /dev/null +++ b/Repository/Station/BatteryGroupRepository.cs @@ -0,0 +1,14 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using SqlSugar; + +namespace Repository.Station; + +[Scope("SingleInstance")] +public class BatteryGroupRepository:BaseRepository +{ + + public BatteryGroupRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) + { + } +} \ No newline at end of file diff --git a/Service/Service.csproj b/Service/Service.csproj index 1ee60b6..433e1ae 100644 --- a/Service/Service.csproj +++ b/Service/Service.csproj @@ -14,7 +14,7 @@ - + diff --git a/WebStarter/Controllers/GenController.cs b/WebStarter/Controllers/GenController.cs new file mode 100644 index 0000000..888cddd --- /dev/null +++ b/WebStarter/Controllers/GenController.cs @@ -0,0 +1,84 @@ +using Entity.DbModel.Station; +using Microsoft.AspNetCore.Mvc; +using Repository.Station; +using SqlSugar; + +namespace WebStarter.Controllers; + +[ApiController] +[Route("[controller]")] +public class GenController : ControllerBase +{ + private readonly ISqlSugarClient _sqlSugarClient; + private readonly BatteryGroupRepository _batteryGroupRepository; + + public GenController(ISqlSugarClient sqlSugarClient, BatteryGroupRepository batteryGroupRepository) + { + _sqlSugarClient = sqlSugarClient; + _batteryGroupRepository = batteryGroupRepository; + } + + /// + /// 生成文件 + /// + /// + [HttpGet("gen/t/{id}")] + public void Get(int id) + { + Console.WriteLine(); + _sqlSugarClient.DbFirst + .IsCreateAttribute() //创建sqlsugar自带特性 + .FormatFileName(it => ToPascalCase(it)) //格式化文件名(文件名和表名不一样情况) + .FormatClassName(it => ToPascalCase(it)) //格式化类名 (类名和表名不一样的情况) + .FormatPropertyName(it => ToPascalCase(it)) //格式化属性名 (属性名和字段名不一样情况) + .CreateClassFile("D:\\lxw\\work\\pro\\c#\\hn_back_main\\Entity\\DbModel\\Station", + "Entity.DbModel.Station"); + + + Console.WriteLine("生成完毕"); + } + + [HttpGet("test115")] + public void Test115() + { + _batteryGroupRepository.Insert(new List() + { + new BatteryGroup() + { + BatteryNo = "1", + Group = 1, + }, + new BatteryGroup() + { + BatteryNo = "2", + Group = 2, + }, + }); + List batteryGroups = _batteryGroupRepository.Query(); + BatteryGroup batteryGroup = batteryGroups[0]; + _batteryGroupRepository.Delete(batteryGroup); + BatteryGroup batteryGroup1 = batteryGroups[1]; + batteryGroup1.Group = 3; + _batteryGroupRepository.Update(batteryGroup1); + + + Console.WriteLine("测试完毕"); + } + + + static string ToPascalCase(string input) + { + if (string.IsNullOrEmpty(input)) + return input; + string[] strings = input.Split("_"); + string res = ""; + foreach (var s in strings) + { + string first = s.First().ToString().ToUpper(); + string te = first + s.Substring(1); + res += te; + } + + return res; + } +} \ No newline at end of file diff --git a/WebStarter/Controllers/WeatherForecastController.cs b/WebStarter/Controllers/WeatherForecastController.cs index f3f784d..35fb358 100644 --- a/WebStarter/Controllers/WeatherForecastController.cs +++ b/WebStarter/Controllers/WeatherForecastController.cs @@ -23,6 +23,7 @@ public class WeatherForecastController : ControllerBase } [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() { var sysUsers = _sysUserServices.Query(); diff --git a/WebStarter/bin/Debug/net6.0/SqlSugar.dll b/WebStarter/bin/Debug/net6.0/SqlSugar.dll index d892921..5946740 100644 Binary files a/WebStarter/bin/Debug/net6.0/SqlSugar.dll and b/WebStarter/bin/Debug/net6.0/SqlSugar.dll differ diff --git a/WpfStarter/WpfStarter.csproj b/WpfStarter/WpfStarter.csproj index bb66c09..acf2725 100644 --- a/WpfStarter/WpfStarter.csproj +++ b/WpfStarter/WpfStarter.csproj @@ -12,7 +12,7 @@ - +