|
|
|
@ -3,6 +3,7 @@ package com.xydl.cac.task;
|
|
|
|
|
import com.xydl.cac.entity.*;
|
|
|
|
|
import com.xydl.cac.iec.IecClient;
|
|
|
|
|
import com.xydl.cac.repository.*;
|
|
|
|
|
import com.xydl.cac.service.DataService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -27,6 +28,8 @@ public class Client61850Task {
|
|
|
|
|
IcdConfigTypeInstRepository instRepository;
|
|
|
|
|
@Resource
|
|
|
|
|
RptparamindexRepository rptparamindexRepository;
|
|
|
|
|
@Resource
|
|
|
|
|
DataService dataService;
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 30 * * * ?")
|
|
|
|
|
public void collectAll() {
|
|
|
|
@ -90,12 +93,10 @@ public class Client61850Task {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getOneValue(String paramindexNew, String paramindexT, String fc, Rptparamindex rpt, IecClient iecClient) throws Exception {
|
|
|
|
|
|
|
|
|
|
String value = iecClient.getValue(paramindexNew, fc);
|
|
|
|
|
log.info(paramindexNew + "=" + value);
|
|
|
|
|
|
|
|
|
|
String time = iecClient.getValue(paramindexT, fc);
|
|
|
|
|
log.info(paramindexT + "=" + time);
|
|
|
|
|
time = time.replace("T", " ").replace("Z", "").replace("z", "");
|
|
|
|
|
dataService.insertData(rpt.getTablename(), rpt.getEqmid(), time, rpt.getColname(), value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|