feat: 增加是否定时查全部拍照时间表开关

dev
huangfeng 2 months ago
parent 128068aa9e
commit 4c909ba154

@ -127,4 +127,6 @@ mqtt:
cmdtopic: /v1/devices/MSRDT-A/command
resptopic: /v1/devices/MSRDT-A/commandResponse
datatopic: /v1/devices/MSRDT-A/datas
photodir: /home/xymp/photos/
photodir: /home/xymp/photos/
camera-schedule: false

@ -14,6 +14,7 @@ import com.shxy.xymanager_service.service.CacheService;
import com.shxy.xymanager_service.service.NewCacheService;
import com.shxy.xymanager_service.service.TermSetService;
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;
@ -29,6 +30,9 @@ import java.util.Map;
@Slf4j
public class StoreCameraScheduleTask {
@Value("${camera-schedule:false}")
private boolean enable;
@Resource
NewCacheService newCacheService;
@Resource
@ -90,6 +94,9 @@ public class StoreCameraScheduleTask {
@Scheduled(cron = "0 1 3 * * ?")
private void search() {
if (!enable) {
return;
}
Map<Integer, Terminals> terminalMap = newCacheService.getTerminalMap();
Map<Integer, TermAndChannelDto> termAndChannelMap = cacheService.getTermAndChannelMap();
Iterator<Integer> it = terminalMap.keySet().iterator();

Loading…
Cancel
Save