opt: 内包间A1优化
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -255,10 +256,16 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
remark = "纸管库的任务号为空";
|
remark = "纸管库的任务号为空";
|
||||||
} else if (task1 < 1) {
|
} else if (task1 < 1) {
|
||||||
remark = "行架任务为空";
|
remark = "行架任务为空";
|
||||||
} else if (requireSucess) {
|
} else {
|
||||||
remark = "requrieSucess为" + requireSucess;
|
remark = "requrieSucess 为: " + requireSucess;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
if (move == 0 && !requireSucess) {
|
||||||
|
sucess();
|
||||||
|
}else if (move != 0){
|
||||||
|
remark = "套管工位有货";
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
log.info("未知模式");
|
log.info("未知模式");
|
||||||
break;
|
break;
|
||||||
@@ -277,6 +284,29 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
last_qty = qty;
|
last_qty = qty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//取货完成
|
||||||
|
private void sucess() {
|
||||||
|
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
||||||
|
Instruction inst1 = instructionService.findByCode(String.valueOf(task));
|
||||||
|
String task_code = inst1.getTask_code();
|
||||||
|
applyManipulatorActionRequest.setAction("1");
|
||||||
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈套管工位取货完成");
|
||||||
|
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
||||||
|
if (applyManipulatorActionResponse1.getstatus() == 200) {
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "套管工位取货请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
|
||||||
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
|
map.put("to_command", 6);
|
||||||
|
this.writing(map);
|
||||||
|
message = "套管工位取货完成";
|
||||||
|
requireSucess = true;
|
||||||
|
} else {
|
||||||
|
requireSucess = false;
|
||||||
|
message = "套管工位取货失败";
|
||||||
|
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货失败,返回参数:" + applyManipulatorActionResponse1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private synchronized void bushingSucess() {
|
private synchronized void bushingSucess() {
|
||||||
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
||||||
@@ -432,6 +462,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
move = "有托盘";
|
move = "有托盘";
|
||||||
}
|
}
|
||||||
jo.put("device_name", this.getDevice().getDevice_name());
|
jo.put("device_name", this.getDevice().getDevice_name());
|
||||||
|
jo.put("task", task);
|
||||||
jo.put("mode", mode);
|
jo.put("mode", mode);
|
||||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
@@ -440,7 +471,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
jo.put("material1", material1);
|
jo.put("material1", material1);
|
||||||
jo.put("material2", material2);
|
jo.put("material2", material2);
|
||||||
jo.put("isOnline", this.getIsonline());
|
jo.put("isOnline", this.getIsonline());
|
||||||
jo.put("message", ObjectUtil.isNotEmpty(remark)?"反馈套管失败的原因:"+remark:remark);
|
jo.put("message", ObjectUtil.isNotEmpty(remark) ? "反馈套管失败的原因:" + remark : remark);
|
||||||
|
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "完成反馈LMS失败," + String.valueOf(applyManipulatorActionResponse);
|
message = "完成反馈LMS失败," + String.valueOf(applyManipulatorActionResponse);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "反馈尺寸成请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
//logServer.deviceExecuteLog(this.device_code, "", "", "反馈尺寸成请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,7 +476,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "申请放货点LMS失败," + String.valueOf(applyManipulatorActionResponse.getMessage());
|
message = "申请放货点LMS失败," + String.valueOf(applyManipulatorActionResponse.getMessage());
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "反馈尺寸成请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
//logServer.deviceExecuteLog(this.device_code, "", "", "申请放货点请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "申请新取货点失败";
|
message = "申请新取货点失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请新取货点失败,返回参数:" + applyManipulatorActionResponse);
|
//logServer.deviceExecuteLog(this.device_code, "", "", "申请新取货点失败,返回参数:" + applyManipulatorActionResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,7 +530,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "申请二次放货点失败";
|
message = "申请二次放货点失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请二次放货点,返回参数:" + applyManipulatorActionResponse);
|
//logServer.deviceExecuteLog(this.device_code, "", "", "申请二次放货点,返回参数:" + applyManipulatorActionResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -551,7 +551,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "缓存库取货失败";
|
message = "缓存库取货失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货失败,返回参数:" + applyManipulatorActionResponse1);
|
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货失败,返回参数:" + applyManipulatorActionResponse1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,14 +572,30 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "缓存库放货失败";
|
message = "缓存库放货失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库放货完成,返回参数:" + applyManipulatorActionResponse1);
|
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库放货完成,返回参数:" + applyManipulatorActionResponse1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//异常气胀轴反馈
|
//异常气胀轴反馈
|
||||||
/*if (action == 9) {
|
if (action == 9) {
|
||||||
String task_code = inst1.getTask_code();
|
try {
|
||||||
|
instructionService.cancel(inst1.getInstruction_id());
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "取消指令完成");
|
||||||
|
TaskDto byTaskCode = taskserver.findByTaskCode(inst1.getTask_code());
|
||||||
|
taskserver.cancel(byTaskCode.getTask_id());
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "取消任务完成");
|
||||||
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
|
map.put("to_command", 9);
|
||||||
|
this.writing(map);
|
||||||
|
feedbackSucess = true;
|
||||||
|
message = "异常气胀轴任务取消成功";
|
||||||
|
} catch (Exception e) {
|
||||||
|
message = "取消任务或指令失败,失败原因"+ e.getMessage();
|
||||||
|
feedbackSucess = false;
|
||||||
|
//logServer.deviceExecuteLog(this.device_code, "", "", "取消任务或指令失败,失败原因"+e.getMessage());
|
||||||
|
}
|
||||||
|
/*String task_code = inst1.getTask_code();
|
||||||
applyManipulatorActionRequest.setType("9");
|
applyManipulatorActionRequest.setType("9");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "异常反馈");
|
logServer.deviceExecuteLog(this.device_code, "", "", "异常反馈");
|
||||||
@@ -601,8 +617,8 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
message = "取消任务或指令失败,失败原因"+ e.getMessage();
|
message = "取消任务或指令失败,失败原因"+ e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "取消任务或指令失败,失败原因"+e.getMessage());
|
logServer.deviceExecuteLog(this.device_code, "", "", "取消任务或指令失败,失败原因"+e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
//放货完成
|
//放货完成
|
||||||
@@ -762,6 +778,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
jo.put("x", x_position);
|
jo.put("x", x_position);
|
||||||
jo.put("y", y_position);
|
jo.put("y", y_position);
|
||||||
jo.put("inflatable_shaft_size", this.inflatable_shaft_size);
|
jo.put("inflatable_shaft_size", this.inflatable_shaft_size);
|
||||||
|
jo.put("version", this.inflatableShaftVersion);
|
||||||
jo.put("driver_type", "station");
|
jo.put("driver_type", "station");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
@@ -1003,20 +1020,24 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
rgv1 = (RgvDeviceDriver) agv1.getDeviceDriver();
|
rgv1 = (RgvDeviceDriver) agv1.getDeviceDriver();
|
||||||
rgv2 = (RgvDeviceDriver) agv2.getDeviceDriver();
|
rgv2 = (RgvDeviceDriver) agv2.getDeviceDriver();
|
||||||
if ((rgv1.getMode() == 2 && rgv1.getMove1() == 1 && rgv1.getMove2() == 0) || (rgv2.getMode() == 2 && rgv2.getMove1() == 1 && rgv2.getMove2() == 0)) {
|
if ((rgv1.getMode() == 2 && rgv1.getMove1() == 1 && rgv1.getMove2() == 0) || (rgv2.getMode() == 2 && rgv2.getMove1() == 1 && rgv2.getMove2() == 0)) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "mode1" + rgv1.getMode() + "mode2" +
|
/*logServer.deviceExecuteLog(device_code, "", "", "mode1" + rgv1.getMode() + "mode2" +
|
||||||
rgv2.getMode() + "rgv1的move2" + rgv1.getMove2() + "rgv2的move2" + rgv2.getMove2());
|
rgv2.getMode() + "rgv1的move2" + rgv1.getMove2() + "rgv2的move2" + rgv2.getMove2());*/
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "rgv信号不符合");
|
message = "rgv信号不符合";
|
||||||
|
//logServer.deviceExecuteLog(device_code, "", "", "rgv信号不符合");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv");
|
message = "关联的站点不是rgv";
|
||||||
|
//logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点");
|
message = "rgv没有关联站点";
|
||||||
|
//logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "rgv不是普通站点");
|
message = "rgv不是普通站点";
|
||||||
|
//logServer.deviceExecuteLog(device_code, "", "", "rgv不是普通站点");
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -212,6 +212,8 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//1-执行任务;2-取货完成;3-放货完成;
|
//1-执行任务;2-取货完成;3-放货完成;
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
|
String msg = "";
|
||||||
|
|
||||||
|
|
||||||
int last_inventory_qty = 0;
|
int last_inventory_qty = 0;
|
||||||
int last_out_finish = 0;
|
int last_out_finish = 0;
|
||||||
@@ -475,7 +477,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void request_for_shipment(String mode, String item_out_seq_arr, String item_out_qty_arr) {
|
public synchronized void request_for_shipment(String mode, String item_out_seq_arr, String item_out_qty_arr) {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.require_apply_strangulation_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.require_apply_strangulation_time.getTime() < (long) this.instruction_require_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
@@ -714,9 +716,9 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
} else if (this.getMode() == 4) {
|
} else if (this.getMode() == 4) {
|
||||||
mode = "申请出纸管";
|
mode = "申请出纸管";
|
||||||
}
|
}
|
||||||
if(this.getMove() == 0){
|
if (this.getMove() == 0) {
|
||||||
move = "无货";
|
move = "无货";
|
||||||
}else if(this.getMove() == 1){
|
} else if (this.getMove() == 1) {
|
||||||
move = "有托盘";
|
move = "有托盘";
|
||||||
}
|
}
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
int error = 0;
|
int error = 0;
|
||||||
int move = 0;
|
int move = 0;
|
||||||
int task1 = 0;
|
int task1 = 0;
|
||||||
// int task2 = 0;
|
// int task2 = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
int last_move = 0;
|
int last_move = 0;
|
||||||
int last_task1 = 0;
|
int last_task1 = 0;
|
||||||
// int last_task2 = 0;
|
// int last_task2 = 0;
|
||||||
Boolean isonline = true;
|
Boolean isonline = true;
|
||||||
|
|
||||||
Boolean iserror = false;
|
Boolean iserror = false;
|
||||||
@@ -104,7 +104,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
// task2 = this.itemProtocol.getTask2();
|
// task2 = this.itemProtocol.getTask2();
|
||||||
|
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
this.requireSucess=false;
|
this.requireSucess = false;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
||||||
}
|
}
|
||||||
if (move != last_move) {
|
if (move != last_move) {
|
||||||
@@ -176,14 +176,14 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
applyManipulatorActionRequest.setTask_code1(task_code1);
|
applyManipulatorActionRequest.setTask_code1(task_code1);
|
||||||
applyManipulatorActionRequest.setType("8");
|
applyManipulatorActionRequest.setType("8");
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse.getstatus()==200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 6);
|
map.put("to_command", 6);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "拔轴成功反馈,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "拔轴成功反馈,返回参数:" + applyManipulatorActionResponse);
|
||||||
message = "拔轴完成成功";
|
message = "拔轴完成成功";
|
||||||
}else{
|
} else {
|
||||||
message = applyManipulatorActionResponse.getMessage();
|
message = applyManipulatorActionResponse.getMessage();
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 99);
|
map.put("to_command", 99);
|
||||||
@@ -194,9 +194,6 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private synchronized void bushingSucess() {
|
private synchronized void bushingSucess() {
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
||||||
@@ -210,14 +207,14 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
// applyManipulatorActionRequest.setTask_code2(task_code2);
|
// applyManipulatorActionRequest.setTask_code2(task_code2);
|
||||||
applyManipulatorActionRequest.setType("7");
|
applyManipulatorActionRequest.setType("7");
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse.getstatus()==200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 5);
|
map.put("to_command", 5);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴反馈完成,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴反馈完成,返回参数:" + applyManipulatorActionResponse);
|
||||||
message = "套轴完成成功";
|
message = "套轴完成成功";
|
||||||
}else{
|
} else {
|
||||||
message = applyManipulatorActionResponse.getMessage();
|
message = applyManipulatorActionResponse.getMessage();
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 99);
|
map.put("to_command", 99);
|
||||||
@@ -248,7 +245,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴成功,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴成功,返回参数:" + applyManipulatorActionResponse);
|
||||||
message = "套轴申请成功";
|
message = "套轴申请成功";
|
||||||
}else if (ObjectUtils.isNotEmpty(applyManipulatorActionResponse) && "2".equals(applyManipulatorActionResponse.getIs_bushing())){
|
} else if (ObjectUtils.isNotEmpty(applyManipulatorActionResponse) && "2".equals(applyManipulatorActionResponse.getIs_bushing())) {
|
||||||
message = applyManipulatorActionResponse.getMessage();
|
message = applyManipulatorActionResponse.getMessage();
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 98);
|
map.put("to_command", 98);
|
||||||
@@ -256,7 +253,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
message = "等待套轴";
|
message = "等待套轴";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "等待套轴,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "等待套轴,返回参数:" + applyManipulatorActionResponse);
|
||||||
}else {
|
} else {
|
||||||
message = applyManipulatorActionResponse.getMessage();
|
message = applyManipulatorActionResponse.getMessage();
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 99);
|
map.put("to_command", 99);
|
||||||
@@ -290,7 +287,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
*/
|
*/
|
||||||
public void writing(Map<String, Object> map) {
|
public void writing(Map<String, Object> map) {
|
||||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||||
Map<String, Object> itemMap = new LinkedHashMap<>();
|
Map<String, Object> itemMap = new LinkedHashMap<>();
|
||||||
map.forEach((key, value) -> {
|
map.forEach((key, value) -> {
|
||||||
|
|||||||
@@ -120,6 +120,15 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
if(!move2.equals(last_move2)){
|
if(!move2.equals(last_move2)){
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_move2 + "->" + move2);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_move2 + "->" + move2);
|
||||||
}
|
}
|
||||||
|
if(qty1 != last_qty1){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_qty1 + "->" + qty1);
|
||||||
|
}
|
||||||
|
if(qty2 != last_qty2){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_qty2 + "->" + qty2);
|
||||||
|
}
|
||||||
|
if(task != last_task){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_task + "->" + task);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
applyManipulatorActionRequest.setTask_code1(inst.getTask_code());
|
applyManipulatorActionRequest.setTask_code1(inst.getTask_code());
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,参数:" + applyManipulatorActionRequest);
|
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,参数:" + applyManipulatorActionRequest);
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
ApplyManipulatorActionResponse response = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
ApplyManipulatorActionResponse response = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
||||||
if (response == null || response.getstatus() == 200) {
|
if (response == null || response.getstatus() == 200) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,接口返回:" + response.getMessage());
|
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,接口返回:" + response.getMessage());
|
||||||
|
|||||||
Binary file not shown.
@@ -644,6 +644,7 @@ export default {
|
|||||||
})
|
})
|
||||||
getDicts().then(data => {
|
getDicts().then(data => {
|
||||||
this.dicts = data
|
this.dicts = data
|
||||||
|
console.log(this.dict.label.task_status[3])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ import deviceCrud from '@/api/acs/device/device'
|
|||||||
import { getDeviceByCodes } from '@/api/acs/device/deviceStageMonitor'
|
import { getDeviceByCodes } from '@/api/acs/device/deviceStageMonitor'
|
||||||
import '@logicflow/core/dist/style/index.css'
|
import '@logicflow/core/dist/style/index.css'
|
||||||
import '@logicflow/extension/lib/style/index.css'
|
import '@logicflow/extension/lib/style/index.css'
|
||||||
|
import { getDicts } from '@/api/system/dict'
|
||||||
import { LogicFlow } from '@logicflow/core'
|
import { LogicFlow } from '@logicflow/core'
|
||||||
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
|
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
|
||||||
|
|
||||||
@@ -231,6 +231,7 @@ let data = {}
|
|||||||
let lf = ''
|
let lf = ''
|
||||||
export default {
|
export default {
|
||||||
name: 'MonitorDevice',
|
name: 'MonitorDevice',
|
||||||
|
dicts: ['material'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
stageParam: 'stage_code', // 舞台参数
|
stageParam: 'stage_code', // 舞台参数
|
||||||
@@ -342,6 +343,11 @@ export default {
|
|||||||
lf.render(data)
|
lf.render(data)
|
||||||
this.initStageData()
|
this.initStageData()
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
getDicts().then(data => {
|
||||||
|
this.dicts = data
|
||||||
|
})
|
||||||
|
},
|
||||||
initStageData() {
|
initStageData() {
|
||||||
// 获取舞台编码
|
// 获取舞台编码
|
||||||
paramCrud.getValueByCode(this.stageParam).then(res => {
|
paramCrud.getValueByCode(this.stageParam).then(res => {
|
||||||
@@ -672,73 +678,73 @@ export default {
|
|||||||
const obj = { name: '光电信号2', value: data[val] }
|
const obj = { name: '光电信号2', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material1') {
|
} else if (val === 'material1') {
|
||||||
const obj = { name: '物料1', value: data[val] }
|
const obj = { name: '物料1', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty1') {
|
} else if (val === 'z_qty1') {
|
||||||
const obj = { name: '数量1', value: data[val] }
|
const obj = { name: '数量1', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material2') {
|
} else if (val === 'material2') {
|
||||||
const obj = { name: '物料2', value: data[val] }
|
const obj = { name: '物料2', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty2') {
|
} else if (val === 'z_qty2') {
|
||||||
const obj = { name: '数量2', value: data[val] }
|
const obj = { name: '数量2', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material3') {
|
} else if (val === 'material3') {
|
||||||
const obj = { name: '物料3', value: data[val] }
|
const obj = { name: '物料3', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty3') {
|
} else if (val === 'z_qty3') {
|
||||||
const obj = { name: '数量3', value: data[val] }
|
const obj = { name: '数量3', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material4') {
|
} else if (val === 'material4') {
|
||||||
const obj = { name: '物料4', value: data[val] }
|
const obj = { name: '物料4', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty4') {
|
} else if (val === 'z_qty4') {
|
||||||
const obj = { name: '数量4', value: data[val] }
|
const obj = { name: '数量4', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material5') {
|
} else if (val === 'material5') {
|
||||||
const obj = { name: '物料5', value: data[val] }
|
const obj = { name: '物料5', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty5') {
|
} else if (val === 'z_qty5') {
|
||||||
const obj = { name: '数量5', value: data[val] }
|
const obj = { name: '数量5', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material6') {
|
} else if (val === 'material6') {
|
||||||
const obj = { name: '物料6', value: data[val] }
|
const obj = { name: '物料6', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty6') {
|
} else if (val === 'z_qty6') {
|
||||||
const obj = { name: '数量6', value: data[val] }
|
const obj = { name: '数量6', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material7') {
|
} else if (val === 'material7') {
|
||||||
const obj = { name: '物料7', value: data[val] }
|
const obj = { name: '物料7', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty7') {
|
} else if (val === 'z_qty7') {
|
||||||
const obj = { name: '数量7', value: data[val] }
|
const obj = { name: '数量7', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material8') {
|
} else if (val === 'material8') {
|
||||||
const obj = { name: '物料8', value: data[val] }
|
const obj = { name: '物料8', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty8') {
|
} else if (val === 'z_qty8') {
|
||||||
const obj = { name: '数量8', value: data[val] }
|
const obj = { name: '数量8', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material9') {
|
} else if (val === 'material9') {
|
||||||
const obj = { name: '物料9', value: data[val] }
|
const obj = { name: '物料9', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty9') {
|
} else if (val === 'z_qty9') {
|
||||||
const obj = { name: '数量9', value: data[val] }
|
const obj = { name: '数量9', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material10') {
|
} else if (val === 'material10') {
|
||||||
const obj = { name: '物料10', value: data[val] }
|
const obj = { name: '物料10', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty10') {
|
} else if (val === 'z_qty10') {
|
||||||
const obj = { name: '数量10', value: data[val] }
|
const obj = { name: '数量10', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material11') {
|
} else if (val === 'material11') {
|
||||||
const obj = { name: '物料11', value: data[val] }
|
const obj = { name: '物料11', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty11') {
|
} else if (val === 'z_qty11') {
|
||||||
const obj = { name: '数量11', value: data[val] }
|
const obj = { name: '数量11', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'material12') {
|
} else if (val === 'material12') {
|
||||||
const obj = { name: '物料12', value: data[val] }
|
const obj = { name: '物料12', value: this.dict.label.material[data[val]] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'z_qty12') {
|
} else if (val === 'z_qty12') {
|
||||||
const obj = { name: '数量12', value: data[val] }
|
const obj = { name: '数量12', value: data[val] }
|
||||||
@@ -752,6 +758,9 @@ export default {
|
|||||||
} else if (val === 'now_steps_type') {
|
} else if (val === 'now_steps_type') {
|
||||||
const obj = { name: '烘箱执行信号', value: data[val] }
|
const obj = { name: '烘箱执行信号', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'version') {
|
||||||
|
const obj = { name: '轴代数', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user