|
@@ -2,11 +2,9 @@ package com.tofly.scada.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.tofly.scada.common.FlowConstant;
|
|
|
import com.tofly.scada.entity.*;
|
|
|
import com.tofly.scada.entity.dto.ScadaMoreQuery;
|
|
|
import com.tofly.scada.entity.dto.ScadaQuery;
|
|
@@ -17,15 +15,11 @@ import com.tofly.scada.mapper.AllocationMapper;
|
|
|
import com.tofly.scada.mapper.ScadaReportMapper;
|
|
|
import com.tofly.scada.mapper.StatisticsScadaMapper;
|
|
|
import com.tofly.scada.service.ScadaMonitorService;
|
|
|
-import com.tofly.scada.service.ScadaService;
|
|
|
import com.tofly.scada.service.StatisticsScadaService;
|
|
|
-import lombok.SneakyThrows;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -524,26 +518,6 @@ public class StatisticsScadaServiceImpl extends ServiceImpl<StatisticsScadaMappe
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- * 更新异常点位实时数据
|
|
|
- *
|
|
|
- */
|
|
|
- @Async
|
|
|
- @Scheduled(cron = "0 10 0/1 * * ? ")
|
|
|
- @SneakyThrows
|
|
|
- public void timeAbnormalPointData() {
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.add(Calendar.HOUR, -1);
|
|
|
- calendar.set(Calendar.MINUTE, 59);
|
|
|
- calendar.set(Calendar.SECOND, 59);
|
|
|
- Date endTime = calendar.getTime();
|
|
|
- calendar.add(Calendar.HOUR, -1);
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
- Date startTime = calendar.getTime();
|
|
|
- syncAbnormalPointData(DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss"), DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss"));
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
* 更新异常点位实时数据
|
|
|
*
|