|
|
|
@ -34,7 +34,7 @@ public class IEDCollectService {
|
|
|
|
|
BizConfig _bizConfig;
|
|
|
|
|
|
|
|
|
|
String folder = "/record";
|
|
|
|
|
String sameTime;
|
|
|
|
|
String firstOneTime;
|
|
|
|
|
|
|
|
|
|
public IEDCollectService(IcdConfigTypeRepository configRepository, IcdConfigTypeAttRepository attRepository,
|
|
|
|
|
IcdConfigTypeInstRepository instRepository, RptparamindexRepository rptparamindexRepository,
|
|
|
|
@ -71,7 +71,7 @@ public class IEDCollectService {
|
|
|
|
|
try {
|
|
|
|
|
log.info("61850开始采集数据, ied=" + ied.getName() + ", ip=" + ied.getIp() + ", port=" + ied.getPort());
|
|
|
|
|
this.connect();
|
|
|
|
|
sameTime = null;
|
|
|
|
|
firstOneTime = null;
|
|
|
|
|
if (!CollectionUtils.isEmpty(rptList)) {
|
|
|
|
|
this.doCollectAndSave(configTypeList, rptList);
|
|
|
|
|
}
|
|
|
|
@ -136,14 +136,19 @@ public class IEDCollectService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String makeSameTime(String time) {
|
|
|
|
|
if (sameTime == null) {
|
|
|
|
|
sameTime = time;
|
|
|
|
|
if (firstOneTime == null) {
|
|
|
|
|
firstOneTime = time;
|
|
|
|
|
} else {
|
|
|
|
|
if (!sameTime.equals(time)) {
|
|
|
|
|
if (!firstOneTime.equals(time)) {
|
|
|
|
|
long sec = DateUtil.secondDiff(firstOneTime, time);
|
|
|
|
|
if (sec >= 0 && sec < 3) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return sameTime;
|
|
|
|
|
return firstOneTime;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Rptparamindex findRpt(List<Rptparamindex> rptList, String paramindex) {
|
|
|
|
|