From c0af93f17962161fd1d620cd576cad726d586646 Mon Sep 17 00:00:00 2001 From: loujf Date: Tue, 6 Dec 2022 14:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E4=BB=A4=E6=95=B0=E9=87=8F=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/modules/quartz/task/AutoCreateInst.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;