Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2025-10-11 10:55:31 +08:00
3 changed files with 8 additions and 1 deletions

View File

@ -298,6 +298,8 @@ dxf2GeoJson:
ys7:
app-key: 3acf9f1a43dc4209841e0893003db0a2
app-secret: 09e29c70ae1161fbc3ce2030fc09ba2e
job:
capture-enabled: false # 控制是否启用萤石抓拍任务
#ys7:
# app-key: 081b0d6d5f7f4de8bc5c7fa350fb26ec
# app-secret: caa37b9f60ef02deb57e563bc190e6db

View File

@ -301,6 +301,8 @@ dxf2GeoJson:
ys7:
app-key: 3acf9f1a43dc4209841e0893003db0a2
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
job:
capture-enabled: true # 控制是否启用萤石抓拍任务
# 斯巴达算法
sparta:
url: http://119.3.204.120:8040

View File

@ -10,6 +10,7 @@ import org.dromara.other.domain.enums.OthDeviceStatusEnum;
import org.dromara.other.service.IOthDevicePresetService;
import org.dromara.other.service.IOthYs7DeviceImgService;
import org.dromara.other.service.IOthYs7DeviceService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@ -27,6 +28,7 @@ import java.util.stream.Collectors;
*/
@Slf4j
@Component
@ConditionalOnProperty(prefix = "ys7.job", name = "capture-enabled", havingValue = "true")
public class IncSyncYs7DeviceCapturePicData {
@Resource
@ -44,8 +46,9 @@ public class IncSyncYs7DeviceCapturePicData {
private final ExecutorService executorService = Executors.newFixedThreadPool(5);
// 每 15 分钟执行一次
@Scheduled(cron = "0 */15 7-19 * * ?")
@Scheduled(cron = "0 */10 7-19 * * ?")
public void run() {
log.info("执行萤石设备抓拍图片");
// 查询所有在线的摄像头设备,仅获取必要字段
List<OthYs7Device> deviceList = ys7DeviceService.lambdaQuery()
.select(OthYs7Device::getId, OthYs7Device::getDeviceSerial, OthYs7Device::getDeviceName)