|
|
|
@ -3,7 +3,9 @@ package com.xydl.cac.service.impl;
|
|
|
|
|
import com.xydl.cac.entity.*;
|
|
|
|
|
import com.xydl.cac.entity.constants.Constants;
|
|
|
|
|
import com.xydl.cac.exception.BusinessException;
|
|
|
|
|
import com.xydl.cac.iec.IecClient;
|
|
|
|
|
import com.xydl.cac.model.IcdAttUpdateModel;
|
|
|
|
|
import com.xydl.cac.model.StaticVariable;
|
|
|
|
|
import com.xydl.cac.repository.*;
|
|
|
|
|
import com.xydl.cac.service.DataService;
|
|
|
|
|
import com.xydl.cac.service.IcdFileConfigService;
|
|
|
|
@ -108,6 +110,13 @@ public class IcdFileConfigServiceImpl implements IcdFileConfigService {
|
|
|
|
|
List<IcdIed> iedList = iedRepository.findByIcdFileId(icdFile.getId());
|
|
|
|
|
for (IcdIed ied : iedList) {
|
|
|
|
|
if (StringUtils.isNotBlank(ied.getIp())) {
|
|
|
|
|
ied.setConnected(false);
|
|
|
|
|
ied.setRetry(0);
|
|
|
|
|
IecClient iecClient = StaticVariable.realTimeClientMap.get(ied.getId());
|
|
|
|
|
if (iecClient != null) {
|
|
|
|
|
ied.setRetry(iecClient.retry);
|
|
|
|
|
ied.setConnected(iecClient.connected);
|
|
|
|
|
}
|
|
|
|
|
result.add(ied);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|