diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index adeaac691..c835021a0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -308,7 +308,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { log.info("读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose()); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - log.info("未下发NDC信号原因: 读取光栅信号值为:{}", standardAutodoorDeviceDriver.getClose()); + log.info("未下发NDC信号原因: 读取自动门信号值为:{}", standardAutodoorDeviceDriver.getClose()); } } else if (device.getDeviceDriver() instanceof RasterDeviceDriver) { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java index 8dbbd7778..a43852471 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java @@ -614,8 +614,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if (paperTubePickSiteDeviceDriver.getAction() == 1 - && paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) { + if (paperTubePickSiteDeviceDriver.getAction() == 0) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -1390,8 +1389,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if (paperTubePickSiteDeviceDriver.getAction() == 1 - && paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) { + if (paperTubePickSiteDeviceDriver.getAction() == 1) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -1701,8 +1699,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if (paperTubePickSiteDeviceDriver.getAction() == 1 - && paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) { + if (paperTubePickSiteDeviceDriver.getAction() == 0) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java index 577001150..a14a687de 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java @@ -315,7 +315,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv } else { this.require_apply_mxrk_time = date; if (StrUtil.isNotEmpty(hand_barcode) && StrUtil.isNotEmpty(hand_material_barcode)) { - applyIn(StorageTypeEnum.BOX_IN.getType(), mode); + applyInByHand(StorageTypeEnum.BOX_IN.getType(), mode); } else if (StrUtil.isEmpty(barcode) || StrUtil.isEmpty(material_barcode)) { message = "托盘条码为空、或者子卷码为空"; } else { @@ -335,7 +335,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv } else { this.require_apply_zjrk_time = date; if (StrUtil.isNotEmpty(hand_barcode) && StrUtil.isNotEmpty(hand_material_barcode)) { - applyIn(StorageTypeEnum.STORAGE.getType(), mode); + applyInByHand(StorageTypeEnum.STORAGE.getType(), mode); } else if (StrUtil.isEmpty(barcode) || StrUtil.isEmpty(material_barcode)) { message = "托盘条码为空、或者子卷码为空"; } else { @@ -705,15 +705,79 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv try { JSONObject param = new JSONObject(); param.put("device_code", device_code); - if (StrUtil.isNotEmpty(hand_barcode)) { - param.put("vehicle_code", hand_barcode); - } if (StrUtil.isNotEmpty(barcode) && (barcode.startsWith("A") || barcode.startsWith("B"))) { param.put("vehicle_code", barcode); } if (StrUtil.isNotEmpty(material_barcode)) { param.put("material_barcode", material_barcode); } + if (mode == 7 && weight != 0) { + param.put("weight", weight); + } + param.put("type", type); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content("木箱、子卷入库申请入库任务,参数:" + param) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + HttpResponse httpResponse = acsToWmsService.applyTwo(param); + JSONObject jsonObject = null; + if (ObjectUtil.isNotEmpty(httpResponse)) { + String body = httpResponse.body(); + jsonObject = JSONObject.parseObject(body); + } + log.info("wms反馈结果:{}",jsonObject); + message = "木箱、子卷入库申请入库任务,返回参数:" + jsonObject; + LuceneLogDto logDto3 = LuceneLogDto.builder() + .device_code(device_code) + .content("木箱、子卷入库申请入库任务,参数,接口返回:" + jsonObject) + .build(); + logDto3.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto3); + if (ObjectUtil.isNotNull(jsonObject) && Integer.valueOf(200).equals(jsonObject.getInteger("status"))) { + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("木箱、子卷入库申请入库任务,参数,接口返回:" + jsonObject) + .build(); + logDto2.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto2); + List list1 = new ArrayList(); + Map map = new HashMap(); + map.put("code", "to_command"); + map.put("value", mode); + list1.add(map); + log.error("下发电气--------:{}",map); + this.writing(list1); + requireSucess = true; + } else { + this.iserror = true; + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("木箱、子卷入库申请入库任务,返回参数:" + jsonObject) + .build(); + logDto2.setLog_level(4); + message = "木箱、子卷入库申请入库任务报错,返回参数:" + jsonObject; + luceneExecuteLogService.deviceExecuteLog(logDto2); + } + } catch (Exception e) { + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("木箱、子卷入库申请入库任务,返回参数:" + e.getMessage()) + .build(); + logDto2.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto2); + } + + } + + private void applyInByHand(String type, int mode) { + try { + JSONObject param = new JSONObject(); + param.put("device_code", device_code); + if (StrUtil.isNotEmpty(hand_barcode)) { + param.put("vehicle_code", hand_barcode); + } if (StrUtil.isNotEmpty(hand_material_barcode)) { param.put("material_barcode", hand_material_barcode); } @@ -777,6 +841,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv } + /** * 更新指令状态 */ diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java index 94a55ccd5..4cd7df7bc 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java @@ -425,12 +425,20 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp return true; } else { - List taskDtoList = taskserver.queryTaskByDeviceCode(startDeviceCode); + List taskDtoList = taskserver.findByTrappedManipulatorReady(); if (ObjectUtil.isNotEmpty(taskDtoList)) { - for (int j = 0; j < taskDtoList.size(); j++) { + List taskDtosReady = new ArrayList<>(); + if (CollUtil.isNotEmpty(taskDtoList)) { + for (TaskDto taskDto1 : taskDtoList) { + if (getDeviceCodeList.contains(taskDto1.getStart_device_code())) { + taskDtosReady.add(taskDto1); + } + } + } + for (int j = 0; j < taskDtosReady.size(); j++) { //按照优先级排序 优先级相等按照创建时间排序 - taskDtoList = this.sortTask(taskDtoList); - task = taskDtoList.get(j); + taskDtosReady = this.sortTask(taskDtosReady); + task = taskDtosReady.get(j); // 6 行架任务 8烘箱任务 if (!StrUtil.equals(task.getTask_type(), "6")) { task = null; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 4f323410d..64e483e4e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -1048,7 +1048,7 @@ public class InstructionServiceImpl extends CommonServiceImpl true - + ${log.pattern} - + ${log.charset} @@ -47,7 +47,7 @@ https://juejin.cn/post/6844903775631572999 20GB - + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n diff --git a/acs2/nladmin-ui/src/views/acs/instruction/index.vue b/acs2/nladmin-ui/src/views/acs/instruction/index.vue index 59a1a8fb7..cdfe20daa 100644 --- a/acs2/nladmin-ui/src/views/acs/instruction/index.vue +++ b/acs2/nladmin-ui/src/views/acs/instruction/index.vue @@ -54,7 +54,7 @@ style="width: 200px" @change="crud.toQuery" > - + @@ -68,7 +68,7 @@ style="width: 200px" @change="crud.toQuery" > - + @@ -82,7 +82,7 @@ style="width: 200px" @change="crud.toQuery" > - + @@ -96,7 +96,7 @@ @keyup.enter.native="crud.toQuery" /> - + @@ -123,21 +123,24 @@ > - + - + - + - + @@ -149,15 +152,18 @@ style="width: 100%;" @selection-change="crud.selectionChangeHandler" > - - - - + + + + - + - - + + - - - - + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + @@ -212,25 +237,17 @@ > {{ $t('Inst.table.Finish') }} - - {{ $t('user.other.More') }} - - - {{ $t('auto.common.Cancel') }} - - - {{ $t('auto.common.Forced_cancellation') }} - {{ $t('auto.common.Initialize') }} - - - + + {{ $t('auto.common.Cancel') }} + + + {{ $t('auto.common.Forced_cancellation') }} + - + diff --git a/acs2/nladmin-ui/src/views/acs/task/index.vue b/acs2/nladmin-ui/src/views/acs/task/index.vue index 2615c7fd2..b11e53008 100644 --- a/acs2/nladmin-ui/src/views/acs/task/index.vue +++ b/acs2/nladmin-ui/src/views/acs/task/index.vue @@ -539,7 +539,9 @@ /> @@ -592,13 +594,20 @@ {{ getAgvSystemLabel(scope.row.agv_system_type) }} - - - - - - - + + + + + + + @@ -742,6 +746,7 @@ export default { vehicle_type: null, task_type: '1', storage_task_type: '', + empty_site: '', task_status: null, priority: 1, start_point_code: null,