Browse Source

指令数量限制

master
loujf 2 years ago
parent
commit
c0af93f179
  1. 4
      hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

4
hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

@ -85,9 +85,11 @@ public class AutoCreateInst {
taskserver.updateByCodeFromCache(acsTask); taskserver.updateByCodeFromCache(acsTask);
continue; continue;
} }
List<Instruction> instructions = instructionService.queryAll("instruction_status < 2");
String maxInstnumber = acsConfigService.findConfigFromCache().get(AcsConfig.MAXINSTNUMBER); String maxInstnumber = acsConfigService.findConfigFromCache().get(AcsConfig.MAXINSTNUMBER);
if (ObjectUtils.isNotEmpty(maxInstnumber)) { if (ObjectUtils.isNotEmpty(maxInstnumber)) {
if (i >= Integer.parseInt(maxInstnumber)) { if (instructions.size() >= Integer.parseInt(maxInstnumber)) {
log.info("系统参数配置最大指令数为:" + maxInstnumber + "无法生成指令");
acsTask.setRemark("系统参数配置最大指令数为:" + maxInstnumber + "无法生成指令"); acsTask.setRemark("系统参数配置最大指令数为:" + maxInstnumber + "无法生成指令");
taskserver.updateByCodeFromCache(acsTask); taskserver.updateByCodeFromCache(acsTask);
continue; continue;

Loading…
Cancel
Save