Browse Source

rev:取消手持任务起点2和终点2校验

v1.1_20240705
gengby 11 months ago
parent
commit
2bd973d63d
  1. 8
      acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  2. 2
      acs/nladmin-system/src/main/resources/config/application-prod.yml

8
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)) { if (StrUtil.isEmpty(next_device_code)) {
throw new BadRequestException("终点设备为空,无法生成指令。"); throw new BadRequestException("终点设备为空,无法生成指令。");
} }
if (StrUtil.isEmpty(start_device_code2)) { if (StrUtil.isEmpty(start_device_code2) && !"3".equals(acsTask.getTask_type())) {
throw new BadRequestException("起点设备2为空,无法生成指令。"); 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空,无法生成指令。"); throw new BadRequestException("终点设备为2空,无法生成指令。");
} }
List<Instruction> instructions = instructionService.queryAll("instruction_status < 2"); List<Instruction> instructions = instructionService.queryAll("instruction_status < 2");
@ -840,10 +840,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
if (ObjectUtils.isEmpty(nextdevice)) { if (ObjectUtils.isEmpty(nextdevice)) {
throw new BadRequestException("终点设备编码 [" + next_device_code + "] 对应设备未找到,无法生成指令。"); 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 + "] 对应设备未找到,无法生成指令。"); 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 + "] 对应设备未找到,无法生成指令。"); throw new BadRequestException("终点设备2编码 [" + next_device_code + "] 对应设备未找到,无法生成指令。");
} }

2
acs/nladmin-system/src/main/resources/config/application-prod.yml

@ -6,7 +6,7 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy 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} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:123456}
# 初始连接数 # 初始连接数

Loading…
Cancel
Save