更新
This commit is contained in:
@@ -631,6 +631,21 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
if (byNextDeviceCode.size() >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String code = list.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(code);
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||
if (standardCoveyorControlDeviceDriver.getMove() != 0) count += 1;
|
||||
}
|
||||
}
|
||||
//如果当前关联的设备中都有货的话,就返回
|
||||
if (count != 0 && count >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
instructionService.create(instdto);
|
||||
|
||||
Instruction instdto2 = new Instruction();
|
||||
@@ -680,6 +695,21 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
if (byNextDeviceCode.size() >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String code = list.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(code);
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||
if (standardCoveyorControlDeviceDriver.getMove() != 0) count += 1;
|
||||
}
|
||||
}
|
||||
//如果当前关联的设备中都有货的话,就返回
|
||||
if (count != 0 && count >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
instructionService.create(instdto);
|
||||
|
||||
//创建指令后修改任务状态
|
||||
@@ -719,6 +749,21 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
if (byNextDeviceCode.size() >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String code = list.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(code);
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||
if (standardCoveyorControlDeviceDriver.getMove() != 0) count += 1;
|
||||
}
|
||||
}
|
||||
//如果当前关联的设备中都有货的话,就返回
|
||||
if (count != 0 && count >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
instructionService.create(instdto);
|
||||
|
||||
//创建指令后修改任务状态
|
||||
@@ -957,6 +1002,21 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
return true;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String code = list.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(code);
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||
if (standardCoveyorControlDeviceDriver.getMove() != 0) count += 1;
|
||||
}
|
||||
}
|
||||
//如果当前关联的设备中都有货的话,就返回
|
||||
if (count != 0 && count >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
instructionService.create(instdto);
|
||||
|
||||
Instruction instdto2 = new Instruction();
|
||||
@@ -1006,6 +1066,21 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
if (byNextDeviceCode.size() >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String code = list.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(code);
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||
if (standardCoveyorControlDeviceDriver.getMove() != 0) count += 1;
|
||||
}
|
||||
}
|
||||
//如果当前关联的设备中都有货的话,就返回
|
||||
if (count != 0 && count >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
instructionService.create(instdto);
|
||||
|
||||
//创建指令后修改任务状态
|
||||
@@ -1046,6 +1121,21 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
if (byNextDeviceCode.size() >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String code = list.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(code);
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||
if (standardCoveyorControlDeviceDriver.getMove() != 0) count += 1;
|
||||
}
|
||||
}
|
||||
//如果当前关联的设备中都有货的话,就返回
|
||||
if (count != 0 && count >= list.size()) {
|
||||
return true;
|
||||
}
|
||||
instructionService.create(instdto);
|
||||
|
||||
//创建指令后修改任务状态
|
||||
|
||||
Reference in New Issue
Block a user