diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java
index 5d1cc66..a94f235 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java
@@ -10,6 +10,7 @@ import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device_driver.agv.ndcone.AgvNdcOneDeviceDriver;
import org.nl.acs.device_driver.agv.ndctwo.AgvNdcTwoDeviceDriver;
import org.nl.acs.device_driver.autodoor.standard_autodoor.StandardAutodoorDeviceDriver;
+import org.nl.acs.device_driver.two_conveyor.lamp_three_color.LampThreecolorDeviceDriver;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.instruction.domain.Instruction;
@@ -171,6 +172,8 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
String emptyNum = null;
//自动门
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
+ //报警灯
+ LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
if (agvaddr != 0) {
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
if (StrUtil.contains(old_device_code, "-")) {
@@ -201,7 +204,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
}
//任务完毕
//(无车id及状态)
- else if (phase == 0x14) {
+ else if (phase == 0x0A) {
if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令号{}对应的指令", ikey);
} else {
@@ -248,18 +251,41 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (ObjectUtil.isNotEmpty(device)) {
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
- try {
- standardAutodoorDeviceDriver.writing("to_open", "1");
- standardAutodoorDeviceDriver.writing("to_close", "0");
- } catch (Exception e) {
- log.info("下发电气信号失败:" + e.getMessage());
- e.printStackTrace();
- }
- if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1) {
- log.info("下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getOpen());
- data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
+ String link_three_lamp = device.getExtraValue().get("link_three_lamp").toString();
+ if (StrUtil.isNotEmpty(link_three_lamp)) {
+ Device code = deviceAppService.findDeviceByCode(link_three_lamp);
+ if (code.getDeviceDriver() instanceof LampThreecolorDeviceDriver) {
+ lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) code.getDeviceDriver();
+ lampThreecolorDeviceDriver.writing("to_command", "1");
+ }
+ Thread.sleep(5000);
+ try {
+ standardAutodoorDeviceDriver.writing("to_open", "0");
+ standardAutodoorDeviceDriver.writing("to_close", "1");
+ } catch (Exception e) {
+ log.info("下发电气信号失败:" + e.getMessage());
+ e.printStackTrace();
+ }
+ if (standardAutodoorDeviceDriver.getClose() == 1) {
+ log.info("读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
+ data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
+ } else {
+ log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
+ }
} else {
- log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
+ try {
+ standardAutodoorDeviceDriver.writing("to_open", "1");
+ standardAutodoorDeviceDriver.writing("to_close", "0");
+ } catch (Exception e) {
+ log.info("下发电气信号失败:" + e.getMessage());
+ e.printStackTrace();
+ }
+ if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1) {
+ log.info("下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getOpen());
+ data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
+ } else {
+ log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
+ }
}
}
} else {
@@ -274,18 +300,35 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (ObjectUtil.isNotEmpty(device)) {
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
- try {
- standardAutodoorDeviceDriver.writing("to_close", "1");
- standardAutodoorDeviceDriver.writing("to_open", "0");
- } catch (Exception e) {
- log.info("下发电气信号失败:" + e.getMessage());
- e.printStackTrace();
- }
- if (standardAutodoorDeviceDriver.getClose() == 1) {
- log.info("读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
+ String link_three_lamp = device.getExtraValue().get("link_three_lamp").toString();
+ if (StrUtil.isNotEmpty(link_three_lamp)) {
+ Device code = deviceAppService.findDeviceByCode(link_three_lamp);
+ if (code.getDeviceDriver() instanceof LampThreecolorDeviceDriver) {
+ lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) code.getDeviceDriver();
+ lampThreecolorDeviceDriver.writing("to_command", "0");
+ }
+ try {
+ standardAutodoorDeviceDriver.writing("to_open", "0");
+ standardAutodoorDeviceDriver.writing("to_close", "0");
+ } catch (Exception e) {
+ log.info("下发电气信号失败:" + e.getMessage());
+ e.printStackTrace();
+ }
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
- log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
+ try {
+ standardAutodoorDeviceDriver.writing("to_close", "1");
+ standardAutodoorDeviceDriver.writing("to_open", "0");
+ } catch (Exception e) {
+ log.info("下发电气信号失败:" + e.getMessage());
+ e.printStackTrace();
+ }
+ if (standardAutodoorDeviceDriver.getClose() == 1) {
+ log.info("读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
+ data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
+ } else {
+ log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
+ }
}
}
} else {
@@ -304,9 +347,6 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver();
agvNdcTwoDeviceDriver.processSocket(arr);
- } else if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) {
- agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver();
- agvNdcOneDeviceDriver.processSocket(arr);
}
} else {
log.info("当前phase:" + phase + "未找到对应设备");
diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/base/CommonFinalParam.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/base/CommonFinalParam.java
index ba3609b..d136e02 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/base/CommonFinalParam.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/base/CommonFinalParam.java
@@ -20,6 +20,7 @@ public class CommonFinalParam {
public static final String ONE = "1";
public static final String TWO = "2";
+ public static final String FINISHED = "2";
public static final String THREE = "3";
public static final String FOUR = "4";
diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/data/controller/MaterialbaseController.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/data/controller/MaterialbaseController.java
new file mode 100644
index 0000000..0fcfd6e
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/data/controller/MaterialbaseController.java
@@ -0,0 +1,75 @@
+package org.nl.acs.data.controller;
+
+
+import com.alibaba.fastjson.JSONArray;
+import org.nl.acs.data.domain.Materialbase;
+import org.nl.acs.data.domain.MaterialbaseQuery;
+import org.nl.acs.data.service.IMaterialbaseService;
+import org.nl.acs.point.domain.AcsPoint;
+import org.nl.acs.point.domain.PointQuery;
+import org.nl.common.base.TableDataInfo;
+import org.nl.common.domain.query.PageQuery;
+import org.nl.common.logging.annotation.Log;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Set;
+
+/**
+ *
+ * 物料基本信息表 前端控制器
+ *
+ *
+ * @author tuqiang
+ * @since 2024-10-10
+ */
+@RestController
+@RequestMapping("/api/materialbase")
+public class MaterialbaseController {
+
+ @Autowired
+ private IMaterialbaseService materialbaseService;
+
+ @GetMapping
+ @Log("查询物料管理")
+ //@SaCheckPermission("@el.check('schBasePoint:list')")
+ public ResponseEntity