Commit 5d7d36e8 authored by 王飞's avatar 王飞

Merge branch 'wangdingyi' into 'dev'

查询任务列表返回结果修改&接口注解

See merge request !16
parents 4494e04e 064de0b8
......@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
......@@ -24,14 +25,14 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang
* @param userId
* @return
*/
List<ReviewSceneChangeTask> findPendingListByUserId(@Param("userId") Long userId);
List<ReviewSceneChangeTaskResponse> findPendingListByUserId(@Param("userId") Long userId);
/**
* 根据用户ID查询已办列表
* @param userId
* @return
*/
List<ReviewSceneChangeTask> findFinishListByUserId(@Param("userId") Long userId);
List<ReviewSceneChangeTaskResponse> findFinishListByUserId(@Param("userId") Long userId);
/**
* 查询当前用户创建的任务
......
......@@ -2,6 +2,7 @@ package com.ruoyi.service;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import java.util.Date;
import java.util.List;
......@@ -50,14 +51,14 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* @param userId
* @return
*/
List<ReviewSceneChangeTask> findPendingListByUserId(Long userId);
List<ReviewSceneChangeTaskResponse> findPendingListByUserId(Long userId);
/**
* 根据用户ID查询已办列表
* @param userId
* @return
*/
List<ReviewSceneChangeTask> findFinishListByUserId(Long userId);
List<ReviewSceneChangeTaskResponse> findFinishListByUserId(Long userId);
/**
* 根据用户ID查询发布的任务列表
......
......@@ -13,6 +13,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService;
import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.service.SystemReviewTaskInboxService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -191,8 +192,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
* @return
*/
@Override
public List<ReviewSceneChangeTask> findPendingListByUserId(Long userId) {
List<ReviewSceneChangeTask> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findPendingListByUserId(userId);
public List<ReviewSceneChangeTaskResponse> findPendingListByUserId(Long userId) {
List<ReviewSceneChangeTaskResponse> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findPendingListByUserId(userId);
return reviewSceneChangeTask;
}
......@@ -202,8 +203,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
* @return
*/
@Override
public List<ReviewSceneChangeTask> findFinishListByUserId(Long userId) {
List<ReviewSceneChangeTask> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findFinishListByUserId(userId);
public List<ReviewSceneChangeTaskResponse> findFinishListByUserId(Long userId) {
List<ReviewSceneChangeTaskResponse> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findFinishListByUserId(userId);
return reviewSceneChangeTask;
}
......
......@@ -8,6 +8,9 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.request.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -43,6 +46,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
return R.ok();
}
@ApiOperation("审核通过任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "审核通过任务", businessType = BusinessType.UPDATE)
......@@ -54,6 +58,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
return R.ok();
}
@ApiOperation("审核驳回任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "审核驳回任务", businessType = BusinessType.UPDATE)
......@@ -73,7 +78,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findPending")
public TableDataInfo<ReviewSceneChangeTask> findPending(@Validated @RequestBody ReviewSceneChangeTaskFindPendingRequest request) {
public TableDataInfo<ReviewSceneChangeTaskResponse> findPending(@Validated @RequestBody ReviewSceneChangeTaskFindPendingRequest request) {
startPage(request);
return getDataTable(reviewSceneChangeTaskService.findPendingListByUserId(getUserId()));
}
......@@ -86,7 +91,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findFinish")
public TableDataInfo<ReviewSceneChangeTask> findFinish(ReviewSceneChangeTaskFindFinishRequest request) {
public TableDataInfo<ReviewSceneChangeTaskResponse> findFinish(ReviewSceneChangeTaskFindFinishRequest request) {
startPage(request);
return getDataTable(reviewSceneChangeTaskService.findFinishListByUserId(getUserId()));
}
......
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "ReviewSceneChangeTaskPassRequest", description = "审核任务")
@Data
public class ReviewSceneChangeTaskPassRequest {
@ApiModelProperty(value = "任务id",required = true)
private Long taskId;
@ApiModelProperty("评论")
private String comment;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ApiModel(value = "ReviewSceneChangeTaskResponse", description = "查询返回结果")
@Data
public class ReviewSceneChangeTaskResponse {
/**
* 主键
*/
@ApiModelProperty("主键")
private Long id;
/**
* 任务编号
*/
@ApiModelProperty("任务编号")
private String taskNo;
/**
* 章节
*/
@ApiModelProperty("章节")
private String chapter;
/**
* 审查标准id
*/
@ApiModelProperty("审查标准id")
private Long standardId;
/**
* 审查标准
*/
@ApiModelProperty("审查标准")
private String standard;
/**
* 审查要点id
*/
@ApiModelProperty("审查要点id")
private Long keypointId;
/**
* 审查要点
*/
@ApiModelProperty("审查要点")
private String keypoint;
/**
* 审查细则id
*/
@ApiModelProperty("审查细则id")
private Long detailsId;
/**
* 审查细则
*/
@ApiModelProperty("审查细则")
private String details;
/**
* 操作(ADD DELETE UPDATE)
*/
@ApiModelProperty("操作(ADD DELETE UPDATE)")
private String operation;
/**
* 当 operation 为 ADD 时该字段为空
*/
@ApiModelProperty("当 operation 为 ADD 时该字段为空")
private String oldText;
/**
* 当 operation 为 DELETE 时该字段为空
*/
@ApiModelProperty("当 operation 为 DELETE 时该字段为空")
private String newText;
/**
* 任务发起人姓名
*/
@ApiModelProperty("任务发起人姓名")
private String taskInitiator;
/**
* 任务发起人部门
*/
@ApiModelProperty("任务发起人部门")
private String taskInitiatorDept;
/**
* 任务发起人Id
*/
@ApiModelProperty("任务发起人Id")
private Long taskInitiatorId;
/**
* 任务状态(PENDING、FINISH、CLOSE)
*/
@ApiModelProperty("任务状态(PENDING、FINISH、CLOSE)")
private String taskStatus;
/**
* 任务结果(PASS、REJECT)
*/
@ApiModelProperty("任务结果(PASS、REJECT)")
private String taskResult;
/**
* 任务开始时间
*/
@ApiModelProperty("任务开始时间")
private Date taskBeginTime;
/**
* 任务结束时间
*/
@ApiModelProperty("任务结束时间")
private Date taskEndTime;
/**
* 备注
*/
@ApiModelProperty("备注")
private String remark;
/**
......@@ -112,10 +135,12 @@ public class ReviewSceneChangeTaskResponse {
* 若为修改、删除任务时,此id在创建任务时赋值
* 若为新增任务时,此id在审批通过并保存新场景后赋值
*/
@ApiModelProperty("审查场景id")
private Long reviewSceneId;
/**
* 本人审核意见(PASS、REJECT)
*/
@ApiModelProperty("本人审核意见(PASS、REJECT)")
private String decision;
}
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