fix: 行架任务被分切输送线截取

This commit is contained in:
yanps
2023-12-31 09:10:09 +08:00
parent 49f0f677ad
commit 8e5c76a0a1
3 changed files with 22 additions and 17 deletions

View File

@@ -256,7 +256,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
if (action != last_action) { if (action != last_action) {
this.setFeedbackSucess(false); this.setFeedbackSucess(false);
logServer.deviceItemValue(this.device_code, "action", String.valueOf(action)); logServer.deviceItemValue(this.device_code, "action", String.valueOf(action));
logServer.deviceExecuteLog(this.device_code, "", "", "信号action" + last_action + "->" + action); logServer.deviceExecuteLog(this.device_code, "", "", "信号action" + last_action + "->" + action +"feedbackSucess:"+feedbackSucess);
} }
if (error != last_error) { if (error != last_error) {
if (error != 0) { if (error != 0) {
@@ -296,7 +296,9 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
if (task > 0 && !feedbackSucess) { if (task > 0 && !feedbackSucess) {
update_instruction_status(); update_instruction_status();
} }/*else {
logServer.deviceExecuteLog(this.device_code,"","","更新指令状态,条件不满足的原因,task:"+task+"feedbackSucess:"+feedbackSucess);
}*/
} catch (Exception var17) { } catch (Exception var17) {
@@ -435,6 +437,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
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;
@@ -455,6 +458,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code(); String task_code = inst1.getTask_code();
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));
@@ -481,6 +485,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code(); String task_code = inst1.getTask_code();
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();
@@ -507,6 +512,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code(); String task_code = inst1.getTask_code();
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,6 +539,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code(); String task_code = inst1.getTask_code();
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));
@@ -553,6 +560,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code(); String task_code = inst1.getTask_code();
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,6 +583,7 @@ 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);
@@ -810,13 +819,13 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 1); map.put("to_command", 1);
map.put("inflatableShaftVersion", Integer.parseInt(version)); map.put("inflatableShaftVersion", version);
map.put("tube_num", bushing_num); map.put("tube_num", bushing_num);
map.put("is_wrapped", is_bushing); map.put("is_wrapped", is_bushing);
map.put("to_task_type", Integer.parseInt(taskDto.getTruss_type())); map.put("to_task_type", taskDto.getTruss_type());
map.put("to_onset", Integer.parseInt(start_addr)); map.put("to_onset", start_addr);
map.put("to_task", Integer.parseInt(instruction.getInstruction_code())); map.put("to_task", instruction.getInstruction_code());
map.put("to_target", Integer.parseInt(next_addr)); map.put("to_target", next_addr);
try { try {
this.writing(map); this.writing(map);
} catch (Exception e) { } catch (Exception e) {
@@ -866,6 +875,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
return false; return false;
} }
} }
String taskid = task.getTask_id(); String taskid = task.getTask_id();
String taskcode = task.getTask_code(); String taskcode = task.getTask_code();
String vehiclecode = task.getVehicle_code(); String vehiclecode = task.getVehicle_code();
@@ -974,7 +984,6 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
} }
} else { } else {
logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv"); logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv");
} }
} else { } else {
logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点"); logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点");

View File

@@ -697,7 +697,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
this.instruction_require_time = date; this.instruction_require_time = date;
//判断是否存在起点相同 任务状态就绪的任务 //判断是否存在起点相同 任务状态就绪的任务
TaskDto taskdto = taskserver.findByStartCodeAndReady(device_code); TaskDto taskdto = taskserver.findByStartCodeAndReady(device_code);
if (!ObjectUtil.isEmpty(taskdto)) { if (!ObjectUtil.isEmpty(taskdto) && "5".equals(taskdto.getTask_type())) {
// if (!ObjectUtils.isEmpty(instructionService.findByBarcodeFromCache(container_code))) { // if (!ObjectUtils.isEmpty(instructionService.findByBarcodeFromCache(container_code))) {
// return false; // return false;
// } // }

View File

@@ -2,8 +2,6 @@
package org.nl.acs.route.rest; package org.nl.acs.route.rest;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.acs.route.service.RoutePlanService; import org.nl.acs.route.service.RoutePlanService;
@@ -68,7 +66,6 @@ public class RoutePlanController {
} }
@Log("导出路由方案") @Log("导出路由方案")
@GetMapping(value = "/download") @GetMapping(value = "/download")
//@PreAuthorize("@el.check('routePlan:list')") //@PreAuthorize("@el.check('routePlan:list')")
public void download(HttpServletResponse response, Map whereJson) throws IOException { public void download(HttpServletResponse response, Map whereJson) throws IOException {
@@ -77,7 +74,6 @@ public class RoutePlanController {
@GetMapping("/selectList") @GetMapping("/selectList")
@Log("下拉选路由方案") @Log("下拉选路由方案")
//@PreAuthorize("@el.check('routePlan:list')") //@PreAuthorize("@el.check('routePlan:list')")
public ResponseEntity<Object> selectList() { public ResponseEntity<Object> selectList() {
return new ResponseEntity<>(routePlanService.selectList(), HttpStatus.OK); return new ResponseEntity<>(routePlanService.selectList(), HttpStatus.OK);