洁美更新

This commit is contained in:
loujf
2022-07-19 19:37:45 +08:00
parent d2a8f5cdcd
commit dc8774c640
3 changed files with 33 additions and 32 deletions

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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;