parent
db2ca61f83
commit
d34a368310
|
|
@ -19,6 +19,7 @@ import org.springframework.context.annotation.Profile;
|
|||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -28,6 +29,9 @@ import java.time.LocalDateTime;
|
|||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.RejectedExecutionHandler;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
|
@ -51,8 +55,7 @@ public class AlarmTask {
|
|||
@Autowired
|
||||
private StRiverRRealService stRiverRRealService;
|
||||
|
||||
// @Async
|
||||
@Scheduled(fixedRate = 10, timeUnit = TimeUnit.SECONDS)
|
||||
//@Scheduled(fixedRate = 10, timeUnit = TimeUnit.SECONDS)
|
||||
public void updateAlarmSet(){
|
||||
//查询告警设置中所有的配置的站点
|
||||
List<AlarmSet> alarmSets = alarmSetMapper.selectList(null);
|
||||
|
|
@ -63,7 +66,7 @@ public class AlarmTask {
|
|||
}
|
||||
}
|
||||
|
||||
// @Async
|
||||
//@Async
|
||||
//@Scheduled(fixedRate = 30, timeUnit = TimeUnit.SECONDS)
|
||||
public void updateWaterAlarm(){
|
||||
List<AttResBaseVo> attResBaseVos = attResBaseMapper.queryList();
|
||||
|
|
|
|||
|
|
@ -19,9 +19,12 @@ import java.time.LocalDateTime;
|
|||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 供水整编定时任务
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
//@EnableScheduling
|
||||
|
|
@ -59,6 +62,7 @@ public class WaterRTask {
|
|||
calendar.add(Calendar.HOUR_OF_DAY, 1); // 加一个小时
|
||||
Date newDatePlusOneHour = calendar.getTime();
|
||||
// 站点配置
|
||||
//TODO 站点编号待定。
|
||||
String ecoStcd = "1114";
|
||||
String stcd1 = "1112";
|
||||
String stcd2 = "1113";
|
||||
|
|
|
|||
Loading…
Reference in New Issue