主站网关1
This commit is contained in:
parent
df2a417de2
commit
2fad16e5e6
24
OperationsMainSiteGatewayServer/OMSGAbpModule.cs
Normal file
24
OperationsMainSiteGatewayServer/OMSGAbpModule.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using Abp.Modules;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using YunDa.ISAS.Application.Core;
|
||||||
|
|
||||||
|
namespace Yunda.SOMS.OperationsMainSiteGatewayServer
|
||||||
|
{
|
||||||
|
|
||||||
|
[DependsOn(typeof(ISASApplicationCoreModule))] // 依赖 Autofac 模块
|
||||||
|
public class OMSGAbpModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void PreInitialize()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -576,6 +576,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
ProtectionDeviceInfo protectionDeviceInfo = null;
|
ProtectionDeviceInfo protectionDeviceInfo = null;
|
||||||
using (var work = _unitOfWorkManager.Begin())
|
using (var work = _unitOfWorkManager.Begin())
|
||||||
{
|
{
|
||||||
@ -600,6 +601,8 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
device = _imProtectDeviceRepository.GetAllIncluding(t => t.StatCodeNavigation, t => t.GateWay).FirstOrDefault(t=>t.Id == protectionDeviceInfo.ISMS_DeviceId);
|
device = _imProtectDeviceRepository.GetAllIncluding(t => t.StatCodeNavigation, t => t.GateWay).FirstOrDefault(t=>t.Id == protectionDeviceInfo.ISMS_DeviceId);
|
||||||
await work.CompleteAsync();
|
await work.CompleteAsync();
|
||||||
}
|
}
|
||||||
|
if (device!=null)
|
||||||
|
{
|
||||||
var deviceCommInfo = new ProtectionDeviceCommInfoOutput
|
var deviceCommInfo = new ProtectionDeviceCommInfoOutput
|
||||||
{
|
{
|
||||||
DeviceAddr = device.DeviceAddr,
|
DeviceAddr = device.DeviceAddr,
|
||||||
@ -616,6 +619,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
};
|
};
|
||||||
|
|
||||||
rst.ResultData = deviceCommInfo;
|
rst.ResultData = deviceCommInfo;
|
||||||
|
}
|
||||||
rst.Flag = true;
|
rst.Flag = true;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using YunDa.ISAS.Application.Core;
|
using YunDa.ISAS.Application.Core;
|
||||||
using YunDa.ISAS.DataTransferObject;
|
using YunDa.ISAS.DataTransferObject;
|
||||||
|
using YunDa.ISMS.BASE.Entities.Models;
|
||||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto;
|
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto;
|
||||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.SearchCondition;
|
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.SearchCondition;
|
||||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionSettingDto;
|
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionSettingDto;
|
||||||
@ -25,5 +26,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo
|
|||||||
/// <param name="cpuIndex"></param>
|
/// <param name="cpuIndex"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
RequestResult<List<ImDeviceDzOutput>> GetDzByDeviceAddr(int deviceAddr, int cpuIndex);
|
RequestResult<List<ImDeviceDzOutput>> GetDzByDeviceAddr(int deviceAddr, int cpuIndex);
|
||||||
|
Task<RequestResult<List<ImDeviceDzenumPu>>> GetDeviceSettingEnumPu();
|
||||||
|
Task<RequestResult<List<ImDztype>>> GetDeviceSettingType();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -174,12 +174,12 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
|||||||
{
|
{
|
||||||
var list = await _imDeviceDzRedis.HashSetGetAllAsync($"DZ_{entity.DeviceAddress.ToString("X2")}_System");
|
var list = await _imDeviceDzRedis.HashSetGetAllAsync($"DZ_{entity.DeviceAddress.ToString("X2")}_System");
|
||||||
|
|
||||||
rst.ResultData = list.OrderBy(t=>t.DzIndex).ToList();
|
rst.ResultData = list?.OrderBy(t=>t.DzIndex)?.ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var list = await _imDeviceDzRedis.HashSetGetAllAsync($"DZ_{entity.DeviceAddress.ToString("X2")}_User");
|
var list = await _imDeviceDzRedis.HashSetGetAllAsync($"DZ_{entity.DeviceAddress.ToString("X2")}_User");
|
||||||
rst.ResultData = list.OrderBy(t => t.DzIndex).ToList();
|
rst.ResultData = list?.OrderBy(t => t.DzIndex)?.ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
rst.Flag = true;
|
rst.Flag = true;
|
||||||
@ -422,5 +422,53 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
|||||||
Value = (new Random().Next(0, 10)).ToString() // 随机值
|
Value = (new Random().Next(0, 10)).ToString() // 随机值
|
||||||
}).ToList();
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取定值枚举数组
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[ShowApi]
|
||||||
|
[AbpAllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<RequestResult< List<ImDeviceDzenumPu>>> GetDeviceSettingEnumPu()
|
||||||
|
{
|
||||||
|
RequestResult<List<ImDeviceDzenumPu>> rst = new();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var repo =await _imDeviceDzenumPuitory.GetAllAsync();
|
||||||
|
rst.ResultData = repo.ToList();
|
||||||
|
rst.Flag = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
rst.Message = ex.Message;
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取定值类型
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[ShowApi]
|
||||||
|
[AbpAllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<RequestResult<List<ImDztype>>> GetDeviceSettingType()
|
||||||
|
{
|
||||||
|
RequestResult<List<ImDztype>> rst = new();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var repo = await _imDztypeRepository.GetAllAsync();
|
||||||
|
rst.ResultData = repo.ToList();
|
||||||
|
rst.Flag = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
rst.Message = ex.Message;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3785,6 +3785,18 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo.ProtectionSettingAppService.GetDeviceSettingEnumPu">
|
||||||
|
<summary>
|
||||||
|
获取定值枚举数组
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo.ProtectionSettingAppService.GetDeviceSettingType">
|
||||||
|
<summary>
|
||||||
|
获取定值类型
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:YunDa.ISAS.Application.GeneralInformation.ITransformerSubstationAppService.GetTransformerSubstationTreeNode(YunDa.ISAS.DataTransferObject.GeneralInformation.TransformerSubstationDto.TransformerSubstationSearchConditionInput)">
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ITransformerSubstationAppService.GetTransformerSubstationTreeNode(YunDa.ISAS.DataTransferObject.GeneralInformation.TransformerSubstationDto.TransformerSubstationSearchConditionInput)">
|
||||||
<summary>
|
<summary>
|
||||||
获取变电所结构树
|
获取变电所结构树
|
||||||
|
@ -45,5 +45,10 @@ namespace YunDa.SOMS.Entities.GeneralInformation
|
|||||||
/// 更换后数据
|
/// 更换后数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string ContentNewJson { get; set; }
|
public virtual string ContentNewJson { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否已经发送给主站
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool IsSend { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user