Commit 7ab5c4a3 authored by 王飞's avatar 王飞

Feat

1、改为从收件箱中查询审查任务过程中的场景变更信息。

Reference N/A
parent 1cbb16e9
...@@ -2,8 +2,8 @@ package com.ruoyi.mapper; ...@@ -2,8 +2,8 @@ package com.ruoyi.mapper;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -13,8 +13,8 @@ import java.util.List; ...@@ -13,8 +13,8 @@ import java.util.List;
* @Entity com.ruoyi.domain.ReviewSceneChangeTask * @Entity com.ruoyi.domain.ReviewSceneChangeTask
*/ */
public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChangeTask> { public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChangeTask> {
List<ReviewSceneChangeTask> findLastChangeByTaskId(@Param("taskId") Long taskId);
List<ReviewSceneChangeTask> findLastChangeByAfterTime(Date date);
} }
......
...@@ -39,10 +39,10 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange ...@@ -39,10 +39,10 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
void close(Long taskId); void close(Long taskId);
/** /**
* 获取指定时间之后的每个场景的最后变更记录 * 获取体系审查任务的每个场景的最后变更记录
* @param date * @param taskId
* @return * @return
*/ */
List<ReviewSceneChangeTask> findLastChangeByAfterTime(Date date); List<ReviewSceneChangeTask> findLastChangeByTaskId(Long taskId);
} }
...@@ -135,12 +135,11 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -135,12 +135,11 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
@Override @Override
public void close(Long taskId) { public void close(Long taskId) {
ReviewSceneChangeTask task = getById(taskId);
} }
@Override @Override
public List<ReviewSceneChangeTask> findLastChangeByAfterTime(Date date) { public List<ReviewSceneChangeTask> findLastChangeByTaskId(Long taskId) {
return reviewSceneChangeTaskMapper.findLastChangeByAfterTime(date); return reviewSceneChangeTaskMapper.findLastChangeByTaskId(taskId);
} }
private void checkTaskStatus(String status) { private void checkTaskStatus(String status) {
......
...@@ -75,7 +75,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -75,7 +75,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
systemReviewTask.setStandard(standardTree); systemReviewTask.setStandard(standardTree);
// 查询场景变更任务便于提醒用户场景变动 // 查询场景变更任务便于提醒用户场景变动
List<ReviewSceneChangeTask> lastChanges = reviewSceneChangeTaskService.findLastChangeByAfterTime(systemReviewTask.getTaskBeginTime()); List<ReviewSceneChangeTask> lastChanges = reviewSceneChangeTaskService.findLastChangeByTaskId(systemReviewTask.getId());
// 构建返回结果 // 构建返回结果
SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse(); SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
<result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/> <result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/>
</resultMap> </resultMap>
<select id="findLastChangeByAfterTime" resultType="com.ruoyi.domain.ReviewSceneChangeTask"> <select id="findLastChangeByTaskId" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
SELECT * FROM t_review_scene_change_task WHERE id IN SELECT * FROM t_review_scene_change_task WHERE id IN
( (
SELECT MAX(id) FROM t_review_scene_change_task WHERE task_status = 'FINISH' AND task_result = 'PASS' AND task_end_time >= #{date} GROUP BY review_scene_id SELECT MAX(id) FROM t_review_scene_change_task WHERE task_status = 'FINISH' AND task_result = 'PASS' AND id IN (SELECT review_scene_change_task_id FROM t_system_review_task_inbox WHERE system_review_task_id = 1737668929502830594 AND is_confirm = 0) GROUP BY review_scene_id
) )
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment