Lius
2025-08-27 fa1f4cdd548662fc2619c4675588b9797e0dd9fa
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/quartz/job/SampleParamJob.java
@@ -82,8 +82,12 @@
                AtomicReference<String> end = new AtomicReference<>("");
                AtomicReference<Date> endDate = new AtomicReference<>(null); // 采集时间
                serverDeployList.forEach(s -> {
                    if (s.getId().equals(in.getServerDeployId()) && s.getCollectTime() != null) {
                        start.set(sdf.format(s.getCollectTime()));
                    if (s.getId().equals(in.getServerDeployId())) {
                        if (s.getCollectTime() != null) {
                            start.set(sdf.format(s.getCollectTime()));
                        } else {
                            start.set(sdf.format(new Date()));
                        }
                        // 获取当前时间
                        LocalDateTime now = LocalDateTime.now();
                        // 减去一分钟
@@ -98,7 +102,7 @@
                        end.set(formattedTime);
                    }
                });
                if (start.get().equals("")){
                if (start.get().equals("")) {
                    return;
                }
                LocalDateTime startTime = LocalDateTime.parse(start.get(), inputFormatter);
@@ -158,7 +162,13 @@
                        // 处理设备状态
                        int lastIndex = table.lastIndexOf('.');
                        String code = table.substring(lastIndex + 1);
                        EquipmentLog equipmentLog = equipmentLogService.selectEquipmentOporation(code);
                        EquipmentLog equipmentLog = null;
                        if (databaseType.equals("SqlServer")) {
                            equipmentLog = equipmentLogService.selectEquipmentOporationSqlServer(code);
                        } else if (databaseType.equals("MySql")) {
                            equipmentLog  = equipmentLogService.selectEquipmentOporationMySql(code);
                        }
                        // 设备状态
                        Integer equipmentState = null;
                        for (Map.Entry<String, List<Influxdb>> entry : timeListMap.entrySet()) {