From e62cd8272c49a81a7bcd4b4ac7eebc62225740e8 Mon Sep 17 00:00:00 2001 From: lch <1627445470@qq.com> Date: Fri, 7 Jun 2024 14:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=83=BD=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/DbModel/Station/EmeterEnergy.cs | 33 ++++++++++++++++++ Entity/DbModel/Station/EmeterEnergyChange.cs | 34 +++++++++++++++++++ .../Station/EmeterEnergyChangeRepository.cs | 16 +++++++++ Repository/Station/EmeterEnergyRepository.cs | 17 ++++++++++ Service/Station/EmeterEnergyChangeService.cs | 16 +++++++++ Service/Station/EmeterEnergyService.cs | 16 +++++++++ 6 files changed, 132 insertions(+) create mode 100644 Entity/DbModel/Station/EmeterEnergy.cs create mode 100644 Entity/DbModel/Station/EmeterEnergyChange.cs create mode 100644 Repository/Station/EmeterEnergyChangeRepository.cs create mode 100644 Repository/Station/EmeterEnergyRepository.cs create mode 100644 Service/Station/EmeterEnergyChangeService.cs create mode 100644 Service/Station/EmeterEnergyService.cs diff --git a/Entity/DbModel/Station/EmeterEnergy.cs b/Entity/DbModel/Station/EmeterEnergy.cs new file mode 100644 index 0000000..157944d --- /dev/null +++ b/Entity/DbModel/Station/EmeterEnergy.cs @@ -0,0 +1,33 @@ +using SqlSugar; + +namespace Entity.DbModel.Station; + +[SugarTable("emeter_energy")] +public class EmeterEnergy +{ + /// + /// 主键ID 与 EmeterEnergyChange ID相同 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public virtual string Id { get; set; } + /// + /// 充电机电表编码 (充电机Sn) + /// + [SugarColumn(ColumnName = "code")] + public virtual string Code { get; set; } + /// + /// 电表当前读数 + /// + [SugarColumn(ColumnName = "value")] + public virtual string Value { get; set; } + /// + /// 充电机上报时间 + /// + [SugarColumn(ColumnName = "upload_time")] + public virtual string UploadTime { get; set; } + /// + /// 上报标识:0未上传 1上传 + /// + [SugarColumn(ColumnName = "upload_flag")] + public virtual string UploadFlag { get; set; } +} \ No newline at end of file diff --git a/Entity/DbModel/Station/EmeterEnergyChange.cs b/Entity/DbModel/Station/EmeterEnergyChange.cs new file mode 100644 index 0000000..28c6042 --- /dev/null +++ b/Entity/DbModel/Station/EmeterEnergyChange.cs @@ -0,0 +1,34 @@ +using SqlSugar; + +namespace Entity.DbModel.Station; + +[SugarTable("emeter_energy_change")] +public class EmeterEnergyChange +{ + /// + /// 主键ID 与EmeterEnergy id 相同 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public virtual string Id { get; set; } + /// + /// 充电机电表编码 (充电机Sn) + /// + [SugarColumn(ColumnName = "code")] + public virtual string Code { get; set; } + /// + /// 电表当前读数 + /// + [SugarColumn(ColumnName = "value")] + public virtual string Value { get; set; } + /// + /// 充电机上报时间 + /// + [SugarColumn(ColumnName = "upload_time")] + public virtual string UploadTime { get; set; } + /// + /// 上报标识:0未上传 1上传 + /// + [SugarColumn(ColumnName = "upload_flag")] + public virtual string UploadFlag { get; set; } + +} \ No newline at end of file diff --git a/Repository/Station/EmeterEnergyChangeRepository.cs b/Repository/Station/EmeterEnergyChangeRepository.cs new file mode 100644 index 0000000..c95e2a3 --- /dev/null +++ b/Repository/Station/EmeterEnergyChangeRepository.cs @@ -0,0 +1,16 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using SqlSugar; +using Entity.DbModel.System; + +namespace Repository.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyChangeRepository : BaseRepository +{ + private ISqlSugarClient DbBaseClient; + public EmeterEnergyChangeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) + { + DbBaseClient = sqlSugar; + } +} \ No newline at end of file diff --git a/Repository/Station/EmeterEnergyRepository.cs b/Repository/Station/EmeterEnergyRepository.cs new file mode 100644 index 0000000..24835a9 --- /dev/null +++ b/Repository/Station/EmeterEnergyRepository.cs @@ -0,0 +1,17 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using SqlSugar; +using Entity.DbModel.System; + + +namespace Repository.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyRepository : BaseRepository +{ + private ISqlSugarClient DbBaseClient; + public EmeterEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) + { + DbBaseClient = sqlSugar; + } +} \ No newline at end of file diff --git a/Service/Station/EmeterEnergyChangeService.cs b/Service/Station/EmeterEnergyChangeService.cs new file mode 100644 index 0000000..af49727 --- /dev/null +++ b/Service/Station/EmeterEnergyChangeService.cs @@ -0,0 +1,16 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using Repository.Station; + +namespace Service.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyChangeService : BaseServices +{ + private readonly EmeterEnergyChangeRepository _emeterEnergyChangeRep; + + public EmeterEnergyChangeService(EmeterEnergyChangeRepository emeterEnergyChangeRep) + { + _emeterEnergyChangeRep = emeterEnergyChangeRep; + } +} \ No newline at end of file diff --git a/Service/Station/EmeterEnergyService.cs b/Service/Station/EmeterEnergyService.cs new file mode 100644 index 0000000..53fd992 --- /dev/null +++ b/Service/Station/EmeterEnergyService.cs @@ -0,0 +1,16 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using Repository.Station; + +namespace Service.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyService : BaseServices +{ + private readonly EmeterEnergyRepository _emeterEnergyRep; + + public EmeterEnergyService(EmeterEnergyRepository emeterEnergyRep) + { + _emeterEnergyRep = emeterEnergyRep; + } +} \ No newline at end of file