同步框架代码

zw
smartwyy 6 months ago
parent 558664b2df
commit 8e0a780252

@ -8,7 +8,6 @@
<ItemGroup>
<PackageReference Include="BouncyCastle" Version="1.8.9" />
<PackageReference Include="Furion.Pure" Version="4.9.3.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
</ItemGroup>

@ -1,7 +1,7 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using HybirdFrameworkCore.Extensions;
using HybirdFrameworkCore.Configuration;
using Microsoft.AspNetCore.Http;
using Microsoft.IdentityModel.Tokens;
@ -11,11 +11,10 @@ namespace Common.Util
{
public static string BuildToken(string username)
{
var issuer = AppConfigurtaionServices.Configuration.GetSection("TokenOptions:Issuer").Value;
var issuer = AppSettingsHelper.GetContent("TokenOptions", "Issuer");
var audience = AppSettingsHelper.GetContent("TokenOptions", "Audience");
var securityKey = AppSettingsHelper.GetContent("TokenOptions", "SecurityKey");
var audience = AppConfigurtaionServices.Configuration.GetSection("TokenOptions:Audience").Value;
var securityKey = AppConfigurtaionServices.Configuration.GetSection("TokenOptions:SecurityKey").Value;
var claims = new[]{
new Claim(JwtRegisteredClaimNames.Nbf,$"{new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds()}") ,

@ -1,16 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Furion.ConfigurableOptions;
using System.Text;
using System.Threading.Tasks;
namespace Common.Util
namespace Common.Util
{
/// <summary>
/// 文件上传配置选项
/// </summary>
public sealed class UploadOptions : IConfigurableOptions
public sealed class UploadOptions
{
/// <summary>
/// 路径
@ -33,4 +26,4 @@ namespace Common.Util
/// <remarks>防止重复上传</remarks>
public bool EnableMd5 { get; set; }
}
}
}

@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统参数配置表

@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
///<summary>
///

@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
///<summary>
///

@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统文件表

@ -1,7 +1,7 @@
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统差异日志表

@ -1,12 +1,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统异常日志表

@ -1,12 +1,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统操作日志表

@ -3,7 +3,7 @@ using Dm.Config;
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统访问日志表

@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统菜单表

@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统通知公告表

@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统通知公告用户表

@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统角色表

@ -1,11 +1,6 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统角色菜单表

@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统用户表

@ -1,11 +1,6 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.DbModel.System.SysBaseObject
namespace Entity.DbModel.System
{
/// <summary>
/// 系统用户角色表

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -0,0 +1,12 @@
namespace Entity.Dto.Req;
/// <summary>
///
/// </summary>
public class PageAmmeterReq : BasePageReq
{
/// <summary>
///
/// </summary>
public string? Code { get; set; }
}

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -1,5 +1,5 @@
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Req
{

@ -1,5 +1,5 @@
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Mapster;
namespace Entity.Dto.Resp

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
namespace Entity.Dto.Resp
{

@ -8,7 +8,15 @@ public class PropertyAttribute : System.Attribute
public readonly double Scale;
public readonly int Start;
public readonly PropertyReadConstant Type;
/// <summary>
///
/// </summary>
/// <param name="start"></param>
/// <param name="length"></param>
/// <param name="type"></param>
/// <param name="scale">缩放</param>
/// <param name="round">舍入方式,用于处理浮点数的精度问题</param>
/// <param name="offset">偏移量</param>
public PropertyAttribute(int start, int length, PropertyReadConstant type = PropertyReadConstant.Bit,
double scale = 1, int round = 0, double offset = 0)
{

@ -9,7 +9,7 @@ public class IPage<T>
public int PageSize;
public List<T>? Rows;
public IPage(int total, QueryPageModel page, List<T>? rows)
{
Total = total;

@ -11,22 +11,3 @@ public class QueryPageModel
/// </summary>
public int PageSize { get; set; } = 10;
}
/// <summary>
/// 电表统计分析
/// </summary>
public class AmmeterQueryPageModel
{
/// <summary>
///页码
/// </summary>
public int Page { get; set; } = 1;
/// <summary>
/// 页数
/// </summary>
public int PageSize { get; set; } = 10;
/// <summary>
/// 电表编码 用于分页查询
/// </summary>
public string? Code { get; set; } = "";
}

@ -54,13 +54,12 @@
/// </summary>
/// <param name="msg">消息</param>
/// <returns></returns>
public static Result<T> Fail(string msg = "失败")
public static Result<T> Fail(string? msg = "失败")
{
return Message(false, msg, default);
}
/// <summary>
/// 返回失败
/// </summary>

@ -1,25 +0,0 @@
using Microsoft.Extensions.Configuration.Json;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HybirdFrameworkCore.Extensions
{
public class AppConfigurtaionServices
{
public static IConfiguration Configuration { get; set; }
static AppConfigurtaionServices()
{
//ReloadOnChange = true 当appsettings.json被修改时重新加载
Configuration = new ConfigurationBuilder()
//.SetBasePath(Directory.GetCurrentDirectory())
//AppDomain.CurrentDomain.BaseDirectory是程序集基目录所以appsettings.json,需要复制一份放在程序集目录下,
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.Add(new JsonConfigurationSource { Path = "appsettings.json", ReloadOnChange = true })
.Build();
}
}
}

@ -55,6 +55,7 @@ public class RedisHelper : IDisposable
{
return GetConnect().GetDatabase(_defaultDB);
}
/// <summary>
/// 获取数据库
/// </summary>
@ -82,19 +83,31 @@ public class RedisHelper : IDisposable
/// </summary>
/// <param name="key">键</param>
/// <returns>对应的值如果键不存在则返回null</returns>
public string GetStrValue(string key)
public string? GetStrValue(string key)
{
var db = GetConnect().GetDatabase(_defaultDB);
return db.StringGet(key);
}
/// <summary>
/// 先进先出队列
/// </summary>
/// <param name="topic"></param>
/// <param name="value"></param>
/// <returns></returns>
public void PublishAsync(string topic, string value)
{
ISubscriber sub = GetConnect().GetSubscriber();
sub.PublishAsync(topic, value);
}
/// <summary>
/// 获取Redis中的值异步版本
/// </summary>
/// <param name="key">键</param>
/// <returns>一个表示异步操作的任务任务的结果是对应的值如果键不存在则返回null</returns>
public async Task<string> GetAsync(string key)
public async Task<string?> GetAsync(string key)
{
var db = GetConnect().GetDatabase(_defaultDB);
return await db.StringGetAsync(key);
@ -105,11 +118,12 @@ public class RedisHelper : IDisposable
/// </summary>
/// <param name="key">键</param>
/// <param name="value">值</param>
/// <param name="expiry">值</param>
/// <returns>操作是否成功</returns>
public bool SetKeyValueStr(string key, string value)
public bool SetKeyValueStr(string key, string value, TimeSpan? expiry = default(TimeSpan?))
{
var db = GetConnect().GetDatabase(_defaultDB);
return db.StringSet(key, value);
return db.StringSet(key, value, expiry);
}
/// <summary>

@ -0,0 +1,9 @@
namespace HybirdFrameworkCore.Utils;
public interface IEnum<TK, TV>
{
public TK Key { get; set; }
public TV Value { get; set; }
public TV GetByKey(TK key);
}

@ -1,5 +1,4 @@
using System.Linq.Expressions;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using SqlSugar;

@ -1,8 +1,8 @@
using Entity.DbModel.System.SysBaseObject;
using System.Linq.Expressions;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System.Linq.Expressions;
namespace Repository.System
{

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,11 +1,11 @@
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity.DbModel.System;
namespace Repository.System
{

@ -1,5 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
@ -8,6 +7,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Entity.DbModel.System;
namespace Repository.System
{

@ -1,5 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
@ -8,6 +7,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Entity.DbModel.System;
namespace Repository.System
{

@ -1,11 +1,11 @@
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity.DbModel.System;
namespace Repository.System
{

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,11 +1,11 @@
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity.DbModel.System;
namespace Repository.System
{

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;

@ -1,4 +1,5 @@
using Entity.Ammeter;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
@ -15,7 +16,7 @@ namespace Service.Ammeter
{
this.BaseDal = service;
}
public async Task<PageResult<EmeterDayEnergy>> Page(AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterDayEnergy>> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{

@ -1,4 +1,5 @@
using Entity.Ammeter;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
@ -16,7 +17,7 @@ namespace Service.Ammeter
this.BaseDal = service;
}
public async Task<PageResult<EmeterHourEnergy>> Page(AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterHourEnergy>> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{

@ -1,14 +1,8 @@
using Entity.Ammeter;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository;
using Repository.Ammeter;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Ammeter
{
@ -23,7 +17,7 @@ namespace Service.Ammeter
}
public async Task<PageResult<EmeterMinutesEnergyChange>> Page(AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterMinutesEnergyChange>> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{

@ -1,4 +1,5 @@
using Entity.Ammeter;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
@ -18,7 +19,7 @@ namespace Service.Ammeter
_emeterMinutesEnergyRepository1 = emeterMinutesEnergyRepository;
}
public async Task<PageResult<EmeterMinutesEnergy>> Page(AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterMinutesEnergy>> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{

@ -41,49 +41,56 @@ public class CloudClientMgr
BinInfoRepository binInfoRepository = AppInfo.Container.Resolve<BinInfoRepository>();
redisHelper?.GetSubscriber().Subscribe("UploadTelemetryData", (channel, value) =>
{
Log.Info($"receive UploadTelemetryData={value}");
if (value.HasValue)
try
{
UploadTelemetryData? data = JsonConvert.DeserializeObject<UploadTelemetryData>(value.ToString());
if (data != null)
Log.Info($"receive UploadTelemetryData={value}");
if (value.HasValue)
{
BinInfo? binInfo = binInfoRepository.QueryByClause(it => it.ChargerNo == data.ChargerNo);
ChargeDevDataInfo req = new ChargeDevDataInfo()
UploadTelemetryData? data = JsonConvert.DeserializeObject<UploadTelemetryData>(value.ToString());
if (data != null)
{
sn = StaticStationInfo.StationNo,
en = data.ChargerNo,
sd = "A"+int.Parse(data.ChargerNo),
mtp = StaticStationInfo.ChargePower,
mcr = 1,
hb = binInfo?.Exists??0,
el = 0,
cno = int.Parse(data.ChargerNo),
cs = binInfo.ChargeStatus??0,
fs = 0,
@as = 0,
//fc = data.,
//st = data.,
ct = data.ChargingTime,
//ssoc = data.,
csoc = data.CurrentSoc,
//ssoe = data.,
//csoe = data.,
cvot = data.BmsChargingVoltage,
ccur = data.BmsChargingCurrent,
nvot = data.BmsNeedVoltage,
ncur = data.BmsNeedCurrent,
lsv = data.SingleBatteryMinVoltage,
hsv = data.SingleBatteryMaxVoltage,
lst = data.MinBatteryTemp,
hst = data.MaxBatteryTemp,
ws = 0xFF,
it = 0xFF,
ot = 0xFF,
bt = DateTime.Now
};
CloudClient?.SendChargeDevDataInfo(req);
BinInfo? binInfo = binInfoRepository.QueryByClause(it => it.ChargerNo == data.ChargerNo);
ChargeDevDataInfo req = new ChargeDevDataInfo()
{
sn = StaticStationInfo.StationNo,
en = data.ChargerNo,
sd = "A"+int.Parse(data.ChargerNo),
mtp = StaticStationInfo.ChargePower,
mcr = 1,
hb = binInfo?.Exists??0,
el = 0,
cno = int.Parse(data.ChargerNo),
cs = binInfo.ChargeStatus??0,
fs = 0,
@as = 0,
//fc = data.,
//st = data.,
ct = data.ChargingTime,
//ssoc = data.,
csoc = data.CurrentSoc,
//ssoe = data.,
//csoe = data.,
cvot = data.BmsChargingVoltage,
ccur = data.BmsChargingCurrent,
nvot = data.BmsNeedVoltage,
ncur = data.BmsNeedCurrent,
lsv = data.SingleBatteryMinVoltage,
hsv = data.SingleBatteryMaxVoltage,
lst = data.MinBatteryTemp,
hst = data.MaxBatteryTemp,
ws = 0xFF,
it = 0xFF,
ot = 0xFF,
bt = DateTime.Now
};
CloudClient?.SendChargeDevDataInfo(req);
}
}
}
catch (Exception e)
{
Log.Info("error", e);
}
});
}
}

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;

@ -1,18 +1,12 @@
using Aliyun.OSS.Util;
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;
using Aliyun.OSS.Util;
using Common.Util;
using Entity.DbModel.System.SysBaseObject;
using Furion.VirtualFileServer;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Configuration;
using Microsoft.AspNetCore.Http;
using Repository.System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Service.Mgr
{
@ -92,14 +86,6 @@ namespace Service.Mgr
throw new ArgumentException($"文件超过允许大小");
// 获取文件后缀
var suffix = Path.GetExtension(file.FileName).ToLower(); // 后缀
if (string.IsNullOrWhiteSpace(suffix))
{
var contentTypeProvider = FS.GetFileExtensionContentTypeProvider();
suffix = contentTypeProvider.Mappings.FirstOrDefault(u => u.Value == file.ContentType).Key;
// 修改 image/jpeg 类型返回的 .jpe 后缀
if (suffix == ".jpe")
suffix = ".jpg";
}
if (string.IsNullOrWhiteSpace(suffix))
throw new ArgumentException($"文件后缀错误");
var newFile = new SysFile

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;

@ -1,6 +1,6 @@
using Autofac;
using Common.Const;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,9 +1,9 @@
using Entity.DbModel.System.SysBaseObject;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity.DbModel.System;
namespace Service.Mgr
{

@ -1,7 +1,6 @@
using Entity.Api.Req;
using Entity.Base;
using Entity.DbModel.Station;
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;

@ -1,6 +1,6 @@
using Common.Enum;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Mapster;

@ -1,6 +1,6 @@
using Common.Enum;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Mapster;

@ -2,7 +2,6 @@
using Common.Const;
using Common.Enum;
using Common.Util;
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Attribute;
using HybirdFrameworkCore.Autofac;
@ -13,6 +12,7 @@ using Repository.System;
using Service.Mgr;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Entity.DbModel.System;
namespace Service.System
{

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
using Service.Mgr;

@ -1,7 +1,7 @@
using Common.Const;
using Common.Enum;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
using Service.Mgr;

@ -5,7 +5,7 @@ using Autofac;
using Common.Enum;
using Entity.Base;
using Entity.Constant;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
@ -16,7 +16,6 @@ using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Security;
using Repository.System;
using Service.Mgr;
using Service.Station;
using SqlSugar;
namespace Service.System

@ -7,7 +7,7 @@ using Aliyun.OSS.Util;
using Common.Enum;
using Common.Util;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Furion.VirtualFileServer;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,5 +1,5 @@
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;

@ -1,5 +1,5 @@
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,5 +1,5 @@
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,5 +1,5 @@
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;

@ -1,6 +1,6 @@
using AutoMapper;
using Common.Enum;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,7 +1,7 @@
using System.ComponentModel;
using Common.Enum;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Mapster;

@ -1,4 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
namespace Service.System

@ -4,7 +4,7 @@ using Common.Const;
using Common.Enum;
using Common.Util;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;

@ -1,14 +1,9 @@
using Autofac;
using Entity.Ammeter;
using Entity.DbModel;
using HybirdFrameworkCore.Autofac;
using Entity.Ammeter;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Repository.Station;
using Service.Ammeter;
using Service.Station;
using Service.System;
using System.Collections.Generic;
namespace WebStarter.Controllers.Ammeter
{
@ -84,7 +79,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表变化值信息
/// </summary>
[HttpPost("TEgEmeterRealEnergyValue")]
public async Task<PageResult<EmeterMinutesEnergyChange>> GetEmeterMinutesEnergyChange([FromBody] AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterMinutesEnergyChange>> GetEmeterMinutesEnergyChange([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterMinutesEnergyChangeService.Page(queryPageModel);
}
@ -113,7 +108,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表小时能耗值
/// </summary>
[HttpPost("TEgEmeterHourEnergyValue")]
public async Task<PageResult<EmeterHourEnergy>> GetEmeterHourEnergy([FromBody] AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterHourEnergy>> GetEmeterHourEnergy([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterHourEnergyService.Page(queryPageModel);
}
@ -141,7 +136,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表每天能耗值
/// </summary>
[HttpPost("TEgEmeterDayEnergyValue")]
public async Task<PageResult<EmeterDayEnergy>> GetEmeterDayEnergy([FromBody] AmmeterQueryPageModel queryPageModel)
public async Task<PageResult<EmeterDayEnergy>> GetEmeterDayEnergy([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterDayEnergyService.Page(queryPageModel);
}

@ -6,7 +6,6 @@ using System;
using System.Reflection;
using Entity.Api.Resp;
using Entity.DbModel.Station;
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Entity;
using Microsoft.VisualBasic;
using Newtonsoft.Json.Linq;

@ -1,9 +1,9 @@
using Entity.DbModel.System.SysBaseObject;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using Entity.Dto.Req;
using Service.System.Dict;
using Entity.Base;
using Entity.DbModel.System;
namespace WebStarter.Controllers.System.Dict
{

@ -1,9 +1,9 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.System.Dict;
using Entity.Base;
using Entity.DbModel.System;
namespace WebStarter.Controllers.System.Dict
{

@ -1,7 +1,6 @@
using Entity.Api.Req;
using Entity.Api.Resp;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
@ -16,6 +15,7 @@ using Service.System;
using SqlSugar;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Entity.DbModel.System;
using Service.Init;
namespace WebStarter.Controllers.System

@ -1,9 +1,9 @@
using Entity.DbModel.System.SysBaseObject;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using Entity.Dto.Req;
using Service.System;
using Entity.Base;
using Entity.DbModel.System;
namespace WebStarter.Controllers.System
{

@ -1,5 +1,5 @@
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;

@ -1,6 +1,6 @@

using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;

@ -1,5 +1,5 @@
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;

@ -1,6 +1,6 @@

using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;

@ -1,5 +1,5 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.DbModel;
using Entity.DbModel;
using Entity.DbModel.System;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.System;

@ -1,11 +1,11 @@
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Entity;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.System.Roles;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using Common.Enum;
using Entity.Base;
using Entity.DbModel.System;
namespace WebStarter.Controllers.System
{

@ -1,5 +1,4 @@
using Entity.DbModel.System.SysBaseObject;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using Entity.DbModel;
using Entity.Dto.Req;
@ -7,6 +6,7 @@ using HybirdFrameworkCore.Entity;
using Service.Mgr;
using Service.System;
using Entity.Base;
using Entity.DbModel.System;
namespace WebStarter.Controllers.System
{

@ -14,7 +14,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://0.0.0.0:5034",
"applicationUrl": "http://localhost:5034",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"profiles_active": "dev"

@ -72,7 +72,7 @@
"Kestrel": {
"Endpoints": {
"http": {
"Url": "http://*:15034"
"Url": "http://*:5034"
}
}
},

Loading…
Cancel
Save