fix: 一楼联调

This commit is contained in:
2024-06-11 14:59:32 +08:00
parent 753a4df8df
commit 6781a60a3f
10 changed files with 17 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ public class XianGongAgvController {
@Autowired @Autowired
private XianGongAgvService xianGongAgentService; private XianGongAgvService xianGongAgentService;
@PostMapping("/waitPointRequest") @PostMapping("/api/agv/xg/waitPointRequest")
@Log("仙工AGV请求取放货") @Log("仙工AGV请求取放货")
public ResponseEntity<JSONObject> xgAGVWaitPointRequest(@RequestBody JSONObject requestParam) { public ResponseEntity<JSONObject> xgAGVWaitPointRequest(@RequestBody JSONObject requestParam) {
return new ResponseEntity<>(xianGongAgentService.xgAGVWaitPointRequest(requestParam), HttpStatus.OK); return new ResponseEntity<>(xianGongAgentService.xgAGVWaitPointRequest(requestParam), HttpStatus.OK);

View File

@@ -814,7 +814,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
jo.put("device_name", this.getDevice().getDevice_name()); jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode); jo.put("mode", mode);
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
if (this.getMove() == 0) { if (this.getMove() == 0) {
move = LangProcess.msg("universal_no"); move = LangProcess.msg("universal_no");
jo.put("hasGoods", false); jo.put("hasGoods", false);

View File

@@ -679,7 +679,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
map.put("hand_barcode", hand_barcode); map.put("hand_barcode", hand_barcode);
map.put("barcode", this.getMove() == 0 ? null : checkInst() == null ? vehicle_code : checkInst().getVehicle_code()); map.put("barcode", this.getMove() == 0 ? null : checkInst() == null ? vehicle_code : checkInst().getVehicle_code());
map.put("is_click", true); map.put("is_click", true);
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); map.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
map.put("requireSucess", requireSucess); map.put("requireSucess", requireSucess);
map.put("driver_type", "siemens_conveyor"); map.put("driver_type", "siemens_conveyor");
map.put("message", LangProcess.msg(message)); map.put("message", LangProcess.msg(message));

View File

@@ -462,7 +462,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
jo.put("inst_message", this.inst_message); jo.put("inst_message", this.inst_message);
jo.put("last_inst_message", this.last_inst_message); jo.put("last_inst_message", this.last_inst_message);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); jo.put("isError", this.getIserror());
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("hand_barcode", hand_barcode); jo.put("hand_barcode", hand_barcode);

View File

@@ -698,7 +698,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
jo.put("inst_message", this.inst_message); jo.put("inst_message", this.inst_message);
jo.put("last_inst_message", this.last_inst_message); jo.put("last_inst_message", this.last_inst_message);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); jo.put("isError", this.getIserror());
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("hand_barcode", hand_barcode); jo.put("hand_barcode", hand_barcode);

View File

@@ -674,7 +674,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
jo.put("action", action); jo.put("action", action);
jo.put("task", task); jo.put("task", task);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); jo.put("isError", this.getIserror());
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("notCreateTaskMessage", notCreateTaskMessage); jo.put("notCreateTaskMessage", notCreateTaskMessage);

View File

@@ -787,12 +787,14 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map3.put("code", "to_container_type"); map3.put("code", "to_container_type");
map3.put("value", containerType); map3.put("value", containerType);
list.add(map3); list.add(map3);
this.writing(list);
List list2 = new ArrayList();
Map map4 = new HashMap(); Map map4 = new HashMap();
map4.put("code", "to_command"); map4.put("code", "to_command");
map4.put("value", "1"); map4.put("value", "1");
list.add(map4); list2.add(map4);
this.writing(list2);
this.writing(list);
led_message = getLedMessage(instdto); led_message = getLedMessage(instdto);
List<String> deviceCodes = this.getExtraDeviceCodes("link_device_code"); List<String> deviceCodes = this.getExtraDeviceCodes("link_device_code");
String device = null; String device = null;
@@ -973,7 +975,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
jo.put("action", action); jo.put("action", action);
jo.put("task", task); jo.put("task", task);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); jo.put("isError", this.getIserror());
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("notCreateTaskMessage", notCreateTaskMessage); jo.put("notCreateTaskMessage", notCreateTaskMessage);

View File

