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} # 初始连接数