From e28d3f5b11531942ca9f0d3728f7a66399487492 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Mon, 30 Sep 2024 16:55:30 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E6=9B=B4=E6=96=B0=E5=8F=A0=E7=9B=98?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=B8=8B=E5=8F=91=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sch/task/service/ISchBaseTaskService.java | 9 +++++++++ .../service/impl/SchBaseTaskServiceImpl.java | 18 ++++++++++++++++++ .../sch/task_manage/task/tasks/POINTTask.java | 8 +++++++- 3 files changed, 34 insertions(+), 1 deletion(-) 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")){