@@ -410,7 +410,7 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
jo.put("inst_message", this.inst_message); jo.put("inst_message", this.inst_message);
jo.put("last_inst_message", this.last_inst_message); jo.put("last_inst_message", this.last_inst_message);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); jo.put("isError", this.getIserror());
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("hand_barcode", hand_barcode); jo.put("hand_barcode", hand_barcode);

View File

@@ -432,7 +432,6 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
break; break;
case 4: case 4:
message = "one_message1"; message = "one_message1";
if (updateCommand("4")) break;
Instruction instruction1 = checkInst(); Instruction instruction1 = checkInst();
String next_device_code1 = instruction1.getNext_device_code(); String next_device_code1 = instruction1.getNext_device_code();
Device nextDevice1 = deviceAppService.findDeviceByCode(next_device_code1); Device nextDevice1 = deviceAppService.findDeviceByCode(next_device_code1);
@@ -456,7 +455,6 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
break; break;
case 5: case 5:
message = "universal_releasing_completed"; message = "universal_releasing_completed";
if (updateCommand("11")) break;
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
List list5 = new ArrayList(); List list5 = new ArrayList();
map.put("code", "to_command"); map.put("code", "to_command");

View File

@@ -51,6 +51,7 @@ import org.nl.acs.route.service.dto.RouteLineDto;
import org.nl.acs.route.service.impl.RouteLineServiceImpl; import org.nl.acs.route.service.impl.RouteLineServiceImpl;
import org.nl.acs.task.TaskInstructionLock; import org.nl.acs.task.TaskInstructionLock;
import org.nl.acs.task.domain.Task; import org.nl.acs.task.domain.Task;
import org.nl.acs.task.enums.AgvSystemTypeEnum;
import org.nl.acs.task.enums.TaskStatusEnum; import org.nl.acs.task.enums.TaskStatusEnum;
import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto; import org.nl.acs.task.service.dto.TaskDto;
@@ -470,7 +471,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (ObjectUtil.isEmpty(route) && (!start_device_code.equals(next_device_code))) { if (ObjectUtil.isEmpty(route) && (!start_device_code.equals(next_device_code))) {
throw new BadRequestException(LangProcess.msg("error_isNull", "route")); throw new BadRequestException(LangProcess.msg("error_isNull", "route"));
} }
if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE) && dto.getAgv_system_type().equals(CommonFinalParam.TWO)) { if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE) && dto.getAgv_system_type().equals(AgvSystemTypeEnum.Two_NDC_System_Type.getIndex())) {
// 0为输送、立库任务 1 1楼叉车系统 2 2楼1区域AGV系统 3 2楼2区域AGV系统 // 0为输送、立库任务 1 1楼叉车系统 2 2楼1区域AGV系统 3 2楼2区域AGV系统
if (!StrUtil.equals(task.getAgv_system_type(), "0") if (!StrUtil.equals(task.getAgv_system_type(), "0")
&& ObjectUtil.isNotEmpty(task.getAgv_system_type())) { && ObjectUtil.isNotEmpty(task.getAgv_system_type())) {
@@ -500,7 +501,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
} }
} }
//判断是否是仙工AGV //判断是否是仙工AGV
if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE) && dto.getAgv_system_type().equals(CommonFinalParam.ONE)) { if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE) && dto.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())) {
Device deviceByCode = deviceAppService.findDeviceByCode(dto.getStart_device_code()); Device deviceByCode = deviceAppService.findDeviceByCode(dto.getStart_device_code());
if (StrUtil.equals(task.getRequest_again_success(), "1")) { if (StrUtil.equals(task.getRequest_again_success(), "1")) {
//追加订单 //追加订单
@@ -511,7 +512,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
dto.setSend_status("1"); dto.setSend_status("1");
} }
//仙工叉车 //仙工叉车
} else if (deviceByCode.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { } else if (deviceByCode.getDeviceDriver() instanceof BeltConveyorDeviceDriver&& dto.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
HttpResponse response = xiangGongAgvService.sendOrderSequencesToForklift(dto); HttpResponse response = xiangGongAgvService.sendOrderSequencesToForklift(dto);
if (ObjectUtils.isEmpty(response) || response.getStatus() != 200) { if (ObjectUtils.isEmpty(response) || response.getStatus() != 200) {
dto.setSend_status("2"); dto.setSend_status("2");