电表model错误修正

master
CZ 6 months ago
parent 5114301165
commit 664578f7af

@ -40,7 +40,7 @@ namespace Entity.DbModel.Station
public string Name {get;set;} public string Name {get;set;}
/// <summary> /// <summary>
/// Desc:设备类型编码 /// Desc:设备类型编码 0交流1直流
/// Default: /// Default:
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>

@ -8,8 +8,10 @@ namespace Repository.Ammeter
[Scope("SingleInstance")] [Scope("SingleInstance")]
public class EmeterDayEnergyRepository : BaseRepository<EmeterDayEnergy> public class EmeterDayEnergyRepository : BaseRepository<EmeterDayEnergy>
{ {
private ISqlSugarClient DbBaseClient;
public EmeterDayEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) public EmeterDayEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{ {
DbBaseClient = sqlSugar;
} }
} }
} }

@ -8,8 +8,10 @@ namespace Repository.Ammeter
[Scope("SingleInstance")] [Scope("SingleInstance")]
public class EmeterHourEnergyRepository : BaseRepository<EmeterHourEnergy> public class EmeterHourEnergyRepository : BaseRepository<EmeterHourEnergy>
{ {
private ISqlSugarClient DbBaseClient;
public EmeterHourEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) public EmeterHourEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{ {
DbBaseClient = sqlSugar;
} }
} }
} }

@ -12,8 +12,10 @@ namespace Repository.Ammeter
[Scope("SingleInstance")] [Scope("SingleInstance")]
public class EmeterMinutesEnergyChangeRepository : BaseRepository<EmeterMinutesEnergyChange> public class EmeterMinutesEnergyChangeRepository : BaseRepository<EmeterMinutesEnergyChange>
{ {
private ISqlSugarClient DbBaseClient;
public EmeterMinutesEnergyChangeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) public EmeterMinutesEnergyChangeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{ {
DbBaseClient = sqlSugar;
} }
} }
} }

@ -7,8 +7,10 @@ namespace Repository.Ammeter
[Scope("SingleInstance")] [Scope("SingleInstance")]
public class EmeterMinutesEnergyRepository : BaseRepository<EmeterMinutesEnergy> public class EmeterMinutesEnergyRepository : BaseRepository<EmeterMinutesEnergy>
{ {
private ISqlSugarClient DbBaseClient;
public EmeterMinutesEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) public EmeterMinutesEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{ {
DbBaseClient = sqlSugar;
} }
} }
} }

@ -1,4 +1,5 @@
using Entity.DbModel; using Entity.Ammeter;
using Entity.DbModel;
using Entity.DbModel.Station; using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using Repository.Ammeter; using Repository.Ammeter;
@ -14,10 +15,9 @@ namespace Service.Station
[Scope("SingleInstance")] [Scope("SingleInstance")]
public class EquipInfoService : BaseServices<EquipInfo> public class EquipInfoService : BaseServices<EquipInfo>
{ {
private readonly EquipInfoRepository _service;
public EquipInfoService(EquipInfoRepository service) public EquipInfoService(EquipInfoRepository service)
{ {
_service = service; this.BaseDal = service;
} }
} }
} }

@ -170,7 +170,6 @@ namespace WebStarter.Controllers.Ammeter
//TODO:: //TODO::
//每天计算总能耗值,每天计算充电能耗值,每天计算换电能耗值,每天计算其他能耗值,开始时间,结束时间 //每天计算总能耗值,每天计算充电能耗值,每天计算换电能耗值,每天计算其他能耗值,开始时间,结束时间
#endregion #endregion
#region 电能监控/交流电能监控 #region 电能监控/交流电能监控
@ -187,7 +186,7 @@ namespace WebStarter.Controllers.Ammeter
{ {
strings.Add(kvp.Code); strings.Add(kvp.Code);
} }
//TODO::过滤,确保编码相同只出现一次
return Result<List<EmeterMinutesEnergy>>.Success(_emeterMinutesEnergyService.QueryListByClause(i => strings.Contains(i.Code)).ToList()); return Result<List<EmeterMinutesEnergy>>.Success(_emeterMinutesEnergyService.QueryListByClause(i => strings.Contains(i.Code)).ToList());
} }
@ -195,7 +194,7 @@ namespace WebStarter.Controllers.Ammeter
#region 电能监控/直流电能监控 #region 电能监控/直流电能监控
/// <summary> /// <summary>
/// 电能监控/流电能监控 /// 电能监控/流电能监控
/// </summary> /// </summary>
[HttpGet("ManualSwap/GetDcCurrentInfo")] [HttpGet("ManualSwap/GetDcCurrentInfo")]
public Result<List<EmeterMinutesEnergy>> GetDcCurrentInfo() public Result<List<EmeterMinutesEnergy>> GetDcCurrentInfo()
@ -206,7 +205,7 @@ namespace WebStarter.Controllers.Ammeter
{ {
strings.Add(kvp.Code); strings.Add(kvp.Code);
} }
//TODO::过滤,确保编码相同只出现一次
return Result<List<EmeterMinutesEnergy>>.Success(_emeterMinutesEnergyService.QueryListByClause(i => strings.Contains(i.Code)).ToList()); return Result<List<EmeterMinutesEnergy>>.Success(_emeterMinutesEnergyService.QueryListByClause(i => strings.Contains(i.Code)).ToList());
} }
#endregion #endregion

Loading…
Cancel
Save