|
|
@ -696,7 +696,13 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc |
|
|
|
this.requireTime = currentTimeMillis; |
|
|
|
LOCK.lock(); |
|
|
|
try { |
|
|
|
List<TaskDto> taskDtoBusys = taskService.findInstsByNextDeviceCode(deviceCode); |
|
|
|
Device cacheDevice = deviceAppService.findDeviceByCode(deviceCode); |
|
|
|
Integer maxInstNum = Optional.ofNullable(cacheDevice.getExtraValue().get("maxInstNum")).map(Object::toString).map(Integer::parseInt).orElse(2); |
|
|
|
if (taskDtoBusys.size() >= maxInstNum) { |
|
|
|
this.unExecutedMessage = "查询出库任务,当前终点: " + deviceCode + ", 指令数量大于设定最大值: " + maxInstNum; |
|
|
|
return; |
|
|
|
} |
|
|
|
List<String> checkoutStartDeviceCode = new ArrayList<>(); |
|
|
|
if (cacheDevice.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver) { |
|
|
|
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) cacheDevice.getDeviceDriver(); |
|
|
|