diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java index d50af98ea..13067629f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java @@ -81,6 +81,9 @@ public class NDCAgvServiceImpl implements NDCAgvService { @LokiLog(type = LokiLogType.AGV) @Override public void sendAgvInstToNDC(String agv_system_type, Instruction inst) { + log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() + + ",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() + + ",nextAddress:" + inst.getNext_point_code()); if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) { if (!StrUtil.equals(agv_system_type, "1")) { String instcode = inst.getInstruction_code(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java index e21640c6f..745870ba0 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java @@ -380,6 +380,14 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i //按照优先级排序 优先级相等按照创建时间排序 taskDtos = this.sortTask(taskDtos); TaskDto taskDto = taskDtos.get(0); + + //存在行架->暂存的AGV任务 需要过滤 + // 6 行架任务 8烘箱任务 + if(!StrUtil.equals(taskDto.getTask_type(),"6") || StrUtil.equals(taskDto.getTask_type(),"8")){ + taskDto = null; + continue; + } + Instruction instruction = instructionService.findByTaskcodeAndStatus(taskDto.getTask_code()); String start_device_code = instruction.getStart_device_code(); String next_device_code = instruction.getNext_device_code(); @@ -465,11 +473,18 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } else { List taskDtoList = taskserver.queryTaskByDeviceCode(startDeviceCode); if (ObjectUtil.isNotEmpty(taskDtoList)) { - //按照优先级排序 优先级相等按照创建时间排序 - taskDtoList = this.sortTask(taskDtoList); - task = taskDtoList.get(0); + for(int j=0; j " + plcbarcode); } + if (height != last_height){ + logServer.deviceExecuteLog(this.device_code, "", "", "信号height:" + last_height + "->" + height); + } if (task != last_task) { logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task); } @@ -341,10 +350,10 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe } } - if (move > 0 && !StrUtil.isEmpty(newBarcode) && !requireSucess) { + if (move > 0 && !StrUtil.isEmpty(newBarcode) && !requireSucess && height>0) { instruction_require(newBarcode.trim()); } - if (move > 0 && !StrUtil.isEmpty(newBarcode) && !applySucess) { + if (move > 0 && !StrUtil.isEmpty(newBarcode) && !applySucess && height>0) { instruction_apply(newBarcode.trim()); } break; @@ -363,7 +372,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe } } // 申请贴标 - if (move > 0 && !StrUtil.isEmpty(newBarcodes) && !requireSucess) { + if (move > 0 && !StrUtil.isEmpty(newBarcodes) && !requireSucess ) { applyLabeling(newBarcodes); } break; @@ -859,6 +868,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe JSONObject apply = new JSONObject(); apply.put("vehicle_code", container_code); apply.put("device_code", device_code); + apply.put("height", height); apply.put("type", "1"); logServer.deviceExecuteLog(this.device_code, "", "", "申请入库,木箱号:"+ container_code + ",请求参数:" + apply.toString()); String str = acsToWmsService.applyTaskToWms(apply); @@ -1074,6 +1084,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe jo.put("inst_message", this.inst_message); jo.put("task", this.getTask()); jo.put("barcode", plcbarcode); + jo.put("height", height); jo.put("barcode_length", plcbarcode_length); String requireSucess = "0"; if (this.requireSucess) { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index a5b9d4f96..f41d8acad 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -395,8 +395,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu if (!StrUtil.equals(task.getAgv_system_type(), "0") && ObjectUtil.isNotEmpty(task.getAgv_system_type())) { NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class); - log.warn("下发AGV指令数据,"+ "指令号:" + dto.getInstruction_code() + ",AGV系统类型:"+ task.getAgv_system_type()); + log.warn("下发AGV指令数据,"+ "指令号:" + dto.getInstruction_code() + ",AGV系统类型:"+ dto.getAgv_system_type() + + ",AGV指令类型:" + dto.getInstruction_type() ); try { + if(StrUtil.isEmpty(dto.getAgv_inst_type()) || StrUtil.isEmpty(dto.getAgv_system_type())){ + log.info("sendAgvInstToNDC 指令校验:" + dto.getInstruction_code() + ",inst_type:" +dto.getInstruction_type() + +",inst_system_type:" + dto.getAgv_system_type()); + } ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto); } catch (Exception e){ dto.setSend_status("2"); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java index f515370b0..8d29ba7b4 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java @@ -146,7 +146,7 @@ public class AutoCreateInst { //判断agv系统 //1、1楼叉车系统 //2、2楼1区域AGV系统 - //3、2楼2区域AGV系统 + //3、2楼2区域AGV系统 -已废弃 if (!StrUtil.equals(agv_system_type, "1")) { // task_type //1、生箔; Itype=1:取空,取满,放空,放满; @@ -164,11 +164,13 @@ public class AutoCreateInst { instdto.setAgv_inst_type("3"); } else if (StrUtil.equals(task_type, "8")) { instdto.setAgv_inst_type("2"); + } else { + log.info("未找到对应的AGV指令类型,任务号:" + acsTask.getTask_code() + ",task_type:" + acsTask.getTask_type()) ; + continue; } } else { instdto.setAgv_inst_type("4"); } - try { instructionService.create(instdto); } catch (Exception e) { diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java index e605eaa72..5d563a4c6 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java @@ -56,14 +56,14 @@ public class DictController { @ApiOperation("查询字典") @GetMapping(value = "/all") - @SaCheckPermission("dict:list") +// @SaCheckPermission("dict:list") public ResponseEntity queryAll(){ return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK); } @ApiOperation("查询字典") @GetMapping - @SaCheckPermission("dict:list") +// @SaCheckPermission("dict:list") public ResponseEntity query(DictQueryCriteria resources, Pageable pageable){ return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK); } diff --git a/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml b/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml index cf6996bac..8d66a53c8 100644 --- a/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml +++ b/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml @@ -26,7 +26,7 @@ --> - + diff --git a/acs/nladmin-system/src/main/resources/logback-spring.xml b/acs/nladmin-system/src/main/resources/logback-spring.xml index 1bbafc678..45c7f529b 100644 --- a/acs/nladmin-system/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/src/main/resources/logback-spring.xml @@ -38,6 +38,7 @@ https://juejin.cn/post/6844903775631572999 +