fix: 修复烘箱行架不给2的问题
This commit is contained in:
@@ -340,6 +340,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
jo.put("finish", finish);
|
jo.put("finish", finish);
|
||||||
jo.put("isOnline", this.getIsonline());
|
jo.put("isOnline", this.getIsonline());
|
||||||
jo.put("error", ErrorUtil.getDictDetail("hx_error_type", String.valueOf(this.getError())));
|
jo.put("error", ErrorUtil.getDictDetail("hx_error_type", String.valueOf(this.getError())));
|
||||||
|
jo.put("error1", ErrorUtil.getDictDetail("hx_error_type", String.valueOf(this.getError1())));
|
||||||
jo.put("isError", this.getIserror());
|
jo.put("isError", this.getIserror());
|
||||||
jo.put("countdown_house", countdown_house);
|
jo.put("countdown_house", countdown_house);
|
||||||
jo.put("countdown_min", countdown_min);
|
jo.put("countdown_min", countdown_min);
|
||||||
@@ -348,9 +349,6 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
jo.put("mode", mode);
|
jo.put("mode", mode);
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
jo.put("action", action);
|
jo.put("action", action);
|
||||||
// jo.put("isOnline", this.getIsonline());
|
|
||||||
// jo.put("error", this.getError());
|
|
||||||
// jo.put("isError", this.getIserror());
|
|
||||||
jo.put("task", this.getTask());
|
jo.put("task", this.getTask());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
@@ -402,4 +400,29 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writing(List list) {
|
||||||
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
Object ob = list.get(i);
|
||||||
|
JSONObject json = (JSONObject) JSONObject.toJSON(ob);
|
||||||
|
if (!StrUtil.isEmpty(json.getString("value"))) {
|
||||||
|
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
|
+ "." + json.getString("code");
|
||||||
|
itemMap.put(to_param, json.getString("value"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
|
try {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
try {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -457,11 +457,29 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.writing("to_command", "1");
|
this.writing("to_command", "1");
|
||||||
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
List list = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "to_open_door");
|
||||||
|
map.put("value", "1");
|
||||||
|
list.add(map);
|
||||||
|
try {
|
||||||
|
hongXiangConveyorDeviceDriver.writing(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "起点设备:" + start_device_code + "未打开烘箱门,导致now_steps_type不等于: 2 ;now_steps_type:" + now_steps_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
List list = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "to_open_door");
|
||||||
|
map.put("value", "1");
|
||||||
|
list.add(map);
|
||||||
|
try {
|
||||||
|
hongXiangConveyorDeviceDriver.writing(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "终点设备:" + next_device_code + "未打开烘箱门,导致now_steps_type不等于: 2;now_steps_type:" + now_steps_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.setNow_steps_type(2);
|
this.setNow_steps_type(2);
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
@@ -605,13 +623,29 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
//HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
List list = new ArrayList();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
Map map = new HashMap();
|
||||||
|
map.put("code", "to_open_door");
|
||||||
|
map.put("value", "1");
|
||||||
|
list.add(map);
|
||||||
|
try {
|
||||||
|
hongXiangConveyorDeviceDriver.writing(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "终点设备:" + next_device_code + "未打开烘箱门,导致now_steps_type不等于: 2;now_steps_type:" + now_steps_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
List list = new ArrayList();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
Map map = new HashMap();
|
||||||
|
map.put("code", "to_open_door");
|
||||||
|
map.put("value", "1");
|
||||||
|
list.add(map);
|
||||||
|
try {
|
||||||
|
hongXiangConveyorDeviceDriver.writing(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "起点设备:" + start_device_code + "未打开烘箱门,导致now_steps_type不等于: 2;now_steps_type:" + now_steps_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.setNow_steps_type(2);
|
this.setNow_steps_type(2);
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
@@ -800,11 +834,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
steps_type = "更新指令状态";
|
steps_type = "更新指令状态";
|
||||||
} else if (now_steps_type == 2) {
|
} else if (now_steps_type == 2) {
|
||||||
steps_type = "下发电气信号";
|
steps_type = "下发电气信号";
|
||||||
}else if(now_steps_type == 3){
|
} else if (now_steps_type == 3) {
|
||||||
steps_type = "允许取货";
|
steps_type = "允许取货";
|
||||||
}else if (now_steps_type ==4 ){
|
} else if (now_steps_type == 4) {
|
||||||
steps_type += "允许放货";
|
steps_type += "允许放货";
|
||||||
}else if (now_steps_type == 5){
|
} else if (now_steps_type == 5) {
|
||||||
steps_type += "放货完成";
|
steps_type += "放货完成";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
message = "task变化请求LMS失败: " + response.getMessage();
|
message = "task变化请求LMS失败: " + response.getMessage();
|
||||||
Thread.sleep(5000);
|
Thread.sleep(15000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -470,6 +470,9 @@ export default {
|
|||||||
} else if (val === 'error') {
|
} else if (val === 'error') {
|
||||||
const obj = { name: '报警', value: data[val] }
|
const obj = { name: '报警', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'error1') {
|
||||||
|
const obj = { name: '报警2', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
} else if (val === 'ip') {
|
} else if (val === 'ip') {
|
||||||
const obj = { name: 'IP地址', value: data[val] }
|
const obj = { name: 'IP地址', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
v-model="query.createTime"
|
v-model="query.createTime"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
range-separator="至"
|
:range-separator="$t('monitor.lucence.until')"
|
||||||
start-placeholder="开始日期"
|
:start-placeholder="$t('auto.common.startDate')"
|
||||||
end-placeholder="结束日期"
|
:end-placeholder="$t('auto.common.endDate')"
|
||||||
align="right"
|
align="right"
|
||||||
/>
|
/>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
|
|||||||
Reference in New Issue
Block a user