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!fmdKl~kw3ad-n5HswVT*#ch&9(ryuP+JU|J{hZs=D0^yst9%6hQyr)FO=inJO
z3Hdsb|WTN-9F3Pcm4X4cfz&h}-wD8rogFuO9A??P1+^zX58}
zu@uy4A$*8eBl_%xf0zpu@7*iK9WLIrkA3StkIaXzW{efIpXH@^(S9V8jDk-9YvA+0
z&?Vs0zR~b;VEkZk9NbGE7RFBqCy@k>i-CTNp8$@7SP5|ACx_#RjwF%@@zXb$zj$>&
zb8$p`Ea0O>=L4*cwGi>h0anhrt$u^`tE)W7^676@OIdHS=*S#kG6%K?>J>JHimeN%pT9R06F*-Z329Af#4ss>=yQm<(+Dx-5bHVB
zJW8BdHXx9#$I)!Vp~h??pylwxcScS$pvJ+*SjcUNxc(691=;L}Y~0PW876)$g*hB%
zL2beYiGvTbU^eTRn01)-XcKr%eBv-Cy5(>?qBq3T5Ej;+$4Jg2G+MhF`BChBgp4
zpBJhcporoNN0@e1aT(2$ZJP^K^E>ggx0na5l(D{Ie|#kJ<50cu!MSt)Oq-g#X4&lL
z_w}E@5={^Gj!FGW&LnNzH|CWq{wJ5&*UeY(js4bT*tvJnKG#cKvAMGHc?CaCwPtqu}3pJY1Z#>$&6?D}7zMKJ&Lt3f?wr+YeL5Y`!~T~=
zStVfIvG1M;OP?@ib@W3A_J31;8ow=q3_bqjJEyvBIXmX*l|Dh=3~VyQ_xkI)qez6dCN?TU6DOSzGAeOcV1zCrQ4=2>866*=7&kIL
z3D0P?IQL`rgMGMqfDj!QF3vo|8b$3Vti1Xxu=la};8|erf_M$VMe)INz~y(qRzcN^
xyI-oyJkQFg)A&?f+Gt&(4hnwZQx@$={-WotWK*@uHmFW}fi>9F79VM#{~tAR$%y~}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/CargoLiftConveyorDefination.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/CargoLiftConveyorDefination.java
new file mode 100644
index 0000000..44bdb8c
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/CargoLiftConveyorDefination.java
@@ -0,0 +1,60 @@
+package org.nl.acs.device_driver.basedriver.cargo_lift_conveyor;
+
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.DeviceDriver;
+import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceType;
+import org.springframework.stereotype.Service;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 海亮迅捷plc测试
+ */
+@Service
+public class CargoLiftConveyorDefination implements OpcDeviceDriverDefination {
+ @Override
+ public String getDriverCode() {
+ return "cargo_lift_conveyor";
+ }
+
+ @Override
+ public String getDriverName() {
+ return "货梯对接线";
+ }
+
+ @Override
+ public String getDriverDescription() {
+ return "货梯对接线";
+ }
+
+ @Override
+ public DeviceDriver getDriverInstance(Device device) {
+ return (new CargoLiftConveyorDeviceDriver()).setDevice(device).setDriverDefination(this);
+ }
+
+ @Override
+ public Class extends DeviceDriver> getDeviceDriverType() {
+ return CargoLiftConveyorDeviceDriver.class;
+ }
+
+ @Override
+ public List getFitDeviceTypes() {
+ List types = new LinkedList();
+ types.add(DeviceType.conveyor);
+ return types;
+ }
+
+ @Override
+ public List getReadableItemDtos() {
+ return ItemProtocol.getReadableItemDtos();
+ }
+
+ @Override
+ public List getWriteableItemDtos() {
+ return ItemProtocol.getWriteableItemDtos();
+ }
+
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/CargoLiftConveyorDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/CargoLiftConveyorDeviceDriver.java
new file mode 100644
index 0000000..88cad73
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/CargoLiftConveyorDeviceDriver.java
@@ -0,0 +1,208 @@
+package org.nl.acs.device_driver.basedriver.cargo_lift_conveyor;
+
+import lombok.Data;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.agv.server.AgvService;
+import org.nl.acs.config.server.AcsConfigService;
+import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
+import org.nl.acs.device.service.DeviceService;
+import org.nl.acs.device_driver.DeviceDriver;
+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.ext.wms.service.AcsToWmsService;
+import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
+import org.nl.acs.instruction.service.InstructionService;
+import org.nl.acs.instruction.service.dto.Instruction;
+import org.nl.acs.log.service.LogServer;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceAppService;
+import org.nl.acs.route.service.RouteLineService;
+import org.nl.acs.task.service.TaskService;
+import org.nl.utils.SpringContextHolder;
+import org.openscada.opc.lib.da.Server;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 海亮清洗机储料仓
+ */
+@Slf4j
+@Data
+@RequiredArgsConstructor
+public class CargoLiftConveyorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
+
+ protected ItemProtocol itemProtocol = new ItemProtocol(this);
+ @Autowired
+ DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
+ @Autowired
+ InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
+ @Autowired
+ DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class);
+ @Autowired
+ TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
+ @Autowired
+ RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
+ @Autowired
+ AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
+ @Autowired
+ AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigService.class);
+ @Autowired
+ LogServer logServer = SpringContextHolder.getBean(LogServer.class);
+ @Autowired
+ AgvService agvService = SpringContextHolder.getBean(AgvService.class);
+
+ private Date instruction_require_time = new Date();
+ private Date instruction_finished_time = new Date();
+ private Date instruction_apply_time = new Date();
+ private int instruction_require_time_out = 3000;
+
+ int heartbeat = 0;
+ int mode = 0;
+ int move = 0;
+ int action = 0;
+ int error = 0;
+ int task = 0;
+
+ Boolean isonline = true;
+
+ Boolean iserror = false;
+
+ //1-执行任务;2-取货完成;3-放货完成;
+ int flag;
+
+ int last_mode = 0;
+ int last_move = 0;
+ int last_error = 0;
+
+ String device_code;
+
+ @Override
+ public Device getDevice() {
+ return this.device;
+ }
+
+ //请求成功标记
+ Boolean requireSucess = false;
+
+ @Override
+ public void execute() {
+ String message = null;
+
+ device_code = this.getDeviceCode();
+ heartbeat = this.itemProtocol.getItem_heartbeat();
+ mode = this.itemProtocol.getItem_mode();
+ move = this.itemProtocol.getItem_mode();
+ error = this.itemProtocol.getItem_error();
+ task = this.itemProtocol.getItem_task();
+ action = this.itemProtocol.getItem_action();
+
+
+ if (mode != last_mode) {
+ this.setRequireSucess(false);
+ }
+ if (move != last_move) {
+ if (move == 0) {
+ thingToNothing();
+ }
+ }
+ if (error != last_error) {
+ }
+
+
+ if (!this.itemProtocol.getIsonline()) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "信号量同步异常";
+ //未联机
+ } else if (mode == 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "未联机";
+ //有报警
+ } else if (error != 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "有报警";
+ //无报警
+ } else {
+ this.setIsonline(true);
+ this.setIserror(false);
+ message = "";
+ Instruction instruction = null;
+ List toInstructions;
+ switch (flag) {
+ //取货完成
+ case 1:
+ writing(2);
+ break;
+ //放货完成
+ case 2:
+ writing(3);
+ break;
+
+ }
+ }
+
+ last_mode = mode;
+ last_move = move;
+ last_error = error;
+ }
+
+
+ public synchronized boolean instruction_apply(String container_code) throws Exception {
+ Date date = new Date();
+ if (date.getTime() - this.instruction_apply_time.getTime() < (long) this.instruction_require_time_out) {
+ log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
+ return false;
+ } else {
+ this.instruction_apply_time = date;
+ requireSucess = true;
+ return true;
+ }
+ }
+
+ protected void thingToNothing() {
+
+ }
+
+ public void writing(int command) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, command);
+ ReadUtil.write(itemMap, server);
+ }
+
+ public void writing(int type, int command) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + ItemProtocol.item_to_command;
+ String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + ItemProtocol.item_to_target;
+ String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + ItemProtocol.item_to_task;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ if (type == 1) {
+ itemMap.put(to_command, command);
+ log.info("设备:" + device_code + ",下发PLC信号" + to_command + ",value:" + command);
+ } else if (type == 2) {
+ itemMap.put(to_target, command);
+ log.info("设备:" + device_code + ",下发PLC信号" + to_target + ",value:" + command);
+
+ } else if (type == 3) {
+ itemMap.put(to_task, command);
+ log.info("设备:" + device_code + ",下发PLC信号" + to_task + ",value:" + command);
+ }
+
+ ReadUtil.write(itemMap, server);
+ }
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/ItemProtocol.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/ItemProtocol.java
new file mode 100644
index 0000000..1be3569
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/cargo_lift_conveyor/ItemProtocol.java
@@ -0,0 +1,94 @@
+package org.nl.acs.device_driver.basedriver.cargo_lift_conveyor;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position.EmptyVehicleStackingPositionDeviceDriver;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Data
+public class ItemProtocol {
+
+ public static String item_heartbeat = "heartbeat";
+ public static String item_mode = "mode";
+ public static String item_move = "move";
+ public static String item_action = "action";
+ public static String item_error = "error";
+ public static String item_task = "task";
+
+
+ public static String item_to_command = "to_command";
+ public static String item_to_target = "to_target";
+ public static String item_to_task = "to_task";
+
+
+ private CargoLiftConveyorDeviceDriver driver;
+
+ public ItemProtocol(CargoLiftConveyorDeviceDriver driver) {
+ this.driver = driver;
+ }
+
+ public int getItem_heartbeat() {
+ return this.getOpcIntegerValue(item_heartbeat);
+ }
+
+ public int getItem_mode() {
+ return this.getOpcIntegerValue(item_mode);
+ }
+
+ public int getItem_move() {
+ return this.getOpcIntegerValue(item_move);
+ }
+
+ public int getItem_error() {
+ return this.getOpcIntegerValue(item_error);
+ }
+
+ public int getItem_action() {
+ return this.getOpcIntegerValue(item_action);
+ }
+
+ public int getItem_task() {
+ return this.getOpcIntegerValue(item_task);
+ }
+
+ Boolean isonline;
+
+ public int getOpcIntegerValue(String protocol) {
+ Integer value = this.driver.getIntegeregerValue(protocol);
+ if (value == null) {
+ setIsonline(false);
+ } else {
+ setIsonline(true);
+ return value;
+ }
+ return 0;
+
+ }
+
+ public static List getReadableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_heartbeat, "心跳", "VW0"));
+ list.add(new ItemDto(item_mode, "工作模式", "VW2"));
+ list.add(new ItemDto(item_move, "光电信号", "VW4"));
+ list.add(new ItemDto(item_action, "取放信号", "VW6"));
+ list.add(new ItemDto(item_error, "故障", "VW8"));
+ list.add(new ItemDto(item_task, "任务号", "VD10"));
+
+ return list;
+ }
+
+ public static List getWriteableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_to_command, "下发命令", "VW102"));
+ list.add(new ItemDto(item_to_target, "下发目标站", "VW104"));
+ list.add(new ItemDto(item_to_task, "任务号", "VD108"));
+ return list;
+ }
+
+
+}
+
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/EmptyVehicleStackingPositionDefination.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/EmptyVehicleStackingPositionDefination.java
new file mode 100644
index 0000000..57b0b11
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/EmptyVehicleStackingPositionDefination.java
@@ -0,0 +1,60 @@
+package org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position;
+
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.DeviceDriver;
+import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceType;
+import org.springframework.stereotype.Service;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 海亮迅捷plc测试
+ */
+@Service
+public class EmptyVehicleStackingPositionDefination implements OpcDeviceDriverDefination {
+ @Override
+ public String getDriverCode() {
+ return "empty_vehicle_stacking_position";
+ }
+
+ @Override
+ public String getDriverName() {
+ return "永裕叠盘位smart200";
+ }
+
+ @Override
+ public String getDriverDescription() {
+ return "永裕叠盘位smart200";
+ }
+
+ @Override
+ public DeviceDriver getDriverInstance(Device device) {
+ return (new EmptyVehicleStackingPositionDeviceDriver()).setDevice(device).setDriverDefination(this);
+ }
+
+ @Override
+ public Class extends DeviceDriver> getDeviceDriverType() {
+ return EmptyVehicleStackingPositionDeviceDriver.class;
+ }
+
+ @Override
+ public List getFitDeviceTypes() {
+ List types = new LinkedList();
+ types.add(DeviceType.conveyor);
+ return types;
+ }
+
+ @Override
+ public List getReadableItemDtos() {
+ return ItemProtocol.getReadableItemDtos();
+ }
+
+ @Override
+ public List getWriteableItemDtos() {
+ return ItemProtocol.getWriteableItemDtos();
+ }
+
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/EmptyVehicleStackingPositionDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/EmptyVehicleStackingPositionDeviceDriver.java
new file mode 100644
index 0000000..d4ec4f5
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/EmptyVehicleStackingPositionDeviceDriver.java
@@ -0,0 +1,194 @@
+package org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position;
+
+import lombok.Data;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.agv.server.AgvService;
+import org.nl.acs.config.server.AcsConfigService;
+import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
+import org.nl.acs.device.service.DeviceService;
+import org.nl.acs.device_driver.DeviceDriver;
+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.ext.wms.service.AcsToWmsService;
+import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
+import org.nl.acs.instruction.service.InstructionService;
+import org.nl.acs.instruction.service.dto.Instruction;
+import org.nl.acs.log.service.LogServer;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceAppService;
+import org.nl.acs.route.service.RouteLineService;
+import org.nl.acs.task.service.TaskService;
+import org.nl.utils.SpringContextHolder;
+import org.openscada.opc.lib.da.Server;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 海亮清洗机储料仓
+ */
+@Slf4j
+@Data
+@RequiredArgsConstructor
+public class EmptyVehicleStackingPositionDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
+ protected ItemProtocol itemProtocol = new ItemProtocol(this);
+ @Autowired
+ DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
+ @Autowired
+ InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
+ @Autowired
+ DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class);
+ @Autowired
+ TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
+ @Autowired
+ RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
+ @Autowired
+ AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
+ @Autowired
+ AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigService.class);
+ @Autowired
+ LogServer logServer = SpringContextHolder.getBean(LogServer.class);
+ @Autowired
+ AgvService agvService = SpringContextHolder.getBean(AgvService.class);
+
+ private Date instruction_require_time = new Date();
+ private Date instruction_finished_time = new Date();
+ private Date instruction_apply_time = new Date();
+ private int instruction_require_time_out = 3000;
+
+ int heartbeat = 0;
+ int mode = 0;
+ int move = 0;
+ int error = 0;
+ int number = 0;
+ int container_type = 0;
+ int task = 0;
+
+ Boolean isonline = true;
+
+ Boolean iserror = false;
+
+ //1-执行任务;2-取货完成;3-放货完成;
+ int flag;
+
+ int last_mode = 0;
+ int last_move = 0;
+ int last_error = 0;
+
+ String device_code;
+
+ @Override
+ public Device getDevice() {
+ return this.device;
+ }
+
+ //请求成功标记
+ Boolean requireSucess = false;
+
+ @Override
+ public void execute() {
+ String message = null;
+
+ device_code = this.getDeviceCode();
+ heartbeat = this.itemProtocol.getItem_heartbeat();
+ mode = this.itemProtocol.getItem_mode();
+ move = this.itemProtocol.getItem_mode();
+ error = this.itemProtocol.getItem_error();
+ number = this.itemProtocol.getItem_number();
+ container_type = this.itemProtocol.getItem_container_type();
+ task = this.itemProtocol.getItem_task();
+
+
+ if (mode != last_mode) {
+ this.setRequireSucess(false);
+ }
+ if (move != last_move) {
+ if (move == 0) {
+ thingToNothing();
+ }
+ }
+ if (error != last_error) {
+ }
+
+
+ if (!this.itemProtocol.getIsonline()) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "信号量同步异常";
+ //未联机
+ } else if (mode == 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "未联机";
+ //有报警
+ } else if (error != 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "有报警";
+ //无报警
+ } else {
+ this.setIsonline(true);
+ this.setIserror(false);
+ message = "";
+ Instruction instruction = null;
+ List toInstructions;
+ switch (flag) {
+ //取货完成
+ case 1:
+ writing(2);
+ break;
+ //放货完成
+ case 2:
+ writing(3);
+ break;
+
+ }
+ }
+
+ last_mode = mode;
+ last_move = move;
+ last_error = error;
+ }
+
+
+ public synchronized boolean instruction_apply(String container_code) throws Exception {
+ Date date = new Date();
+ if (date.getTime() - this.instruction_apply_time.getTime() < (long) this.instruction_require_time_out) {
+ log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
+ return false;
+ } else {
+ this.instruction_apply_time = date;
+ requireSucess = true;
+ return true;
+ }
+ }
+
+ protected void thingToNothing() {
+
+ }
+
+ public void writing(int command) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, command);
+ ReadUtil.write(itemMap, server);
+ }
+
+ public void writing(String key, String value) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + key;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, value);
+ ReadUtil.write(itemMap, server);
+ }
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/ItemProtocol.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/ItemProtocol.java
new file mode 100644
index 0000000..adc0f2a
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/empty_vehicle_stacking_position/ItemProtocol.java
@@ -0,0 +1,100 @@
+package org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Data
+public class ItemProtocol {
+
+ public static String item_heartbeat = "heartbeat";
+ public static String item_mode = "mode";
+ public static String item_move = "move";
+ public static String item_error = "error";
+ public static String item_number = "number";
+ public static String item_container_type = "container_type";
+ public static String item_task = "task";
+
+
+ public static String item_to_command = "to_command";
+ public static String item_to_target = "to_target";
+ public static String item_to_container_type = "to_container_type";
+ public static String item_to_task = "to_task";
+
+
+ private EmptyVehicleStackingPositionDeviceDriver driver;
+
+ public ItemProtocol(EmptyVehicleStackingPositionDeviceDriver driver) {
+ this.driver = driver;
+ }
+
+ public int getItem_heartbeat() {
+ return this.getOpcIntegerValue(item_heartbeat);
+ }
+
+ public int getItem_mode() {
+ return this.getOpcIntegerValue(item_mode);
+ }
+
+ public int getItem_move() {
+ return this.getOpcIntegerValue(item_move);
+ }
+
+ public int getItem_error() {
+ return this.getOpcIntegerValue(item_error);
+ }
+
+ public int getItem_number() {
+ return this.getOpcIntegerValue(item_number);
+ }
+
+ public int getItem_container_type() {
+ return this.getOpcIntegerValue(item_container_type);
+ }
+
+ public int getItem_task() {
+ return this.getOpcIntegerValue(item_task);
+ }
+
+ Boolean isonline;
+
+ public int getOpcIntegerValue(String protocol) {
+ Integer value = this.driver.getIntegeregerValue(protocol);
+ if (value == null) {
+ setIsonline(false);
+ } else {
+ setIsonline(true);
+ return value;
+ }
+ return 0;
+
+ }
+
+ public static List getReadableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_heartbeat, "心跳", "VW0"));
+ list.add(new ItemDto(item_mode, "工作模式", "VW2"));
+ list.add(new ItemDto(item_move, "光电信号", "VW4"));
+ list.add(new ItemDto(item_number, "数量", "VW6"));
+ list.add(new ItemDto(item_container_type, "托盘类型", "VW8"));
+ list.add(new ItemDto(item_error, "故障", "VW10"));
+ list.add(new ItemDto(item_task, "任务号", "VD12"));
+
+ return list;
+ }
+
+ public static List getWriteableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_to_command, "下发命令", "VW52"));
+ list.add(new ItemDto(item_to_target , "下发目标站", "VW54"));
+ list.add(new ItemDto(item_to_task, "任务号", "VD58"));
+ return list;
+ }
+
+
+}
+
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDefination.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDefination.java
index 64017e2..41ac944 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDefination.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDefination.java
@@ -22,12 +22,12 @@ public class HailiangSmartplcTestDefination implements OpcDeviceDriverDefination
@Override
public String getDriverName() {
- return "海亮-西门子plc测试";
+ return "永裕共挤线smart200";
}
@Override
public String getDriverDescription() {
- return "海亮-西门子plc测试";
+ return "永裕共挤线smart200";
}
@Override
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDeviceDriver.java
index c5a1dbf..12724ce 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDeviceDriver.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/HailiangSmartplcTestDeviceDriver.java
@@ -1,5 +1,7 @@
package org.nl.acs.device_driver.basedriver.hailiang_smart_plc_test;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -26,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -55,6 +58,11 @@ public class HailiangSmartplcTestDeviceDriver extends AbstractOpcDeviceDriver im
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
+ private Date instruction_require_time = new Date();
+ private Date instruction_finished_time = new Date();
+ private Date instruction_apply_time = new Date();
+ private int instruction_require_time_out = 3000;
+
int heartbeat = 0;
int mode = 0;
int move = 0;
@@ -64,6 +72,17 @@ public class HailiangSmartplcTestDeviceDriver extends AbstractOpcDeviceDriver im
int container_type = 0;
int task = 0;
+ Boolean isonline = true;
+
+ Boolean iserror = false;
+
+ //1-执行任务;2-取货完成;3-放货完成;
+ int flag;
+
+ int last_mode = 0;
+ int last_move = 0;
+ int last_error = 0;
+
String device_code;
@Override
@@ -71,23 +90,132 @@ public class HailiangSmartplcTestDeviceDriver extends AbstractOpcDeviceDriver im
return this.device;
}
+ //请求成功标记
+ Boolean requireSucess = false;
@Override
public void execute() {
+ String message = null;
+
device_code = this.getDeviceCode();
heartbeat = this.itemProtocol.getItem_heartbeat();
mode = this.itemProtocol.getItem_mode();
- move = this.itemProtocol.getItem_mode();
+ move = this.itemProtocol.getItem_move();
action = this.itemProtocol.getItem_action();
error = this.itemProtocol.getItem_error();
number = this.itemProtocol.getItem_number();
container_type = this.itemProtocol.getItem_container_type();
task = this.itemProtocol.getItem_task();
+
+ if (mode != last_mode) {
+ this.setRequireSucess(false);
+ }
+ if (move != last_move) {
+ if (move == 0) {
+ thingToNothing();
+ }
+ }
+ if (error != last_error) {
+ }
+
+
+ if (!this.itemProtocol.getIsonline()) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "信号量同步异常";
+ //未联机
+ } else if (mode == 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "未联机";
+ //有报警
+ } else if (error != 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "有报警";
+ //无报警
+ } else {
+ this.setIsonline(true);
+ this.setIserror(false);
+ JSONObject jo = new JSONObject();
+ switch (mode) {
+ case 1:
+ log.debug("设备运转模式:等待工作");
+ break;
+ case 4:
+ //申请空盘
+ if (move == 0 && !requireSucess) {
+ Date date = new Date();
+ if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
+ log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
+ }else {
+ //向LMS发送请求,发送终点和托盘类型
+ jo.put("type", "1");
+ jo.put("point_code", device_code);
+ jo.put("vehicle_num", "1");
+ jo.put("vehicle_type", container_type);
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ }
+ }
+ break;
+ case 5:
+ //满托入库
+ if (move == 1 && !requireSucess) {
+ Date date = new Date();
+ if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
+ log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
+ }else {
+ //向LMS发送请求,发送起点
+ jo.put("type", "2");
+ jo.put("point_code", device_code);
+ jo.put("vehicle_num", "1");
+ jo.put("vehicle_type", container_type);
+ jo.put("qty", number);
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ }
+ }
+ break;
+ }
+ switch (flag) {
+ //取货完成
+ case 1:
+ writing(2);
+ break;
+ //放货完成
+ case 2:
+ writing(3);
+ break;
+
+ }
+ }
+
+ last_mode = mode;
+ last_move = move;
+ last_error = error;
+ }
+
+
+ protected void thingToNothing() {
+
}
public void writing(int command) {
-
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, command);
+ ReadUtil.write(itemMap, server);
}
public void writing(String key, String value) {
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/ItemProtocol.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/ItemProtocol.java
index 4c9da20..4ecd889 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/ItemProtocol.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_smart_plc_test/ItemProtocol.java
@@ -49,7 +49,7 @@ public class ItemProtocol {
}
public int getItem_error() {
- return this.getOpcIntegerValue(item_action);
+ return this.getOpcIntegerValue(item_error);
}
public int getItem_number() {
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/HaoKaiAutoConveyorDefination.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/HaoKaiAutoConveyorDefination.java
new file mode 100644
index 0000000..d8f37e4
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/HaoKaiAutoConveyorDefination.java
@@ -0,0 +1,60 @@
+package org.nl.acs.device_driver.basedriver.haokai_auto_conveyor;
+
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.DeviceDriver;
+import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceType;
+import org.springframework.stereotype.Service;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 海亮迅捷plc测试
+ */
+@Service
+public class HaoKaiAutoConveyorDefination implements OpcDeviceDriverDefination {
+ @Override
+ public String getDriverCode() {
+ return "haokai_auto_conveyor";
+ }
+
+ @Override
+ public String getDriverName() {
+ return "豪凯自动线对接位";
+ }
+
+ @Override
+ public String getDriverDescription() {
+ return "豪凯自动线对接位";
+ }
+
+ @Override
+ public DeviceDriver getDriverInstance(Device device) {
+ return (new HaoKaiAutoConveyorDeviceDriver()).setDevice(device).setDriverDefination(this);
+ }
+
+ @Override
+ public Class extends DeviceDriver> getDeviceDriverType() {
+ return HaoKaiAutoConveyorDeviceDriver.class;
+ }
+
+ @Override
+ public List getFitDeviceTypes() {
+ List types = new LinkedList();
+ types.add(DeviceType.conveyor);
+ return types;
+ }
+
+ @Override
+ public List getReadableItemDtos() {
+ return ItemProtocol.getReadableItemDtos();
+ }
+
+ @Override
+ public List getWriteableItemDtos() {
+ return ItemProtocol.getWriteableItemDtos();
+ }
+
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/HaoKaiAutoConveyorDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/HaoKaiAutoConveyorDeviceDriver.java
new file mode 100644
index 0000000..7337bdf
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/HaoKaiAutoConveyorDeviceDriver.java
@@ -0,0 +1,237 @@
+package org.nl.acs.device_driver.basedriver.haokai_auto_conveyor;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import lombok.Data;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.agv.server.AgvService;
+import org.nl.acs.config.server.AcsConfigService;
+import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
+import org.nl.acs.device.service.DeviceService;
+import org.nl.acs.device_driver.DeviceDriver;
+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.ext.wms.service.AcsToWmsService;
+import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
+import org.nl.acs.instruction.service.InstructionService;
+import org.nl.acs.instruction.service.dto.Instruction;
+import org.nl.acs.log.service.LogServer;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceAppService;
+import org.nl.acs.route.service.RouteLineService;
+import org.nl.acs.task.service.TaskService;
+import org.nl.utils.SpringContextHolder;
+import org.openscada.opc.lib.da.Server;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 海亮清洗机储料仓
+ */
+@Slf4j
+@Data
+@RequiredArgsConstructor
+public class HaoKaiAutoConveyorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
+ protected ItemProtocol itemProtocol = new ItemProtocol(this);
+ @Autowired
+ DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
+ @Autowired
+ InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
+ @Autowired
+ DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class);
+ @Autowired
+ TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
+ @Autowired
+ RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
+ @Autowired
+ AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
+ @Autowired
+ AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigService.class);
+ @Autowired
+ LogServer logServer = SpringContextHolder.getBean(LogServer.class);
+ @Autowired
+ AgvService agvService = SpringContextHolder.getBean(AgvService.class);
+
+ private Date instruction_require_time = new Date();
+ private Date instruction_finished_time = new Date();
+ private Date instruction_apply_time = new Date();
+ private int instruction_require_time_out = 3000;
+
+ int heartbeat = 0;
+ int mode = 0;
+ int move = 0;
+ int action = 0;
+ int error = 0;
+ int task = 0;
+
+ Boolean isonline = true;
+
+ Boolean iserror = false;
+
+ //1-执行任务;2-取货完成;3-放货完成;
+ int flag;
+
+ int last_mode = 0;
+ int last_move = 0;
+ int last_error = 0;
+
+ String device_code;
+
+ @Override
+ public Device getDevice() {
+ return this.device;
+ }
+
+ //请求成功标记
+ Boolean requireSucess = false;
+
+ @Override
+ public void execute() {
+ String message = null;
+
+ device_code = this.getDeviceCode();
+ heartbeat = this.itemProtocol.getItem_heartbeat();
+ mode = this.itemProtocol.getItem_mode();
+ move = this.itemProtocol.getItem_mode();
+ error = this.itemProtocol.getItem_error();
+ task = this.itemProtocol.getItem_task();
+ action = this.itemProtocol.getItem_action();
+
+
+ if (mode != last_mode) {
+ this.setRequireSucess(false);
+ }
+ if (move != last_move) {
+ if (move == 0) {
+ thingToNothing();
+ }
+ }
+ if (error != last_error) {
+ }
+
+
+ if (!this.itemProtocol.getIsonline()) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "信号量同步异常";
+ //未联机
+ } else if (mode == 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "未联机";
+ //有报警
+ } else if (error != 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "有报警";
+ //无报警
+ } else {
+ this.setIsonline(true);
+ this.setIserror(false);
+ message = "";
+ Instruction instruction = null;
+ List toInstructions;
+ switch (mode) {
+ case 1:
+ log.debug("设备运转模式:等待工作");
+ break;
+ case 2:
+ //申请任务
+ if (move > 0 && !requireSucess) {
+ message = "申请任务中...";
+ JSONObject apply = new JSONObject();
+ apply.put("type","8");
+ apply.put("point_code",device_code);
+ String str = acsToWmsService.applyTaskToWms(apply);
+ JSONObject jo = JSON.parseObject(str);
+ if (ObjectUtil.isEmpty(jo)) {
+ message = "接口不通";
+ } else {
+ if (jo.getInteger("status") == 200) {
+ requireSucess = true;
+ } else {
+ requireSucess = false;
+ message = jo.get("message").toString();
+ }
+ }
+ }
+
+ }
+ switch (flag) {
+ //取货完成
+ case 1:
+ writing(2);
+ break;
+ //放货完成
+ case 2:
+ writing(3);
+ break;
+
+ }
+ }
+
+ last_mode = mode;
+ last_move = move;
+ last_error = error;
+ }
+
+
+ public synchronized boolean instruction_apply(String container_code) throws Exception {
+ Date date = new Date();
+ if (date.getTime() - this.instruction_apply_time.getTime() < (long) this.instruction_require_time_out) {
+ log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
+ return false;
+ } else {
+ this.instruction_apply_time = date;
+ requireSucess = true;
+ return true;
+ }
+ }
+
+ protected void thingToNothing() {
+ this.setRequireSucess(false);
+ }
+
+ public void writing(int command) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, command);
+ ReadUtil.write(itemMap, server);
+ }
+
+ public void writing(int type, int command) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.cargo_lift_conveyor.ItemProtocol.item_to_command;
+ String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.cargo_lift_conveyor.ItemProtocol.item_to_target;
+ String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.cargo_lift_conveyor.ItemProtocol.item_to_task;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ if (type == 1) {
+ itemMap.put(to_command, command);
+ log.info("设备:" + device_code + ",下发PLC信号" + to_command + ",value:" + command);
+ } else if (type == 2) {
+ itemMap.put(to_target, command);
+ log.info("设备:" + device_code + ",下发PLC信号" + to_target + ",value:" + command);
+
+ } else if (type == 3) {
+ itemMap.put(to_task, command);
+ log.info("设备:" + device_code + ",下发PLC信号" + to_task + ",value:" + command);
+ }
+
+ ReadUtil.write(itemMap, server);
+ }
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/ItemProtocol.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/ItemProtocol.java
new file mode 100644
index 0000000..c0dbe02
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/haokai_auto_conveyor/ItemProtocol.java
@@ -0,0 +1,94 @@
+package org.nl.acs.device_driver.basedriver.haokai_auto_conveyor;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.basedriver.cargo_lift_conveyor.CargoLiftConveyorDeviceDriver;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Data
+public class ItemProtocol {
+
+ public static String item_heartbeat = "heartbeat";
+ public static String item_mode = "mode";
+ public static String item_move = "move";
+ public static String item_action = "action";
+ public static String item_error = "error";
+ public static String item_task = "task";
+
+
+ public static String item_to_command = "to_command";
+ public static String item_to_target = "to_target";
+ public static String item_to_task = "to_task";
+
+
+ private HaoKaiAutoConveyorDeviceDriver driver;
+
+ public ItemProtocol(HaoKaiAutoConveyorDeviceDriver driver) {
+ this.driver = driver;
+ }
+
+ public int getItem_heartbeat() {
+ return this.getOpcIntegerValue(item_heartbeat);
+ }
+
+ public int getItem_mode() {
+ return this.getOpcIntegerValue(item_mode);
+ }
+
+ public int getItem_move() {
+ return this.getOpcIntegerValue(item_move);
+ }
+
+ public int getItem_error() {
+ return this.getOpcIntegerValue(item_error);
+ }
+
+ public int getItem_action() {
+ return this.getOpcIntegerValue(item_action);
+ }
+
+ public int getItem_task() {
+ return this.getOpcIntegerValue(item_task);
+ }
+
+ Boolean isonline;
+
+ public int getOpcIntegerValue(String protocol) {
+ Integer value = this.driver.getIntegeregerValue(protocol);
+ if (value == null) {
+ setIsonline(false);
+ } else {
+ setIsonline(true);
+ return value;
+ }
+ return 0;
+
+ }
+
+ public static List getReadableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_heartbeat, "心跳", "VW0"));
+ list.add(new ItemDto(item_mode, "工作模式", "VW2"));
+ list.add(new ItemDto(item_move, "光电信号", "VW4"));
+ list.add(new ItemDto(item_action, "取放信号", "VW6"));
+ list.add(new ItemDto(item_error, "故障", "VW8"));
+ list.add(new ItemDto(item_task, "任务号", "VD10"));
+
+ return list;
+ }
+
+ public static List getWriteableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_to_command, "下发命令", "VW102"));
+ list.add(new ItemDto(item_to_target, "下发目标站", "VW104"));
+ list.add(new ItemDto(item_to_task, "任务号", "VD108"));
+ return list;
+ }
+
+
+}
+
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/ItemProtocol.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/ItemProtocol.java
new file mode 100644
index 0000000..9b3b8d7
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/ItemProtocol.java
@@ -0,0 +1,100 @@
+package org.nl.acs.device_driver.basedriver.paint_conveyor;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.basedriver.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Data
+public class ItemProtocol {
+
+ public static String item_heartbeat = "heartbeat";
+ public static String item_mode = "mode";
+ public static String item_move = "move";
+ public static String item_action = "action";
+ public static String item_error = "error";
+ public static String item_number = "number";
+ public static String item_task = "task";
+
+
+ public static String item_to_target = "to_target";//
+ public static String item_to_command = "to_command";//
+ public static String item_to_task = "to_task";//
+
+
+ private PaintConveyorDeviceDriver driver;
+
+ public ItemProtocol(PaintConveyorDeviceDriver driver) {
+ this.driver = driver;
+ }
+
+ public int getItem_heartbeat() {
+ return this.getOpcIntegerValue(item_heartbeat);
+ }
+
+ public int getItem_mode() {
+ return this.getOpcIntegerValue(item_mode);
+ }
+
+ public int getItem_move() {
+ return this.getOpcIntegerValue(item_move);
+ }
+
+ public int getItem_action() {
+ return this.getOpcIntegerValue(item_action);
+ }
+
+ public int getItem_error() {
+ return this.getOpcIntegerValue(item_error);
+ }
+
+ public int getItem_number() {
+ return this.getOpcIntegerValue(item_number);
+ }
+
+ public int getItem_task() {
+ return this.getOpcIntegerValue(item_task);
+ }
+
+ Boolean isonline;
+
+ public int getOpcIntegerValue(String protocol) {
+ Integer value = this.driver.getIntegeregerValue(protocol);
+ if (value == null) {
+ setIsonline(false);
+ } else {
+ setIsonline(true);
+ return value;
+ }
+ return 0;
+
+ }
+
+ public static List getReadableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_heartbeat, "心跳", "D0000000"));
+ list.add(new ItemDto(item_mode, "模式", "D0000004"));
+ list.add(new ItemDto(item_move, "光电信号", "D0000008"));
+ list.add(new ItemDto(item_action, "取放信号", "D0000012"));
+ list.add(new ItemDto(item_error, "故障", "D0000016"));
+ list.add(new ItemDto(item_number, "数量", "D0000020"));
+ list.add(new ItemDto(item_task, "任务号", "D0000024"));
+
+ return list;
+ }
+
+ public static List getWriteableItemDtos() {
+ ArrayList list = new ArrayList();
+ list.add(new ItemDto(item_to_command, "下发命令", "D00000102"));
+ list.add(new ItemDto(item_to_target , "下发目标站", "D00000106"));
+ list.add(new ItemDto(item_to_task, "任务号", "D00000110"));
+ return list;
+ }
+
+
+}
+
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/PaintConveyorDefination.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/PaintConveyorDefination.java
new file mode 100644
index 0000000..02524ca
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/PaintConveyorDefination.java
@@ -0,0 +1,61 @@
+package org.nl.acs.device_driver.basedriver.paint_conveyor;
+
+import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
+import org.nl.acs.device_driver.DeviceDriver;
+import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceType;
+import org.springframework.stereotype.Service;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 海亮迅捷plc测试
+ */
+@Service
+public class PaintConveyorDefination implements OpcDeviceDriverDefination {
+ @Override
+ public String getDriverCode() {
+ return "paint_conveyor";
+ }
+
+ @Override
+ public String getDriverName() {
+ return "油漆线";
+ }
+
+ @Override
+ public String getDriverDescription() {
+ return "油漆线";
+ }
+
+ @Override
+ public DeviceDriver getDriverInstance(Device device) {
+ return (new PaintConveyorDeviceDriver()).setDevice(device).setDriverDefination(this);
+
+ }
+
+ @Override
+ public Class extends DeviceDriver> getDeviceDriverType() {
+ return PaintConveyorDeviceDriver.class;
+ }
+
+ @Override
+ public List getFitDeviceTypes() {
+ List types = new LinkedList();
+ types.add(DeviceType.conveyor);
+ return types;
+ }
+
+ @Override
+ public List getReadableItemDtos() {
+ return ItemProtocol.getReadableItemDtos();
+ }
+
+ @Override
+ public List getWriteableItemDtos() {
+ return ItemProtocol.getWriteableItemDtos();
+ }
+
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/PaintConveyorDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/PaintConveyorDeviceDriver.java
new file mode 100644
index 0000000..3240558
--- /dev/null
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paint_conveyor/PaintConveyorDeviceDriver.java
@@ -0,0 +1,261 @@
+package org.nl.acs.device_driver.basedriver.paint_conveyor;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.JSONPObject;
+import lombok.Data;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.nl.acs.agv.server.AgvService;
+import org.nl.acs.config.server.AcsConfigService;
+import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
+import org.nl.acs.device.service.DeviceService;
+import org.nl.acs.device_driver.DeviceDriver;
+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.ext.wms.service.AcsToWmsService;
+import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
+import org.nl.acs.instruction.service.InstructionService;
+import org.nl.acs.log.service.LogServer;
+import org.nl.acs.opc.Device;
+import org.nl.acs.opc.DeviceAppService;
+import org.nl.acs.route.service.RouteLineService;
+import org.nl.acs.task.service.TaskService;
+import org.nl.utils.SpringContextHolder;
+import org.openscada.opc.lib.da.Server;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 海亮清洗机储料仓
+ */
+@Slf4j
+@Data
+@RequiredArgsConstructor
+public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
+ protected ItemProtocol itemProtocol = new ItemProtocol(this);
+ @Autowired
+ DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
+ @Autowired
+ InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
+ @Autowired
+ DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class);
+ @Autowired
+ TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
+ @Autowired
+ RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
+ @Autowired
+ AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
+ @Autowired
+ AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigService.class);
+ @Autowired
+ LogServer logServer = SpringContextHolder.getBean(LogServer.class);
+ @Autowired
+ AgvService agvService = SpringContextHolder.getBean(AgvService.class);
+
+ private Date instruction_require_time = new Date();
+ private Date instruction_finished_time = new Date();
+ private Date instruction_apply_time = new Date();
+ private int instruction_require_time_out = 3000;
+
+ int heartbeat = 0;
+ int mode = 0;
+ int move = 0;
+ int action = 0;
+ int error = 0;
+ int number = 0;
+ int task = 0;
+
+ Boolean isonline = true;
+
+ Boolean iserror = false;
+
+ //1-执行任务;2-取货完成;3-放货完成;
+ int flag;
+
+ int last_mode = 0;
+ int last_move = 0;
+ int last_error = 0;
+
+ String device_code;
+
+ @Override
+ public Device getDevice() {
+ return this.device;
+ }
+
+ //请求成功标记
+ Boolean requireSucess = false;
+
+ @Override
+ public void execute() {
+ String message = null;
+
+ device_code = this.getDeviceCode();
+ heartbeat = this.itemProtocol.getItem_heartbeat();
+ mode = this.itemProtocol.getItem_mode();
+ move = this.itemProtocol.getItem_move();
+ action = this.itemProtocol.getItem_action();
+ error = this.itemProtocol.getItem_error();
+ number = this.itemProtocol.getItem_number();
+ task = this.itemProtocol.getItem_task();
+
+
+ if (mode != last_mode) {
+ this.setRequireSucess(false);
+ }
+ if (move != last_move) {
+ if (move == 0) {
+ thingToNothing();
+ }
+ }
+ if (error != last_error) {
+ }
+
+
+ if (!this.itemProtocol.getIsonline()) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "信号量同步异常";
+ //未联机
+ } else if (mode == 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "未联机";
+ //有报警
+ } else if (error != 0) {
+ this.setIsonline(false);
+ this.setIserror(true);
+ message = "有报警";
+ //无报警
+ } else {
+ this.setIsonline(true);
+ this.setIserror(false);
+ JSONObject jo = new JSONObject();
+ switch (mode) {
+ case 1:
+ log.debug("设备运转模式:等待工作");
+ break;
+ case 5:
+ //下料位申请空盘
+ if (move == 0 && !requireSucess) {
+ //向LMS发送请求,发送终点和托盘类型
+ jo.put("type","3");
+ jo.put("point_code",device_code);
+ jo.put("vehicle_num","10");
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ }
+ case 6:
+ //下料位满拖申请
+ if (move == 1 && !requireSucess) {
+ //向LMS发送请求,发送起点
+ jo.put("type","7");
+ jo.put("point_code",device_code);
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ }
+ case 7:
+ //上料位满拖申请
+ if (move == 0 && !requireSucess) {
+ //向LMS发送请求,发送起点
+ jo.put("type","4");
+ jo.put("point_code",device_code);
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ }
+ break;
+ case 8:
+ if (move == 1 && !requireSucess) {
+ //上料位空托入库
+ jo.put("type", "5");
+ jo.put("point_code", device_code);
+ jo.put("vehicle_num", number);
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ break;
+ }
+ case 9:
+ if (move == 1 && !requireSucess) {
+ //强制满垛入库
+ jo.put("type", "5");
+ jo.put("point_code", device_code);
+ jo.put("vehicle_num", number);
+ String result = acsToWmsService.applyTaskToWms(jo);
+ JSONObject res_jo = JSONObject.parseObject(result);
+ if (res_jo.getString("status").equals("200")){
+ requireSucess = true;
+ }
+ break;
+ }
+ }
+ switch (flag) {
+ //取货完成
+ case 1:
+ writing(2);
+ break;
+ //放货完成
+ case 2:
+ writing(3);
+ break;
+
+ }
+ }
+
+ last_mode = mode;
+ last_move = move;
+ last_error = error;
+ }
+
+
+ public synchronized boolean instruction_apply(String container_code) throws Exception {
+ Date date = new Date();
+ if (date.getTime() - this.instruction_apply_time.getTime() < (long) this.instruction_require_time_out) {
+ log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
+ return false;
+ } else {
+ this.instruction_apply_time = date;
+ requireSucess = true;
+ return true;
+ }
+ }
+
+ protected void thingToNothing() {
+
+ }
+
+ public void writing(int command) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, command);
+ ReadUtil.write(itemMap, server);
+ }
+
+ public void writing(String key, String value) {
+ String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ + "." + key;
+ String opcservcerid = this.getDevice().getOpc_server_id();
+ Server server = ReadUtil.getServer(opcservcerid);
+ Map itemMap = new HashMap();
+ itemMap.put(to_command, value);
+ ReadUtil.write(itemMap, server);
+ }
+}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/StandardCoveyorControlWithPlcScannerDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/StandardCoveyorControlWithPlcScannerDeviceDriver.java
index 6e95597..b29c269 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/StandardCoveyorControlWithPlcScannerDeviceDriver.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_plcscanner/StandardCoveyorControlWithPlcScannerDeviceDriver.java
@@ -817,7 +817,7 @@ public class StandardCoveyorControlWithPlcScannerDeviceDriver extends AbstractOp
applySucess = true;
} else {
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS).toString(), "1")) {
- String str = acsToWmsService.applyTaskToWms(this.getDeviceCode(), container_code, height, 0);
+ //String str = acsToWmsService.applyTaskToWms(this.getDeviceCode(), container_code, height, 0);
JSONObject jo = JSON.parseObject(str);
if (ObjectUtil.isEmpty(jo)) {
message = "接口不通";
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/ItemProtocol.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/ItemProtocol.java
index 6c26264..a1c8e77 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/ItemProtocol.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/ItemProtocol.java
@@ -3,7 +3,6 @@ package org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scann
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
-
import java.util.ArrayList;
import java.util.List;
@@ -15,17 +14,14 @@ public class ItemProtocol {
public static String item_mode = "mode";
public static String item_move = "move";
public static String item_action = "action";
- public static String item_ioaction = "ioaction";
- public static String item_height = "height";
public static String item_error = "error";
- public static String item_direction = "direction";
- public static String item_operation_type = "operation_type";
public static String item_task = "task";
+
public static String item_to_command = "to_command";
public static String item_to_target = "to_target";
public static String item_to_task = "to_task";
- public static String item_weight = "weight";
+
private StandardCoveyorControlWithScannerDeviceDriver driver;
@@ -33,70 +29,35 @@ public class ItemProtocol {
this.driver = driver;
}
- public int getHeartbeat() {
+ public int getItem_heartbeat() {
return this.getOpcIntegerValue(item_heartbeat);
}
- public int getMode() {
+ public int getItem_mode() {
return this.getOpcIntegerValue(item_mode);
}
- public int getMove() {
+ public int getItem_move() {
return this.getOpcIntegerValue(item_move);
}
- public int getAction() {
- return this.getOpcIntegerValue(item_action);
- }
-
- public int getIoAction() {
- return this.getOpcIntegerValue(item_ioaction);
- }
-
- public int getHeight() {
- return this.getOpcIntegerValue(item_height);
- }
-
- public int getDirection() {
- return this.getOpcIntegerValue(item_direction);
- }
-
- public int getOperation_type() {
- return this.getOpcIntegerValue(item_operation_type);
- }
-
-
- public int getError() {
+ public int getItem_error() {
return this.getOpcIntegerValue(item_error);
}
- public int getTask() {
+ public int getItem_action() {
+ return this.getOpcIntegerValue(item_action);
+ }
+
+ public int getItem_task() {
return this.getOpcIntegerValue(item_task);
}
- public int getToCommand() {
- return this.getOpcIntegerValue(item_to_command);
- }
-
- public int getToTarget() {
- return this.getOpcIntegerValue(item_to_target);
- }
-
- public int getToTask() {
- return this.getOpcIntegerValue(item_to_task);
- }
-
- //是否有货
- public int hasGoods(int move) {
- return move;
- }
-
Boolean isonline;
public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol);
if (value == null) {
- log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
setIsonline(false);
} else {
setIsonline(true);
@@ -108,26 +69,24 @@ public class ItemProtocol {
public static List getReadableItemDtos() {
ArrayList list = new ArrayList();
- list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
- list.add(new ItemDto(item_mode, "工作状态", "DB600.B1", Boolean.valueOf(true)));
- list.add(new ItemDto(item_move, "光电开关信号", "DB600.B2"));
- list.add(new ItemDto(item_action, "取放信号", "DB600.B3"));
- list.add(new ItemDto(item_ioaction, "进出类型", "DB600.B4"));
- list.add(new ItemDto(item_height, "高度类型", "DB600.B5"));
- list.add(new ItemDto(item_error, "报警信号", "DB600.B6"));
- list.add(new ItemDto(item_direction, "电机方向", "DB600.B7"));
- list.add(new ItemDto(item_operation_type, "作业类型", "DB600.B8"));
- list.add(new ItemDto(item_task, "任务号", "DB600.D22"));
+ list.add(new ItemDto(item_heartbeat, "心跳", "VW0"));
+ list.add(new ItemDto(item_mode, "工作模式", "VW2"));
+ list.add(new ItemDto(item_move, "光电信号", "VW4"));
+ list.add(new ItemDto(item_action, "取放信号", "VW6"));
+ list.add(new ItemDto(item_error, "故障", "VW8"));
+ list.add(new ItemDto(item_task, "任务号", "VD10"));
+
return list;
}
public static List getWriteableItemDtos() {
ArrayList list = new ArrayList();
- list.add(new ItemDto(item_to_command, "作业命令", "DB601.W2", Boolean.valueOf(true)));
- list.add(new ItemDto(item_to_target, "目标站", "DB601.W4"));
- list.add(new ItemDto(item_to_task, "任务号", "DB601.D8"));
+ list.add(new ItemDto(item_to_command, "下发命令", "VW102"));
+ list.add(new ItemDto(item_to_target, "下发目标站", "VW104"));
+ list.add(new ItemDto(item_to_task, "任务号", "VD108"));
return list;
}
+
}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardConveyorControlWithScannerDefination.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardConveyorControlWithScannerDefination.java
index 67f4538..93a4dd4 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardConveyorControlWithScannerDefination.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardConveyorControlWithScannerDefination.java
@@ -24,12 +24,12 @@ public class StandardConveyorControlWithScannerDefination implements OpcDeviceDr
@Override
public String getDriverName() {
- return "标准版-输送机-控制点-关联扫码器";
+ return "货梯对接线-关联扫码器";
}
@Override
public String getDriverDescription() {
- return "标准版-输送机-控制点-关联扫码器";
+ return "货梯对接线-关联扫码器";
}
@Override
@@ -52,23 +52,9 @@ public class StandardConveyorControlWithScannerDefination implements OpcDeviceDr
@Override
public List getReadableItemDtos() {
- return getReadableItemDtos2();
+ return ItemProtocol.getReadableItemDtos();
}
- public static List getReadableItemDtos2() {
- List list = new ArrayList();
- list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
- list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", Boolean.valueOf(true)));
- list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B2"));
- list.add(new ItemDto(ItemProtocol.item_action, "取放信号", "DB600.B3"));
- list.add(new ItemDto(ItemProtocol.item_ioaction, "进出类型", "DB600.B4"));
- list.add(new ItemDto(ItemProtocol.item_height, "高度类型", "DB600.B5"));
- list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B6"));
- list.add(new ItemDto(ItemProtocol.item_direction, "电机方向", "DB600.B7"));
- list.add(new ItemDto(ItemProtocol.item_operation_type, "作业类型", "DB600.B8"));
- list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB600.D22"));
- return list;
- }
@Override
public List getWriteableItemDtos() {
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java
index 747739d..6b41695 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java
@@ -62,83 +62,46 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
;
+ String container;
+
protected String barcode = null;
protected String formatcode = null;
- String container;
- String container_type_desc;
- String last_container_type_desc;
- String last_container;
- //放货准备锁
- String putReadyLock = null;
- //有货标记
- protected boolean has_goods_tag = false;
-
- int mode = 0;
- int error = 0;
- int move = 0;
- int task = 0;
- int height = 0;
- int action = 0;
- int ioaction = 0;
- int direction = 0;
- int operation_type = 0;
- int last_mode = 0;
- int last_error = 0;
- int last_move = 0;
- int last_task = 0;
- Boolean isonline = true;
- int hasGoods = 0;
- String message = null;
- Boolean iserror = false;
-
- String inst_message;
- boolean hasVehicle = false;
- boolean isReady = false;
- protected int instruction_num = 0;
- protected int instruction_num_truth = 0;
- boolean isFold = false;
- private String assemble_check_tag;
-
- protected String current_stage_instruction_message;
- protected String last_stage_instruction_message;
- Integer heartbeat_tag;
private Date instruction_require_time = new Date();
private Date instruction_finished_time = new Date();
private Date instruction_apply_time = new Date();
private int instruction_require_time_out = 3000;
- //请求成功标记
- Boolean requireSucess = false;
- //申请指令成功标记
- Boolean applySucess = false;
- private int instruction_finished_time_out;
+ int heartbeat = 0;
+ int mode = 0;
+ int move = 0;
+ int action = 0;
+ int error = 0;
+ int task = 0;
- int branchProtocol = 0;
- //备注
- String remark;
- //数量
- String qty;
- //物料
- String material;
- //当前指令
- Instruction inst = null;
- //上次指令
- Instruction last_inst = null;
+ Boolean isonline = true;
- //触摸屏手动触发任务
- private Boolean is_has_task = false;
+ Boolean iserror = false;
- //申请搬运任务
- private Boolean apply_handling = false;
- //申请物料
- private Boolean apply_material = false;
-
- //暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
+ //1-执行任务;2-取货完成;3-放货完成;
int flag;
+ int last_mode = 0;
+ int last_move = 0;
+ int last_error = 0;
+ int last_task = 0;
+ String last_container;
+
String device_code;
+ String message;
+
+ //请求成功标记
+ Boolean requireSucess = false;
+
+ //申请成功标记
+ Boolean applySucess = false;
+
public boolean exe_declaration() {
try {
this.barcode = this.barcode();
@@ -201,45 +164,24 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
String message = null;
try {
device_code = this.getDeviceCode();
- mode = this.itemProtocol.getMode();
- error = this.itemProtocol.getError();
- move = this.itemProtocol.getMove();
- task = this.itemProtocol.getTask();
- action = this.itemProtocol.getAction();
- ioaction = this.itemProtocol.getIoAction();
- height = this.itemProtocol.getHeight();
- operation_type = this.itemProtocol.getOperation_type();
- direction = this.itemProtocol.getDirection();
- hasGoods = this.itemProtocol.getMove();
+ heartbeat = this.itemProtocol.getItem_heartbeat();
+ mode = this.itemProtocol.getItem_mode();
+ move = this.itemProtocol.getItem_move();
+ error = this.itemProtocol.getItem_error();
+ task = this.itemProtocol.getItem_task();
+ action = this.itemProtocol.getItem_action();
if (mode != last_mode) {
this.setRequireSucess(false);
}
if (move != last_move) {
- if (move == 0) {
+ if (move == 0 && mode == 2) {
thingToNothing();
}
}
if (error != last_error) {
}
- if (mode == 2 && move != 0 && task > 0) {
- //inst_message
- inst = instructionService.findByCodeFromCache(String.valueOf(task));
- if (inst != null) {
- inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
- if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
- inst.setInstruction_status("1");
- instructionService.update(inst);
- }
- if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
- finish_instruction();
- }
- }
- }
- if (getBarcode() != null) {
-
- }
} catch (Exception var17) {
return;
}
@@ -270,10 +212,10 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
break;
case 2:
//申请任务
- if (hasGoods > 0 && !StrUtil.isEmpty(barcode()) && height > 0 && !requireSucess) {
+ if (move > 0 && !StrUtil.isEmpty(barcode()) && !requireSucess) {
instruction_require(barcode());
}
- if (hasGoods > 0 && !StrUtil.isEmpty(barcode()) && height > 0 && !applySucess) {
+ if (move > 0 && !StrUtil.isEmpty(barcode()) && !applySucess) {
instruction_apply(barcode());
}
}
@@ -304,30 +246,20 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
}
}
- public synchronized boolean finish_instruction() throws Exception {
- instructionService.finish(inst);
- return true;
- }
-
protected void thingToNothing() throws Exception {
this.setBarcode(null);
this.setRequireSucess(false);
this.setApplySucess(false);
clearBarcode();
- writing(1, 0);
- this.set_last_container(container, container_type_desc);
- }
-
- public void set_last_container(String barcode, String type_desc) {
- this.setInst_message(null);
- this.setContainer(null);
- this.set_last_container(barcode);
- this.set_last_container_type_desc(type_desc);
+ this.set_last_container(container);
}
public void set_last_container(String barcode) {
+ this.setContainer(null);
}
+
+
public void set_last_container_type_desc(String type) {
}
@@ -335,53 +267,10 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
return true;
}
- protected void executing(Instruction instruction) {
- this.executing(1, instruction, "");
- }
-
- public void executing(int command, Instruction instruction, String appendMessage) {
- String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
- + "." + ItemProtocol.item_to_command;
- String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
- + "." + ItemProtocol.item_to_target;
- String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
- + "." + ItemProtocol.item_to_task;
- if (appendMessage == null) {
- appendMessage = "";
- }
- if (instruction != null) {
- instruction_num = Integer.parseInt(instruction.getInstruction_code());
- }
- String opcservcerid = this.getDevice().getOpc_server_id();
- Server server = ReadUtil.getServer(opcservcerid);
- Map itemMap = new HashMap();
- itemMap.put(to_command, 1);
- itemMap.put(to_task, instruction_num);
- ReadUtil.write(itemMap, server);
-
- }
-
public void executing(Server server, Map itemMap) {
ReadUtil.write(itemMap, server);
}
- public void writing() {
-
- String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
- + "." + ItemProtocol.item_to_command;
- String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
- + "." + ItemProtocol.item_to_target;
- String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
- + "." + ItemProtocol.item_to_task;
- String opcservcerid = this.getDevice().getOpc_server_id();
- Server server = ReadUtil.getServer(opcservcerid);
- Map itemMap = new HashMap();
- itemMap.put(to_command, 1);
- itemMap.put(to_target, deviceAppservice.findDeviceByCode(inst.getNext_device_code()).getAddress());
- itemMap.put(to_task, inst.getInstruction_code());
- ReadUtil.write(itemMap, server);
- }
-
public void writing(int command, int target, int task) {
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
@@ -627,7 +516,11 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
} else {
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS).toString(), "1")) {
message = "申请任务中...";
- String str = acsToWmsService.applyTaskToWms(this.getDeviceCode(), container_code, height, 0);
+ JSONObject apply = new JSONObject();
+ apply.put("type","6");
+ apply.put("vehicle_code",container_code);
+ apply.put("point_code",device_code);
+ String str = acsToWmsService.applyTaskToWms(apply);
JSONObject jo = JSON.parseObject(str);
if (ObjectUtil.isEmpty(jo)) {
message = "接口不通";
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_scanner/StandardScannerDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_scanner/StandardScannerDeviceDriver.java
index 3ebed9e..086e749 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_scanner/StandardScannerDeviceDriver.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_scanner/StandardScannerDeviceDriver.java
@@ -29,6 +29,7 @@ public class StandardScannerDeviceDriver extends AbstractDeviceDriver implements
return StrUtil.isEmpty(ip) ? null : ip;
}
+ @Override
public String readBarcode() throws Exception {
String ip = this.getIp();
if (StrUtil.isEmpty(ip)) {
@@ -39,6 +40,7 @@ public class StandardScannerDeviceDriver extends AbstractDeviceDriver implements
}
}
+ @Override
public void writeBarcode(String barcode) throws Exception {
String ip = this.getIp();
if (StrUtil.isEmpty(ip)) {
@@ -48,6 +50,7 @@ public class StandardScannerDeviceDriver extends AbstractDeviceDriver implements
}
}
+ @Override
public void cleanBarcode() throws Exception {
String ip = this.getIp();
if (StrUtil.isEmpty(ip)) {
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractDeviceDriver.java
index ec3dd5f..e0c58cf 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractDeviceDriver.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractDeviceDriver.java
@@ -19,6 +19,7 @@ public class AbstractDeviceDriver implements DeviceDriver {
}
+ @Override
public Device getDevice() {
return this.device;
}
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java
index 7bca6bb..edc96da 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java
@@ -50,6 +50,7 @@ public interface OpcDeviceDriver extends DeviceDriver {
return this.getDevice().getOpc_server_code();
}
+ @Override
Device getDevice();
diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsController.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsController.java
index 635dda4..bfed2b2 100644
--- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsController.java
+++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsController.java
@@ -34,8 +34,8 @@ public class AcsToWmsController {
@PostMapping("/applyTask")
@Log("向WMS申请任务")
@ApiOperation("向WMS申请任务")
- public ResponseEntity