更新
This commit is contained in:
@@ -52,23 +52,9 @@ public class StandardConveyorControlDefination implements OpcDeviceDriverDefinat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemDto> getReadableItemDtos() {
|
public List<ItemDto> getReadableItemDtos() {
|
||||||
return getReadableItemDtos2();
|
return ItemProtocol.getReadableItemDtos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos2() {
|
|
||||||
List<ItemDto> 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
|
@Override
|
||||||
public List<ItemDto> getWriteableItemDtos() {
|
public List<ItemDto> getWriteableItemDtos() {
|
||||||
|
|||||||
@@ -51,24 +51,9 @@ public class StandardConveyorControlWithPlcScannerDefination implements OpcDevic
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemDto> getReadableItemDtos() {
|
public List<ItemDto> getReadableItemDtos() {
|
||||||
return getReadableItemDtos2();
|
return ItemProtocol.getReadableItemDtos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos2() {
|
|
||||||
List<ItemDto> 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"));
|
|
||||||
list.add(new ItemDto(ItemProtocol.item_barcode, "托盘号", "DB600.S26"));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemDto> getWriteableItemDtos() {
|
public List<ItemDto> getWriteableItemDtos() {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
|||||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
import org.nl.acs.instruction.service.dto.Instruction;
|
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.Device;
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
import org.nl.acs.opc.WcsConfig;
|
import org.nl.acs.opc.WcsConfig;
|
||||||
@@ -42,7 +43,7 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Data
|
@Data
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
|
public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||||
@Autowired
|
@Autowired
|
||||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||||
@@ -546,5 +547,69 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getDeviceStatusName() {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
String mode = "";
|
||||||
|
String action = "";
|
||||||
|
String io_action = "";
|
||||||
|
String move = "";
|
||||||
|
String status = "";
|
||||||
|
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 = "申请入库";
|
||||||
|
} else if (this.getMode() == 7) {
|
||||||
|
mode = "码垛完成";
|
||||||
|
} else if (this.getMode() == 8) {
|
||||||
|
mode = "码垛强制完成";
|
||||||
|
} else if (this.getMode() == 9) {
|
||||||
|
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.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("status", status);
|
||||||
|
jo.put("io_action", io_action);
|
||||||
|
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("barcode", this.getBarcode());
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
server:
|
server:
|
||||||
port: 8011
|
port: 8010
|
||||||
#配置数据源
|
#配置数据源
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
@@ -7,9 +7,10 @@ spring:
|
|||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:yongyu_acs2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:yongyu_acs2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:yongyu_acs2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:P@ssw0rd}
|
password: ${DB_PWD:P@ssw0rd}
|
||||||
# password: ${DB_PWD:12356}
|
# password: ${DB_PWD:Root.123456}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
@@ -51,12 +52,12 @@ spring:
|
|||||||
wall:
|
wall:
|
||||||
config:
|
config:
|
||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
database: ${REDIS_DB:15}
|
database: ${REDIS_DB:15}
|
||||||
host: ${REDIS_HOST:127.0.0.1}
|
host: ${REDIS_HOST:127.0.0.1}
|
||||||
port: ${REDIS_PORT:6379}
|
port: ${REDIS_PORT:6379}
|
||||||
password: ${REDIS_PWD:}
|
password: ${REDIS_PWD:}
|
||||||
|
|
||||||
# 登录相关配置
|
# 登录相关配置
|
||||||
login:
|
login:
|
||||||
@@ -133,7 +134,7 @@ logging:
|
|||||||
# Sa-Token配置
|
# Sa-Token配置
|
||||||
sa-token:
|
sa-token:
|
||||||
# token 名称 (同时也是cookie名称)
|
# token 名称 (同时也是cookie名称)
|
||||||
token-name: satoken
|
token-name: Authorization
|
||||||
# token 有效期,单位s 默认30天, -1代表永不过期
|
# token 有效期,单位s 默认30天, -1代表永不过期
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
# token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
# token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||||
@@ -148,7 +149,7 @@ sa-token:
|
|||||||
is-log: false
|
is-log: false
|
||||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||||
# token 前缀
|
# token 前缀
|
||||||
# token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
|
|
||||||
loki:
|
loki:
|
||||||
url: http://localhost:3100/loki/api/v1
|
url: http://localhost:3100/loki/api/v1
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getStageCodeByCode(code) {
|
export function getValueByCode(code) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/param/getValueByCode',
|
url: 'api/param/getValueByCode',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -32,4 +32,4 @@ export function getStageCodeByCode(code) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getStageCodeByCode }
|
export default { add, edit, del, getValueByCode }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="overflow: hidden" >
|
<div style="overflow: hidden">
|
||||||
<el-row>
|
<el-row>
|
||||||
<div id="container" className="container" style="min-height: 100%"/>
|
<div id="container" className="container" style="min-height: 100%" />
|
||||||
</el-row>
|
</el-row>
|
||||||
<!--点击设备显示信息-->
|
<!--点击设备显示信息-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -234,7 +234,7 @@ export default {
|
|||||||
},
|
},
|
||||||
initStageData() {
|
initStageData() {
|
||||||
// 获取舞台编码
|
// 获取舞台编码
|
||||||
paramCrud.getStageCodeByCode(this.stageParam).then(res => {
|
paramCrud.getValueByCode(this.stageParam).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if (res.value) {
|
if (res.value) {
|
||||||
crudStage.getNewStageDataByCode(res.value).then(res => { // 通过舞台编码获取舞台数据并且赋值到lf对象
|
crudStage.getNewStageDataByCode(res.value).then(res => { // 通过舞台编码获取舞台数据并且赋值到lf对象
|
||||||
|
|||||||
Reference in New Issue
Block a user