From 2bd973d63d3cec8d0024c7e759b439bb425bf5db Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Mon, 8 Jan 2024 10:31:29 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E5=8F=96=E6=B6=88=E6=89=8B=E6=8C=81?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=B5=B7=E7=82=B92=E5=92=8C=E7=BB=88?= =?UTF-8?q?=E7=82=B92=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nl/acs/task/service/impl/TaskServiceImpl.java | 8 ++++---- .../src/main/resources/config/application-prod.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 668ef3b..51bd979 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -774,10 +774,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (StrUtil.isEmpty(next_device_code)) { throw new BadRequestException("终点设备为空,无法生成指令。"); } - if (StrUtil.isEmpty(start_device_code2)) { + if (StrUtil.isEmpty(start_device_code2) && !"3".equals(acsTask.getTask_type())) { throw new BadRequestException("起点设备2为空,无法生成指令。"); } - if (StrUtil.isEmpty(next_device_code2)) { + if (StrUtil.isEmpty(next_device_code2) && !"3".equals(acsTask.getTask_type())) { throw new BadRequestException("终点设备为2空,无法生成指令。"); } List instructions = instructionService.queryAll("instruction_status < 2"); @@ -840,10 +840,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (ObjectUtils.isEmpty(nextdevice)) { throw new BadRequestException("终点设备编码 [" + next_device_code + "] 对应设备未找到,无法生成指令。"); } - if (ObjectUtils.isEmpty(startdevice2)) { + if (ObjectUtils.isEmpty(startdevice2) && !"3".equals(acsTask.getTask_type())) { throw new BadRequestException("起点设备2编码 [" + start_device_code + "] 对应设备未找到,无法生成指令。"); } - if (ObjectUtils.isEmpty(nextdevice2)) { + if (ObjectUtils.isEmpty(nextdevice2) && !"3".equals(acsTask.getTask_type())) { throw new BadRequestException("终点设备2编码 [" + next_device_code + "] 对应设备未找到,无法生成指令。"); } diff --git a/acs/nladmin-system/src/main/resources/config/application-prod.yml b/acs/nladmin-system/src/main/resources/config/application-prod.yml index e198ed5..d6654c8 100644 --- a/acs/nladmin-system/src/main/resources/config/application-prod.yml +++ b/acs/nladmin-system/src/main/resources/config/application-prod.yml @@ -6,7 +6,7 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:188.188.69.101}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true + url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数