设备监控驱动更新

This commit is contained in:
lyd
2022-08-17 18:29:26 +08:00
parent a02a2279f0
commit 8a65e47bbd
14 changed files with 807 additions and 93 deletions

View File

@@ -17,6 +17,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
@@ -36,7 +37,7 @@ import java.util.Map;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -403,4 +404,36 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
}
return flag;
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "运行中";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("move", move);
jo.put("container_type", this.getContainer_type());
jo.put("barcode", this.getBarcode());
jo.put("task", this.getTask());
jo.put("error", this.getError());
jo.put("isOnline", this.getIsonline());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -1,6 +1,7 @@
package org.nl.acs.device_driver.lnsh.lnsh_kiln_lane;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -13,6 +14,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
@@ -28,7 +30,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -357,4 +359,46 @@ public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String status = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("isError", this.getIserror());
jo.put("open_time", this.getOpen_time());
jo.put("standby_time", this.getStandby_time());
jo.put("production_time", this.getProduction_time());
jo.put("error_time", this.getError_time());
jo.put("car_sum", this.getCar_sum());
jo.put("nullCar_qty", this.getNullCar_qty());
jo.put("burning_car_qty", this.getBurning_car_qty());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -1,5 +1,6 @@
package org.nl.acs.device_driver.lnsh.lnsh_labeling_machine;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -13,6 +14,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
@@ -28,7 +30,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshLabelingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshLabelingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -227,4 +229,48 @@ public class LnshLabelingMachineDeviceDriver extends AbstractOpcDeviceDriver imp
ReadUtil.write(itemMap, server);
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String status = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "运行中";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
jo.put("isOnline", this.getIsonline());
jo.put("open_time", this.getOpen_time());
jo.put("close_time", this.getClose_time());
jo.put("standby_time", this.getStandby_time());
jo.put("production_time", this.getProduction_time());
jo.put("error_time", this.getError_time());
jo.put("labeling_qty", this.getLabeling_qty());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -16,6 +17,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.DeviceAppServiceImpl;
@@ -35,7 +37,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -402,4 +404,78 @@ public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements D
return true;
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String move_1 = "";
String action_1 = "";
String walk_y = "";
String mode = "";
String status = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "运行中";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
if (this.getMove_1() == 0) {
move_1 = "无货";
} else if (this.getMove_1() == 1) {
move_1 = "有货";
} else if (this.getMove_1() == 2) {
move_1 = "有托盘有货";
}
if (this.getAction_1() == 1) {
action_1 = "取货中";
} else if (this.getAction_1() == 2) {
action_1 = "取货完成";
} else if (this.getAction_1() == 3) {
action_1 = "放货中";
} else if (this.getAction_1() == 4) {
action_1 = "放货完成";
}
if (this.getWalk_y() == 0) {
walk_y = "原位";
} else if (this.getWalk_y() == 2) {
walk_y = "非原位";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
jo.put("move_1", move_1);
jo.put("action_1", action_1);
jo.put("walk_y", walk_y);
jo.put("error", this.getError());
jo.put("task1", this.getTask1());
jo.put("isOnline", this.getIsonline());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("task_qty", this.getTask_qty());
jo.put("finishTask_qty", this.getFinishTask_qty());
jo.put("batch", this.getBatch());
jo.put("specifications", this.getSpecifications());
jo.put("qty", this.getQty());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -17,6 +17,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.order.service.ProduceshiftorderService;
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
@@ -35,7 +36,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -1244,4 +1245,71 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
ReadUtil.write(itemMap, server);
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String status = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} 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 = "申请空盘";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
String onoff_status = "";
if (this.getOnoff_status() == 1) {
onoff_status = "关机";
} else if (this.getOnoff_status() == 2) {
onoff_status = "开机";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
jo.put("onoff_status", onoff_status);
jo.put("specifications", this.getSpecifications());
jo.put("batch", this.getBatch());
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("putStation", this.getPut_station());
jo.put("barcode", this.getBarcode());
jo.put("material", this.getMaterial());
jo.put("qty", this.getQty());
jo.put("open_time", this.getOpen_time());
jo.put("standby_time", this.getStandby_time());
jo.put("production_time", this.getProduction_time());
jo.put("error_time", this.getError_time());
jo.put("order_No", this.getOrder_No());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -17,6 +17,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.DeviceAppServiceImpl;
@@ -36,7 +37,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -482,6 +483,69 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String status = "";
String action = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} 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 = "申请空盘";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
if (this.getAction() == 0) {
action = "禁止取放";
} else if (this.getAction() == 1) {
action = "允许取货";
} else if (this.getAction() == 2) {
action = "允许放货";
} else if (this.getAction() == 3) {
action = "允许取放";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
jo.put("action", action);
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("put_station", this.getPut_station());
jo.put("material", this.getMaterial());
jo.put("encoder_qty", this.getEncoder_qty());
jo.put("specifications", this.getSpecifications());
jo.put("batch", this.getBatch());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
// public void writing(int type, int command) {
// String to_material_code = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
// + "." + ItemProtocol.item_to_material_code;

View File

@@ -17,6 +17,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
@@ -35,7 +36,7 @@ import java.util.Map;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -473,4 +474,78 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
return "";
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String action = "";
String io_action = "";
String move = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 4) {
mode = "叫料";
} else if (this.getMode() == 5) {
mode = "申请空盘";
} else if (this.getMode() == 6) {
mode = "申请入库";
}
if (this.getAction() == 0) {
action = "禁止取放";
} else if (this.getAction() == 1) {
action = "允许取货";
} else if (this.getAction() == 2) {
action = "允许放货";
} else if (this.getAction() == 3) {
action = "允许取放";
}
if (this.getIo_action() == 0) {
io_action = "禁止进出";
} else if (this.getIo_action() == 1) {
io_action = "允许进入";
} else if (this.getIo_action() == 2) {
io_action = "允许离开";
} else if (this.getIo_action() == 3) {
io_action = "允许进出";
}
if (this.getMove() == 0) {
move = "无货";
} else if (this.getMove() == 1) {
move = "有货";
} else if (this.getMove() == 2) {
move = "有托盘有货";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);
jo.put("hasGoods", this.getHasGoods());
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("task", this.getTask());
jo.put("weight", this.getWeight());
jo.put("material", this.getMaterial());
jo.put("barcode", this.getBarcode());
jo.put("specifications", this.getSpecifications());
jo.put("AlongSide", this.getAlongSide());
jo.put("BshortSide", this.getBshortSide());
jo.put("Htrapezoidal", this.getHtrapezoidal());
jo.put("Wthickness", this.getWthickness());
jo.put("batch", this.getBatch());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -16,6 +17,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.DeviceAppServiceImpl;
@@ -38,7 +40,7 @@ import java.util.Map;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -612,4 +614,106 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi
Map<String, Object> itemMap = new HashMap<String, Object>();
ReadUtil.write(itemMap, server);
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String move_1 = "";
String move_2 = "";
String action_1 = "";
String action_2 = "";
String walk_y = "";
String mode = "";
String status = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "运行中";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
if (this.getMove_1() == 0) {
move_1 = "无货";
} else if (this.getMove_1() == 1) {
move_1 = "有货";
} else if (this.getMove_1() == 2) {
move_1 = "有托盘有货";
}
if (this.getMove_2() == 0) {
move_2 = "无货";
} else if (this.getMove_2() == 1) {
move_2 = "有货";
} else if (this.getMove_2() == 2) {
move_2 = "有托盘有货";
}
if (this.getAction_1() == 1) {
action_1 = "取货中";
} else if (this.getAction_1() == 2) {
action_1 = "取货完成";
} else if (this.getAction_1() == 3) {
action_1 = "放货中";
} else if (this.getAction_1() == 4) {
action_1 = "放货完成";
}
if (this.getAction_2() == 1) {
action_2 = "取货中";
} else if (this.getAction_2() == 2) {
action_2 = "取货完成";
} else if (this.getAction_2() == 3) {
action_2 = "放货中";
} else if (this.getAction_2() == 4) {
action_2 = "放货完成";
}
if (this.getWalk_y() == 0) {
walk_y = "原位";
} else if (this.getWalk_y() == 2) {
walk_y = "非原位";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
jo.put("move_1", move_1);
jo.put("move_2", move_2);
jo.put("action_1", action_1);
jo.put("action_2", action_2);
jo.put("walk_y", walk_y);
jo.put("error", this.getError());
jo.put("task1", this.getTask1());
jo.put("task2", this.getTask2());
jo.put("isOnline", this.getIsonline());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("open_time", this.getOpen_time());
jo.put("standby_time", this.getStandby_time());
jo.put("production_time", this.getProduction_time());
jo.put("error_time", this.getError_time());
jo.put("task_qty", this.getTask_qty());
jo.put("finishTask_qty", this.getFinishTask_qty());
jo.put("batch", this.getBatch());
jo.put("specifications", this.getSpecifications());
jo.put("qty", this.getQty());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -17,6 +17,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.order.service.ProduceshiftorderService;
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
@@ -34,7 +35,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -1038,4 +1039,57 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
ReadUtil.write(itemMap, server);
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "工作中";
} else if (this.getMode() == 5) {
mode = "获取托盘信息";
} else if (this.getMode() == 6) {
mode = "拆垛完成";
} else if (this.getMode() == 7) {
mode = "申请空盘";
}
String onoff_status = "";
if (this.getOnoff_status() == 0) {
onoff_status = "关机";
} else if (this.getOnoff_status() == 1) {
onoff_status = "开机";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("getStation", this.getGetStation());
jo.put("barcode", this.getBarcode());
jo.put("material", this.getMaterial());
jo.put("total_split", this.getTotal_split());
jo.put("open_time", this.getOpen_time());
jo.put("standby_time", this.getStandby_time());
jo.put("production_time", this.getProduction_time());
jo.put("error_time", this.getError_time());
jo.put("batch", this.getBatch());
jo.put("specifications", this.getSpecifications());
jo.put("qty", this.getQty());
jo.put("onoff_status", onoff_status);
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -19,6 +19,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
@@ -37,7 +38,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -661,4 +662,74 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
return "";
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String action = "";
String io_action = "";
String move = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 4) {
mode = "叫料";
} else if (this.getMode() == 5) {
mode = "申请空盘";
} else if (this.getMode() == 6) {
mode = "申请入库";
}
if (this.getAction() == 0) {
action = "禁止取放";
} else if (this.getAction() == 1) {
action = "允许取货";
} else if (this.getAction() == 2) {
action = "允许放货";
} else if (this.getAction() == 3) {
action = "允许取放";
}
if (this.getIo_action() == 0) {
io_action = "禁止进出";
} else if (this.getIo_action() == 1) {
io_action = "允许进入";
} else if (this.getIo_action() == 2) {
io_action = "允许离开";
} else if (this.getIo_action() == 3) {
io_action = "允许进出";
}
if (this.getMove() == 0) {
move = "无货";
} else if (this.getMove() == 1) {
move = "有货";
} else if (this.getMove() == 2) {
move = "有托盘有货";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);
jo.put("hasGoods", this.getHasGoods());
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("task", this.getTask());
jo.put("weight", this.getWeight());
jo.put("material", this.getMaterial());
jo.put("barcode", this.getBarcode());
jo.put("specifications", this.getSpecifications());
jo.put("batch", this.getBatch());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -17,6 +17,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.order.service.ProduceshiftorderService;
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
@@ -35,7 +36,7 @@ import java.util.*;
@Slf4j
@Data
@RequiredArgsConstructor
public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@@ -1315,4 +1316,36 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
ReadUtil.write(itemMap, server);
}
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
jo.put("device_code", device.getDevice_code());
jo.put("mode", this.getMode());
jo.put("status", this.getStatus());
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("putStation", this.getPut_station());
jo.put("barcode", this.getBarcode());
jo.put("material", this.getMaterial());
jo.put("qty", this.getQty());
jo.put("open_time", this.getOpen_time());
jo.put("standby_time", this.getStandby_time());
jo.put("production_time", this.getProduction_time());
jo.put("error_time", this.getError_time());
jo.put("order_No", this.getOrder_No());
jo.put("onoff_status", this.getOnoff_status());
jo.put("getStation", this.getGetStation());
jo.put("specifications", this.getSpecifications());
jo.put("batch", this.getBatch());
jo.put("total_split", this.getTotal_split());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -15,8 +15,10 @@ import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.DeviceAppServiceImpl;
@@ -434,6 +436,5 @@ public class SpecialOrdinarySiteDeviceDriver extends AbstractDeviceDriver implem
return true;
}
}
}

