|
|
|
@ -4,6 +4,7 @@ import com.xydl.cac.entity.*;
|
|
|
|
|
import com.xydl.cac.repository.*;
|
|
|
|
|
import com.xydl.cac.service.ModevTypeService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
@ -17,6 +18,8 @@ import java.util.List;
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class Client61850Task {
|
|
|
|
|
|
|
|
|
|
@Value("${cac.iec.enable:true}")
|
|
|
|
|
public boolean enable;
|
|
|
|
|
@Resource
|
|
|
|
|
AsyncTask asyncTask;
|
|
|
|
|
@Resource
|
|
|
|
@ -32,6 +35,9 @@ public class Client61850Task {
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 * * * * ?")
|
|
|
|
|
public void collectAll() {
|
|
|
|
|
if (!enable) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
|
int h = cal.get(Calendar.HOUR_OF_DAY);
|
|
|
|
|
int m = cal.get(Calendar.MINUTE);
|
|
|
|
|