#update
This commit is contained in:
@@ -17,6 +17,7 @@ import com.maibu.core.business.DeviceStatusRecordDTO;
|
||||
import com.maibu.core.business.dto.VehicleMessageRecordDTO;
|
||||
import com.maibu.core.redis.RedisCache;
|
||||
import com.maibu.mapper.VehicleMessageMapper;
|
||||
import com.maibu.memory.GlobalMemory;
|
||||
import com.maibu.memory.SiteMemory;
|
||||
|
||||
@Component
|
||||
@@ -57,16 +58,21 @@ public class ScheduledTask {
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
public void refreshDevicePlanTask() {
|
||||
System.out.println("0点定时刷新状态");
|
||||
Map<String, List<DevicePlan>> map = SiteMemory.devicePlanMap;
|
||||
if (!CollectionUtils.isEmpty(map.keySet())) {
|
||||
map.values().forEach(x -> {
|
||||
if (!CollectionUtils.isEmpty(x)) {
|
||||
x.forEach(y -> {
|
||||
y.setDayTriggerFlag(false);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
List<SiteMemory> siteMemories = GlobalMemory.getAllSiteMemory();
|
||||
if (CollectionUtils.isEmpty(siteMemories))
|
||||
return;
|
||||
siteMemories.forEach(z -> {
|
||||
Map<String, List<DevicePlan>> map = z.devicePlanMap;
|
||||
if (!CollectionUtils.isEmpty(map.keySet())) {
|
||||
map.values().forEach(x -> {
|
||||
if (!CollectionUtils.isEmpty(x)) {
|
||||
x.forEach(y -> {
|
||||
y.setDayTriggerFlag(false);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
System.out.println("0点定时刷新状态执行完成");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user