Commit 742629c6 authored by W_Y's avatar W_Y

根据状态查找车辆审查任务

parent 17b83466
...@@ -17,6 +17,8 @@ import java.util.List; ...@@ -17,6 +17,8 @@ import java.util.List;
public interface CarReviewTaskMapper extends BaseMapper<CarReviewTask> { public interface CarReviewTaskMapper extends BaseMapper<CarReviewTask> {
List<CarReviewTask> findListByReviewStatus(@Param("reviewStatus") String reviewStatus); List<CarReviewTask> findListByReviewStatus(@Param("reviewStatus") String reviewStatus);
List<CarReviewTask> findListByTaskStatus(@Param("taskStatus") String taskStatus);
} }
......
...@@ -53,12 +53,6 @@ public interface CarReviewTaskService extends IService<CarReviewTask> { ...@@ -53,12 +53,6 @@ public interface CarReviewTaskService extends IService<CarReviewTask> {
*/ */
List<CarReviewTask> findListByStatus(String status); List<CarReviewTask> findListByStatus(String status);
/**
* 查询处理中的任务
* @return
*/
List<CarReviewTask> findListInProcess();
} }
...@@ -138,13 +138,9 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C ...@@ -138,13 +138,9 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Override @Override
public List<CarReviewTask> findListByStatus(String status) { public List<CarReviewTask> findListByStatus(String status) {
return null; return carReviewTaskMapper.findListByTaskStatus(status);
} }
@Override
public List<CarReviewTask> findListInProcess() {
return null;
}
} }
......
...@@ -3,7 +3,9 @@ package com.ruoyi.web; ...@@ -3,7 +3,9 @@ package com.ruoyi.web;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.CarReviewTask;
import com.ruoyi.service.CarReviewTaskService; import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.web.request.*; import com.ruoyi.web.request.*;
import com.ruoyi.web.response.CarReviewTaskViewResponse; import com.ruoyi.web.response.CarReviewTaskViewResponse;
...@@ -65,5 +67,22 @@ public class CarReviewTaskController extends BaseController { ...@@ -65,5 +67,22 @@ public class CarReviewTaskController extends BaseController {
return R.ok(); return R.ok();
} }
@ApiOperation("查询处理中的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findPending")
public TableDataInfo<CarReviewTask> findPending(@Validated @RequestBody CarReviewTaskFindPendingRequest request) {
startPage(request);
return getDataTable(carReviewTaskService.findListByStatus(CarReviewTask.TASK_STATUS_PENDING));
}
@ApiOperation("查询处理完成的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findFinish")
public TableDataInfo<CarReviewTask> findFinish(@Validated @RequestBody CarReviewTaskFindFinishRequest request) {
startPage(request);
return getDataTable(carReviewTaskService.findListByStatus(CarReviewTask.TASK_STATUS_FINISH));
}
} }
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
@ApiModel
public class CarReviewTaskFindFinishRequest extends PageDomain {
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
@ApiModel
public class CarReviewTaskFindPendingRequest extends PageDomain {
}
...@@ -46,6 +46,10 @@ ...@@ -46,6 +46,10 @@
</sql> </sql>
<select id="findListByReviewStatus" resultType="com.ruoyi.domain.CarReviewTask"> <select id="findListByReviewStatus" resultType="com.ruoyi.domain.CarReviewTask">
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
FROM t_system_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING' FROM t_car_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
</select>
<select id="findListByTaskStatus" resultType="com.ruoyi.domain.CarReviewTask">
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
FROM t_car_review_task WHERE task_status = #{taskStatus}
</select> </select>
</mapper> </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