Merge branch 'master' of http://192.168.110.57:3000/guor/SOMS
This commit is contained in:
commit
4ff7963a34
@ -31,6 +31,7 @@ using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.HistoryData;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.SearchCondition;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionSettingDto;
|
||||
using YunDa.SOMS.DataTransferObject.MainStationMaintenanceInfo.OperationReport;
|
||||
using YunDa.SOMS.Entities.GeneralInformation;
|
||||
using static Google.Protobuf.Reflection.ExtensionRangeOptions.Types;
|
||||
|
||||
@ -54,6 +55,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
private readonly IRepository<ImProtectDevice,string> _imProtectDeviceRepository;
|
||||
private readonly IRepository<ImGateWay, string> _imGateWayRepository;
|
||||
private readonly IRepository<ImPuCtgy, string> _imPuCtgyRepository;
|
||||
private readonly IRepository<ImEventType, int> _imEventTypeRepository;
|
||||
|
||||
private readonly IRepository<ProtectionDeviceGateway, Guid> _protectionDeviceGatewayRepository;
|
||||
private readonly IRepository<ProtectionDeviceType, Guid> _protectionDeviceTypeyRepository;
|
||||
@ -79,6 +81,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
IRepository<ManufacturerInfo, Guid> manufacturerInfoRepository,
|
||||
IRepository<TransformerSubstation, Guid> transformerSubstationRepository,
|
||||
IRepository<ImDeviceDz, string> imDeviceDzRepository,
|
||||
IRepository<ImEventType, int> imEventTypeRepository,
|
||||
ISessionAppService sessionAppService
|
||||
) :
|
||||
base(sessionAppService)
|
||||
@ -878,7 +881,45 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
|
||||
return rst;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取装置时间类型
|
||||
/// </summary>
|
||||
/// <param name="deviceAddr"></param>
|
||||
/// <param name="eventCode"></param>
|
||||
/// <returns></returns>
|
||||
[ShowApi]
|
||||
[AbpAllowAnonymous]
|
||||
[HttpGet]
|
||||
[DisableAuditing]
|
||||
public RequestResult<AbnormalComponent> GetDeviceEventType(int deviceAddr,int eventCode)
|
||||
{
|
||||
RequestResult <AbnormalComponent> rst= new RequestResult<AbnormalComponent>();
|
||||
try
|
||||
{
|
||||
var device = _imProtectDeviceRepository.GetAll().FirstOrDefault(t => t.DeviceAddr == deviceAddr);
|
||||
if (device!=null)
|
||||
{
|
||||
var imEvent = _imEventTypeRepository.GetAll().FirstOrDefault(t=>t.Id == eventCode&&t.PuctgyCode == device.PuctgyCode);
|
||||
if (imEvent!=null)
|
||||
{
|
||||
AbnormalComponent abnormalComponent = new AbnormalComponent()
|
||||
{
|
||||
ComponentName = "",
|
||||
AbnormalReason = imEvent.EvtName,
|
||||
HandlingMeasures =""
|
||||
};
|
||||
rst.ResultData = abnormalComponent;
|
||||
rst.Flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
rst.Message = ex.Message;
|
||||
Log4Helper.Error(this.GetType(), "线路管理服务", ex);
|
||||
}
|
||||
return rst;
|
||||
}
|
||||
|
||||
|
||||
#if DEBUG
|
||||
|
@ -2724,7 +2724,7 @@ namespace YunDa.ISMS.BASE.Entities
|
||||
|
||||
modelBuilder.Entity<ImEventType>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.EvtCode, e.PuctgyCode })
|
||||
entity.HasKey(e => new { e.Id, e.PuctgyCode })
|
||||
.HasName("PK_EventType");
|
||||
|
||||
entity.ToTable("im_EventType");
|
||||
|
@ -1,11 +1,16 @@
|
||||
using System;
|
||||
using Abp.Domain.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace YunDa.ISMS.BASE.Entities.Models
|
||||
{
|
||||
public partial class ImEventType
|
||||
public partial class ImEventType : Entity<int>
|
||||
{
|
||||
public int EvtCode { get; set; }
|
||||
[Key]
|
||||
[Column("EvtCode")]
|
||||
public override int Id { get; set; }
|
||||
public int PuctgyCode { get; set; }
|
||||
public string EvtName { get; set; } = null!;
|
||||
public string AlertLevel { get; set; } = null!;
|
||||
|
Loading…
x
Reference in New Issue
Block a user