Merge branch 'master' of http://192.168.110.57:3000/guor/SOMS
This commit is contained in:
commit
35a4749766
@ -102,6 +102,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
_manufacturerInfoRepository = manufacturerInfoRepository;
|
_manufacturerInfoRepository = manufacturerInfoRepository;
|
||||||
_transformerSubstationRepository = transformerSubstationRepository;
|
_transformerSubstationRepository = transformerSubstationRepository;
|
||||||
_imDeviceDzRepository = imDeviceDzRepository;
|
_imDeviceDzRepository = imDeviceDzRepository;
|
||||||
|
_imEventTypeRepository = imEventTypeRepository;
|
||||||
}
|
}
|
||||||
public async Task<RequestResult<ProtectionDeviceInfoViewOutput>> CreateOrUpdateAsync(EditProtectionDeviceInfoInput input)
|
public async Task<RequestResult<ProtectionDeviceInfoViewOutput>> CreateOrUpdateAsync(EditProtectionDeviceInfoInput input)
|
||||||
{
|
{
|
||||||
@ -920,8 +921,76 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
}
|
}
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取装置状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="equipmentInfoId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[ShowApi]
|
||||||
|
[AbpAllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
[DisableAuditing]
|
||||||
|
[UnitOfWork(isTransactional: false)]
|
||||||
|
|
||||||
|
public async Task<RequestResult<DeviceStatus>> GetDeviceStatusAsync(Guid equipmentInfoId)
|
||||||
|
{
|
||||||
|
RequestResult<DeviceStatus> rst = new RequestResult<DeviceStatus>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ProtectionDeviceInfo protectionDeviceInfo = default;
|
||||||
|
using (var unitOfWork = _unitOfWorkManager.Begin())
|
||||||
|
{
|
||||||
|
protectionDeviceInfo = _protectionDeviceInfoRepository.GetAllIncluding(t=>t.EquipmentInfo).FirstOrDefault(t=>t.EquipmentInfoId == equipmentInfoId);
|
||||||
|
await unitOfWork.CompleteAsync();
|
||||||
|
}
|
||||||
|
if (protectionDeviceInfo != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (var unitOfWork = _unitOfWorkManager.Begin())
|
||||||
|
{
|
||||||
|
var device = _imProtectDeviceRepository.GetAllIncluding(t=>t.GateWay).FirstOrDefault(t => t.Id == protectionDeviceInfo.ISMS_DeviceId);
|
||||||
|
if (device != null)
|
||||||
|
{
|
||||||
|
DeviceStatus deviceStatus = new DeviceStatus()
|
||||||
|
{
|
||||||
|
ConnectionStatus104=0,
|
||||||
|
EquipmentInfoId = equipmentInfoId,
|
||||||
|
EquipmentInfoName = protectionDeviceInfo.EquipmentInfo.Name,
|
||||||
|
FreeMemory = "0KB",
|
||||||
|
UsedMemory ="0KB",
|
||||||
|
LcdOperationPassword ="",
|
||||||
|
ProtectionDeviceId = protectionDeviceInfo.Id,
|
||||||
|
TotalDisk = "0MB",
|
||||||
|
UsedDisk ="0MB",
|
||||||
|
NetworkInterfaces = new List<NetworkInterfaceStatus>
|
||||||
|
{
|
||||||
|
new NetworkInterfaceStatus
|
||||||
|
{
|
||||||
|
IpAddress =device.GateWay.GatewayIp1,
|
||||||
|
InterfaceName ="eth0",
|
||||||
|
},
|
||||||
|
new NetworkInterfaceStatus
|
||||||
|
{
|
||||||
|
IpAddress =device.GateWay.GatewayIp2,
|
||||||
|
InterfaceName ="eth1",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
rst.ResultData = deviceStatus;
|
||||||
|
rst.Flag = true;
|
||||||
|
}
|
||||||
|
await unitOfWork.CompleteAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
rst.Message = ex.Message;
|
||||||
|
Log4Helper.Error(this.GetType(), "线路管理服务", ex);
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 填充出厂编号
|
/// 填充出厂编号
|
||||||
@ -960,7 +1029,6 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
}
|
}
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 填充出厂编号
|
/// 填充出厂编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -132,11 +132,11 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo
|
|||||||
entity.DeviceAddress = 1;
|
entity.DeviceAddress = 1;
|
||||||
entity.InfoAddress = 0;
|
entity.InfoAddress = 0;
|
||||||
entity.InfoCPUSector = 0;
|
entity.InfoCPUSector = 0;
|
||||||
entity.InfoDeviceAddress = dispatchaddr;
|
entity.InfoDeviceAddress = 1;
|
||||||
entity.IsVirtualDevice = true;
|
entity.IsVirtualDevice = true;
|
||||||
entity.IsSelfCheckingValue = false;
|
entity.IsSelfCheckingValue = false;
|
||||||
entity.Name = $"{secondaryCircuitName}_判定遥测";
|
entity.Name = $"{secondaryCircuitName}_判定遥测";
|
||||||
entity.SeqNo = 100000;
|
entity.SeqNo = dispatchaddr;
|
||||||
entity.IsActive = true;
|
entity.IsActive = true;
|
||||||
entity.IsSave = false;
|
entity.IsSave = false;
|
||||||
entity.IsSendDispatcher = false;
|
entity.IsSendDispatcher = false;
|
||||||
@ -168,7 +168,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo
|
|||||||
InfoDeviceAddress = 0,
|
InfoDeviceAddress = 0,
|
||||||
IsVirtualDevice = true,
|
IsVirtualDevice = true,
|
||||||
IsSelfCheckingValue = false,
|
IsSelfCheckingValue = false,
|
||||||
SeqNo = 100000,
|
SeqNo = dispatchaddr,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsSave = false,
|
IsSave = false,
|
||||||
IsSendDispatcher = true,
|
IsSendDispatcher = true,
|
||||||
|
@ -3570,6 +3570,21 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.GetDeviceEventType(System.Int32,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
获取装置时间类型
|
||||||
|
</summary>
|
||||||
|
<param name="deviceAddr"></param>
|
||||||
|
<param name="eventCode"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.GetDeviceStatusAsync(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取装置状态
|
||||||
|
</summary>
|
||||||
|
<param name="equipmentInfoId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.UpdateProtetionInfoForTest">
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.UpdateProtetionInfoForTest">
|
||||||
<summary>
|
<summary>
|
||||||
填充出厂编号
|
填充出厂编号
|
||||||
|
Loading…
x
Reference in New Issue
Block a user