opt: 监控大屏显示设备信息优化
This commit is contained in:
@@ -360,53 +360,66 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
|
||||
String mode = "";
|
||||
String action = "";
|
||||
String move = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = LangProcess.msg("universal_off-line");
|
||||
} else if (this.getMode() == 1) {
|
||||
}/* else if (this.getMode() == 1) {
|
||||
mode = LangProcess.msg("universal_stand-alone");
|
||||
} else if (this.getMode() == 2) {
|
||||
} */else if (this.getMode() == 1) {
|
||||
mode = LangProcess.msg("universal_standby");
|
||||
} else if (this.getMode() == 3) {
|
||||
}/* else if (this.getMode() == 3) {
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
}
|
||||
String requireSucess = "0";
|
||||
}*/
|
||||
String requireSucess = LangProcess.msg("universal_actionMessage4");
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
requireSucess = LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
map.put("requireSucess", requireSucess);
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = LangProcess.msg("universal_no");
|
||||
jo.put("hasGoods", false);
|
||||
map.put("hasGoods", false);
|
||||
} else if (this.getMove() == 1) {
|
||||
move = LangProcess.msg("universal_yes");
|
||||
jo.put("hasGoods", true);
|
||||
map.put("hasGoods", true);
|
||||
} else if (this.getMove() == 2) {
|
||||
move = LangProcess.msg("universal_two_yes");
|
||||
jo.put("hasGoods", true);
|
||||
map.put("hasGoods", true);
|
||||
}
|
||||
if(error == 0 && iserror){
|
||||
message = "universal_message11";
|
||||
message = LangProcess.msg("universal_message11");
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("temperature", temperature);
|
||||
jo.put("finish", finish);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("countdown_house", countdown_house);
|
||||
jo.put("countdown_min", countdown_min);
|
||||
jo.put("countdown_sec", countdown_sec);
|
||||
jo.put("door", door);
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("message", message);
|
||||
jo.put("task", this.getTask());
|
||||
String door = "关门状态";
|
||||
if(this.door == 1){
|
||||
door = "开门状态";
|
||||
}else if(this.door == 0){
|
||||
door = "门执行中";
|
||||
}
|
||||
String finish = "未完成";
|
||||
if(this.finish == 1){
|
||||
finish = "已完成";
|
||||
}
|
||||
map.put("device_name", this.getDevice().getDevice_name());
|
||||
map.put("finish", finish);
|
||||
map.put("isOnline", this.getIsonline());
|
||||
|
||||
map.put("isError", this.getIserror());
|
||||
map.put("door", door);
|
||||
map.put("mode", mode);
|
||||
map.put("move", move);
|
||||
/*map.put("action", action);
|
||||
map.put("message", message);*/
|
||||
/*map.put("task", this.getTask());*/
|
||||
map.put("error", ErrorUtil.getDictDetail("hx_error_type", String.valueOf(this.getError())));
|
||||
map.put("temperature", temperature);
|
||||
map.put("countdown_house", countdown_house);
|
||||
map.put("countdown_min", countdown_min);
|
||||
map.put("countdown_sec", countdown_sec);
|
||||
JSONObject jo = new JSONObject(map);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public class ItemProtocol {
|
||||
} ;
|
||||
|
||||
Boolean isonline;
|
||||
Boolean isError;
|
||||
Boolean isError = false;
|
||||
|
||||
public int getOpcIntegerValue(String protocol) {
|
||||
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||
|
||||
@@ -192,7 +192,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
requireActionSucess = false;
|
||||
}
|
||||
|
||||
if (!requireActionSucess) {
|
||||
if (mode == 3 && !requireActionSucess) {
|
||||
update_instruction_status();
|
||||
}
|
||||
|
||||
@@ -200,7 +200,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
var17.printStackTrace();
|
||||
feedMessage = var17.getMessage();
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol));
|
||||
|
||||
}
|
||||
|
||||
if (mode == 0) {
|
||||
@@ -1082,7 +1081,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
@@ -1103,11 +1103,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
move = LangProcess.msg("universal_yes");
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
String requireSucess = LangProcess.msg("universal_actionMessage4");
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
requireSucess = LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
map.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = LangProcess.msg("universal_delivery");
|
||||
} else if (this.getAction() == 2) {
|
||||
@@ -1118,30 +1118,31 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
action = LangProcess.msg("universal_releasing_completed");
|
||||
}
|
||||
if (error == 0 && iserror) {
|
||||
this.setMessage(LangProcess.msg("universal_message4"));
|
||||
this.setMessage(LangProcess.msg("universal_message11"));
|
||||
}
|
||||
String requireActionSucess = LangProcess.msg("universal_actionMessage4");
|
||||
String requireActionSucess = "指令" + LangProcess.msg("universal_actionMessage4");
|
||||
if(this.requireActionSucess){
|
||||
requireActionSucess = LangProcess.msg("universal_actionMessage5");
|
||||
requireActionSucess = "指令" + LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("task", task);
|
||||
jo.put("walk_y", walk_y);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", message);
|
||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||
jo.put("feedMessage", feedMessage);
|
||||
jo.put("requireActionSucess", requireActionSucess);
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
jo.put("x", x_position);
|
||||
jo.put("y", y_position);
|
||||
map.put("device_name", this.getDevice().getDevice_name());
|
||||
map.put("mode", mode);
|
||||
map.put("move", move);
|
||||
map.put("action", action);
|
||||
map.put("task", task);
|
||||
map.put("walk_y", this.walk_y);
|
||||
map.put("isOnline", this.getIsonline());
|
||||
map.put("requireActionSucess", requireActionSucess);
|
||||
map.put("error", ErrorUtil.getDictDetail("hxhj_error_type", String.valueOf(this.getError())));
|
||||
map.put("isError", this.getIserror());
|
||||
map.put("message", message);
|
||||
map.put("feedMessage", feedMessage);
|
||||
map.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
map.put("notCreateInstMessage", notCreateInstMessage);
|
||||
map.put("driver_type", "siemens_conveyor");
|
||||
map.put("is_click", true);
|
||||
JSONObject jo = new JSONObject(map);
|
||||
/*jo.put("x", x_position);
|
||||
jo.put("y", y_position);*/
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -221,6 +221,9 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.setIsonline(true);
|
||||
this.setIserror(false);
|
||||
message = "";
|
||||
if(requireSucess){
|
||||
message = LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
//插拔轴机工位申请任务
|
||||
switch (mode) {
|
||||
case 1:
|
||||
@@ -588,8 +591,19 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
mode = LangProcess.msg("universal_standby");
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
} else if(this.mode == 4) {
|
||||
mode = "请求套轴轴";
|
||||
} else if(this.mode == 5){
|
||||
mode = "套轴完成反馈";
|
||||
} else if(this.mode == 6){
|
||||
mode = "请求拔轴";
|
||||
} else if(this.mode == 7){
|
||||
mode = "拔轴完成反馈";
|
||||
} else if(this.mode == 8){
|
||||
mode = "缓存库已满,申请行架任务";
|
||||
}
|
||||
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = LangProcess.msg("universal_no");
|
||||
jo.put("hasGoods", false);
|
||||
@@ -600,6 +614,10 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
move = LangProcess.msg("universal_two_yes");
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
String requireSucess = LangProcess.msg("universal_actionMessage4");
|
||||
if (this.requireSucess) {
|
||||
requireSucess = LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = LangProcess.msg("universal_delivery");
|
||||
@@ -613,11 +631,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
/*jo.put("action", action);*/
|
||||
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("message", message);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -617,11 +617,10 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
String walkY = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = LangProcess.msg("universal_off-line");
|
||||
} else if (this.getMode() == 1) {
|
||||
@@ -638,11 +637,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
move = LangProcess.msg("universal_yes");
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
String requireSucess = LangProcess.msg("universal_actionMessage4");
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
requireSucess = LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
map.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = LangProcess.msg("universal_delivery");
|
||||
} else if (this.getAction() == 2) {
|
||||
@@ -651,29 +650,32 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
action = LangProcess.msg("universal_releasing");
|
||||
} else if (this.getAction() == 4) {
|
||||
action = LangProcess.msg("universal_releasing_completed");
|
||||
}else {
|
||||
action = "无动作";
|
||||
}
|
||||
if(error == 0 && this.itemProtocol.isError){
|
||||
iserror = true;
|
||||
}else if(error == 0 && !this.itemProtocol.isError){
|
||||
iserror = false;
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("task", task);
|
||||
jo.put("walk_y", walkY);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", message);
|
||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||
jo.put("feedMessage", feedMessage);
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
jo.put("x", xPosition);
|
||||
jo.put("y", yPosition);
|
||||
map.put("device_name", this.getDevice().getDevice_name());
|
||||
map.put("mode", mode);
|
||||
map.put("move", move);
|
||||
map.put("action", action);
|
||||
map.put("task", task);
|
||||
map.put("walk_y", walkY);
|
||||
map.put("isOnline", this.getIsonline());
|
||||
map.put("isError", this.getIserror());
|
||||
map.put("feedMessage", feedMessage);
|
||||
map.put("driver_type", "siemens_conveyor");
|
||||
map.put("is_click", true);
|
||||
map.put("message", message);
|
||||
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
map.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
map.put("notCreateInstMessage", notCreateInstMessage);
|
||||
/*jo.put("x", xPosition);
|
||||
jo.put("y", yPosition);*/
|
||||
JSONObject jo = new JSONObject(map);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,21 +232,25 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
.content("反馈LMS子卷重量失败:"+ applyPlugPullSitResponse.getMessage())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
message = "反馈LMS子卷重量失败:"+ applyPlugPullSitResponse.getMessage();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
} else if(mode == 3){
|
||||
feedMessage = "行架机械手:";
|
||||
if (mode != 3) {
|
||||
/*if (mode != 3) {
|
||||
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||
}
|
||||
}*/
|
||||
if (action != 5) {
|
||||
feedMessage = feedMessage + "action不为反馈重量状态,";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage = feedMessage + "move不为有货状态,";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "task为0。";
|
||||
if(StrUtil.isEmpty(sub_volume_no)){
|
||||
feedMessage = feedMessage + "子卷号为空,";
|
||||
}
|
||||
if(requireSucess){
|
||||
feedMessage = feedMessage + "请求动作未复位!";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +577,7 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
@@ -595,11 +599,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
}
|
||||
|
||||
|
||||
String requireSucess = "0";
|
||||
String requireSucess = LangProcess.msg("universal_actionMessage4");
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
requireSucess = LangProcess.msg("universal_actionMessage5");
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
map.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = LangProcess.msg("universal_delivery");
|
||||
} else if (this.getAction() == 2) {
|
||||
@@ -608,29 +612,28 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
action = LangProcess.msg("universal_releasing");
|
||||
} else if (this.getAction() == 4) {
|
||||
action = LangProcess.msg("universal_releasing_completed");
|
||||
}else if (this.getAction() == 5){
|
||||
action = "反馈子卷重量";
|
||||
}else if (this.getAction() == 0){
|
||||
action = "无动作";
|
||||
}
|
||||
if(error == 0 && this.itemProtocol.isError){
|
||||
iserror = true;
|
||||
}else if(error == 0 && !this.itemProtocol.isError){
|
||||
}else if(error == 0 && !(this.itemProtocol.isError)){
|
||||
iserror = false;
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("task", task);
|
||||
jo.put("walk_y", walk_y);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||
jo.put("feedMessage",feedMessage);
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
jo.put("x", x_position);
|
||||
jo.put("y", y_position);
|
||||
map.put("device_name", this.getDevice().getDevice_name());
|
||||
map.put("mode", mode);
|
||||
map.put("move", move);
|
||||
map.put("action", action);
|
||||
map.put("isOnline", this.getIsonline());
|
||||
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
map.put("isError", this.getIserror());
|
||||
map.put("message", message);
|
||||
map.put("feedMessage", feedMessage);
|
||||
map.put("driver_type", "siemens_conveyor");
|
||||
map.put("is_click", true);
|
||||
JSONObject jo = new JSONObject(map);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ export default {
|
||||
this.arr = [] // 清空
|
||||
if (item.device_code && item.data) {
|
||||
console.log('item', item)
|
||||
let tempDeviceName = ''
|
||||
/* let tempDeviceName = ''
|
||||
if (this.language === 'zh') {
|
||||
tempDeviceName = item.data.zh_device_name
|
||||
}
|
||||
@@ -514,12 +514,10 @@ export default {
|
||||
}
|
||||
if (this.language === 'in') {
|
||||
tempDeviceName = item.data.in_device_name
|
||||
}
|
||||
} */
|
||||
this.arr = [
|
||||
{ name: i18n.t('monitor.click.equipment_number'), value: item.device_code },
|
||||
// { name: tempDeviceName, value: item.device_name }
|
||||
{ name: i18n.t('monitor.click.device_name'), value: tempDeviceName }
|
||||
// { name: i18n.t('monitor.click.device_name'), value: item.device_name }
|
||||
{ name: i18n.t('monitor.click.device_name'), value: item.device_name }
|
||||
]
|
||||
const data = item.data
|
||||
for (const val in data) {
|
||||
@@ -689,6 +687,9 @@ export default {
|
||||
} else if (val === 'requireSucess') {
|
||||
const obj = { name: i18n.t('monitor.click.request_success_flag'), value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'requireActionSucess') {
|
||||
const obj = { name: '信号成功标记', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'applySucess') {
|
||||
const obj = { name: 'applySucess', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
@@ -699,7 +700,7 @@ export default {
|
||||
const obj = { name: i18n.t('monitor.click.inventory_quantity'), value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'hand_barcode') {
|
||||
const obj = { name: 'hand_barcode', value: data[val] }
|
||||
const obj = { name: '子卷编号', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'x') {
|
||||
const obj = { name: 'X', value: data[val] }
|
||||
|
||||
Reference in New Issue
Block a user