View File

@@ -395,8 +395,11 @@ export default {
this.logs.push(tempArray[k]) // 追加数据
}
} else {
this.showEmpty = true
this.emptyText = '暂无日志信息,请选择时间段试试'
this.$notify({
title: '警告',
message: '暂无以往日志数据!',
type: 'warning'
})
}
})
}

View File

@@ -336,12 +336,6 @@ export default {
} else if (val === 'number') {
const obj = { name: '托盘数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'qty') {
const obj = { name: '数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'weight') {
const obj = { name: '重量', value: data[val] }
this.arr.push(obj)
} else if (val === 'instruction_message') {
const obj = { name: '指令信息', value: data[val] }
this.arr.push(obj)
@@ -373,10 +367,7 @@ export default {
const obj = { name: '批次', value: data[val] }
this.arr.push(obj)
} else if (val === 'requestSucess') {
const obj = { name: '缺料请求成功', value: data[val] }
this.arr.push(obj)
} else if (val === 'fullrequestSucess') {
const obj = { name: '空箱请求成功', value: data[val] }
const obj = { name: '是否请求任务', value: data[val] }
this.arr.push(obj)
} else if (val === 'applySucess') {
const obj = { name: '是否申请指令', value: data[val] }
@@ -384,71 +375,8 @@ export default {
} else if (val === 'message') {
const obj = { name: '说明', value: data[val] }
this.arr.push(obj)
} else if (val === 'empty_is_lack') {
const obj = { name: '空箱位缺箱', value: data[val] }
this.arr.push(obj)
} else if (val === 'empty_is_finish') {
const obj = { name: '空位完成', value: data[val] }
this.arr.push(obj)
} else if (val === 'full_ready_req_agv') {
const obj = { name: '满箱位就绪请求AGV', value: data[val] }
this.arr.push(obj)
} else if (val === 'full_out') {
const obj = { name: '满箱已运出满箱位', value: data[val] }
this.arr.push(obj)
} else if (val === 'finish') {
const obj = { name: '订单完成', value: data[val] }
this.arr.push(obj)
} else if (val === 'order_compel_finish') {
const obj = { name: '订单强制完成', value: data[val] }
this.arr.push(obj)
} else if (val === 'now_order_prod_num') {
const obj = { name: '当前生产总量', value: data[val] }
this.arr.push(obj)
} else if (val === 'now_one_prod_num') {
const obj = { name: '当前箱生产量', value: data[val] }
this.arr.push(obj)
} else if (val === 'task') {
const obj = { name: '任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'full_number') {
const obj = { name: '出料口满框数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'storage_stock_num') {
const obj = { name: '储料仓库存数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'line_stock_num') {
const obj = { name: '线体库存数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'order_prod_allnum') {
const obj = { name: '订单生产总量', value: data[val] }
this.arr.push(obj)
} else if (val === 'order') {
const obj = { name: '工单号', value: data[val] }
this.arr.push(obj)
} else if (val === 'storage_stock_num') {
const obj = { name: '储料仓库存数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'line_stock_num') {
const obj = { name: '线体库存数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'material_type') {
const obj = { name: '产品编号', value: data[val] }
this.arr.push(obj)
} else if (val === 'lack_req') {
const obj = { name: '缺料请求', value: data[val] }
this.arr.push(obj)
} else if (val === 'empty_req') {
const obj = { name: '空箱请求', value: data[val] }
this.arr.push(obj)
} else if (val === 'address') {
const obj = { name: 'agv位置', value: data[val] }
this.arr.push(obj)
} else if (val === 'phaseName') {
const obj = { name: 'phase', value: data[val] }
this.arr.push(obj)
} else if (val === 'full_req') {
const obj = { name: '满箱请求', value: data[val] }
} else if (val === 'status') {
const obj = { name: '设备状态', value: data[val] }
this.arr.push(obj)
} else if (val === 'open_time') {
const obj = { name: '开机时间', value: data[val] }
@@ -456,11 +384,125 @@ export default {
} else if (val === 'close_time') {
const obj = { name: '关机时间', value: data[val] }
this.arr.push(obj)
} else if (val === 'feeding_qty') {
const obj = { name: '上料数量', value: data[val] }
} else if (val === 'standby_time') {
const obj = { name: '待机时间', value: data[val] }
this.arr.push(obj)
} else if (val === 'error_num') {
const obj = { name: '故障次数', value: data[val] }
} else if (val === 'production_time') {
const obj = { name: '生产时间', value: data[val] }
this.arr.push(obj)
} else if (val === 'error_time') {
const obj = { name: '故障时间', value: data[val] }
this.arr.push(obj)
} else if (val === 'weight') {
const obj = { name: '生产重量', value: data[val] }
this.arr.push(obj)
} else if (val === 'order_No') {
const obj = { name: '工单号', value: data[val] }
this.arr.push(obj)
} else if (val === 'mix_num') {
const obj = { name: '碾次', value: data[val] }
this.arr.push(obj)
} else if (val === 'barcode') {
const obj = { name: '条码', value: data[val] }
this.arr.push(obj)
} else if (val === 'qualified') {
const obj = { name: '合格数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'unqualified') {
const obj = { name: '不合格数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'put_station') {
const obj = { name: '当前码盘工位', value: data[val] }
this.arr.push(obj)
} else if (val === 'encoder_qty') {
const obj = { name: '码盘数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'outKiln_move') {
const obj = { name: '出窑光电', value: data[val] }
this.arr.push(obj)
} else if (val === 'outKiln_barcode') {
const obj = { name: '出窑条码', value: data[val] }
this.arr.push(obj)
} else if (val === 'outKiln_device') {
const obj = { name: '出窑设备', value: data[val] }
this.arr.push(obj)
} else if (val === 'car_sum') {
const obj = { name: '窑车总数', value: data[val] }
this.arr.push(obj)
} else if (val === 'nullCar_qty') {
const obj = { name: '空窑车数', value: data[val] }
this.arr.push(obj)
} else if (val === 'burning_car_qty') {
const obj = { name: '在烧窑车数', value: data[val] }
this.arr.push(obj)
} else if (val === 'container_qty') {
const obj = { name: '托盘数', value: data[val] }
this.arr.push(obj)
} else if (val === 'tray_crib_qty') {
const obj = { name: '托盘垛数', value: data[val] }
this.arr.push(obj)
} else if (val === 'total_container') {
const obj = { name: '托盘总数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'total_split') {
const obj = { name: '累计拆垛数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'getStation') {
const obj = { name: '当前抓取工位', value: data[val] }
this.arr.push(obj)
} else if (val === 'putStation') {
const obj = { name: '当前码盘工位', value: data[val] }
this.arr.push(obj)
} else if (val === 'move_1') {
const obj = { name: '前工位光电信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'move_2') {
const obj = { name: '后工位光电信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'action_1') {
const obj = { name: '前工位动作信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'action_2') {
const obj = { name: '后工位动作信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'walk_y') {
const obj = { name: '行走列', value: data[val] }
this.arr.push(obj)
} else if (val === 'task1') {
const obj = { name: '前工位任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'task2') {
const obj = { name: '后工位任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'labeling_qty') {
const obj = { name: '贴标数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'container_type') {
const obj = { name: '托盘类型', value: data[val] }
this.arr.push(obj)
} else if (val === 'specifications') {
const obj = { name: '规格', value: data[val] }
this.arr.push(obj)
} else if (val === 'onoff_status') {
const obj = { name: '开关机状态', value: data[val] }
this.arr.push(obj)
} else if (val === 'task_qty') {
const obj = { name: '当前任务数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'finishTask_qty') {
const obj = { name: '完成任务数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'AlongSide') {
const obj = { name: 'A长边', value: data[val] }
this.arr.push(obj)
} else if (val === 'BshortSide') {
const obj = { name: 'B短边', value: data[val] }
this.arr.push(obj)
} else if (val === 'Htrapezoidal') {
const obj = { name: 'H梯形高', value: data[val] }
this.arr.push(obj)
} else if (val === 'Wthickness') {
const obj = { name: 'W厚度', value: data[val] }
this.arr.push(obj)
}
}