Merge remote-tracking branch 'origin/master_merge' into master_merge

This commit is contained in:
2024-07-08 15:50:22 +08:00
5 changed files with 74 additions and 69 deletions

View File

@@ -907,10 +907,10 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
.collect(Collectors.toList()); .collect(Collectors.toList());
//任务组id //任务组id
String groupId = deviceCode.substring(deviceCode.lastIndexOf("_") + 1); String groupId = deviceCode.substring(deviceCode.lastIndexOf("_") + 1);
// RLock lock = redissonClient.getLock(groupId); RLock lock = redissonClient.getLock(groupId);
// boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS); boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
// try { try {
// if (tryLock) { if (tryLock) {
List<SchBaseTask> schBaseTaskList = new ArrayList<>(); List<SchBaseTask> schBaseTaskList = new ArrayList<>();
//确定起点,安装装箱组标识加入任务队列 //确定起点,安装装箱组标识加入任务队列
djqPoints.forEach(r -> { djqPoints.forEach(r -> {
@@ -938,14 +938,14 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
if (CollectionUtils.isNotEmpty(schBaseTaskList)) { if (CollectionUtils.isNotEmpty(schBaseTaskList)) {
taskQueue.addTasksToQueue(groupId, schBaseTaskList); taskQueue.addTasksToQueue(groupId, schBaseTaskList);
} }
// } else { } else {
// log.info("待检区->装箱区任务队列正在创建被锁住。"); log.info("待检区->装箱区任务队列正在创建被锁住。");
// } }
// } finally { } finally {
// if (tryLock) { if (tryLock) {
// lock.unlock(); lock.unlock();
// } }
// } }
} }

View File

@@ -298,12 +298,11 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
.or() .or()
.eq(SchBaseTask::getTask_type, PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)") .eq(SchBaseTask::getTask_type, PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)")
))); )));
// if (CollectionUtils.isNotEmpty(taskList)) { if (CollectionUtils.isNotEmpty(taskList)) {
// //todo 桁架任务取空载具动作完成 if (!taskList.get(0).getRequest_param().equals(IOSEnum.IS_SEND.code(""))) {
// if (!taskList.get(0).getRequest_param().equals(IOSEnum.IS_SEND.code("是"))) { throw new BadRequestException("请等待桁架任务取空载具动作执行完成,再分配空载具点位");
// throw new BadRequestException("请等待桁架任务取空载具动作执行完成,再分配空载具点位"); }
// } }
// }
newPoint = checkIvtSBlock(); newPoint = checkIvtSBlock();
} else { } else {
newPoint = getBstIvtPackageinfoivt(actionType, taskPointType, baseTask); newPoint = getBstIvtPackageinfoivt(actionType, taskPointType, baseTask);
@@ -345,6 +344,9 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
} }
//取货任务 //取货任务
if (actionType.equals(PackageInfoIvtEnum.TASK_ACTION_TYPE.code("取货完成"))) { if (actionType.equals(PackageInfoIvtEnum.TASK_ACTION_TYPE.code("取货完成"))) {
if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区")) ||
baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("输送线四个点任务")) ||
baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)"))) {
UpdateWrapper<BstIvtPackageinfoivt> updateWrapper = new UpdateWrapper<>(); UpdateWrapper<BstIvtPackageinfoivt> updateWrapper = new UpdateWrapper<>();
//取满轴 //取满轴
if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区"))) { if (baseTask.getTask_type().equals(PackageInfoIvtEnum.TASK_TYPE.code("满轴缓存位->待检区"))) {
@@ -371,6 +373,7 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
//标记桁架任务取空载具完成 //标记桁架任务取空载具完成
baseTask.setRequest_param(IOSEnum.IS_SEND.code("")); baseTask.setRequest_param(IOSEnum.IS_SEND.code(""));
taskService.update(); taskService.update();
}
} else { } else {
//放货任务 //放货任务
List<BstIvtPackageinfoivt> ivtList = packageinfoivtService.list(new LambdaQueryWrapper<BstIvtPackageinfoivt>() List<BstIvtPackageinfoivt> ivtList = packageinfoivtService.list(new LambdaQueryWrapper<BstIvtPackageinfoivt>()

View File

@@ -8,6 +8,7 @@ import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask; import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask;
import org.nl.common.enums.PackageInfoIvtEnum; import org.nl.common.enums.PackageInfoIvtEnum;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient; import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@@ -15,6 +16,7 @@ import javax.annotation.Resource;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -48,10 +50,10 @@ public class AutoSendToZxq {
@SneakyThrows @SneakyThrows
public void sendDjqToZxq() { public void sendDjqToZxq() {
log.info(THIS_CLASS + "-待检区->装箱区定时任务开始执行扫描。"); log.info(THIS_CLASS + "-待检区->装箱区定时任务开始执行扫描。");
// RLock lock = redissonClient.getLock(THIS_CLASS); RLock lock = redissonClient.getLock(THIS_CLASS);
// boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS); boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
// try { try {
// if (tryLock) { if (tryLock) {
//装箱区有空位,去待检区消费合格品子卷 //装箱区有空位,去待检区消费合格品子卷
List<BstIvtPackageinfoivt> bstIvtPackageinfoivtList = packageinfoivtService.checkEndPointTask( List<BstIvtPackageinfoivt> bstIvtPackageinfoivtList = packageinfoivtService.checkEndPointTask(
PackageInfoIvtEnum.POINT_STATUS.code("装箱区"), PackageInfoIvtEnum.POINT_STATUS.code("装箱区"),
@@ -67,14 +69,14 @@ public class AutoSendToZxq {
//taskQueueManager.processTasks(ivtList); //taskQueueManager.processTasks(ivtList);
taskQueue.processTasks(ivtList); taskQueue.processTasks(ivtList);
} }
// } else { } else {
// log.info("满轴->待检区agv自动搬运任务正在创建被锁住。"); log.info("满轴->待检区agv自动搬运任务正在创建被锁住。");
// } }
// } finally { } finally {
// if (tryLock) { if (tryLock) {
// lock.unlock(); lock.unlock();
// } }
// } }
} }
} }

View File

@@ -109,7 +109,8 @@ public class AutoSendZxToDjw {
.list(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getPackage_box_sn, boxNo).eq(PdmBiSubpackagerelation::getStatus, "0")); .list(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getPackage_box_sn, boxNo).eq(PdmBiSubpackagerelation::getStatus, "0"));
if (CollectionUtils.isEmpty(relationList)) { if (CollectionUtils.isEmpty(relationList)) {
log.info("装箱位的木箱号" + boxNo + "对应的子卷包装关系为空,请检查子卷包装关系状态是否为0!"); log.info("装箱位的木箱号" + boxNo + "对应的子卷包装关系为空,请检查子卷包装关系状态是否为0!");
throw new BadRequestException("装箱位的木箱号" + boxNo + "对应的子卷包装关系异常,请检查子卷包装关系状态是否为0!"); return;
//throw new BadRequestException("装箱位的木箱号" + boxNo + "对应的子卷包装关系异常,请检查子卷包装关系状态是否为0!");
} }
//获取与该木箱号匹配的子卷号 //获取与该木箱号匹配的子卷号
String containerName = relationList.get(0).getContainer_name(); String containerName = relationList.get(0).getContainer_name();

View File

@@ -8,7 +8,6 @@ import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMap
import org.nl.b_lms.sch.task.dao.SchBaseTask; import org.nl.b_lms.sch.task.dao.SchBaseTask;
import org.nl.b_lms.sch.task.service.IschBaseTaskService; import org.nl.b_lms.sch.task.service.IschBaseTaskService;
import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask; import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask;
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
import org.nl.modules.common.utils.RedisUtils; import org.nl.modules.common.utils.RedisUtils;
import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.manage.TaskStatusEnum;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;