dev #2

Merged
admin merged 176 commits from dev into master 2025-04-18 01:31:49 +00:00
4 changed files with 28 additions and 2 deletions
Showing only changes of commit e95d356780 - Show all commits

View File

@ -4,12 +4,32 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JiShe.CollectBus.EnergySystems.TableViews;
using JiShe.CollectBus.FreeSql;
using Volo.Abp.Domain.Repositories;
using JiShe.CollectBus.IotSystems.PrepayModel;
namespace JiShe.CollectBus.EnergySystem
{
public class CacheAppService: CollectBusAppService,ICacheAppService
public class CacheAppService : CollectBusAppService, ICacheAppService
{
//public async Task<V_FocusAmmeter> GetHashByKey(string key)
//{
// await FreeRedisProvider.Instance.HGetAsync<V_FocusAmmeter>(key,);
//}
public async Task SetHashByKey(string key)
{
var data = await SqlProvider.Instance.Change(DbEnum.EnergyDB).Select<V_FocusAmmeter>().ToListAsync();
var groupData = data.GroupBy(a => $"{a.FocusAreaCode}{a.FocusAddress}").ToList();
foreach (var group in groupData)
{
var aa = data.ToDictionary(a => a.Address, b => b);
await FreeRedisProvider.Instance.HSetAsync(group.Key, aa);
}
}
}
}

View File

@ -1,4 +1,5 @@
using System;
using FreeSql.DataAnnotations;
namespace JiShe.CollectBus.EnergySystems.Entities
{
@ -22,6 +23,7 @@ namespace JiShe.CollectBus.EnergySystems.Entities
/// <summary>
/// 区域名
/// </summary>
[Column(IsIgnore = true)]
public string AreaName { get; set; }
/// <summary>
@ -146,6 +148,7 @@ namespace JiShe.CollectBus.EnergySystems.Entities
/// <summary>
/// 集中器名称(扩展字段)
/// </summary>
[Column(IsIgnore = true)]
public string FocusName { get; set; }
/// <summary>
@ -168,11 +171,13 @@ namespace JiShe.CollectBus.EnergySystems.Entities
/// 机械表1德力西机械电表-Code
/// (原有数据都默认:电子电表)
/// </summary>
[Column(IsIgnore = true)]
public int MeterKind { get; set; }
/// <summary>
/// 采集方案ID
/// </summary>
[Column(IsIgnore = true)]
public int GatherPlanID { get; set; }
/// <summary>

View File

@ -23,6 +23,7 @@
<ItemGroup>
<ProjectReference Include="..\JiShe.CollectBus.Common\JiShe.CollectBus.Common.csproj" />
<ProjectReference Include="..\JiShe.CollectBus.Domain.Shared\JiShe.CollectBus.Domain.Shared.csproj" />
<ProjectReference Include="..\JiShe.CollectBus.FreeSql\JiShe.CollectBus.FreeSql.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -40,7 +40,7 @@
"EnergyDB": "server=118.190.144.92;database=db_energy;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False"
},
"Redis": {
"Configuration": "118.190.144.92:6379,syncTimeout=30000,abortConnect=false,connectTimeout=30000,allowAdmin=true",
"Configuration": "192.168.111.248:6379,password=123456abcD,syncTimeout=30000,abortConnect=false,connectTimeout=30000,allowAdmin=true",
"DefaultDB": "14",
"HangfireDB": "15"
},