洁美更新
This commit is contained in:
@@ -236,10 +236,10 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
// instruction_apply();
|
||||
// }
|
||||
//申请任务
|
||||
if (hasGoods > 0 && error == 0 && !StrUtil.isEmpty(container) && height > 0 && !requireSucess) {
|
||||
if (hasGoods > 0 && error == 0 && !StrUtil.isEmpty(container) && !requireSucess) {
|
||||
instruction_require(container);
|
||||
}
|
||||
if (hasGoods > 0 && error == 0 && !StrUtil.isEmpty(container) && height > 0 && !applySucess) {
|
||||
if (hasGoods > 0 && error == 0 && !StrUtil.isEmpty(container) && !applySucess) {
|
||||
instruction_apply(container);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -253,7 +253,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
}
|
||||
}
|
||||
//查询agv指令,类型为3(输送入库)的数量
|
||||
if (instructionService.queryAgvInstByThree().size() >= 3) {
|
||||
if (instructionService.queryAgvInstByThree().size() >= 2) {
|
||||
createLock = true;
|
||||
}
|
||||
//查询输送指令数量
|
||||
@@ -262,13 +262,13 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
}
|
||||
|
||||
//如果输送线无指令,则输送线解锁(输送线锁定状态时,1005与1008生成指令比例为1:1,反之则为1:3)
|
||||
if (instructionService.queryConveyorInstByThree().size() == 0) {
|
||||
conveyLock = false;
|
||||
}
|
||||
//如果输送线指令数量大于4,则输送线锁定
|
||||
if (instructionService.queryConveyorInstByThree().size() >= 4) {
|
||||
conveyLock = true;
|
||||
}
|
||||
// if (instructionService.queryConveyorInstByThree().size() == 0) {
|
||||
// conveyLock = false;
|
||||
// }
|
||||
// //如果输送线指令数量大于4,则输送线锁定
|
||||
// if (instructionService.queryConveyorInstByThree().size() >= 4) {
|
||||
// conveyLock = true;
|
||||
// }
|
||||
|
||||
if (getBarcode() != null) {
|
||||
|
||||
|
||||
@@ -1218,31 +1218,32 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
continue;
|
||||
}
|
||||
|
||||
Boolean conveyLock = false;
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(device_code);
|
||||
StandardCoveyorControlWithScannerDeviceDriver scannerDeviceDriver;
|
||||
if (deviceByCode.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
|
||||
scannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) deviceByCode.getDeviceDriver();
|
||||
conveyLock = scannerDeviceDriver.getConveyLock();
|
||||
}
|
||||
// Boolean conveyLock = false;
|
||||
// Device deviceByCode = deviceAppService.findDeviceByCode(device_code);
|
||||
// StandardCoveyorControlWithScannerDeviceDriver scannerDeviceDriver;
|
||||
// if (deviceByCode.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
|
||||
// scannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) deviceByCode.getDeviceDriver();
|
||||
// conveyLock = scannerDeviceDriver.getConveyLock();
|
||||
// }
|
||||
|
||||
if (!conveyLock) {
|
||||
//查询所有的关联设备
|
||||
List<String> list1 = deviceService.queryLinkDeviceByCode(this_device_code);
|
||||
int count = 0;
|
||||
for (int z = 0; z < list1.size(); z++) {
|
||||
String code = list1.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) {
|
||||
break;
|
||||
// if (!conveyLock) {
|
||||
//查询所有的关联设备
|
||||
List<String> list1 = deviceService.queryLinkDeviceByCode(this_device_code);
|
||||
int count = 0;
|
||||
for (int z = 0; z < list1.size(); z++) {
|
||||
String code = list1.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()) {
|
||||
break;
|
||||
}
|
||||
// }
|
||||
|
||||
if (j == 0) {
|
||||
flag1 = num;
|
||||
|
||||
Reference in New Issue
Block a user