From 89652ee42de9299678f227b9a53d6238b9dc6237 Mon Sep 17 00:00:00 2001 From: psh Date: Thu, 4 Jan 2024 14:14:36 +0800 Subject: [PATCH] fix --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 12 +++++++ .../sch/task_manage/task/tasks/BPSLTask.java | 9 ++--- .../task_manage/task/tasks/KGHJRKTask.java | 35 +++++++++++++------ 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index a3dca4b..ec688f6 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -15,6 +15,7 @@ import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver; +import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_storage.StandardStorageDeviceDriver; import org.nl.acs.device_driver.driver.AbstractDeviceDriver; @@ -173,6 +174,17 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); return; } + StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; + if(device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); + if(standardInspectSiteDeviceDriver.getAction()==1){ + standardInspectSiteDeviceDriver.writing(2); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); + }else{ + log.info("当前涂板线未允许取货"); + return; + } + } data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //到达取货等待点 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java index 2d6f713..20845d8 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java @@ -236,11 +236,12 @@ public class BPSLTask extends AbstractTask { //todo 重算最优点 JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data()); SchBasePoint point = this.findNextPoint(jsonObject,schBaseTask); - if( "1".equals(jsonObject.getString("material_type"))) { - schBaseTask.setPoint_code1(point.getPoint_code()+"0"+point.getVehicle_qty()); - }else{ + //正极板现在不堆叠 +// if( "1".equals(jsonObject.getString("material_type"))) { +// schBaseTask.setPoint_code1(point.getPoint_code()+"0"+point.getVehicle_qty()); +// }else{ schBaseTask.setPoint_code1(point.getPoint_code()); - } +// } //重算点位时把点位占用 point.setIng_task_code(schBaseTask.getTask_code()); // point.setVehicle_qty(point.getVehicle_qty() - 1); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java index a1d3090..3d7932b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java @@ -85,7 +85,7 @@ public class KGHJRKTask extends AbstractTask { continue; } // 设置终点并修改创建成功状态 - task.setPoint_code2(point.getPoint_code()); + task.setPoint_code2(point.getNext_wait_point()); task.setTask_status(TaskStatus.CREATED.getCode()); task.setRemark(""); taskService.update(task); @@ -120,18 +120,31 @@ public class KGHJRKTask extends AbstractTask { List schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); //从前往后判断,直到发现点位有货,取前一个 SchBasePoint schBasePoint=null; - for(int i=schBasePointList.size()-1;i>=0;i--) { - SchBasePoint temp = schBasePointList.get(i); - if(temp.getVehicle_qty()==1&& - ObjectUtil.isEmpty(temp.getIng_task_code())){ - if(schBasePoint!=null) { - log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); - }else{ - log.info("当前区域:{}所有点位均已放满,暂时跳过",regionCode); + if(!"ZJBKGHJDJW".equals(regionCode)) { + for (int i = schBasePointList.size() - 1; i >= 0; i--) { + SchBasePoint temp = schBasePointList.get(i); + if (temp.getVehicle_qty() == 1 && + ObjectUtil.isEmpty(temp.getIng_task_code())) { + if (schBasePoint != null) { + log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); + } else { + throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); + } + break; } - break; + schBasePoint = temp; + } + }else{ + for (int i = schBasePointList.size() - 1; i >= 0; i--) { + SchBasePoint temp = schBasePointList.get(i); + if (temp.getVehicle_qty() <3 && + ObjectUtil.isEmpty(temp.getIng_task_code())) { + schBasePoint = temp; + } + } + if (schBasePoint==null){ + throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); } - schBasePoint=temp; } return schBasePoint; }