add: 内包间日志增加
This commit is contained in:
@@ -125,7 +125,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//请求成功标记
|
//请求成功标记
|
||||||
Boolean requireSucess = false;
|
Boolean requireSucess = false;
|
||||||
|
|
||||||
String message = null;
|
String message = "";
|
||||||
String device_code;
|
String device_code;
|
||||||
|
|
||||||
String remark = "";
|
String remark = "";
|
||||||
@@ -138,7 +138,6 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
try {
|
try {
|
||||||
String message = null;
|
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getHeartbeat();
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
mode = this.itemProtocol.getMode();
|
mode = this.itemProtocol.getMode();
|
||||||
@@ -198,7 +197,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
acsToWmsService.sendDeviceStatus(param);
|
acsToWmsService.sendDeviceStatus(param);
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess);
|
||||||
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) {
|
||||||
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
||||||
@@ -228,7 +227,6 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
} else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
message = "";
|
|
||||||
Instruction instruction = null;
|
Instruction instruction = null;
|
||||||
List toInstructions;
|
List toInstructions;
|
||||||
//纸管库申请任务
|
//纸管库申请任务
|
||||||
@@ -286,24 +284,35 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
//取货完成
|
//取货完成
|
||||||
private void sucess() {
|
private void sucess() {
|
||||||
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
Date date = new Date();
|
||||||
Instruction inst1 = instructionService.findByCode(String.valueOf(task));
|
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
||||||
String task_code = inst1.getTask_code();
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
||||||
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 {
|
} else {
|
||||||
requireSucess = false;
|
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
||||||
message = "套管工位取货失败";
|
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货失败,返回参数:" + applyManipulatorActionResponse1);
|
if (ObjectUtil.isNotEmpty(inst1)) {
|
||||||
|
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 = "套管工位取货完成";
|
||||||
|
remark = "";
|
||||||
|
requireSucess = true;
|
||||||
|
} else {
|
||||||
|
requireSucess = false;
|
||||||
|
message = "套管工位取货失败";
|
||||||
|
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货失败,返回参数:" + applyManipulatorActionResponse1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
requireSucess = false;
|
||||||
|
message = "行架任务号不存在";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,6 +336,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴完成反馈完成,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴完成反馈完成,返回参数:" + applyManipulatorActionResponse);
|
||||||
message = "套轴完成成功";
|
message = "套轴完成成功";
|
||||||
|
remark = null;
|
||||||
} else {
|
} else {
|
||||||
message = applyManipulatorActionResponse.getMessage();
|
message = applyManipulatorActionResponse.getMessage();
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
@@ -471,7 +481,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 : message);
|
||||||
|
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,6 +160,8 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
int flag;
|
int flag;
|
||||||
|
//1点对点 6下卷拔轴 7换轴 8 放轴
|
||||||
|
String truss_type;
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
|
|
||||||
@@ -173,6 +175,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
String feedMessage = "";
|
String feedMessage = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<String> getDeviceCodeList = null;
|
List<String> getDeviceCodeList = null;
|
||||||
|
|
||||||
List<String> putDeviceCodeList = null;
|
List<String> putDeviceCodeList = null;
|
||||||
@@ -763,6 +766,18 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else if (this.getAction() == 8) {
|
} else if (this.getAction() == 8) {
|
||||||
action = "任务完成";
|
action = "任务完成";
|
||||||
}
|
}
|
||||||
|
String type = "";
|
||||||
|
if("1".equals(this.truss_type)){
|
||||||
|
type = "点对点任务";
|
||||||
|
}else if("6".equals(this.truss_type)){
|
||||||
|
type = "下卷拔轴任务";
|
||||||
|
}else if("7".equals(this.truss_type)){
|
||||||
|
type = "换轴任务";
|
||||||
|
}else if("8".equals(this.truss_type)){
|
||||||
|
type = "放轴任务";
|
||||||
|
}else if("9".equals(this.truss_type)){
|
||||||
|
type = "异常气胀轴任务";
|
||||||
|
}
|
||||||
|
|
||||||
jo.put("device_name", this.getDevice().getDevice_name());
|
jo.put("device_name", this.getDevice().getDevice_name());
|
||||||
jo.put("mode", mode);
|
jo.put("mode", mode);
|
||||||
@@ -780,6 +795,8 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
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("version", this.inflatableShaftVersion);
|
||||||
jo.put("driver_type", "station");
|
jo.put("driver_type", "station");
|
||||||
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
|
jo.put("truss_type", type);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,6 +852,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
//按照优先级排序 优先级相等按照创建时间排序
|
//按照优先级排序 优先级相等按照创建时间排序
|
||||||
taskDtos = this.sortTask(taskDtos);
|
taskDtos = this.sortTask(taskDtos);
|
||||||
TaskDto taskDto = taskDtos.get(0);
|
TaskDto taskDto = taskDtos.get(0);
|
||||||
|
truss_type = taskDto.getTruss_type();
|
||||||
//存在行架->暂存的AGV任务 需要过滤
|
//存在行架->暂存的AGV任务 需要过滤
|
||||||
// 9 行架任务
|
// 9 行架任务
|
||||||
if (!StrUtil.equals(taskDto.getTask_type(), "9")) {
|
if (!StrUtil.equals(taskDto.getTask_type(), "9")) {
|
||||||
@@ -909,6 +927,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(task)) {
|
if (!ObjectUtil.isEmpty(task)) {
|
||||||
|
truss_type = task.getTruss_type();
|
||||||
Device nextdevice = deviceAppService.findDeviceByCode(task.getNext_device_code());
|
Device nextdevice = deviceAppService.findDeviceByCode(task.getNext_device_code());
|
||||||
Device startdevice = deviceAppService.findDeviceByCode(task.getStart_device_code());
|
Device startdevice = deviceAppService.findDeviceByCode(task.getStart_device_code());
|
||||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||||
@@ -1000,6 +1019,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
notCreateTaskMessage = "";
|
notCreateTaskMessage = "";
|
||||||
} else {
|
} else {
|
||||||
notCreateInstMessage = "未找到关联设备的任务,指令无法创建";
|
notCreateInstMessage = "未找到关联设备的任务,指令无法创建";
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1024,19 +1044,19 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
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 {
|
||||||
message = "rgv信号不符合";
|
notCreateInstMessage = "rgv信号不符合";
|
||||||
//logServer.deviceExecuteLog(device_code, "", "", "rgv信号不符合");
|
//logServer.deviceExecuteLog(device_code, "", "", "rgv信号不符合");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message = "关联的站点不是rgv";
|
notCreateInstMessage = "关联的站点不是rgv";
|
||||||
//logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv");
|
//logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message = "rgv没有关联站点";
|
notCreateInstMessage = "rgv没有关联站点";
|
||||||
//logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点");
|
//logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message = "rgv不是普通站点";
|
notCreateInstMessage = "rgv不是普通站点";
|
||||||
//logServer.deviceExecuteLog(device_code, "", "", "rgv不是普通站点");
|
//logServer.deviceExecuteLog(device_code, "", "", "rgv不是普通站点");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
jo.put("move2", move2);
|
jo.put("move2", move2);
|
||||||
jo.put("isOnline", this.getIsonline());
|
jo.put("isOnline", this.getIsonline());
|
||||||
jo.put("isError", this.getIserror());
|
jo.put("isError", this.getIserror());
|
||||||
|
jo.put("task", this.getTask());
|
||||||
jo.put("qty1", this.getQty1());
|
jo.put("qty1", this.getQty1());
|
||||||
jo.put("qty2", this.getQty2());
|
jo.put("qty2", this.getQty2());
|
||||||
jo.put("message", this.getMessage());
|
jo.put("message", this.getMessage());
|
||||||
|
|||||||
@@ -644,7 +644,6 @@ export default {
|
|||||||
})
|
})
|
||||||
getDicts().then(data => {
|
getDicts().then(data => {
|
||||||
this.dicts = data
|
this.dicts = data
|
||||||
console.log(this.dict.label.task_status[3])
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -761,6 +761,9 @@ export default {
|
|||||||
} else if (val === 'version') {
|
} else if (val === 'version') {
|
||||||
const obj = { name: '轴代数', value: data[val] }
|
const obj = { name: '轴代数', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'truss_type') {
|
||||||
|
const obj = { name: '内包间行架任务类型', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user