Merge branch 'master' of http://192.168.110.57:3000/guor/SOMS
This commit is contained in:
commit
7b8a1a1ed2
@ -66,7 +66,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
private readonly IRepository<ImDeviceDz, string> _imDeviceDzRepository;
|
private readonly IRepository<ImDeviceDz, string> _imDeviceDzRepository;
|
||||||
private readonly IRedisRepository<ImDeviceDzOutput, string> _imDeviceDzRedis;
|
private readonly IRedisRepository<ImDeviceDzOutput, string> _imDeviceDzRedis;
|
||||||
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
||||||
|
private readonly IRedisRepository<BCodeAndNTP, string> _bcodeAndNTP;
|
||||||
public ProtectionDeviceAppService(
|
public ProtectionDeviceAppService(
|
||||||
IRepository<ProtectionDeviceInfo, Guid> protectionDeviceInfoRepository,
|
IRepository<ProtectionDeviceInfo, Guid> protectionDeviceInfoRepository,
|
||||||
IUnitOfWorkManager unitOfWorkManager,
|
IUnitOfWorkManager unitOfWorkManager,
|
||||||
@ -88,6 +88,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
IRepository<TransformerSubstation, Guid> transformerSubstationRepository,
|
IRepository<TransformerSubstation, Guid> transformerSubstationRepository,
|
||||||
IRepository<ImDeviceDz, string> imDeviceDzRepository,
|
IRepository<ImDeviceDz, string> imDeviceDzRepository,
|
||||||
IRepository<ImEventType, int> imEventTypeRepository,
|
IRepository<ImEventType, int> imEventTypeRepository,
|
||||||
|
IRedisRepository<BCodeAndNTP, string> bcodeAndNTP,
|
||||||
ISessionAppService sessionAppService
|
ISessionAppService sessionAppService
|
||||||
) :
|
) :
|
||||||
base(sessionAppService)
|
base(sessionAppService)
|
||||||
@ -111,6 +112,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
_imEventTypeRepository = imEventTypeRepository;
|
_imEventTypeRepository = imEventTypeRepository;
|
||||||
_telemeteringConfigurationRepository = telemeteringConfigurationRepository;
|
_telemeteringConfigurationRepository = telemeteringConfigurationRepository;
|
||||||
_telesignalisationConfigurationRepository = telesignalisationConfigurationRepository;
|
_telesignalisationConfigurationRepository = telesignalisationConfigurationRepository;
|
||||||
|
_bcodeAndNTP = bcodeAndNTP;
|
||||||
}
|
}
|
||||||
public async Task<RequestResult<ProtectionDeviceInfoViewOutput>> CreateOrUpdateAsync(EditProtectionDeviceInfoInput input)
|
public async Task<RequestResult<ProtectionDeviceInfoViewOutput>> CreateOrUpdateAsync(EditProtectionDeviceInfoInput input)
|
||||||
{
|
{
|
||||||
@ -1070,6 +1072,30 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
}
|
}
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
[AbpAllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
[DisableAuditing]
|
||||||
|
public async Task<RequestResult<BCodeAndNTP>> GetDeviceBCondeAndNTP(Guid equipmentInfoId)
|
||||||
|
{
|
||||||
|
RequestResult<BCodeAndNTP> rst = new();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var device = _protectionDeviceInfoRepository.GetAll().FirstOrDefault(t => t.EquipmentInfoId == equipmentInfoId);
|
||||||
|
if (device!=null)
|
||||||
|
{
|
||||||
|
var entity =await _bcodeAndNTP.HashSetGetOneAsync(nameof(BCodeAndNTP), device.DeviceAddress.ToString());
|
||||||
|
rst.ResultData = entity;
|
||||||
|
rst.Flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
rst.Message = ex.Message;
|
||||||
|
|
||||||
|
Log4Helper.Error(this.GetType(), "线路管理服务", ex);
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 填充出厂编号
|
/// 填充出厂编号
|
||||||
|
Loading…
x
Reference in New Issue
Block a user