From ff04f40bbc3c5da7ee6dcad0aa026a5696bdadb3 Mon Sep 17 00:00:00 2001 From: lishuai <1793460677@qq.com> Date: Thu, 22 Feb 2024 17:55:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=E6=B5=8B=E8=AF=95=E3=80=81=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E7=82=B9=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DeviceServiceImpl.java | 8 ++ .../BoxManipulatorSiteDeviceDriver.java | 5 +- .../BeltConveyorDeviceDriver.java | 26 +++--- .../conveyor/belt_conveyor/ItemProtocol.java | 12 ++- .../BoxStorageOutConveyorDeviceDriver.java | 43 +++++----- .../BoxSubvolumesConveyorDeviceDriver.java | 14 +++- ...nishedProductOutBindLableDeviceDriver.java | 19 ++++- .../FoldDiscSiteDefination.java | 2 +- .../FoldDiscSiteDeviceDriver.java | 80 +++++++++++++++---- .../fold_disc_site/ItemProtocol.java | 24 ++++++ ...ConveyorWithScannerWeightDeviceDriver.java | 38 ++++++--- .../scanner_weight_conveyor/ItemProtocol.java | 4 + .../UnBoxLableConveyorDeviceDriver.java | 11 ++- .../BoxPackageManipulatorDeviceDriver.java | 6 +- .../BoxStorageManipulatorDeviceDriver.java | 10 ++- .../return_good_manipulator/ItemProtocol.java | 21 +++++ .../ReturnGoodManipulatorDeviceDriver.java | 12 ++- ...pedManipulatorManipulatorDeviceDriver.java | 5 ++ ...TwoManipulatorManipulatorDeviceDriver.java | 14 ++-- .../StandardStackerDeviceDriver.java | 60 ++++++++++---- .../org/nl/acs/enums/StorageTypeEnum.java | 2 +- .../controller/logicflow/StageController.java | 13 ++- .../monitor/one_device/one_advice.properties | 3 + .../one_device/one_advice_en_US.properties | 4 + .../one_device/one_advice_in_ID.properties | 3 + .../one_device/one_advice_zh_CN.properties | 3 + .../monitor/universal/universal.properties | 2 + .../universal/universal_en_US.properties | 2 + .../universal/universal_in_ID.properties | 2 + .../universal/universal_zh_CN.properties | 2 + acs2/nladmin-ui/src/i18n/langs/monitor/en.js | 5 +- acs2/nladmin-ui/src/i18n/langs/monitor/in.js | 5 +- acs2/nladmin-ui/src/i18n/langs/monitor/zh.js | 4 +- .../src/views/system/monitor/device/index.vue | 6 ++ 34 files changed, 357 insertions(+), 113 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java index d32e195ed..1d6b070f7 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java @@ -26,6 +26,8 @@ import org.nl.acs.device.enums.DeviceType; import org.nl.acs.device.service.mapper.DeviceExtraMapper; import org.nl.acs.device.domain.DeviceRunpoint; import org.nl.acs.device.service.mapper.DeviceRunpointMapper; +import org.nl.acs.device_driver.one_conveyor.scanner_weight_conveyor.ConveyorWithScannerWeightDeviceDriver; +import org.nl.acs.device_driver.one_manipulator.volume_two_manipulator.VolumeTwoManipulatorManipulatorDeviceDriver; import org.nl.acs.device_driver.stacker.standard_stacker.StandardStackerDeviceDriver; import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver; import org.nl.acs.device_driver.two_conveyor.slit_two_manipulator.SlitTwoManipulatorDeviceDriver; @@ -1017,6 +1019,12 @@ public class DeviceServiceImpl extends CommonServiceImpl i }*/else if (device.getDeviceDriver() instanceof StandardStackerDeviceDriver) { StandardStackerDeviceDriver standardStackerDeviceDriver = (StandardStackerDeviceDriver) device.getDeviceDriver(); standardStackerDeviceDriver.setDeviceStatus(form); + } else if (device.getDeviceDriver() instanceof VolumeTwoManipulatorManipulatorDeviceDriver) { + VolumeTwoManipulatorManipulatorDeviceDriver volumeTwoManipulatorManipulatorDeviceDriver = (VolumeTwoManipulatorManipulatorDeviceDriver) device.getDeviceDriver(); + volumeTwoManipulatorManipulatorDeviceDriver.setDeviceStatus(form); + }else if (device.getDeviceDriver() instanceof ConveyorWithScannerWeightDeviceDriver) { + ConveyorWithScannerWeightDeviceDriver conveyorWithScannerWeightDeviceDriver = (ConveyorWithScannerWeightDeviceDriver) device.getDeviceDriver(); + conveyorWithScannerWeightDeviceDriver.setDeviceStatus(form); } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/box_manipulator_site/BoxManipulatorSiteDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/box_manipulator_site/BoxManipulatorSiteDeviceDriver.java index e2b6df819..e4ccf1ead 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/box_manipulator_site/BoxManipulatorSiteDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/box_manipulator_site/BoxManipulatorSiteDeviceDriver.java @@ -247,11 +247,12 @@ public class BoxManipulatorSiteDeviceDriver extends AbstractOpcDeviceDriver impl if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); //无报警 } else { this.setIsonline(true); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java index 360c94683..63b06c8a8 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java @@ -161,7 +161,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements int to_container_type = 0; int last_to_container_type = 0; + String barcode = null; + + //子卷条码 + String material_barcode = null; + String last_material_barcode = null; /** * 当前指令 */ @@ -218,6 +223,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements error = this.itemProtocol.getError(); task = this.itemProtocol.getTask(); container_no = this.itemProtocol.getContainer_no(); + material_barcode= this.itemProtocol.getMaterialBarcode(); to_command = this.itemProtocol.getTo_command(); to_target = this.itemProtocol.getTotarget(); to_task = this.itemProtocol.getTo_task(); @@ -294,13 +300,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements applyManipulatorTask(); } break; - case 7: - //申请空托盘到叠盘位的任务 - //TODO 申请行架任务 - if (move == 1 && !requireSucess) { - applyEmpotyTask(); - } - break; + default: break; } @@ -322,20 +322,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements } - private void applyEmpotyTask() { - JSONObject param = new JSONObject(); - param.put("device_code", device_code); - logServer.deviceExecuteLog(this.device_code, "", "", "二楼到一楼输送线申请行架任务,参数:" + param); - HttpResponse response = acsToWmsService.shipDeviceUpdate(param); - if (response == null || response.getStatus() == 200) { - logServer.deviceExecuteLog(this.device_code, "", "", "二楼到一楼输送线申请行架任务,接口返回:" + response.body()); - } - } private void applyManipulatorTask() { JSONObject param = new JSONObject(); param.put("device_code", device_code); + param.put("material_barcode", material_barcode); logServer.deviceExecuteLog(this.device_code, "", "", "二楼到一楼输送线申请行架任务,参数:" + param); HttpResponse response = acsToWmsService.shipDeviceUpdate(param); if (response == null || response.getStatus() == 200) { @@ -740,6 +732,8 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements mode = LangProcess.msg("universal_standby"); } else if (this.getMode() == 3) { mode = LangProcess.msg("universal_operation"); + }else if (this.getMode() == 5) { + mode = LangProcess.msg("one_mode3"); } jo.put("device_name", this.getDevice().getDevice_name()); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java index 40fd0a015..126ec1fcd 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java @@ -50,6 +50,11 @@ public class ItemProtocol { */ public static String item_container_no = "container_no"; + /** + * 子卷条码 + */ + public static String item_material_barcode = "material_barcode"; + /** * 下发命令 */ @@ -72,13 +77,17 @@ public class ItemProtocol { public static String item_to_target = "to_target"; + + private BeltConveyorDeviceDriver driver; public ItemProtocol(BeltConveyorDeviceDriver driver) { this.driver = driver; } - + public String getMaterialBarcode() { + return this.getOpcStringValue(item_material_barcode); + } public int getHeartbeat() { return this.getOpcIntegerValue(item_heartbeat); } @@ -183,6 +192,7 @@ public class ItemProtocol { list.add(new ItemDto(item_action, "动作类型", "DB101.B6")); list.add(new ItemDto(item_error, "报警", "DB101.B58")); list.add(new ItemDto(item_task, "任务号", "DB101.D68")); + list.add(new ItemDto(item_material_barcode, "子卷条码", "DB1.B12")); return list; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_storage_out_conveyor/BoxStorageOutConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_storage_out_conveyor/BoxStorageOutConveyorDeviceDriver.java index 828577a3c..c1400dd7c 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_storage_out_conveyor/BoxStorageOutConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_storage_out_conveyor/BoxStorageOutConveyorDeviceDriver.java @@ -10,6 +10,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; @@ -172,7 +173,16 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i to_target = this.itemProtocol.getTo_target(); to_task = this.itemProtocol.getTo_task(); heartbeat = this.itemProtocol.getHeartbeat(); - + if (mode != last_mode) { + JSONObject param = new JSONObject(); + param.put("device_code", this.device_code); + param.put("mode", Math.min(mode, 3)); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", CommonFinalParam.ONE); + requireSucess = false; + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); + } if (move != 0 && task > 0) { @@ -186,7 +196,8 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else { @@ -194,7 +205,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i this.setIserror(false); if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); } Instruction instruction = null; @@ -344,7 +355,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i return false; } } - message = "下发电气任务号成功"; + message = LangProcess.msg("universal_message5"); requireSucess = true; return true; } @@ -508,33 +519,23 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i String move = ""; String carrier_direction = ""; if (this.getMode() == 0) { - mode = "脱机"; + mode = LangProcess.msg("universal_off-line"); } else if (this.getMode() == 1) { - mode = "单机"; + mode = LangProcess.msg("universal_stand-alone"); } else if (this.getMode() == 2) { - mode = "待机"; + mode = LangProcess.msg("universal_standby"); } else if (this.getMode() == 3) { - mode = "运行中"; - } else if (this.getMode() == 4) { - mode = "申请捆扎中"; - } else if (this.getMode() == 5) { - mode = "申请贴标中"; - } else if (this.getMode() == 6) { - mode = "申请空盘入库中"; - } else if (this.getMode() == 7) { - mode = "申请空盘出库中"; - } else if (this.getMode() == 8) { - mode = "申请AGV任务中"; + mode = LangProcess.msg("universal_operation"); } if (this.getMove() == 0) { - move = "无货"; + move = LangProcess.msg("universal_no"); jo.put("hasGoods", false); } else if (this.getMove() == 1) { - move = "有货"; + move = LangProcess.msg("universal_yes"); jo.put("hasGoods", true); } else if (this.getMove() == 2) { - move = "有托盘有货"; + move = LangProcess.msg("universal_two_yes"); jo.put("hasGoods", true); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_subvolumes_conveyor/BoxSubvolumesConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_subvolumes_conveyor/BoxSubvolumesConveyorDeviceDriver.java index 732080501..7f3b18a3b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_subvolumes_conveyor/BoxSubvolumesConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/box_subvolumes_conveyor/BoxSubvolumesConveyorDeviceDriver.java @@ -10,6 +10,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; @@ -172,7 +173,16 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i heartbeat = this.itemProtocol.getHeartbeat(); material_barcode = this.itemProtocol.getMaterialBarCode(); // 更新指令状态 - + if (mode != last_mode) { + JSONObject param = new JSONObject(); + param.put("device_code", this.device_code); + param.put("mode", Math.min(mode, 3)); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", CommonFinalParam.ONE); + requireSucess = false; + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); + } if (move != 0 && task > 0) { update_instruction_status(); @@ -400,7 +410,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i return false; } } - message = "下发电气任务号成功"; + message = LangProcess.msg("universal_message5"); requireSucess = true; return true; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/finished_product_out_with_bind_lable_conveyor/FinishedProductOutBindLableDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/finished_product_out_with_bind_lable_conveyor/FinishedProductOutBindLableDeviceDriver.java index bc0d29fea..84f12729e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/finished_product_out_with_bind_lable_conveyor/FinishedProductOutBindLableDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/finished_product_out_with_bind_lable_conveyor/FinishedProductOutBindLableDeviceDriver.java @@ -11,6 +11,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; @@ -180,7 +181,16 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr heartbeat = this.itemProtocol.getHeartbeat(); material_barcode = this.itemProtocol.getMaterialBarCode(); - + if (mode != last_mode) { + JSONObject param = new JSONObject(); + param.put("device_code", this.device_code); + param.put("mode", Math.min(mode, 3)); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", CommonFinalParam.ONE); + requireSucess = false; + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); + } if (move != 0 && task > 0) { @@ -196,7 +206,8 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else { @@ -204,7 +215,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr this.setIserror(false); if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); } Instruction instruction = null; @@ -553,7 +564,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr return false; } } - message = "下发电气任务号成功"; + message = LangProcess.msg("universal_message5"); requireSucess = true; return true; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDefination.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDefination.java index 5f25a5629..98d753a80 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDefination.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDefination.java @@ -19,7 +19,7 @@ public class FoldDiscSiteDefination implements OpcDeviceDriverDefination { @Override public String getDriverName() { - return "叠盘机位"; + return "拆叠盘机位"; } @Override diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDeviceDriver.java index e9507a8ef..3ea716666 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/FoldDiscSiteDeviceDriver.java @@ -2,6 +2,7 @@ package org.nl.acs.device_driver.one_conveyor.fold_disc_site; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSONObject; import lombok.Data; import lombok.RequiredArgsConstructor; @@ -15,6 +16,8 @@ import org.nl.acs.device_driver.FeedLmsRealFailed; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.enums.StorageTypeEnum; +import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.history.ErrorUtil; import org.nl.acs.history.service.DeviceErrorLogService; import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl; @@ -36,7 +39,7 @@ import java.util.Date; import java.util.List; /** - * 叠盘机 + * 拆叠盘机 */ @Slf4j @Data @@ -57,6 +60,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class); @Autowired DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); + AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class); //工作模式 int mode = 0; @@ -109,6 +113,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements private int instruction_update_time_out = 1000; Integer heartbeat_tag; private Date instruction_require_time = new Date(); + private Date require_apply_strangulation_time = new Date(); private int instruction_require_time_out = 3000; //行架机械手申请任务成功标识 @@ -124,6 +129,10 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements String device_code; + //托盘条码 + String barcode = null; + String last_barcode = null; + //当前指令 Instruction inst = null; @@ -165,7 +174,16 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements to_container_type = this.itemProtocol.getTo_container_type(); container_type = this.itemProtocol.getContainer_type(); carrier_direction = this.itemProtocol.getCarrier_direction(); - + if (mode != last_mode) { + JSONObject param = new JSONObject(); + param.put("device_code", this.device_code); + param.put("mode", Math.min(mode, 3)); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", CommonFinalParam.ONE); + requireSucess = false; + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); + } // 更新指令状态 if (move != 0 && task > 0) { update_instruction_status(); @@ -180,11 +198,12 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); //无报警 } else { this.setIsonline(true); @@ -193,6 +212,18 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements Instruction instruction = null; List toInstructions; + //申请空托盘入库 + if (mode == 9 && move == 1 ){ + applyEmptyTask(StorageTypeEnum.DISKS_IN.getType()); + } + + + //申请空托盘出库 + if (mode == 8 && move == 1 ){ + applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType()); + } + + //行架机械手申请任务 if (mode == 2 && move == 0 && task == 0 && !requireSucess) { // boolean res = applyTask(); @@ -240,6 +271,33 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements last_carrier_direction = carrier_direction; } + private void applyEmptyTask(String type) { + Date date = new Date(); + if (date.getTime() - this.require_apply_strangulation_time.getTime() + < (long) this.instruction_require_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); + return; + } else { + try { + JSONObject param = new JSONObject(); + param.put("device_code", device_code); + param.put("vehicle_code", barcode); + param.put("container_type", container_type); + param.put("type", type); + logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请入库任务,参数:" + param); + HttpResponse response = acsToWmsService.shipDeviceUpdate(param); + if (response == null || response.getStatus() == 200) { + logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请入库任务,接口返回:" + response.body()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + + + @Override public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); @@ -255,6 +313,10 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements mode = LangProcess.msg("universal_standby"); } else if (this.getMode() == 3) { mode = LangProcess.msg("universal_operation"); + }else if (this.getMode() == 9) { + mode = LangProcess.msg("one_mode2"); + }else if (this.getMode() == 8) { + mode = LangProcess.msg("one_mode4"); } @@ -275,16 +337,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements requireSucess = "1"; } jo.put("requireSucess", requireSucess); - if (this.getAction() == 1) { - action = "取货中"; - } else if (this.getAction() == 2) { - action = "取货完成"; - } else if (this.getAction() == 3) { - action = "放货中"; - } else if (this.getAction() == 4) { - action = "放货完成"; - } - jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/ItemProtocol.java index 95a386251..2c16f7bd8 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/fold_disc_site/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.one_conveyor.fold_disc_site; +import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -38,8 +39,18 @@ public class ItemProtocol { //下发托盘类型 public static String item_to_container_type = "to_container_type"; + /** + * 托盘条码 + */ + public static String item_barcode = "barcode"; + private FoldDiscSiteDeviceDriver driver; + + public String getBarcode() { + return this.getOpcStringValue(item_barcode); + } + public ItemProtocol(FoldDiscSiteDeviceDriver driver){ this.driver=driver; } @@ -110,6 +121,17 @@ public class ItemProtocol { return 0; } + public String getOpcStringValue(String protocol) { + String value = this.driver.getStringValue(protocol); + if (StrUtil.isBlank(value)) { + //throw new BusinessException("{} : {}", new Object[]{protocol, DeviceErrorProtocol.getMessage(10000)}); + + } else { + return value; + } + return "0"; + } + public static List getReadableItemDtos() { ArrayList list = new ArrayList<>(); list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); @@ -120,6 +142,8 @@ public class ItemProtocol { list.add(new ItemDto(item_task, "任务号", "DB1.D6")); list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7")); list.add(new ItemDto(item_qty, "数量", "DB1.B8")); + list.add(new ItemDto(item_barcode, "托盘条码", "DB1.B11")); + return list; } 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 b7740dcd8..e0605ded3 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 @@ -107,6 +107,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv int container_type = 0; int last_container_type = 0; + + + //行架任务号 int hj_task = 0; int last_hj_task = 0; @@ -115,10 +118,15 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv int weight = 0; int last_weight = 0; - //条码 + //托盘条码 String barcode = null; String last_barcode = null; + + //子卷条码 + String material_barcode = null; + String last_material_barcode = null; + //数量 int qty = 0; int last_qty = 0; @@ -193,9 +201,19 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv carrier_direction = this.itemProtocol.getCarrier_direction(); qty = this.itemProtocol.getQty(); weight = this.itemProtocol.getWeight(); - // barcode = this.itemProtocol.getBarcode(); - + barcode = this.itemProtocol.getBarcode(); + material_barcode = this.itemProtocol.getMaterialBarcode(); + if (mode != last_mode) { + JSONObject param = new JSONObject(); + param.put("device_code", this.device_code); + param.put("mode", Math.min(mode, 3)); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", CommonFinalParam.ONE); + requireSucess = false; + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); + } if (move != 0 && task > 0) { update_instruction_status(); @@ -287,6 +305,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv JSONObject param = new JSONObject(); param.put("device_code", device_code); param.put("vehicle_code", barcode); + param.put("material_barcode", material_barcode); param.put("type", StorageTypeEnum.ERROR.getType()); logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请异常位任务,参数:" + param); HttpResponse response = acsToWmsService.shipDeviceUpdate(param); @@ -310,6 +329,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv JSONObject param = new JSONObject(); param.put("device_code", device_code); param.put("vehicle_code", barcode); + param.put("material_barcode", material_barcode); param.put("type", StorageTypeEnum.STORAGE.getType()); logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请入库任务,参数:" + param); HttpResponse response = acsToWmsService.shipDeviceUpdate(param); @@ -392,7 +412,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv String path = routeLineDto.getPath(); String[] str = path.split("->"); List pathlist = Arrays.asList(str); - Integer start = 1; + Integer start = 0; String start_device_code = pathlist.get(start); String next_device_code = pathlist.get(start+1); packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code); @@ -539,15 +559,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv requireSucess = "1"; } jo.put("requireSucess", requireSucess); - if (this.getAction() == 1) { - action = "取货中"; - } else if (this.getAction() == 2) { - action = "取货完成"; - } else if (this.getAction() == 3) { - action = "放货中"; - } else if (this.getAction() == 4) { - action = "放货完成"; - } + jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java index 397f2d946..f3124ff2f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java @@ -125,6 +125,10 @@ public class ItemProtocol { return this.getOpcStringValue(item_barcode); } + public String getMaterialBarcode() { + return this.getOpcStringValue(item_material_barcode); + } + public int getWeight(){ return this.getOpcIntegerValue(item_weight); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/un_box_lable_conveyor/UnBoxLableConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/un_box_lable_conveyor/UnBoxLableConveyorDeviceDriver.java index 659282b79..12884697a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/un_box_lable_conveyor/UnBoxLableConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/un_box_lable_conveyor/UnBoxLableConveyorDeviceDriver.java @@ -10,6 +10,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; @@ -43,7 +44,7 @@ import java.util.*; import java.util.concurrent.ThreadPoolExecutor; /** - * 一楼木箱入库站点 + * 一楼申请开箱位、贴标位 */ @Slf4j @Data @@ -180,10 +181,14 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl } + if (mode != last_mode) { + requireSucess = false; + } if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else { @@ -500,7 +505,7 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl return false; } } - message = "下发电气任务号成功"; + message = LangProcess.msg("universal_message5"); requireSucess = true; return true; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java index 4d0a528c3..9fe27ebf4 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java @@ -175,7 +175,10 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i to_direction = this.itemProtocol.getTo_direction(); to_last = this.itemProtocol.getTo_last(); + if (mode != last_mode) { + requireSucess = false; + } // 更新指令状态 if (mode == 3 && task > 0) { updateInstrction(); @@ -188,7 +191,8 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else if (error != 0) { this.setIserror(true); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_storage_manipulator/BoxStorageManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_storage_manipulator/BoxStorageManipulatorDeviceDriver.java index 724be3ef2..45973e0de 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_storage_manipulator/BoxStorageManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_storage_manipulator/BoxStorageManipulatorDeviceDriver.java @@ -70,6 +70,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl"); int mode = 0; + int last_mode = 0; int move = 0; int action = 0; int error = 0; @@ -144,7 +145,10 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i to_layer = this.itemProtocol.getTo_layer(); to_barcode = this.itemProtocol.getTo_barcode(); + if (mode != last_mode) { + requireSucess = false; + } // 更新指令状态 if (mode == 3 && task > 0) { updateInstructionStatus(); @@ -161,11 +165,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); //无报警 } else { this.setIsonline(true); @@ -203,6 +208,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } + last_mode =mode; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ItemProtocol.java index 03545c635..fd72628f2 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ItemProtocol.java @@ -65,6 +65,23 @@ public class ItemProtocol { */ public static String item_to_onset = "to_onset"; + /** + *木箱长度 + */ + public static String item_to_length = "to_length"; + /** + *木箱宽度 + */ + public static String item_to_weight = "to_weight"; + /** + *木箱高度 + */ + public static String item_to_height = "to_height"; + /** + *下发木箱条码 + */ + public static String item_to_barcode = "to_barcode"; + private ReturnGoodManipulatorDeviceDriver driver; @@ -156,6 +173,10 @@ public class ItemProtocol { list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6")); list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2")); list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB102.B8")); + list.add(new ItemDto(item_to_length, "木箱长度", "DB601.W14")); + list.add(new ItemDto(item_to_weight, "木箱宽度", "DB601.W16")); + list.add(new ItemDto(item_to_height, "木箱高度", "DB601.W18")); + list.add(new ItemDto(item_to_barcode, "下发木箱条码", "DB601.STRING1.50")); return list; } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ReturnGoodManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ReturnGoodManipulatorDeviceDriver.java index aa20738f3..25c53ff07 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ReturnGoodManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/return_good_manipulator/ReturnGoodManipulatorDeviceDriver.java @@ -156,11 +156,18 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i to_target = this.itemProtocol.getTo_target(); to_onset = this.itemProtocol.getTo_onset(); to_task = this.itemProtocol.getTo_task(); + + if (mode != last_mode) { + + requireSucess = false; + } + // 更新指令状态 if (mode == 3 && task > 0) { updateInstructionStatus(); } + } catch (Exception e) { logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + Arrays.toString(e.getStackTrace())); @@ -168,11 +175,12 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); //无报警 } else { this.setIsonline(true); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/trapped_manipulator/TrappedManipulatorManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/trapped_manipulator/TrappedManipulatorManipulatorDeviceDriver.java index 39a4a988a..98e94399a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/trapped_manipulator/TrappedManipulatorManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/trapped_manipulator/TrappedManipulatorManipulatorDeviceDriver.java @@ -155,6 +155,11 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice to_onset = this.itemProtocol.getTo_onset(); to_task = this.itemProtocol.getTo_task(); + + if (mode != last_mode) { + + requireSucess = false; + } // 更新指令状态 if (mode == 3 && task > 0) { updateInstructionStatus(); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java index ab744fedc..25b581359 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java @@ -175,6 +175,10 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi to_task = this.itemProtocol.getTo_task(); to_type = this.itemProtocol.getTo_type(); + if (mode != last_mode) { + + requireSucess = false; + } // 更新指令状态 if (mode == 3 && task > 0) { updateInstructionStatus(); @@ -189,11 +193,12 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi if (mode == 0) { this.setIsonline(false); - message = "未联机"; + message = LangProcess.msg("universal_off-line"); + //有报警 } else if (error != 0) { this.setIserror(true); - message = "有报警"; + message = LangProcess.msg("universal_message3"); //无报警 } else { this.setIsonline(true); @@ -392,7 +397,6 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi //创建指令后修改任务状态 taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex()); taskserver.update(taskDto); - requireSucess = true; this.setRequireSucess(true); Map map1 = new HashMap<>(); @@ -444,10 +448,10 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi map1.put("code", "to_command"); map1.put("value", 1); list.add(map1); - map2.put("code", "to_target"); + map2.put("code", "to_target1"); map2.put("value", next_addr); list.add(map2); - map3.put("code", "to_onset"); + map3.put("code", "to_onset1"); map3.put("value", start_addr); list.add(map3); map4.put("code", "to_task"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java index 5479463f5..c6f3986f5 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java @@ -377,6 +377,10 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme case 2: message = LangProcess.msg("universal_completed"); Instruction instruction = checkInst(); + if (ObjectUtil.isEmpty(instruction)){ + message = LangProcess.msg("universal_message4"); + break; + } String next_device_code = instruction.getNext_device_code(); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); if (StrUtil.equals(nextDevice.getDevice_type(), DeviceType.conveyor.name())) { @@ -604,35 +608,61 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme } } List list = new ArrayList(); - HashMap map = new HashMap(); - map.put("to_device_code", this.getDevice().getAddress()); - map.put("to_command", 1); -// map.put("to_type", inst.getMaterial()); - map.put("to_task", inst.getInstruction_code()); - + HashMap map1 = new HashMap(); + map1.put("code", "to_device_code"); + map1.put("value", this.getDevice().getAddress()); + list.add(map1); + HashMap map2 = new HashMap(); + map2.put("code", "to_command"); + map2.put("value", 1); + list.add(map2); + HashMap map3 = new HashMap(); + map3.put("code", "to_task"); + list.add(map3); + map3.put("value", inst.getInstruction_code()); if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) { if (ObjectUtil.isNotEmpty(startDevice.getExtraValue().get("z"))) { - map.put("to_x", startDevice.getExtraValue().get("z")); + HashMap map4 = new HashMap(); + map4.put("code", "to_x"); + map4.put("value", startDevice.getExtraValue().get("z")); + list.add(map4); } if (ObjectUtil.isNotEmpty(startDevice.getExtraValue().get("x"))) { - map.put("to_z", startDevice.getExtraValue().get("x")); + HashMap map5 = new HashMap(); + map5.put("code", "to_z"); + map5.put("value", startDevice.getExtraValue().get("x")); + list.add(map5); } if (ObjectUtil.isNotEmpty(startDevice.getExtraValue().get("y"))) { - map.put("to_y", startDevice.getExtraValue().get("y")); + HashMap map6 = new HashMap(); + map6.put("code", "to_y"); + map6.put("value", startDevice.getExtraValue().get("y")); + list.add(map6); } } if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name())) { - map.put("to_y", inst.getFrom_z()); + HashMap map4 = new HashMap(); + map4.put("code", "to_y"); + map4.put("value", inst.getFrom_z()); + list.add(map4); if (inst.getFrom_x().length() > 1) { String substring = inst.getFrom_x().substring(1); - map.put("to_z", substring); + HashMap map5 = new HashMap(); + map5.put("code", "to_z"); + map5.put("value", substring); + list.add(map5); } else { - map.put("to_z", inst.getFrom_x()); + HashMap map6 = new HashMap(); + map6.put("code", "to_z"); + map6.put("value", inst.getFrom_x()); + list.add(map6); } - map.put("to_x", inst.getFrom_y()); + HashMap map7 = new HashMap(); + map7.put("code", "to_x"); + map7.put("value", inst.getFrom_y()); + list.add(map7); } - if (ObjectUtil.isNotEmpty(map)) { - list.add(map); + if (ObjectUtil.isNotEmpty(list)) { this.writing(list); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/StorageTypeEnum.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/StorageTypeEnum.java index 9700179ce..e1c8cbcc3 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/StorageTypeEnum.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/StorageTypeEnum.java @@ -8,7 +8,7 @@ import lombok.Getter; @Getter @AllArgsConstructor public enum StorageTypeEnum { - STORAGE("1", "入库任务"), + STORAGE("1", "装箱入库任务"), DISKS_IN("2", "空盘入库"), diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logicflow/StageController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logicflow/StageController.java index 7e421bd54..22901849c 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logicflow/StageController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logicflow/StageController.java @@ -37,7 +37,7 @@ public class StageController { @GetMapping @Log("查询舞台") - + //@SaCheckPermission("stage:list") public ResponseEntity query(@RequestParam Map whereJson, PageQuery page) { return new ResponseEntity<>(TableDataInfo.build(stageService.queryAll(whereJson, page)), HttpStatus.OK); @@ -45,7 +45,7 @@ public class StageController { @PostMapping @Log("新增舞台") - + //@SaCheckPermission("stage:add") public ResponseEntity create(@Validated @RequestBody Stage dto) { stageService.create(dto); @@ -54,7 +54,7 @@ public class StageController { @PutMapping @Log("修改舞台") - + //@SaCheckPermission("stage:edit") public ResponseEntity update(@Validated @RequestBody Stage dto) { stageService.update(dto); @@ -62,7 +62,7 @@ public class StageController { } @Log("删除舞台") - + //@SaCheckPermission("stage:del") @DeleteMapping public ResponseEntity delete(@RequestBody Set ids) { @@ -72,7 +72,7 @@ public class StageController { @GetMapping("/selectList") @Log("下拉选舞台") - + //@SaCheckPermission("routePlan:list") public ResponseEntity selectList() { return new ResponseEntity<>(stageService.selectList(), HttpStatus.OK); @@ -80,7 +80,7 @@ public class StageController { @PostMapping("/addNewStage") @Log("保存舞台数据") - + public ResponseEntity addNewStage(@Validated @RequestBody Stage dto) { log.info("dto{}",dto); stageService.addNewStage(dto); @@ -89,7 +89,6 @@ public class StageController { @PostMapping("/getNewStageDataByCode") @Log("根据stage_code获取舞台数据") - public ResponseEntity getNewStageDataByCode(@RequestBody String code) { Stage one = stageService.getOne(new LambdaQueryWrapper().eq(Stage::getStage_code, code)); return new ResponseEntity<>(one, HttpStatus.CREATED); diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice.properties index f3cb68e69..0efb56cce 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice.properties @@ -6,3 +6,6 @@ one_message5=\u4E0D\u660E one_message6=\u6CA1\u6709\u8F93\u9001\u7EBF\u5230\u5806\u579B\u673A\u7684\u8DEF\u7531 one_message7=\u672A\u8054\u673A\u6216\u5DF2\u4FEE\u6539 one_mode1=\u7533\u8BF7\u5165\u5E93\u4EFB\u52A1 +one_mode2=\u7533\u8BF7\u7A7A\u6258\u76D8\u5165\u5E93 +one_mode3=\u7533\u8BF7AGV\u4EFB\u52A1 +one_mode4=\u7533\u8BF7\u7A7A\u6258\u76D8\u51FA\u5E93 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_en_US.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_en_US.properties index d1d418adf..e7f65333c 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_en_US.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_en_US.properties @@ -6,3 +6,7 @@ one_message5=unknown one_message6=There is no routing of the conveyor line to the stacker one_message7=Not online or modified one_mode1=Request a warehouse entry task +one_mode2=Request empty pallets for storage +one_mode3=Request AGV +one_mode4=Request empty pallets out of warehouse + diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_in_ID.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_in_ID.properties index 9a8cfbdf9..cf77c2975 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_in_ID.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_in_ID.properties @@ -6,3 +6,6 @@ one_message5=Tak diketahui one_message6=Tidak ada rute pengiriman ke stacker one_message7=Unfreed atau diubah one_mode1=Berlaku untuk tugas pustaka +one_mode2=Pendaftaran nampan kosong +one_mode3=Permintaan AGV +one_mode4=Mendaftar untuk pengiriman nampan kosong diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_zh_CN.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_zh_CN.properties index f3cb68e69..0efb56cce 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_zh_CN.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/one_device/one_advice_zh_CN.properties @@ -6,3 +6,6 @@ one_message5=\u4E0D\u660E one_message6=\u6CA1\u6709\u8F93\u9001\u7EBF\u5230\u5806\u579B\u673A\u7684\u8DEF\u7531 one_message7=\u672A\u8054\u673A\u6216\u5DF2\u4FEE\u6539 one_mode1=\u7533\u8BF7\u5165\u5E93\u4EFB\u52A1 +one_mode2=\u7533\u8BF7\u7A7A\u6258\u76D8\u5165\u5E93 +one_mode3=\u7533\u8BF7AGV\u4EFB\u52A1 +one_mode4=\u7533\u8BF7\u7A7A\u6258\u76D8\u51FA\u5E93 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties index c6d273580..d180e1c3c 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties @@ -18,6 +18,8 @@ universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\ universal_message1=\u653E\u8D27\u5B8C\u6210 universal_message2=\u653E\u8D27\u5931\u8D25 universal_message3=\u6709\u62A5\u8B66 +universal_message4=\u672A\u627E\u5230\u7B26\u5408\u6761\u4EF6\u7684\u6307\u4EE4 +universal_message5=\u4E0B\u53D1\u7535\u6C14\u4EFB\u52A1\u53F7\u6210\u529F universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001 universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001 universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties index 9d34a9d14..a4eb607b8 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties @@ -12,6 +12,8 @@ universal_releasing_completed=Release completed universal_remark1=The task is not found because universal_remark2=Working mode (mode) is not standby universal_remark3=Photoelectric signal (move) is in stock status +universal_message4=No matching instructions were found +universal_message5=Succeeded in delivering the electrical task number universal_remark4=The current report task ID should be 0 universal_remark5=Right-click the icon and change the Request task reset flag (requireSucess) to No universal_notCreateInstMessage=Instructions cannot be created because the task for the associated device is not found diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties index 73b7941ac..6d11953cd 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties @@ -18,6 +18,8 @@ universal_notCreateInstMessage=Misi untuk divais yang diasosiasikan tidak ditemu universal_message1=Pengiriman selesai universal_message2=Gagal memasukkan barang universal_message3=Alarm berbunyi +universal_message4=Tak ada perintah yang ditemukan +universal_message5=Misi kelistrikan berhasil universal_feedMessage1=Mode kerja tidak untuk mode dalam mode universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan universal_feedMessage3=tidak ada status pengiriman diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties index 28932b552..0d5f4fc28 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties @@ -18,6 +18,8 @@ universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\ universal_message1=\u653E\u8D27\u5B8C\u6210 universal_message2=\u653E\u8D27\u5931\u8D25 universal_message3=\u6709\u62A5\u8B66 +universal_message4=\u672A\u627E\u5230\u7B26\u5408\u6761\u4EF6\u7684\u6307\u4EE4 +universal_message5=\u4E0B\u53D1\u7535\u6C14\u4EFB\u52A1\u53F7\u6210\u529F universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001 universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001 universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001 diff --git a/acs2/nladmin-ui/src/i18n/langs/monitor/en.js b/acs2/nladmin-ui/src/i18n/langs/monitor/en.js index 661d0bb63..ea557524d 100644 --- a/acs2/nladmin-ui/src/i18n/langs/monitor/en.js +++ b/acs2/nladmin-ui/src/i18n/langs/monitor/en.js @@ -118,7 +118,10 @@ export default { 'loading_or_not': 'loading or not', 'barcode': 'Vehicle number', 'barcode_length': 'Vehicle length', - 'last_container': 'Last vehicle number' + 'last_container': 'Last vehicle number', + 'applySucess': 'Request task flag', + 'requireSucess': 'Request instruction mark' + } } } diff --git a/acs2/nladmin-ui/src/i18n/langs/monitor/in.js b/acs2/nladmin-ui/src/i18n/langs/monitor/in.js index e453e01cd..1ce62c624 100644 --- a/acs2/nladmin-ui/src/i18n/langs/monitor/in.js +++ b/acs2/nladmin-ui/src/i18n/langs/monitor/in.js @@ -118,7 +118,10 @@ export default { 'loading_or_not': 'dimuat atau tidak', 'barcode': 'Angkat tanda', 'barcode_length': 'Perjalanan panjang', - 'last_container': 'Nomor muatan terakhir' + 'last_container': 'Nomor muatan terakhir', + 'applySucess': 'Meminta tanda tugas', + 'requireSucess': 'Kode aplikasicomment' + } } } diff --git a/acs2/nladmin-ui/src/i18n/langs/monitor/zh.js b/acs2/nladmin-ui/src/i18n/langs/monitor/zh.js index f1d35565a..811fde9f6 100644 --- a/acs2/nladmin-ui/src/i18n/langs/monitor/zh.js +++ b/acs2/nladmin-ui/src/i18n/langs/monitor/zh.js @@ -118,7 +118,9 @@ export default { 'loading_or_not': '是否装载', 'barcode': '载具号', 'barcode_length': '载具长度', - 'last_container': '上次载具号' + 'last_container': '上次载具号', + 'applySucess': '请求任务标记', + 'requireSucess': '申请指令标记' } } } diff --git a/acs2/nladmin-ui/src/views/system/monitor/device/index.vue b/acs2/nladmin-ui/src/views/system/monitor/device/index.vue index 3e8794a2b..5e95fff17 100644 --- a/acs2/nladmin-ui/src/views/system/monitor/device/index.vue +++ b/acs2/nladmin-ui/src/views/system/monitor/device/index.vue @@ -200,6 +200,12 @@ + + + {{ $t('auto.common.false') }} + {{ $t('auto.common.true') }} + +