装置状态
查询装置自检代码
This commit is contained in:
parent
c7d85a12d1
commit
7a145b9e47
@ -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)
|
||||||
{
|
{
|
||||||
@ -904,7 +905,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
{
|
{
|
||||||
AbnormalComponent abnormalComponent = new AbnormalComponent()
|
AbnormalComponent abnormalComponent = new AbnormalComponent()
|
||||||
{
|
{
|
||||||
ComponentName = "",
|
ComponentName = device.DeviceName,
|
||||||
AbnormalReason = imEvent.EvtName,
|
AbnormalReason = imEvent.EvtName,
|
||||||
HandlingMeasures =""
|
HandlingMeasures =""
|
||||||
};
|
};
|
||||||
@ -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>
|
||||||
/// 填充出厂编号
|
/// 填充出厂编号
|
||||||
|
@ -3578,6 +3578,13 @@
|
|||||||
<param name="eventCode"></param>
|
<param name="eventCode"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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