Browse Source

opt:更新叠盘任务的下发校验

master
zds 2 months ago
parent
commit
e28d3f5b11
  1. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java
  2. 18
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java
  3. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java

9
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<SchBaseTask> {
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

18
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<SchBaseTaskMapper, SchBa
return schBaseTasks;
}
@Override
public Integer findUnFinishTasksByPoint_code1(String task_code, String point_code2) {
Assert.notNull(point_code2, "点位不能为空!");
LambdaQueryWrapper<SchBaseTask> 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, "子托盘不能为空!");

8
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")){

Loading…
Cancel
Save