psh 11 months ago
parent
commit
89652ee42d
  1. 12
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
  3. 29
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java

12
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);
//到达取货等待点

9
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);

29
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<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1");
//从前往后判断,直到发现点位有货,取前一个
SchBasePoint schBasePoint=null;
for(int i=schBasePointList.size()-1;i>=0;i--) {
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) {
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);
} else {
throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过");
}
break;
}
schBasePoint=temp;
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+"所有点位均已放满,暂时跳过");
}
}
return schBasePoint;
}

Loading…
Cancel
Save