diff --git a/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java b/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java index 844a7e7..676c844 100644 --- a/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java +++ b/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java @@ -85,9 +85,11 @@ public class AutoCreateInst { taskserver.updateByCodeFromCache(acsTask); continue; } + List instructions = instructionService.queryAll("instruction_status < 2"); String maxInstnumber = acsConfigService.findConfigFromCache().get(AcsConfig.MAXINSTNUMBER); if (ObjectUtils.isNotEmpty(maxInstnumber)) { - if (i >= Integer.parseInt(maxInstnumber)) { + if (instructions.size() >= Integer.parseInt(maxInstnumber)) { + log.info("系统参数配置最大指令数为:" + maxInstnumber + "无法生成指令"); acsTask.setRemark("系统参数配置最大指令数为:" + maxInstnumber + "无法生成指令"); taskserver.updateByCodeFromCache(acsTask); continue;