Commit 36e05475 authored by W_Y's avatar W_Y

查询完成的任务

parent 7bd1bc32
......@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.Task;
import com.ruoyi.web.request.TaskFindFinishRequest;
import com.ruoyi.web.request.TaskFindPendingRequest;
import com.ruoyi.web.request.TaskListRequest;
import com.ruoyi.web.response.TaskFindPendingResponse;
......@@ -16,4 +17,6 @@ public interface TaskMapper extends BaseMapper<Task> {
List<Task> findList(TaskListRequest request);
List<TaskFindPendingResponse> findPending(TaskFindPendingRequest request);
List<Task> findFinish(TaskFindFinishRequest request);
}
......@@ -3,6 +3,7 @@ package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.Task;
import com.ruoyi.web.request.TaskCreateRequest;
import com.ruoyi.web.request.TaskFindFinishRequest;
import com.ruoyi.web.request.TaskFindPendingRequest;
import com.ruoyi.web.request.TaskListRequest;
import com.ruoyi.web.response.TaskFindPendingResponse;
......@@ -27,4 +28,6 @@ public interface TaskService extends IService<Task> {
* @return
*/
List<TaskFindPendingResponse> findPending(TaskFindPendingRequest request);
List<Task> findFinish(TaskFindFinishRequest request);
}
......@@ -12,6 +12,7 @@ import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.service.*;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.TaskCreateRequest;
import com.ruoyi.web.request.TaskFindFinishRequest;
import com.ruoyi.web.request.TaskFindPendingRequest;
import com.ruoyi.web.request.TaskListRequest;
import com.ruoyi.web.response.TaskFindPendingResponse;
......@@ -114,6 +115,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
return taskMapper.findPending(request);
}
@Override
public List<Task> findFinish(TaskFindFinishRequest request) {
return taskMapper.findFinish(request);
}
public Long saveSystemReview(TaskCreateRequest request,SysUser initiator,Standard standard,TaskUserRelation leader) {
// 构建并保存任务信息
......
......@@ -10,10 +10,7 @@ import com.ruoyi.domain.Task;
import com.ruoyi.domain.TaskUserRelation;
import com.ruoyi.service.TaskService;
import com.ruoyi.service.TaskUserRelationService;
import com.ruoyi.web.request.TaskCreateRequest;
import com.ruoyi.web.request.TaskFindPendingRequest;
import com.ruoyi.web.request.TaskGetInfoRequest;
import com.ruoyi.web.request.TaskListRequest;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.TaskFindPendingResponse;
import com.ruoyi.web.response.TaskGetInfoResponse;
import io.swagger.annotations.Api;
......@@ -83,4 +80,13 @@ public class TaskController extends BaseController {
return getDataTable(taskService.findPending(request));
}
@ApiOperation("查询完成的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findFinish")
public TableDataInfo<Task> findFinish(@Validated @RequestBody TaskFindFinishRequest request) {
startPage(request);
return getDataTable(taskService.findFinish(request));
}
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ApiModel(value = "TaskFindFinishRequest", description = "查询完成的总任务")
@Data
public class TaskFindFinishRequest extends PageDomain {
@ApiModelProperty("任务编号")
private String taskNo;
@ApiModelProperty("名称关键词")
private String taskName;
@ApiModelProperty("任务开始时间")
private Date taskBeginTime;
@ApiModelProperty("任务结束时间")
private Date taskEndTime;
}
......@@ -81,6 +81,7 @@
SELECT t.id, t.system_review_task_id, t.car_review_task_id,
t.task_no,t.task_name,t.task_status,
t.leader_id,t.leader,
t.task_begin_time,
srt.task_status review_status,
crt.review_status car_review_status,
crt.test_status car_test_status
......@@ -103,6 +104,28 @@
</if>
</where>
</select>
<select id="findFinish" parameterType="com.ruoyi.web.request.TaskFindFinishRequest" resultType="com.ruoyi.domain.Task">
SELECT t.id, t.system_review_task_id, t.car_review_task_id,
t.task_no,t.task_name,t.task_status,
t.leader_id,t.leader,
t.task_begin_time,t.task_end_time
FROM t_task t
<where>
t.task_status IN ("FINISH")
<if test="taskNo != null and taskNo != ''">
and t.task_no = #{taskNo}
</if>
<if test="taskName != null and taskName != ''">
and t.task_name like concat('%',#{taskName},'%')
</if>
<if test="taskBeginTime != null and taskBeginTime != ''">
and t.task_begin_time = #{taskBeginTime}
</if>
<if test="taskEndTime != null and taskEndTime != ''">
and t.task_end_time = #{taskEndTime}
</if>
</where>
</select>
</mapper>
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