diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java index 0fb0544..7f260eb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java @@ -69,6 +69,15 @@ public interface ISchBaseTaskService extends IService { Integer findUnFinishTasksByPoint_code2(String task_code, String point_code2); + /** + * 根据任务号和DKT点位查询未完成的任务 + * @param task_code + * @param point_code2 + * @return + */ + Integer findUnFinishTasksByPoint_code1(String task_code, String point_code2); + + /** * 根据任务号和子托盘查询未完成的任务 * @param task_code diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java index ee13b9e..ff7462e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java @@ -141,6 +141,24 @@ public class SchBaseTaskServiceImpl extends ServiceImpl lam = new LambdaQueryWrapper<>(); + lam.lt(SchBaseTask::getTask_status, TaskStatus.FINISHED.getCode()) + .ne(ObjectUtil.isNotEmpty(task_code),SchBaseTask::getTask_code, task_code)// 不是当前任务 + .and(slam -> slam.eq(SchBaseTask::getPoint_code1, point_code2) + .or() + .eq(SchBaseTask::getPoint_code2, point_code2) + .or() + .like(point_code2.startsWith("DKT"),SchBaseTask::getPoint_code2,"DKT") + ) + .eq(SchBaseTask::getIs_delete, false) + .gt(point_code2.startsWith("DKT"),SchBaseTask::getTask_status, TaskStatus.APPLY.getCode()); + Integer schBaseTasks = schBaseTaskMapper.selectCount(lam); + return schBaseTasks; + } + @Override public Integer findUnFinishTasksBySub_tray(String task_code, String sub_tray) { Assert.notNull(sub_tray, "子托盘不能为空!"); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java index 13ca8ea..e2431b4 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java @@ -101,7 +101,13 @@ public class POINTTask extends AbstractTask { } } // 获取任务 - Integer taskList = taskService.findUnFinishTasksByPoint_code2(task.getTask_code(),task.getPoint_code2()); + Integer taskList = 0; + if(task.getPoint_code2().startsWith("DKT")){ + taskList = taskService.findUnFinishTasksByPoint_code1(task.getTask_code(),task.getPoint_code2()); + }else{ + taskList = taskService.findUnFinishTasksByPoint_code2(task.getTask_code(),task.getPoint_code2()); + } + if(taskList>0){ task.setRemark("分配终点点位"+task.getPoint_code2()+"已存在未完成任务!"); if(task.getPoint_code2().startsWith("DKT")){