定值接口
This commit is contained in:
parent
af3c58c0e9
commit
c2dac70075
@ -4,19 +4,13 @@ using Abp.Collections.Extensions;
|
|||||||
using Abp.Domain.Repositories;
|
using Abp.Domain.Repositories;
|
||||||
using Abp.Domain.Uow;
|
using Abp.Domain.Uow;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
|
||||||
using MongoDB.Driver.Linq;
|
using MongoDB.Driver.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NPOI.SS.Formula.Functions;
|
|
||||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Xml.Serialization;
|
|
||||||
using ToolLibrary.LogHelper;
|
using ToolLibrary.LogHelper;
|
||||||
using YunDa.ISAS.Application.Core;
|
using YunDa.ISAS.Application.Core;
|
||||||
using YunDa.ISAS.Application.Core.Session;
|
using YunDa.ISAS.Application.Core.Session;
|
||||||
@ -24,7 +18,6 @@ using YunDa.ISAS.Application.Core.SwaggerHelper;
|
|||||||
using YunDa.ISAS.DataTransferObject;
|
using YunDa.ISAS.DataTransferObject;
|
||||||
using YunDa.ISAS.DataTransferObject.CommonDto;
|
using YunDa.ISAS.DataTransferObject.CommonDto;
|
||||||
using YunDa.ISAS.DataTransferObject.DataMonitoring.TelemeteringConfigurationDto;
|
using YunDa.ISAS.DataTransferObject.DataMonitoring.TelemeteringConfigurationDto;
|
||||||
using YunDa.ISAS.DataTransferObject.GeneralInformation.EquipmentInfoDto.SearchCondition;
|
|
||||||
using YunDa.ISAS.Entities.DataMonitoring;
|
using YunDa.ISAS.Entities.DataMonitoring;
|
||||||
using YunDa.ISAS.Entities.GeneralInformation;
|
using YunDa.ISAS.Entities.GeneralInformation;
|
||||||
using YunDa.ISAS.Redis.Repositories;
|
using YunDa.ISAS.Redis.Repositories;
|
||||||
@ -35,7 +28,6 @@ using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.S
|
|||||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionSettingDto;
|
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionSettingDto;
|
||||||
using YunDa.SOMS.DataTransferObject.MainStationMaintenanceInfo.OperationReport;
|
using YunDa.SOMS.DataTransferObject.MainStationMaintenanceInfo.OperationReport;
|
||||||
using YunDa.SOMS.Entities.GeneralInformation;
|
using YunDa.SOMS.Entities.GeneralInformation;
|
||||||
using static Google.Protobuf.Reflection.ExtensionRangeOptions.Types;
|
|
||||||
|
|
||||||
namespace YunDa.ISAS.Application.GeneralInformation
|
namespace YunDa.ISAS.Application.GeneralInformation
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
|||||||
private readonly IRepository<ProtectionSettingType, Guid> _protectionSettingTypeRepository;
|
private readonly IRepository<ProtectionSettingType, Guid> _protectionSettingTypeRepository;
|
||||||
private readonly IRepository<ImDztype, int> _imDztypeRepository;
|
private readonly IRepository<ImDztype, int> _imDztypeRepository;
|
||||||
private readonly IRedisRepository<ImDeviceDzOutput, string> _imDeviceDzRedis;
|
private readonly IRedisRepository<ImDeviceDzOutput, string> _imDeviceDzRedis;
|
||||||
|
private readonly IRepository<ImDeviceDzenumPu, int> _imDeviceDzenumPuitory;
|
||||||
|
|
||||||
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
||||||
public ProtectionSettingAppService(ISessionAppService sessionAppService,
|
public ProtectionSettingAppService(ISessionAppService sessionAppService,
|
||||||
@ -50,6 +51,8 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
|||||||
IRepository<ProtectionSetting, Guid> protectionSettingRepository,
|
IRepository<ProtectionSetting, Guid> protectionSettingRepository,
|
||||||
IRepository<ProtectionSettingType, Guid> protectionSettingTypeRepository,
|
IRepository<ProtectionSettingType, Guid> protectionSettingTypeRepository,
|
||||||
IRedisRepository<ImDeviceDzOutput, string> imDeviceDzRedis,
|
IRedisRepository<ImDeviceDzOutput, string> imDeviceDzRedis,
|
||||||
|
IRepository<ImDeviceDzenumPu, int> imDeviceDzenumPuitory,
|
||||||
|
|
||||||
IUnitOfWorkManager unitOfWorkManager
|
IUnitOfWorkManager unitOfWorkManager
|
||||||
) : base(sessionAppService)
|
) : base(sessionAppService)
|
||||||
{
|
{
|
||||||
@ -60,6 +63,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
|||||||
_protectionSettingTypeRepository = protectionSettingTypeRepository;
|
_protectionSettingTypeRepository = protectionSettingTypeRepository;
|
||||||
_imDztypeRepository = imDztypeRepository;
|
_imDztypeRepository = imDztypeRepository;
|
||||||
_imDeviceDzRedis = imDeviceDzRedis;
|
_imDeviceDzRedis = imDeviceDzRedis;
|
||||||
|
_imDeviceDzenumPuitory = imDeviceDzenumPuitory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<RequestResult<ProtectionSettingOutput>> CreateOrUpdateAsync(EditProtectionSettingInput input)
|
public Task<RequestResult<ProtectionSettingOutput>> CreateOrUpdateAsync(EditProtectionSettingInput input)
|
||||||
@ -385,5 +389,54 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
|||||||
}
|
}
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取定值类型
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[ShowApi]
|
||||||
|
[AbpAllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<RequestResult<List<ImDztype>>> GetDeviceSettingType()
|
||||||
|
{
|
||||||
|
RequestResult<List<ImDztype>> rst = new RequestResult<List<ImDztype>>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var repo = await _imDztypeRepository.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<ImDeviceDzenumPu>>> GetDeviceSettingEnumPu()
|
||||||
|
{
|
||||||
|
RequestResult<List<ImDeviceDzenumPu>> rst = new RequestResult<List<ImDeviceDzenumPu>>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var repo = await _imDeviceDzenumPuitory.GetAllAsync();
|
||||||
|
rst.ResultData = repo.ToList();
|
||||||
|
rst.Flag = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
rst.Message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3777,6 +3777,18 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo.ProtectionSettingAppService.GetDeviceSettingType">
|
||||||
|
<summary>
|
||||||
|
获取定值类型
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo.ProtectionSettingAppService.GetDeviceSettingEnumPu">
|
||||||
|
<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>
|
||||||
获取变电所结构树
|
获取变电所结构树
|
||||||
|
@ -2107,15 +2107,15 @@ namespace YunDa.ISMS.BASE.Entities
|
|||||||
|
|
||||||
modelBuilder.Entity<ImDeviceDzenumPu>(entity =>
|
modelBuilder.Entity<ImDeviceDzenumPu>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasKey(e => new { e.PuctgyCode, e.EnumTypeId, e.EnumIndex })
|
entity.HasKey(e => new { e.Id, e.EnumTypeId, e.EnumIndex })
|
||||||
.HasName("PK_DeviceDZEnumPU");
|
.HasName("PK_DeviceDZEnumPU");
|
||||||
|
|
||||||
entity.ToTable("im_DeviceDZEnumPU");
|
entity.ToTable("im_DeviceDZEnumPU");
|
||||||
|
|
||||||
entity.HasIndex(e => new { e.PuctgyCode, e.EnumTypeId, e.EnumComment }, "UK_DeviceDZEnumPU")
|
entity.HasIndex(e => new { e.Id, e.EnumTypeId, e.EnumComment }, "UK_DeviceDZEnumPU")
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
|
entity.Property(e => e.Id).HasColumnName("PUCtgyCode");
|
||||||
|
|
||||||
entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
|
entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
|
||||||
|
|
||||||
@ -2128,7 +2128,7 @@ namespace YunDa.ISMS.BASE.Entities
|
|||||||
|
|
||||||
entity.HasOne(d => d.PuctgyCodeNavigation)
|
entity.HasOne(d => d.PuctgyCodeNavigation)
|
||||||
.WithMany(p => p.ImDeviceDzenumPus)
|
.WithMany(p => p.ImDeviceDzenumPus)
|
||||||
.HasForeignKey(d => d.PuctgyCode)
|
.HasForeignKey(d => d.Id)
|
||||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||||
.HasConstraintName("FK_DeviceDZEnumPU_PUCtgy");
|
.HasConstraintName("FK_DeviceDZEnumPU_PUCtgy");
|
||||||
});
|
});
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
using System;
|
using Abp.Domain.Entities;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace YunDa.ISMS.BASE.Entities.Models
|
namespace YunDa.ISMS.BASE.Entities.Models
|
||||||
{
|
{
|
||||||
public partial class ImDeviceDzenumPu
|
public partial class ImDeviceDzenumPu:Entity<int>
|
||||||
{
|
{
|
||||||
public int PuctgyCode { get; set; }
|
[Key]
|
||||||
|
[Column("PuctgyCode")]
|
||||||
|
public override int Id { get; set; }
|
||||||
public int EnumTypeId { get; set; }
|
public int EnumTypeId { get; set; }
|
||||||
public int EnumIndex { get; set; }
|
public int EnumIndex { get; set; }
|
||||||
public string? EnumComment { get; set; }
|
public string? EnumComment { get; set; }
|
||||||
|
|
||||||
public virtual ImPuCtgy PuctgyCodeNavigation { get; set; } = null!;
|
[JsonIgnore] public virtual ImPuCtgy PuctgyCodeNavigation { get; set; } = null!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace YunDa.ISMS.BASE.Entities.Models
|
namespace YunDa.ISMS.BASE.Entities.Models
|
||||||
{
|
{
|
||||||
@ -18,7 +19,7 @@ namespace YunDa.ISMS.BASE.Entities.Models
|
|||||||
public override int Id { get; set; }
|
public override int Id { get; set; }
|
||||||
public string Dztype { get; set; } = null!;
|
public string Dztype { get; set; } = null!;
|
||||||
|
|
||||||
public virtual ICollection<ImDeviceDzTmp> ImDeviceDzTmps { get; set; }
|
[JsonIgnore] public virtual ICollection<ImDeviceDzTmp> ImDeviceDzTmps { get; set; }
|
||||||
public virtual ICollection<ImDeviceDz> ImDeviceDzs { get; set; }
|
[JsonIgnore] public virtual ICollection<ImDeviceDz> ImDeviceDzs { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace YunDa.ISMS.BASE.Entities.Models
|
namespace YunDa.ISMS.BASE.Entities.Models
|
||||||
{
|
{
|
||||||
@ -49,14 +50,14 @@ namespace YunDa.ISMS.BASE.Entities.Models
|
|||||||
public virtual ImDevCtgy DevCtgyNavigation { get; set; } = null!;
|
public virtual ImDevCtgy DevCtgyNavigation { get; set; } = null!;
|
||||||
public virtual ImManufacturer ManufacturerNavigation { get; set; } = null!;
|
public virtual ImManufacturer ManufacturerNavigation { get; set; } = null!;
|
||||||
public virtual ImProtectDeviceTmp? ImProtectDeviceTmp { get; set; }
|
public virtual ImProtectDeviceTmp? ImProtectDeviceTmp { get; set; }
|
||||||
public virtual ICollection<ImAnalogData20102> ImAnalogData20102s { get; set; }
|
[JsonIgnore] public virtual ICollection<ImAnalogData20102> ImAnalogData20102s { get; set; }
|
||||||
public virtual ICollection<ImAsdu140FltActType> ImAsdu140FltActTypes { get; set; }
|
[JsonIgnore] public virtual ICollection<ImAsdu140FltActType> ImAsdu140FltActTypes { get; set; }
|
||||||
public virtual ICollection<ImBreakerNoEnum> ImBreakerNoEnums { get; set; }
|
[JsonIgnore] public virtual ICollection<ImBreakerNoEnum> ImBreakerNoEnums { get; set; }
|
||||||
public virtual ICollection<ImDeviceDzenumPu> ImDeviceDzenumPus { get; set; }
|
[JsonIgnore] public virtual ICollection<ImDeviceDzenumPu> ImDeviceDzenumPus { get; set; }
|
||||||
public virtual ICollection<ImEventType> ImEventTypes { get; set; }
|
[JsonIgnore] public virtual ICollection<ImEventType> ImEventTypes { get; set; }
|
||||||
public virtual ICollection<ImFaultActType20102> ImFaultActType20102s { get; set; }
|
[JsonIgnore] public virtual ICollection<ImFaultActType20102> ImFaultActType20102s { get; set; }
|
||||||
public virtual ICollection<ImProtectDevice> ImProtectDevices { get; set; }
|
[JsonIgnore] public virtual ICollection<ImProtectDevice> ImProtectDevices { get; set; }
|
||||||
public virtual ICollection<ImPuWaveChl> ImPuWaveChls { get; set; }
|
[JsonIgnore] public virtual ICollection<ImPuWaveChl> ImPuWaveChls { get; set; }
|
||||||
public virtual ICollection<ImPuctgyFltRptItem> ImPuctgyFltRptItems { get; set; }
|
[JsonIgnore] public virtual ICollection<ImPuctgyFltRptItem> ImPuctgyFltRptItems { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user