Commit 087ca2ef authored by W_Y's avatar W_Y

查询我发起的评审

parent 4c920e7b
...@@ -2,6 +2,7 @@ package com.ruoyi.mapper; ...@@ -2,6 +2,7 @@ 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 com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
...@@ -41,7 +42,7 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang ...@@ -41,7 +42,7 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang
* @param userId * @param userId
* @return * @return
*/ */
List<ReviewSceneChangeTask> findCreateListByUserId(@Param("userId") Long userId); List<ReviewSceneChangeTask> findCreateListByUserId(@Param("userId") Long userId, @Param("request") ReviewSceneChangeTaskFindCreateRequest request);
} }
......
...@@ -2,6 +2,7 @@ package com.ruoyi.service; ...@@ -2,6 +2,7 @@ package com.ruoyi.service;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
...@@ -74,6 +75,6 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange ...@@ -74,6 +75,6 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* @param userId * @param userId
* @return * @return
*/ */
List<ReviewSceneChangeTask> findCreateListByUserId(Long userId); List<ReviewSceneChangeTask> findCreateListByUserId(Long userId, ReviewSceneChangeTaskFindCreateRequest request);
} }
...@@ -13,6 +13,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService; ...@@ -13,6 +13,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService;
import com.ruoyi.service.ReviewSceneService; import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.service.ReviewTaskInboxService; import com.ruoyi.service.ReviewTaskInboxService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
...@@ -230,8 +231,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -230,8 +231,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
* @return * @return
*/ */
@Override @Override
public List<ReviewSceneChangeTask> findCreateListByUserId(Long userId) { public List<ReviewSceneChangeTask> findCreateListByUserId(Long userId, ReviewSceneChangeTaskFindCreateRequest request) {
List<ReviewSceneChangeTask> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findCreateListByUserId(userId); List<ReviewSceneChangeTask> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findCreateListByUserId(userId,request);
return reviewSceneChangeTask; return reviewSceneChangeTask;
} }
......
...@@ -93,7 +93,7 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -93,7 +93,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = "/findCreate") @RequestMapping(method = RequestMethod.POST, value = "/findCreate")
public TableDataInfo<ReviewSceneChangeTask> findCreate(@Validated @RequestBody ReviewSceneChangeTaskFindCreateRequest request) { public TableDataInfo<ReviewSceneChangeTask> findCreate(@Validated @RequestBody ReviewSceneChangeTaskFindCreateRequest request) {
startPage(request); startPage(request);
return getDataTable(reviewSceneChangeTaskService.findCreateListByUserId(getUserId())); return getDataTable(reviewSceneChangeTaskService.findCreateListByUserId(getUserId(),request));
} }
@ApiOperation("查询任务详情") @ApiOperation("查询任务详情")
......
...@@ -2,7 +2,22 @@ package com.ruoyi.web.request; ...@@ -2,7 +2,22 @@ package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel @ApiModel(value = "ReviewSceneChangeTaskFindCreateRequest", description = "查询发布的任务")
@Data
public class ReviewSceneChangeTaskFindCreateRequest extends PageDomain { public class ReviewSceneChangeTaskFindCreateRequest extends PageDomain {
@ApiModelProperty("评审类型")
private String operationSort;
@ApiModelProperty("条款分类[system(体系审查)、car(车型审查)]")
private String type;
@ApiModelProperty("关键词")
private String keyword;
@ApiModelProperty("评审状态")
private String taskStatus;
} }
...@@ -87,6 +87,19 @@ ...@@ -87,6 +87,19 @@
<select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask"> <select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
SELECT * FROM t_review_scene_change_task SELECT * FROM t_review_scene_change_task
WHERE task_initiator_id = #{userId} WHERE task_initiator_id = #{userId}
<if test="request.operationSort != null and request.operationSort != ''">
and operation_sort = #{request.operationSort}
</if>
<if test="request.type != null and request.type != ''">
and type = #{request.type}
</if>
<if test="request.keyword != null and request.keyword != ''">
and (old_text like concat('%',#{request.keyword},'%') || new_text like concat('%',#{request.keyword},'%'))
</if>
<if test="request.taskStatus != null and request.taskStatus != ''">
and task_status = #{request.taskStatus}
</if>
order by task_begin_time desc
</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