rev 缓存线有任务时不下发调度

This commit is contained in:
2023-04-18 12:00:00 +08:00
parent edcf960254
commit d4a63d1619
3 changed files with 16 additions and 14 deletions

View File

@@ -1327,7 +1327,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
if (putDevice != null) { if (putDevice != null) {
if (startDevice.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) { if (startDevice.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) startDevice.getDeviceDriver(); hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) startDevice.getDeviceDriver();
if (tasksByLinNum.size() == 1 && hailiangAutoCacheLineDeviceDriver.getTask() == 0) { if (hailiangAutoCacheLineDeviceDriver.getTask() != 0) {
throw new BadRequestException("缓存线已存在任务,稍后下发!");
} else if (tasksByLinNum.size() == 1 && hailiangAutoCacheLineDeviceDriver.getTask() == 0) {
//下发电气单出 //下发电气单出
to_task_type = "4"; to_task_type = "4";
} }
@@ -1340,11 +1342,12 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
} }
if (putDevice.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) { if (putDevice.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) putDevice.getDeviceDriver(); hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) putDevice.getDeviceDriver();
if (tasksByLinNum.size() == 1 && hailiangAutoCacheLineDeviceDriver.getTask() == 0) { if (hailiangAutoCacheLineDeviceDriver.getTask() != 0) {
throw new BadRequestException("缓存线已存在任务,稍后下发!");
} else if (tasksByLinNum.size() == 1 && hailiangAutoCacheLineDeviceDriver.getTask() == 0) {
//下发电气单入 //下发电气单入
to_task_type = "2"; to_task_type = "2";
} } else if (tasksByLinNum.size() == 2 && hailiangAutoCacheLineDeviceDriver.getTask() == 0) {
if (tasksByLinNum.size() == 2 && hailiangAutoCacheLineDeviceDriver.getTask() == 0) {
//下发电气双入 //下发电气双入
to_task_type = "3"; to_task_type = "3";
} }

View File

@@ -73,7 +73,6 @@ public class ParamServiceImpl implements ParamService {
return null; return null;
} }
final ParamDto obj = json.toJavaObject(ParamDto.class); final ParamDto obj = json.toJavaObject(ParamDto.class);
;
return obj; return obj;
} }