From e83dacb5066a86db29dbdc232218d8aba6adc95f Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期五, 02 八月 2024 13:34:04 +0800 Subject: [PATCH] # --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/TaskLogServiceImpl.java | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/TaskLogServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/TaskLogServiceImpl.java index be23d4f..6b17441 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/TaskLogServiceImpl.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/TaskLogServiceImpl.java @@ -1,12 +1,32 @@ package com.zy.asrs.wms.asrs.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.zy.asrs.wms.asrs.entity.Task; import com.zy.asrs.wms.asrs.mapper.TaskLogMapper; import com.zy.asrs.wms.asrs.entity.TaskLog; +import com.zy.asrs.wms.asrs.service.TaskDetlLogService; import com.zy.asrs.wms.asrs.service.TaskLogService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; @Service("taskLogService") public class TaskLogServiceImpl extends ServiceImpl<TaskLogMapper, TaskLog> implements TaskLogService { + @Autowired + private TaskDetlLogService taskDetlLogService; + + @Override + public List<TaskLog> getByOrderDetlId(Long orderDetlId) { + ArrayList<TaskLog> tasks = new ArrayList<>(); + List<Long> taskIds = taskDetlLogService.getTaskIdsByDetlId(orderDetlId); + if (!taskIds.isEmpty()) { + return this.list(new LambdaQueryWrapper<TaskLog>().in(TaskLog::getId, taskIds)); + } + return tasks; + } } -- Gitblit v1.9.1