Commit 95d429b6 authored by 王飞's avatar 王飞

Merge branch 'wangdingyi' into 'dev'

体系审查列表查询

See merge request !23
parents 00a26db3 9e6848ee
......@@ -10,4 +10,7 @@ import java.util.List;
@Repository
public interface SystemReviewTaskMapper extends BaseMapper<SystemReviewTask> {
List<SystemReviewTask> findListByStatus(@Param("status") String status);
// 查询处理中的任务
List<SystemReviewTask> findListInProcess();
}
......@@ -40,4 +40,10 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
*/
List<SystemReviewTask> findListByStatus(String status);
/**
* 查询处理中的任务
* @return
*/
List<SystemReviewTask> findListInProcess();
}
......@@ -98,6 +98,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
return systemReviewTaskMapper.findListByStatus(status);
}
@Override
public List<SystemReviewTask> findListInProcess() {
return systemReviewTaskMapper.findListInProcess();
}
}
......
......@@ -4,11 +4,11 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.service.SystemReviewTaskService;
import com.ruoyi.web.request.SystemReviewTaskCreateRequest;
import com.ruoyi.web.request.SystemReviewTaskStartRequest;
import com.ruoyi.web.request.SystemReviewTaskViewRequest;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -22,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@Api("体系审查任务")
@RestController
@RequestMapping("/system/review/task")
......@@ -57,4 +60,22 @@ public class SystemReviewTaskController extends BaseController {
systemReviewTaskService.start(request);
return R.ok();
}
@ApiOperation("查询处理中的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findInProcess")
public TableDataInfo<SystemReviewTask> findInProcess(@Validated @RequestBody SystemReviewTaskFindInProcessRequest request) {
startPage(request);
return getDataTable(systemReviewTaskService.findListInProcess());
}
@ApiOperation("查询处理完成的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findInFinish")
public TableDataInfo<SystemReviewTask> findInFinish(@Validated @RequestBody SystemReviewTaskFindFinishRequest request) {
startPage(request);
return getDataTable(systemReviewTaskService.findListByStatus(SystemReviewTask.STATUS_FINISH));
}
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
@ApiModel
public class SystemReviewTaskFindFinishRequest extends PageDomain {
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
@ApiModel
public class SystemReviewTaskFindInProcessRequest extends PageDomain {
}
......@@ -25,6 +25,13 @@
<select id="findListByStatus" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time, standard_id, name, standard_no, file
FROM t_system_review_task WHERE task_status = #{status}
ORDER BY create_time DESC
</select>
<select id="findListInProcess" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time, standard_id, name, standard_no, file
FROM t_system_review_task WHERE task_status IN ('NEW','PENDING')
ORDER BY create_time DESC
</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