opt: 内包间日志优化
This commit is contained in:
@@ -149,7 +149,6 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
material1 = this.itemProtocol.getMaterial1();
|
material1 = this.itemProtocol.getMaterial1();
|
||||||
material2 = this.itemProtocol.getMaterial2();
|
material2 = this.itemProtocol.getMaterial2();
|
||||||
qty = this.itemProtocol.getQty();
|
qty = this.itemProtocol.getQty();
|
||||||
|
|
||||||
to_command = this.itemProtocol.getTo_command();
|
to_command = this.itemProtocol.getTo_command();
|
||||||
|
|
||||||
|
|
||||||
@@ -227,8 +226,6 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
} else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
Instruction instruction = null;
|
|
||||||
List toInstructions;
|
|
||||||
//纸管库申请任务
|
//纸管库申请任务
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -246,23 +243,22 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
case 5:
|
case 5:
|
||||||
if (move == 1 && !requireSucess && task > 0 && task1 > 0) {
|
if (move == 1 && !requireSucess && task > 0 && task1 > 0) {
|
||||||
//申请套管校验
|
//申请套管校验
|
||||||
// apply_for_casing_inspection(material1, material2);
|
|
||||||
bushingSucess();
|
bushingSucess();
|
||||||
} else if (move != 1) {
|
} else if (move != 1) {
|
||||||
remark = "套管工位没有货";
|
message = "套管工位没有货";
|
||||||
} else if (task < 1) {
|
} else if (task < 1) {
|
||||||
remark = "纸管库的任务号为空";
|
message = "纸管库的任务号为空";
|
||||||
} else if (task1 < 1) {
|
} else if (task1 < 1) {
|
||||||
remark = "行架任务为空";
|
message = "行架任务为空";
|
||||||
} else {
|
} else {
|
||||||
remark = "requrieSucess 为: " + requireSucess;
|
message = "requrieSucess 为: " + requireSucess;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (move == 0 && !requireSucess) {
|
if (move == 0 && !requireSucess) {
|
||||||
sucess();
|
sucess();
|
||||||
}else if (move != 0){
|
} else if (move != 0) {
|
||||||
remark = "套管工位有货";
|
message = "套管工位有货";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
log.info("未知模式");
|
log.info("未知模式");
|
||||||
@@ -282,7 +278,9 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
last_qty = qty;
|
last_qty = qty;
|
||||||
}
|
}
|
||||||
|
|
||||||
//取货完成
|
/**
|
||||||
|
* 取货完成
|
||||||
|
*/
|
||||||
private void sucess() {
|
private void sucess() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
||||||
@@ -292,6 +290,10 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
||||||
if (ObjectUtil.isNotEmpty(inst1)) {
|
if (ObjectUtil.isNotEmpty(inst1)) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if (Long.parseLong(task_code) < 1) {
|
||||||
|
message = "任务ACS创建,不反馈LMS取货完成";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setAction("1");
|
applyManipulatorActionRequest.setAction("1");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈套管工位取货完成");
|
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈套管工位取货完成");
|
||||||
@@ -302,7 +304,6 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
map.put("to_command", 6);
|
map.put("to_command", 6);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
message = "套管工位取货完成";
|
message = "套管工位取货完成";
|
||||||
remark = "";
|
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
} else {
|
} else {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
@@ -324,6 +325,10 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
Instruction inst2 = instructionService.findByCode(String.valueOf(task1));
|
Instruction inst2 = instructionService.findByCode(String.valueOf(task1));
|
||||||
String task_code1 = inst1.getTask_code();
|
String task_code1 = inst1.getTask_code();
|
||||||
String task_code2 = inst2.getTask_code();
|
String task_code2 = inst2.getTask_code();
|
||||||
|
if (Long.parseLong(task_code1) < 1 && Long.parseLong(task_code2) < 1) {
|
||||||
|
message = "任务ACS创建,不反馈LMS套轴完成";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setDevice_code(device_code);
|
applyManipulatorActionRequest.setDevice_code(device_code);
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code2);
|
applyManipulatorActionRequest.setTask_code1(task_code2);
|
||||||
applyManipulatorActionRequest.setTask_code2(task_code1);
|
applyManipulatorActionRequest.setTask_code2(task_code1);
|
||||||
@@ -336,7 +341,6 @@ 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<>();
|
||||||
@@ -481,7 +485,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 : message);
|
jo.put("message", message);
|
||||||
|
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
String notCreateInstMessage = "";
|
String notCreateInstMessage = "";
|
||||||
String feedMessage = "";
|
String feedMessage = "";
|
||||||
|
|
||||||
|
Integer task_count = 0;
|
||||||
|
|
||||||
List<String> getDeviceCodeList = null;
|
List<String> getDeviceCodeList = null;
|
||||||
|
|
||||||
@@ -429,18 +429,21 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
inst1.setInstruction_status("1");
|
inst1.setInstruction_status("1");
|
||||||
inst1.setExecute_device_code(this.device_code);
|
inst1.setExecute_device_code(this.device_code);
|
||||||
instructionService.update(inst1);
|
instructionService.update(inst1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//反馈尺寸
|
//反馈尺寸
|
||||||
if (mode == 3 && action == 2) {
|
if (mode == 3 && action == 2) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if(Long.parseLong(task_code) < 1){
|
||||||
|
message = "任务ACS创建,不反馈LMS尺寸";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setType("2");
|
applyManipulatorActionRequest.setType("2");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
applyManipulatorActionRequest.setSize(String.valueOf(inflatable_shaft_size));
|
applyManipulatorActionRequest.setSize(String.valueOf(inflatable_shaft_size));
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈尺寸");
|
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse.getstatus() == 200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
feedbackSucess = true;
|
feedbackSucess = true;
|
||||||
@@ -451,17 +454,19 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
this.writing(map);
|
this.writing(map);
|
||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "完成反馈LMS失败," + String.valueOf(applyManipulatorActionResponse);
|
message = "反馈LMS尺寸失败";
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "反馈尺寸成请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请放货点
|
//申请放货点
|
||||||
if (mode == 3 && action == 3) {
|
if (mode == 3 && action == 3 ) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if(Long.parseLong(task_code) < 1){
|
||||||
|
message = "任务ACS创建,不向LMS申请放货点";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setType("3");
|
applyManipulatorActionRequest.setType("3");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请放货点");
|
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse.getstatus() == 200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请放货点请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请放货点请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
||||||
@@ -478,17 +483,19 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
message = "申请新取货点成功";
|
message = "申请新取货点成功";
|
||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "申请放货点LMS失败," + String.valueOf(applyManipulatorActionResponse.getMessage());
|
message = "申请放货点LMS失败";
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "申请放货点请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请新取货点
|
//申请新取货点
|
||||||
if (mode == 3 && action == 4) {
|
if (mode == 3 && action == 4) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if(Long.parseLong(task_code) < 1){
|
||||||
|
message = "任务ACS创建,不向LMS申请新取货点";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setType("4");
|
applyManipulatorActionRequest.setType("4");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请取货点");
|
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse.getstatus() == 200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
String get_device_code = applyManipulatorActionResponse.getDevice_code();
|
String get_device_code = applyManipulatorActionResponse.getDevice_code();
|
||||||
@@ -497,7 +504,6 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 4);
|
map.put("to_command", 4);
|
||||||
map.put("inflatableShaftVersion", applyManipulatorActionResponse.getVersion());
|
map.put("inflatableShaftVersion", applyManipulatorActionResponse.getVersion());
|
||||||
|
|
||||||
map.put("to_new_getpoint", Integer.parseInt(to_new_getpoint));
|
map.put("to_new_getpoint", Integer.parseInt(to_new_getpoint));
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
feedbackSucess = true;
|
feedbackSucess = true;
|
||||||
@@ -506,16 +512,18 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "申请新取货点失败";
|
message = "申请新取货点失败";
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "申请新取货点失败,返回参数:" + applyManipulatorActionResponse);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请二次放货点
|
//申请二次放货点
|
||||||
if (mode == 3 && action == 5) {
|
if (mode == 3 && action == 5) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if(Long.parseLong(task_code) < 1){
|
||||||
|
message = "任务ACS创建,不反馈LMS";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setType("5");
|
applyManipulatorActionRequest.setType("5");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请二次放货点");
|
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse.getstatus() == 200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
String put_device_code2 = applyManipulatorActionResponse.getDevice_code();
|
String put_device_code2 = applyManipulatorActionResponse.getDevice_code();
|
||||||
@@ -533,16 +541,18 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "申请二次放货点失败";
|
message = "申请二次放货点失败";
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "申请二次放货点,返回参数:" + applyManipulatorActionResponse);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//缓存库取货完成
|
//缓存库取货完成
|
||||||
if (mode == 3 && action == 6) {
|
if (mode == 3 && action == 6) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if(Long.parseLong(task_code) < 1){
|
||||||
|
message = "任务ACS创建,不反馈LMS缓存库取货成功";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setAction("1");
|
applyManipulatorActionRequest.setAction("1");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈缓存库取货完成");
|
|
||||||
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse1.getstatus() == 200) {
|
if (applyManipulatorActionResponse1.getstatus() == 200) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
|
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
|
||||||
@@ -554,16 +564,18 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "缓存库取货失败";
|
message = "缓存库取货失败";
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货失败,返回参数:" + applyManipulatorActionResponse1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//缓存库放货完成
|
//缓存库放货完成
|
||||||
if (mode == 3 && action == 7) {
|
if (mode == 3 && action == 7) {
|
||||||
String task_code = inst1.getTask_code();
|
String task_code = inst1.getTask_code();
|
||||||
|
if(Long.parseLong(task_code) < 1){
|
||||||
|
message = "任务ACS创建,不反馈LMS缓存库放货完成";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setAction("2");
|
applyManipulatorActionRequest.setAction("2");
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
applyManipulatorActionRequest.setTask_code1(task_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈缓存库放货完成");
|
|
||||||
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
|
||||||
if (applyManipulatorActionResponse1.getstatus() == 200) {
|
if (applyManipulatorActionResponse1.getstatus() == 200) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库放货完成,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
|
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库放货完成,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
|
||||||
@@ -575,7 +587,6 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} else {
|
} else {
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
message = "缓存库放货失败";
|
message = "缓存库放货失败";
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "缓存库放货完成,返回参数:" + applyManipulatorActionResponse1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -596,31 +607,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
message = "取消任务或指令失败,失败原因"+ e.getMessage();
|
message = "取消任务或指令失败,失败原因"+ e.getMessage();
|
||||||
feedbackSucess = false;
|
feedbackSucess = false;
|
||||||
//logServer.deviceExecuteLog(this.device_code, "", "", "取消任务或指令失败,失败原因"+e.getMessage());
|
|
||||||
}
|
}
|
||||||
/*String task_code = inst1.getTask_code();
|
|
||||||
applyManipulatorActionRequest.setType("9");
|
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code);
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "异常反馈");
|
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
|
||||||
if (ObjectUtil.isNotEmpty(applyManipulatorActionResponse) && applyManipulatorActionResponse.getstatus() == 200) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "异常反馈完成,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
|
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
|
||||||
map.put("to_command", 9);
|
|
||||||
this.writing(map);
|
|
||||||
feedbackSucess = true;
|
|
||||||
message = "缓存库放货成功";
|
|
||||||
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, "", "", "取消任务完成");
|
|
||||||
} catch (Exception e) {
|
|
||||||
message = "取消任务或指令失败,失败原因"+ e.getMessage();
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "取消任务或指令失败,失败原因"+e.getMessage());
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -629,7 +616,6 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
if (inst1 != null) {
|
if (inst1 != null) {
|
||||||
try {
|
try {
|
||||||
feedbackSucess = true;
|
feedbackSucess = true;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
|
|
||||||
finish_instruction(inst1);
|
finish_instruction(inst1);
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 8);
|
map.put("to_command", 8);
|
||||||
@@ -910,11 +896,11 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
logServer.deviceExecuteLog(this.device_code, "", "", "RGV条件满足,允许创建指令,任务号为:" + task.getTask_code());
|
logServer.deviceExecuteLog(this.device_code, "", "", "RGV条件满足,允许创建指令,任务号为:" + task.getTask_code());
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
message = "任务号为:" + task.getTask_code() + "的RGV条件不满足,不允许允许创建指令";
|
||||||
task = null;
|
task = null;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "RGV条件不满足,不允许允许创建指令,任务号为:" + task);
|
// logServer.deviceExecuteLog(this.device_code, "", "", "RGV条件不满足,不允许允许创建指令,任务号为:" + task);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 9 行架任务
|
// 9 行架任务
|
||||||
if (ObjectUtil.isNotEmpty(task) && !StrUtil.equals(task.getTask_type(), "9")) {
|
if (ObjectUtil.isNotEmpty(task) && !StrUtil.equals(task.getTask_type(), "9")) {
|
||||||
|
|||||||
@@ -173,6 +173,10 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
ApplyManipulatorActionResponse applyManipulatorActionResponse;
|
ApplyManipulatorActionResponse applyManipulatorActionResponse;
|
||||||
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
||||||
String task_code1 = inst1.getTask_code();
|
String task_code1 = inst1.getTask_code();
|
||||||
|
if (Long.parseLong(task_code1) < 1) {
|
||||||
|
message = "任务ACS创建,不向LMS反馈拔轴状态";
|
||||||
|
return;
|
||||||
|
}
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code1);
|
applyManipulatorActionRequest.setTask_code1(task_code1);
|
||||||
applyManipulatorActionRequest.setType("8");
|
applyManipulatorActionRequest.setType("8");
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
@@ -232,6 +236,10 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
|
||||||
// Instruction inst2 = instructionService.findByCode(String.valueOf(task2));
|
// Instruction inst2 = instructionService.findByCode(String.valueOf(task2));
|
||||||
String task_code1 = inst1.getTask_code();
|
String task_code1 = inst1.getTask_code();
|
||||||
|
if (Long.parseLong(task_code1) < 1) {
|
||||||
|
message = "任务ACS创建,不向LMS申请套轴";
|
||||||
|
return;
|
||||||
|
}
|
||||||
// String task_code2 = inst2.getTask_code();
|
// String task_code2 = inst2.getTask_code();
|
||||||
applyManipulatorActionRequest.setDevice_code(device_code);
|
applyManipulatorActionRequest.setDevice_code(device_code);
|
||||||
applyManipulatorActionRequest.setTask_code1(task_code1);
|
applyManipulatorActionRequest.setTask_code1(task_code1);
|
||||||
@@ -264,6 +272,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean exe_error() {
|
public boolean exe_error() {
|
||||||
if (this.error == 0) {
|
if (this.error == 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -469,13 +469,13 @@ 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 < 20; i++) {
|
for (int i = 0; i < 5; 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());
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS失败" + response.getMessage());
|
message = "task变化请求LMS失败: " + response.getMessage();
|
||||||
Thread.sleep(5000);
|
Thread.sleep(5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user