zhoupeng před 2 roky
rodič
revize
5286e30d7f

+ 1 - 1
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/config/InitRunner.java

@@ -91,7 +91,6 @@ public class InitRunner {
                                 clsId.equals(OpcDaDriverEnum.YOKOGAWA.getValue()) ||
                                 clsId.equals(OpcDaDriverEnum.PAS300.getValue())
                         ) {
-                            SchedulingRunnable task = new SchedulingRunnable(OpcDaTask.class, "opcDaTask", new Object[]{});
                             //新增定时器任务
                             String cronId = "";
                             String cron = "0 0 0 ? * " + itemGroup.getReadWeek();
@@ -100,6 +99,7 @@ public class InitRunner {
                             } else {
                                 cronId = itemGroup.getCronId();
                             }
+                            SchedulingRunnable task = new SchedulingRunnable(OpcDaTask.class, "opcDaTask", new Object[]{itemGroup, dataSource, cronId});
                             cronTaskRegister.addCronTask(task, cronId, cron);
                             itemGroupDao.runItemGroupById(id, ConstantStr.START_UP, cronId);
                         } else {