add:监控页面堆垛机设置及路由设备类型
This commit is contained in:
@@ -26,6 +26,7 @@ import org.nl.acs.device.service.mapper.DeviceExtraMapper;
|
|||||||
import org.nl.acs.device.domain.DeviceRunpoint;
|
import org.nl.acs.device.domain.DeviceRunpoint;
|
||||||
import org.nl.acs.device.service.mapper.DeviceRunpointMapper;
|
import org.nl.acs.device.service.mapper.DeviceRunpointMapper;
|
||||||
import org.nl.acs.device_driver.manipulator.standard_manipulator.OvenGantryManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.manipulator.standard_manipulator.OvenGantryManipulatorDeviceDriver;
|
||||||
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.route.domain.RouteLine;
|
import org.nl.acs.route.domain.RouteLine;
|
||||||
import org.nl.acs.route.service.mapper.RouteLineMapper;
|
import org.nl.acs.route.service.mapper.RouteLineMapper;
|
||||||
//import org.nl.acs.stage.domain.Stage;
|
//import org.nl.acs.stage.domain.Stage;
|
||||||
@@ -1188,6 +1189,9 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
|||||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver
|
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver
|
||||||
= (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
= (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
||||||
standardCoveyorControlWithScannerDeviceDriver.setDeviceStatus(form);
|
standardCoveyorControlWithScannerDeviceDriver.setDeviceStatus(form);
|
||||||
|
} else if (device.getDeviceDriver() instanceof DeviceStageMonitor) {
|
||||||
|
DeviceStageMonitor deviceStageMonitor = (DeviceStageMonitor) device.getDeviceDriver();
|
||||||
|
deviceStageMonitor.setDeviceStatus(form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
public static final Integer MAX_Y = 6;
|
public static final Integer MAX_Y = 6;
|
||||||
public static final Integer MIN_Y = 1;
|
public static final Integer MIN_Y = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 心跳
|
* 心跳
|
||||||
*/
|
*/
|
||||||
Integer heartbeat = 0;
|
Integer heartbeat = 0;
|
||||||
@@ -78,18 +78,18 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
*/
|
*/
|
||||||
Integer itemDeviceCode = 0;
|
Integer itemDeviceCode = 0;
|
||||||
Integer lastItemDeviceCode = 0;
|
Integer lastItemDeviceCode = 0;
|
||||||
/**
|
/**
|
||||||
* 工作模式
|
* 工作模式
|
||||||
*/
|
*/
|
||||||
Integer mode = 0;
|
Integer mode = 0;
|
||||||
Integer lastMode = 0;
|
Integer lastMode = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行走开关信号
|
* 行走开关信号
|
||||||
*/
|
*/
|
||||||
Float move = 0F;
|
Float move = 0F;
|
||||||
Float lastMove = 0F;
|
Float lastMove = 0F;
|
||||||
/**
|
/**
|
||||||
* 行走动作信号
|
* 行走动作信号
|
||||||
*/
|
*/
|
||||||
Float action = 0F;
|
Float action = 0F;
|
||||||
@@ -105,24 +105,24 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
Integer frontTask = 0;
|
Integer frontTask = 0;
|
||||||
Integer lastFrontTask = 0;
|
Integer lastFrontTask = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行走激光数值
|
* 行走激光数值
|
||||||
*/
|
*/
|
||||||
Integer distanceX = 0;
|
Integer distanceX = 0;
|
||||||
Integer lastDistanceX = 0;
|
Integer lastDistanceX = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 特殊开关量1
|
* 特殊开关量1
|
||||||
*/
|
*/
|
||||||
Float special1 = 0F;
|
Float special1 = 0F;
|
||||||
Float lastSpecial1 = 0F;
|
Float lastSpecial1 = 0F;
|
||||||
/**
|
/**
|
||||||
* 特殊开关量2
|
* 特殊开关量2
|
||||||
*/
|
*/
|
||||||
Float special2 = 0F;
|
Float special2 = 0F;
|
||||||
Float lastSpecial2 = 0F;
|
Float lastSpecial2 = 0F;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 水箱和消防缓存位有无货
|
* 水箱和消防缓存位有无货
|
||||||
*/
|
*/
|
||||||
Float storageCache = 0F;
|
Float storageCache = 0F;
|
||||||
@@ -151,7 +151,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
Integer backZerror = 0;
|
Integer backZerror = 0;
|
||||||
Integer lastBackZerror = 0;
|
Integer lastBackZerror = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 前叉行走排号
|
* 前叉行走排号
|
||||||
*/
|
*/
|
||||||
Integer frontZ = 0;
|
Integer frontZ = 0;
|
||||||
@@ -236,6 +236,19 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
*/
|
*/
|
||||||
Boolean requireSucess = false;
|
Boolean requireSucess = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁止入库
|
||||||
|
*/
|
||||||
|
private boolean prohibitInWarehouse = false;
|
||||||
|
/**
|
||||||
|
* 禁止出库
|
||||||
|
*/
|
||||||
|
private boolean prohibitOutWarehouse = false;
|
||||||
|
/**
|
||||||
|
* 停止接收任务
|
||||||
|
*/
|
||||||
|
private boolean stopReceiveTask = false;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Device getDevice() {
|
public Device getDevice() {
|
||||||
@@ -264,38 +277,38 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
message = "有报警";
|
message = "有报警";
|
||||||
} else {
|
} else {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
if (CommandEnum.STANDY.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.STANDY.getStatus())){
|
if (CommandEnum.STANDY.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.STANDY.getStatus())) {
|
||||||
applyTask();
|
applyTask();
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
if (CommandEnum.PICKUP.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.PICKUP.getStatus())){
|
if (CommandEnum.PICKUP.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.PICKUP.getStatus())) {
|
||||||
message = "取货中";
|
message = "取货中";
|
||||||
}
|
}
|
||||||
if (CommandEnum.PICKUP_COMPLETE.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.PICKUP_COMPLETE.getStatus())){
|
if (CommandEnum.PICKUP_COMPLETE.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.PICKUP_COMPLETE.getStatus())) {
|
||||||
message = "取货完成";
|
message = "取货完成";
|
||||||
LinkedList<Instruction> inst = new LinkedList<>();
|
LinkedList<Instruction> inst = new LinkedList<>();
|
||||||
getIns(inst);
|
getIns(inst);
|
||||||
if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isNotEmpty(inst.get(0))) {
|
if (CollectionUtil.isNotEmpty(inst) && ObjectUtil.isNotEmpty(inst.get(0))) {
|
||||||
String startDeviceCode = inst.get(0).getStart_device_code();
|
String startDeviceCode = inst.get(0).getStart_device_code();
|
||||||
Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode);
|
Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode);
|
||||||
writeStorageOrConveyor(inst,startDeviceCode,startDevice,map);
|
writeStorageOrConveyor(inst, startDeviceCode, startDevice, map);
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isEmpty(inst.get(0))) {
|
if (CollectionUtil.isNotEmpty(inst) && ObjectUtil.isEmpty(inst.get(0))) {
|
||||||
String startDeviceCode = inst.get(1).getStart_device_code();
|
String startDeviceCode = inst.get(1).getStart_device_code();
|
||||||
Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode);
|
Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode);
|
||||||
writeStorageOrConveyor(inst,startDeviceCode,startDevice,map);
|
writeStorageOrConveyor(inst, startDeviceCode, startDevice, map);
|
||||||
}
|
}
|
||||||
map.put("to_command", CommandEnum.PICKUP_COMPLETE.getStatus());
|
map.put("to_command", CommandEnum.PICKUP_COMPLETE.getStatus());
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
if (CommandEnum.RELEASE.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.RELEASE.getStatus())){
|
if (CommandEnum.RELEASE.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.RELEASE.getStatus())) {
|
||||||
message = "放货中";
|
message = "放货中";
|
||||||
}
|
}
|
||||||
if (CommandEnum.UNLOAD.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.UNLOAD.getStatus())){
|
if (CommandEnum.UNLOAD.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.UNLOAD.getStatus())) {
|
||||||
message = "请求卸货(申请卸货)";
|
message = "请求卸货(申请卸货)";
|
||||||
LinkedList<Instruction> inst = new LinkedList<>();
|
LinkedList<Instruction> inst = new LinkedList<>();
|
||||||
getIns(inst);
|
getIns(inst);
|
||||||
if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isNotEmpty(inst.get(0))) {
|
if (CollectionUtil.isNotEmpty(inst) && ObjectUtil.isNotEmpty(inst.get(0))) {
|
||||||
String nextDeviceCode = inst.get(0).getNext_device_code();
|
String nextDeviceCode = inst.get(0).getNext_device_code();
|
||||||
Device nextDevice = deviceAppService.findDeviceByCode(nextDeviceCode);
|
Device nextDevice = deviceAppService.findDeviceByCode(nextDeviceCode);
|
||||||
//指令为执行
|
//指令为执行
|
||||||
@@ -305,7 +318,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
map.put("to_command", 3);
|
map.put("to_command", 3);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isEmpty(inst.get(0))) {
|
if (CollectionUtil.isNotEmpty(inst) && ObjectUtil.isEmpty(inst.get(0))) {
|
||||||
String nextDeviceCode = inst.get(1).getNext_device_code();
|
String nextDeviceCode = inst.get(1).getNext_device_code();
|
||||||
Device nextDevice = deviceAppService.findDeviceByCode(nextDeviceCode);
|
Device nextDevice = deviceAppService.findDeviceByCode(nextDeviceCode);
|
||||||
if (unloadCheck(nextDevice)) {
|
if (unloadCheck(nextDevice)) {
|
||||||
@@ -315,13 +328,13 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CommandEnum.UNLOAD_COMPLETE.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.UNLOAD_COMPLETE.getStatus())){
|
if (CommandEnum.UNLOAD_COMPLETE.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.UNLOAD_COMPLETE.getStatus())) {
|
||||||
message = "放货完成";
|
message = "放货完成";
|
||||||
map.put("to_command", 5);
|
map.put("to_command", 5);
|
||||||
LinkedList<Instruction> inst = new LinkedList<>();
|
LinkedList<Instruction> inst = new LinkedList<>();
|
||||||
getIns(inst);
|
getIns(inst);
|
||||||
try {
|
try {
|
||||||
if (CollectionUtil.isNotEmpty(inst)){
|
if (CollectionUtil.isNotEmpty(inst)) {
|
||||||
for (Instruction instruction : inst) {
|
for (Instruction instruction : inst) {
|
||||||
finishInstruction(instruction);
|
finishInstruction(instruction);
|
||||||
}
|
}
|
||||||
@@ -333,17 +346,17 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommandEnum.PICKUP_PREPARATION.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.PICKUP_PREPARATION.getStatus())){
|
if (CommandEnum.PICKUP_PREPARATION.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.PICKUP_PREPARATION.getStatus())) {
|
||||||
message = "取货准备(会库位台)";
|
message = "取货准备(会库位台)";
|
||||||
map.put("to_command", 6);
|
map.put("to_command", 6);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
if (CommandEnum.RECALL.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.RECALL.getStatus())){
|
if (CommandEnum.RECALL.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.RECALL.getStatus())) {
|
||||||
message = "召回";
|
message = "召回";
|
||||||
map.put("to_command", 7);
|
map.put("to_command", 7);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
if (CommandEnum.STOP.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.STOP.getStatus())){
|
if (CommandEnum.STOP.getStatus().equals(frontCommand) || backCommand.equals(CommandEnum.STOP.getStatus())) {
|
||||||
message = "急停";
|
message = "急停";
|
||||||
map.put("to_command", 8);
|
map.put("to_command", 8);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
@@ -398,15 +411,16 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
private void getIns(LinkedList<Instruction> inst) {
|
private void getIns(LinkedList<Instruction> inst) {
|
||||||
if (ObjectUtil.isNotEmpty(this.frontTask)) {
|
if (ObjectUtil.isNotEmpty(this.frontTask)) {
|
||||||
Instruction instructionFront = instructionService.findByCodeFromCache(String.valueOf(frontTask));
|
Instruction instructionFront = instructionService.findByCodeFromCache(String.valueOf(frontTask));
|
||||||
if (ObjectUtil.isNotEmpty(instructionFront)){
|
if (ObjectUtil.isNotEmpty(instructionFront)) {
|
||||||
inst.add(instructionFront);
|
inst.add(instructionFront);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(this.backTask)) {
|
if (ObjectUtil.isNotEmpty(this.backTask)) {
|
||||||
Instruction instructionBack = instructionService.findByCodeFromCache(String.valueOf(backTask));
|
Instruction instructionBack = instructionService.findByCodeFromCache(String.valueOf(backTask));
|
||||||
if (CollectionUtil.isNotEmpty(inst) && ObjectUtil.isNotEmpty(instructionBack)){
|
if (CollectionUtil.isNotEmpty(inst) && ObjectUtil.isNotEmpty(instructionBack)) {
|
||||||
inst.add(instructionBack);
|
inst.add(instructionBack);
|
||||||
}if (CollectionUtil.isEmpty(inst) && ObjectUtil.isNotEmpty(instructionBack)){
|
}
|
||||||
|
if (CollectionUtil.isEmpty(inst) && ObjectUtil.isNotEmpty(instructionBack)) {
|
||||||
inst.add(null);
|
inst.add(null);
|
||||||
inst.add(instructionBack);
|
inst.add(instructionBack);
|
||||||
}
|
}
|
||||||
@@ -465,7 +479,6 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 申请任务
|
* 申请任务
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public synchronized boolean applyTask() {
|
public synchronized boolean applyTask() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
@@ -503,7 +516,6 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -556,17 +568,16 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
}
|
}
|
||||||
//前叉信号写入
|
//前叉信号写入
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
if (inst.size()==1&& ObjectUtil.isNotEmpty(inst.get(0))) {
|
if (inst.size() == 1 && ObjectUtil.isNotEmpty(inst.get(0))) {
|
||||||
map.put("to_device_code", this.getDevice().getAddress());
|
map.put("to_device_code", this.getDevice().getAddress());
|
||||||
map.put("to_command", CommandEnum.PICKUP.getStatus().toString());
|
map.put("to_command", CommandEnum.PICKUP.getStatus().toString());
|
||||||
map.put("to_front_task", inst.get(0).getInstruction_code());
|
map.put("to_front_task", inst.get(0).getInstruction_code());
|
||||||
|
|
||||||
}
|
} else if (inst.size() > 1 && ObjectUtil.isEmpty(inst.get(1))) {
|
||||||
else if (inst.size()>1 && ObjectUtil.isEmpty(inst.get(1))) {
|
|
||||||
map.put("to_device_code", this.getDevice().getAddress());
|
map.put("to_device_code", this.getDevice().getAddress());
|
||||||
map.put("to_command", CommandEnum.PICKUP.getStatus().toString());
|
map.put("to_command", CommandEnum.PICKUP.getStatus().toString());
|
||||||
map.put("to_back_task", inst.get(1).getInstruction_code());
|
map.put("to_back_task", inst.get(1).getInstruction_code());
|
||||||
}else{
|
} else {
|
||||||
map.put("to_device_code", this.getDevice().getAddress());
|
map.put("to_device_code", this.getDevice().getAddress());
|
||||||
map.put("to_command", CommandEnum.PICKUP.getStatus().toString());
|
map.put("to_command", CommandEnum.PICKUP.getStatus().toString());
|
||||||
map.put("to_front_task", inst.get(0).getInstruction_code());
|
map.put("to_front_task", inst.get(0).getInstruction_code());
|
||||||
@@ -604,16 +615,16 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
map.put("to_z", inst.get(0).getFrom_x());
|
map.put("to_z", inst.get(0).getFrom_x());
|
||||||
}
|
}
|
||||||
map.put("to_x", inst.get(0).getFrom_y());
|
map.put("to_x", inst.get(0).getFrom_y());
|
||||||
}else {
|
} else {
|
||||||
//只存在后叉的情况
|
//只存在后叉的情况
|
||||||
map.put("to_y", Integer.parseInt(inst.get(0).getFrom_z())+1);
|
map.put("to_y", Integer.parseInt(inst.get(0).getFrom_z()) + 1);
|
||||||
if (inst.get(0).getFrom_x().length() > 1) {
|
if (inst.get(0).getFrom_x().length() > 1) {
|
||||||
String substring = inst.get(0).getFrom_x().substring(1);
|
String substring = inst.get(0).getFrom_x().substring(1);
|
||||||
map.put("to_z", Integer.parseInt(substring)+1);
|
map.put("to_z", Integer.parseInt(substring) + 1);
|
||||||
} else {
|
} else {
|
||||||
map.put("to_z", Integer.parseInt(inst.get(0).getFrom_x())+1);
|
map.put("to_z", Integer.parseInt(inst.get(0).getFrom_x()) + 1);
|
||||||
}
|
}
|
||||||
map.put("to_x", Integer.parseInt(inst.get(0).getFrom_y())+1);
|
map.put("to_x", Integer.parseInt(inst.get(0).getFrom_y()) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -621,14 +632,14 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
private boolean findInstruction(List<Instruction> instructionList, Instruction inst, LinkedList<Instruction> instructionsAll) {
|
private boolean findInstruction(List<Instruction> instructionList, Instruction inst, LinkedList<Instruction> instructionsAll) {
|
||||||
LambdaQueryWrapper<DeviceExtra> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<DeviceExtra> wrapper = new LambdaQueryWrapper<>();
|
||||||
CommonFinalParam commonFinalParam = new CommonFinalParam();
|
CommonFinalParam commonFinalParam = new CommonFinalParam();
|
||||||
wrapper.in(DeviceExtra::getExtra_name,"no_front_y","no_front_x","no_back_y","no_back_x","sort");
|
wrapper.in(DeviceExtra::getExtra_name, "no_front_y", "no_front_x", "no_back_y", "no_back_x", "sort");
|
||||||
List<DeviceExtra> deviceExtras = deviceExtraMapper.selectList(wrapper);
|
List<DeviceExtra> deviceExtras = deviceExtraMapper.selectList(wrapper);
|
||||||
//默认第一条指令为前叉判断是否符合
|
//默认第一条指令为前叉判断是否符合
|
||||||
if (StringUtils.isEmpty(inst.getNext_point_code())&&!StringUtils.contains(inst.getNext_point_code(),commonFinalParam.getBARRE())){
|
if (StringUtils.isEmpty(inst.getNext_point_code()) && !StringUtils.contains(inst.getNext_point_code(), commonFinalParam.getBARRE())) {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
String[] splitFront = inst.getNext_point_code().split(commonFinalParam.getBARRE());
|
String[] splitFront = inst.getNext_point_code().split(commonFinalParam.getBARRE());
|
||||||
List<DeviceExtra> frontY = deviceExtras.stream().filter(item -> "no_front_y".equals(item.getExtra_name())).collect(Collectors.toList());
|
List<DeviceExtra> frontY = deviceExtras.stream().filter(item -> "no_front_y".equals(item.getExtra_name())).collect(Collectors.toList());
|
||||||
List<DeviceExtra> frontX = deviceExtras.stream().filter(item -> "no_front_x".equals(item.getExtra_name())).collect(Collectors.toList());
|
List<DeviceExtra> frontX = deviceExtras.stream().filter(item -> "no_front_x".equals(item.getExtra_name())).collect(Collectors.toList());
|
||||||
@@ -643,30 +654,30 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Integer.valueOf(splitFront[1]).equals(MIN_Y)){
|
if (Integer.valueOf(splitFront[1]).equals(MIN_Y)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String x1 ;
|
String x1;
|
||||||
String x2 ;
|
String x2;
|
||||||
if (Integer.parseInt(splitFront[1])<10){
|
if (Integer.parseInt(splitFront[1]) < 10) {
|
||||||
x1 = "0"+(Integer.parseInt(splitFront[1]) - 1);
|
x1 = "0" + (Integer.parseInt(splitFront[1]) - 1);
|
||||||
x2 = "0"+(Integer.parseInt(splitFront[1]) + 1);
|
x2 = "0" + (Integer.parseInt(splitFront[1]) + 1);
|
||||||
}else {
|
} else {
|
||||||
x1 = ""+(Integer.parseInt(splitFront[1]) - 1);
|
x1 = "" + (Integer.parseInt(splitFront[1]) - 1);
|
||||||
x2 = ""+(Integer.parseInt(splitFront[1]) + 1);
|
x2 = "" + (Integer.parseInt(splitFront[1]) + 1);
|
||||||
}
|
}
|
||||||
//根据排序进行加减
|
//根据排序进行加减
|
||||||
String nextPointCodeDown = splitFront[0] + commonFinalParam.getBARRE() + x1 + commonFinalParam.getBARRE() + splitFront[2];
|
String nextPointCodeDown = splitFront[0] + commonFinalParam.getBARRE() + x1 + commonFinalParam.getBARRE() + splitFront[2];
|
||||||
String nextPointCodeUp = splitFront[0] + commonFinalParam.getBARRE() + x2 + commonFinalParam.getBARRE() + splitFront[2];
|
String nextPointCodeUp = splitFront[0] + commonFinalParam.getBARRE() + x2 + commonFinalParam.getBARRE() + splitFront[2];
|
||||||
if (CollectionUtil.isNotEmpty(sort)&& SortEnum.BACK.getCode().equals(sort.get(0).getExtra_value())){
|
if (CollectionUtil.isNotEmpty(sort) && SortEnum.BACK.getCode().equals(sort.get(0).getExtra_value())) {
|
||||||
nextPointCodeDown = splitFront[0] + commonFinalParam.getBARRE() + x2 + commonFinalParam.getBARRE() + splitFront[2];
|
nextPointCodeDown = splitFront[0] + commonFinalParam.getBARRE() + x2 + commonFinalParam.getBARRE() + splitFront[2];
|
||||||
nextPointCodeUp = splitFront[0] + commonFinalParam.getBARRE() + x1 + commonFinalParam.getBARRE() + splitFront[2];
|
nextPointCodeUp = splitFront[0] + commonFinalParam.getBARRE() + x1 + commonFinalParam.getBARRE() + splitFront[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Integer.valueOf(splitFront[1]).equals(MAX_Y)){
|
if (Integer.valueOf(splitFront[1]).equals(MAX_Y)) {
|
||||||
String finalNextPointCodeDown = nextPointCodeDown;
|
String finalNextPointCodeDown = nextPointCodeDown;
|
||||||
List<Instruction> instructionNextPointList = instructionList.stream().filter(item -> item.getNext_point_code().equals(finalNextPointCodeDown)).collect(Collectors.toList());
|
List<Instruction> instructionNextPointList = instructionList.stream().filter(item -> item.getNext_point_code().equals(finalNextPointCodeDown)).collect(Collectors.toList());
|
||||||
if (instructionNextPointList.size()>0){
|
if (instructionNextPointList.size() > 0) {
|
||||||
String[] splitBack = instructionNextPointList.get(0).getNext_point_code().split(commonFinalParam.getBARRE());
|
String[] splitBack = instructionNextPointList.get(0).getNext_point_code().split(commonFinalParam.getBARRE());
|
||||||
if (checkY(splitBack, backY)) {
|
if (checkY(splitBack, backY)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -676,13 +687,13 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
}
|
}
|
||||||
instructionsAll.add(instructionNextPointList.get(0));
|
instructionsAll.add(instructionNextPointList.get(0));
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
String finalNextPointCodeDown1 = nextPointCodeDown;
|
String finalNextPointCodeDown1 = nextPointCodeDown;
|
||||||
List<Instruction> instructionNextPointList1 = instructionList.stream().filter(item -> item.getNext_point_code().equals(finalNextPointCodeDown1)).collect(Collectors.toList());
|
List<Instruction> instructionNextPointList1 = instructionList.stream().filter(item -> item.getNext_point_code().equals(finalNextPointCodeDown1)).collect(Collectors.toList());
|
||||||
String finalNextPointCodeUp = nextPointCodeUp;
|
String finalNextPointCodeUp = nextPointCodeUp;
|
||||||
List<Instruction> instructionNextPointList2 = instructionList.stream().filter(item -> item.getNext_point_code().equals(finalNextPointCodeUp)).collect(Collectors.toList());
|
List<Instruction> instructionNextPointList2 = instructionList.stream().filter(item -> item.getNext_point_code().equals(finalNextPointCodeUp)).collect(Collectors.toList());
|
||||||
|
|
||||||
if (instructionNextPointList1.size()>0){
|
if (instructionNextPointList1.size() > 0) {
|
||||||
String[] splitBack = instructionNextPointList1.get(0).getNext_point_code().split(commonFinalParam.getBARRE());
|
String[] splitBack = instructionNextPointList1.get(0).getNext_point_code().split(commonFinalParam.getBARRE());
|
||||||
if (checkY(splitBack, backY)) {
|
if (checkY(splitBack, backY)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -693,7 +704,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
instructionsAll.add(instructionNextPointList1.get(0));
|
instructionsAll.add(instructionNextPointList1.get(0));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (instructionNextPointList2.size()>0){
|
if (instructionNextPointList2.size() > 0) {
|
||||||
//前叉的上一列有指令,此时前叉变成后叉,重新校验
|
//前叉的上一列有指令,此时前叉变成后叉,重新校验
|
||||||
String[] splitBack = instructionNextPointList2.get(0).getNext_point_code().split(commonFinalParam.getBARRE());
|
String[] splitBack = instructionNextPointList2.get(0).getNext_point_code().split(commonFinalParam.getBARRE());
|
||||||
if (checkY(splitBack, frontY)) {
|
if (checkY(splitBack, frontY)) {
|
||||||
@@ -720,7 +731,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkX(String[] split, List<DeviceExtra> x) {
|
private boolean checkX(String[] split, List<DeviceExtra> x) {
|
||||||
if (x.size()!=0&& StringUtils.isNotEmpty(x.get(0).getExtra_value())){
|
if (x.size() != 0 && StringUtils.isNotEmpty(x.get(0).getExtra_value())) {
|
||||||
String[] splitValue = x.get(0).getExtra_value().split(",");
|
String[] splitValue = x.get(0).getExtra_value().split(",");
|
||||||
Set<String> set = new HashSet<>(Arrays.asList(splitValue));
|
Set<String> set = new HashSet<>(Arrays.asList(splitValue));
|
||||||
return set.contains(split[0]);
|
return set.contains(split[0]);
|
||||||
@@ -729,7 +740,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkY(String[] split, List<DeviceExtra> y) {
|
private boolean checkY(String[] split, List<DeviceExtra> y) {
|
||||||
if (y.size()!=0&& StringUtils.isNotEmpty(y.get(0).getExtra_value())){
|
if (y.size() != 0 && StringUtils.isNotEmpty(y.get(0).getExtra_value())) {
|
||||||
String[] splitValue = y.get(0).getExtra_value().split(",");
|
String[] splitValue = y.get(0).getExtra_value().split(",");
|
||||||
Set<String> set = new HashSet<>(Arrays.asList(splitValue));
|
Set<String> set = new HashSet<>(Arrays.asList(splitValue));
|
||||||
return set.contains(split[1]);
|
return set.contains(split[1]);
|
||||||
@@ -759,14 +770,37 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() {
|
public JSONObject getDeviceStatusName() {
|
||||||
return null;
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("device_name", this.getDevice().getDevice_name());
|
||||||
|
jo.put("prohibitInWarehouse", this.prohibitInWarehouse);
|
||||||
|
jo.put("prohibitOutWarehouse", this.prohibitOutWarehouse);
|
||||||
|
jo.put("stopReceiveTask", this.stopReceiveTask);
|
||||||
|
jo.put("is_click", true);
|
||||||
|
jo.put("driver_type", "double_station_stacker");
|
||||||
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
if (ObjectUtil.isNotEmpty(data)) {
|
||||||
|
//监控大屏下发作业命令清警-5、召回-7、急停-8
|
||||||
|
Integer toCommand = data.getInteger("toCommand");
|
||||||
|
if (toCommand != null) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("to_command", toCommand);
|
||||||
|
this.writing(map);
|
||||||
|
}
|
||||||
|
//ACS监控大屏设置禁止入库、禁止出库、停止接收任务
|
||||||
|
Boolean prohibitInWarehouse = data.getBoolean("prohibitInWarehouse");
|
||||||
|
this.prohibitInWarehouse = prohibitInWarehouse;
|
||||||
|
Boolean prohibitOutWarehouse = data.getBoolean("prohibitOutWarehouse");
|
||||||
|
this.prohibitOutWarehouse = prohibitOutWarehouse;
|
||||||
|
Boolean stopReceiveTask = data.getBoolean("stopReceiveTask");
|
||||||
|
this.stopReceiveTask = stopReceiveTask;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成指令
|
* 完成指令
|
||||||
*
|
*
|
||||||
@@ -824,6 +858,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将扩展表中的字符串数据转换成集合
|
* 将扩展表中的字符串数据转换成集合
|
||||||
|
*
|
||||||
* @param extraName
|
* @param extraName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -846,7 +881,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
private void setData() {
|
private void setData() {
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
itemDeviceCode= this.itemProtocol.getItem_device_Code();
|
itemDeviceCode = this.itemProtocol.getItem_device_Code();
|
||||||
mode = this.itemProtocol.getItem_mode();
|
mode = this.itemProtocol.getItem_mode();
|
||||||
move = this.itemProtocol.getItem_move();
|
move = this.itemProtocol.getItem_move();
|
||||||
frontCommand = this.itemProtocol.getItem_front_command();
|
frontCommand = this.itemProtocol.getItem_front_command();
|
||||||
|
|||||||
@@ -41,10 +41,18 @@ public class RouteLine extends CommonModel<RouteLine> implements Serializable {
|
|||||||
@NotBlank
|
@NotBlank
|
||||||
private String device_code;
|
private String device_code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备类型")
|
||||||
|
@NotBlank
|
||||||
|
private String start_device_type;
|
||||||
|
|
||||||
@ApiModelProperty(value = "下一设备")
|
@ApiModelProperty(value = "下一设备")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String next_device_code;
|
private String next_device_code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一设备类型")
|
||||||
|
@NotBlank
|
||||||
|
private String next_device_type;
|
||||||
|
|
||||||
@ApiModelProperty(value = "路线类型")
|
@ApiModelProperty(value = "路线类型")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,15 @@ public class RouteLineDto implements Serializable {
|
|||||||
@ApiModelProperty(value = "设备编码")
|
@ApiModelProperty(value = "设备编码")
|
||||||
private String device_code;
|
private String device_code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "起点设备类型")
|
||||||
|
private String start_device_type;
|
||||||
|
|
||||||
@ApiModelProperty(value = "下一设备")
|
@ApiModelProperty(value = "下一设备")
|
||||||
private String next_device_code;
|
private String next_device_code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "终点设备类型")
|
||||||
|
private String next_device_type;
|
||||||
|
|
||||||
@ApiModelProperty(value = "路线类型")
|
@ApiModelProperty(value = "路线类型")
|
||||||
private String type;
|
private String type;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import org.nl.acs.auto.initial.ApplicationAutoInitial;
|
|||||||
import org.nl.acs.common.base.CommonFinalParam;
|
import org.nl.acs.common.base.CommonFinalParam;
|
||||||
import org.nl.acs.device.domain.Device;
|
import org.nl.acs.device.domain.Device;
|
||||||
import org.nl.acs.device.enums.DeviceType;
|
import org.nl.acs.device.enums.DeviceType;
|
||||||
|
import org.nl.acs.device.service.DeviceService;
|
||||||
|
import org.nl.acs.device.service.dto.DeviceDto;
|
||||||
import org.nl.acs.device.service.mapper.DeviceMapper;
|
import org.nl.acs.device.service.mapper.DeviceMapper;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
@@ -85,6 +87,8 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
|
|||||||
private RoutePlanService routePlanService;
|
private RoutePlanService routePlanService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DeviceAppService deviceAppService;
|
private DeviceAppService deviceAppService;
|
||||||
|
@Autowired
|
||||||
|
private DeviceService deviceService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<RouteLineDto> queryAll(RouteLineQueryParam query, Pageable pageable) {
|
public PageInfo<RouteLineDto> queryAll(RouteLineQueryParam query, Pageable pageable) {
|
||||||
@@ -298,13 +302,17 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
|
|||||||
ArrayList<String> next_arr = (ArrayList<String>) whereJson.get("next_device_code");
|
ArrayList<String> next_arr = (ArrayList<String>) whereJson.get("next_device_code");
|
||||||
for (int i = 0; i < start_arr.size(); i++) {
|
for (int i = 0; i < start_arr.size(); i++) {
|
||||||
String device_code = start_arr.get(i);
|
String device_code = start_arr.get(i);
|
||||||
|
DeviceDto start_device = deviceService.findByCode(device_code);
|
||||||
for (int j = 0; j < next_arr.size(); j++) {
|
for (int j = 0; j < next_arr.size(); j++) {
|
||||||
String next_device_code = next_arr.get(j);
|
String next_device_code = next_arr.get(j);
|
||||||
|
DeviceDto next_device = deviceService.findByCode(next_device_code);
|
||||||
RouteLineDto dto = new RouteLineDto();
|
RouteLineDto dto = new RouteLineDto();
|
||||||
dto.setWeights(String.valueOf(whereJson.get("weights")));
|
dto.setWeights(String.valueOf(whereJson.get("weights")));
|
||||||
dto.setRoute_plan_id(String.valueOf(whereJson.get("route_plan_id")));
|
dto.setRoute_plan_id(String.valueOf(whereJson.get("route_plan_id")));
|
||||||
dto.setDevice_code(device_code);
|
dto.setDevice_code(device_code);
|
||||||
|
dto.setStart_device_type(start_device.getDevice_type());
|
||||||
dto.setNext_device_code(next_device_code);
|
dto.setNext_device_code(next_device_code);
|
||||||
|
dto.setNext_device_type(next_device.getDevice_type());
|
||||||
dto.setType(String.valueOf(whereJson.get("type")));
|
dto.setType(String.valueOf(whereJson.get("type")));
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
@@ -467,6 +475,7 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* floyd算法,将所有设备之间的最短路线计算出来,如果是null 则代表不通
|
* floyd算法,将所有设备之间的最短路线计算出来,如果是null 则代表不通
|
||||||
|
*
|
||||||
* @param graph
|
* @param graph
|
||||||
*/
|
*/
|
||||||
private static void floyd(Map[][] graph) {
|
private static void floyd(Map[][] graph) {
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ export default {
|
|||||||
'table_title': {
|
'table_title': {
|
||||||
'route_plan_id': 'Routing Scheme',
|
'route_plan_id': 'Routing Scheme',
|
||||||
'device_code': 'Current Device Name',
|
'device_code': 'Current Device Name',
|
||||||
|
'device_type': 'Current Device Type',
|
||||||
'next_device_code': 'Post Device Name',
|
'next_device_code': 'Post Device Name',
|
||||||
|
'next_device_type': 'Post Device Type',
|
||||||
'type': 'Route Type',
|
'type': 'Route Type',
|
||||||
'transport_route': 'Transport Route',
|
'transport_route': 'Transport Route',
|
||||||
'agv_route': 'AGV Route',
|
'agv_route': 'AGV Route',
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ export default {
|
|||||||
'table_title': {
|
'table_title': {
|
||||||
'route_plan_id': 'Skema Rute ',
|
'route_plan_id': 'Skema Rute ',
|
||||||
'device_code': 'Nama Divais Saat Ini',
|
'device_code': 'Nama Divais Saat Ini',
|
||||||
|
'device_type': 'Nama Divais Saat Tipe',
|
||||||
'next_device_code': 'Nama Perangkat Rear',
|
'next_device_code': 'Nama Perangkat Rear',
|
||||||
|
'next_device_type': 'Nama Perangkat Tipe',
|
||||||
'type': 'Jenis Rute',
|
'type': 'Jenis Rute',
|
||||||
'transport_rute': 'Rute Pengiriman',
|
'transport_rute': 'Rute Pengiriman',
|
||||||
'agv_rute': 'Agv Rute',
|
'agv_rute': 'Agv Rute',
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ export default {
|
|||||||
'table_title': {
|
'table_title': {
|
||||||
'route_plan_id': '路由方案',
|
'route_plan_id': '路由方案',
|
||||||
'device_code': '当前设备名称',
|
'device_code': '当前设备名称',
|
||||||
|
'device_type': '设备类型',
|
||||||
'next_device_code': '后置设备名称',
|
'next_device_code': '后置设备名称',
|
||||||
|
'next_device_type': '后置设备类型',
|
||||||
'type': '路由类型',
|
'type': '路由类型',
|
||||||
'transport_route': '输送路由',
|
'transport_route': '输送路由',
|
||||||
'agv_route': 'agv路由',
|
'agv_route': 'agv路由',
|
||||||
|
|||||||
@@ -152,7 +152,10 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">{{ $t('task.select.Cancel') }}</el-button>
|
<el-button type="text" @click="crud.cancelCU">{{ $t('task.select.Cancel') }}</el-button>
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('task.select.Confirm') }}</el-button>
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{
|
||||||
|
$t('task.select.Confirm')
|
||||||
|
}}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -167,7 +170,12 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column v-if="false" prop="line_uuid" label="路线标识" />
|
<el-table-column v-if="false" prop="line_uuid" label="路线标识" />
|
||||||
<el-table-column prop="device_code" :label="$t('device.device_table_title.device_encoding')" :min-width="flexWidth('device_code',crud.data,$t('device.device_table_title.device_encoding'))" />
|
<el-table-column
|
||||||
|
prop="device_code"
|
||||||
|
:label="$t('device.device_table_title.device_encoding')"
|
||||||
|
:min-width="flexWidth('device_code',crud.data,$t('device.device_table_title.device_encoding'))"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="start_device_type" min-width="120" :label="$t('route.table_title.device_type')" />
|
||||||
<el-table-column v-if="false" prop="device_code" :label="$t('device.device_table_title.device_name')" />
|
<el-table-column v-if="false" prop="device_code" :label="$t('device.device_table_title.device_name')" />
|
||||||
<el-table-column prop="type" :label="$t('route.table_title.type')">
|
<el-table-column prop="type" :label="$t('route.table_title.type')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -177,10 +185,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="next_device_code" min-width="120" :label="$t('route.table_title.next_device_code')" />
|
<el-table-column prop="next_device_code" min-width="120" :label="$t('route.table_title.next_device_code')" />
|
||||||
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备名称" />
|
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备名称" />
|
||||||
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备类型" />
|
<el-table-column prop="next_device_type" min-width="120" :label="$t('route.table_title.next_device_type')" />
|
||||||
<el-table-column prop="weights" :label="$t('route.table_title.weights')" />
|
<el-table-column prop="weights" :label="$t('route.table_title.weights')" />
|
||||||
|
|
||||||
<el-table-column :label="$t('auto.common.is_on')" align="center" prop="is_active" :min-width="flexWidth('is_active',crud.data,$t('auto.common.is_on'))">
|
<el-table-column
|
||||||
|
:label="$t('auto.common.is_on')"
|
||||||
|
align="center"
|
||||||
|
prop="is_active"
|
||||||
|
:min-width="flexWidth('is_active',crud.data,$t('auto.common.is_on'))"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.is_active"
|
v-model="scope.row.is_active"
|
||||||
|
|||||||
@@ -177,6 +177,35 @@
|
|||||||
<el-button type="primary" @click="saveBarcode">确 定</el-button>
|
<el-button type="primary" @click="saveBarcode">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 堆垛机弹出框 -->
|
||||||
|
<el-dialog title="设备设置" :visible.sync="dialogFormVisible8" width="35%">
|
||||||
|
<el-form :model="form" size="small">
|
||||||
|
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
||||||
|
<el-input v-model="form.device_code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="作业命令" prop="toCommand" label-width="120px">
|
||||||
|
<el-radio-group v-model="form.toCommand">
|
||||||
|
<el-radio-button :label="7">召回</el-radio-button>
|
||||||
|
<el-radio-button :label="8">急停</el-radio-button>
|
||||||
|
<el-radio-button :label="5">清警</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="禁止入库" prop="prohibitInWarehouse" label-width="120px">
|
||||||
|
<el-switch v-model="form.prohibitInWarehouse" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="禁止出库" prop="prohibitOutWarehouse" label-width="120px">
|
||||||
|
<el-switch v-model="form.prohibitOutWarehouse" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="停止任务" prop="stopReceiveTask" label-width="120px">
|
||||||
|
<el-switch v-model="form.stopReceiveTask" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible8 = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="dialogSave">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -211,6 +240,7 @@ export default {
|
|||||||
dialogFormVisible5: false,
|
dialogFormVisible5: false,
|
||||||
dialogFormVisible6: false,
|
dialogFormVisible6: false,
|
||||||
dialogFormVisible7: false,
|
dialogFormVisible7: false,
|
||||||
|
dialogFormVisible8: false,
|
||||||
form: {
|
form: {
|
||||||
device_code: '',
|
device_code: '',
|
||||||
hasGoodStatus: null,
|
hasGoodStatus: null,
|
||||||
@@ -221,7 +251,11 @@ export default {
|
|||||||
requireSucess: '',
|
requireSucess: '',
|
||||||
fullrequireSucess: '',
|
fullrequireSucess: '',
|
||||||
is_disable: '',
|
is_disable: '',
|
||||||
applySucess: ''
|
applySucess: '',
|
||||||
|
toCommand: null,
|
||||||
|
prohibitInWarehouse: false,
|
||||||
|
prohibitOutWarehouse: false,
|
||||||
|
stopReceiveTask: false
|
||||||
},
|
},
|
||||||
allDeviceMsg: [],
|
allDeviceMsg: [],
|
||||||
msgTop: '200px',
|
msgTop: '200px',
|
||||||
@@ -312,7 +346,7 @@ export default {
|
|||||||
this.timer = setInterval(() => { // 定时刷新设备的状态信息
|
this.timer = setInterval(() => { // 定时刷新设备的状态信息
|
||||||
console.log('定时器启动')
|
console.log('定时器启动')
|
||||||
this.initStatus()
|
this.initStatus()
|
||||||
}, 2000)
|
}, 200000)
|
||||||
},
|
},
|
||||||
editDevice(id) {
|
editDevice(id) {
|
||||||
let item = ''
|
let item = ''
|
||||||
@@ -353,6 +387,8 @@ export default {
|
|||||||
this.dialogFormVisible7 = true
|
this.dialogFormVisible7 = true
|
||||||
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
||||||
this.dialogFormVisible6 = true
|
this.dialogFormVisible6 = true
|
||||||
|
} else if (clickObj.data.driver_type === 'double_station_stacker') {
|
||||||
|
this.dialogFormVisible8 = true
|
||||||
} else {
|
} else {
|
||||||
this.dialogFormVisible = true
|
this.dialogFormVisible = true
|
||||||
}
|
}
|
||||||
@@ -368,6 +404,10 @@ export default {
|
|||||||
this.form.applySucess = clickObj.data.applySucess
|
this.form.applySucess = clickObj.data.applySucess
|
||||||
this.form.barcode = clickObj.data.barcode
|
this.form.barcode = clickObj.data.barcode
|
||||||
this.form.hand_barcode = clickObj.data.hand_barcode
|
this.form.hand_barcode = clickObj.data.hand_barcode
|
||||||
|
this.form.prohibitInWarehouse = clickObj.data.prohibitInWarehouse
|
||||||
|
this.form.prohibitOutWarehouse = clickObj.data.prohibitOutWarehouse
|
||||||
|
this.form.stopReceiveTask = clickObj.data.stopReceiveTask
|
||||||
|
this.form.toCommand = null
|
||||||
},
|
},
|
||||||
moveShow(nodeData) { // 点击之后显示出来的数据----只需要设备信息
|
moveShow(nodeData) { // 点击之后显示出来的数据----只需要设备信息
|
||||||
let item = ''
|
let item = ''
|
||||||
@@ -646,6 +686,7 @@ export default {
|
|||||||
this.dialogFormVisible5 = false
|
this.dialogFormVisible5 = false
|
||||||
this.dialogFormVisible6 = false
|
this.dialogFormVisible6 = false
|
||||||
this.dialogFormVisible7 = false
|
this.dialogFormVisible7 = false
|
||||||
|
this.dialogFormVisible8 = false
|
||||||
this.initStageData()
|
this.initStageData()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
@@ -653,6 +694,7 @@ export default {
|
|||||||
this.dialogFormVisible4 = false
|
this.dialogFormVisible4 = false
|
||||||
this.dialogFormVisible5 = false
|
this.dialogFormVisible5 = false
|
||||||
this.dialogFormVisible7 = false
|
this.dialogFormVisible7 = false
|
||||||
|
this.dialogFormVisible8 = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user