Commit 4ddce880 authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'dev'

新增接口:查询所有评审人员、获取评审人员意见。用户查看我发起的评审、评审员查看待审、已办时按照时间排序。

See merge request !434
parents 3d9b1bb1 581290b5
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.response.ReviewOpinionResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.response.ReviewerListResponse;
import org.springframework.stereotype.Repository;
......@@ -63,6 +64,8 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang
List<ReviewSceneChangeTaskResponse> findFinishList(@Param("userId") Long userId, @Param("request") ReviewSceneChangeTaskFindFinishRequest request);
List<ReviewerListResponse> selectReviewerListByTaskId(@Param("id") Long id);
List<ReviewOpinionResponse> getReviewerOpinion(@Param("id") Long id);
}
......
package com.ruoyi.service;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.ReviewDetailsListResponse;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.response.ReviewSceneListResponse;
import com.ruoyi.web.response.*;
import java.util.Date;
import java.util.List;
......@@ -120,4 +118,11 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* 发起评审-获取场景列表
* */
List<ReviewSceneListResponse> getSceneList(Long detailsId);
/*
* 获取评审人员
* */
List<SysUser> getReviewList();
List<ReviewOpinionResponse> getReviewerOpinion(Long id);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
......@@ -17,6 +18,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService;
import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.service.ReviewTaskInboxService;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
......@@ -28,6 +30,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author wangfei
......@@ -53,6 +56,9 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
@Autowired
private ReviewTaskInboxService reviewTaskInboxService;
@Autowired
private ISysDeptService iSysDeptService;
@Autowired
private ReviewSceneChangeTaskMapper reviewSceneChangeTaskMapper;
......@@ -502,6 +508,29 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
public List<ReviewSceneListResponse> getSceneList(Long detailsId) {
return reviewKeyPointMapper.getSceneList(detailsId);
}
/*
* 获取评审人员
* */
@Override
public List<SysUser> getReviewList() {
// 获取用户ID列表
List<Long> reviewerIdList = sysUserRoleMapper.selectReviewerIdByRoleId(ReviewSceneChangeTask.REVIEW_ROLE_ID);
// 获取用户列表
List<SysUser> reviewerList = sysUserService.selectUserListByIds(reviewerIdList);
for (SysUser user : reviewerList){
user.setDept(iSysDeptService.selectDeptById(user.getDeptId()));
}
return reviewerList;
}
@Override
public List<ReviewOpinionResponse> getReviewerOpinion(Long id) {
List<ReviewOpinionResponse> list = reviewSceneChangeTaskMapper.getReviewerOpinion(id);
return list;
}
}
......
......@@ -3,6 +3,7 @@ package com.ruoyi.web;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils;
......@@ -204,4 +205,30 @@ public class ReviewSceneChangeTaskController extends BaseController {
List<ReviewSceneListResponse> list = reviewSceneChangeTaskService.getSceneList(id);
return R.ok(list);
}
/*
* 获取评审人员
* */
@ApiOperation("获取评审人员")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "获取评审人员", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getReviewerList")
public R<List<SysUser>> getReviewerList(){
List<SysUser> list = reviewSceneChangeTaskService.getReviewList();
return R.ok(list);
}
/*
* 查看评审人员评审意见
* */
@ApiOperation("查看评审人员评审意见")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "查看评审人员评审意见", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getReviewerOpinion")
public R<List<ReviewOpinionResponse>> getReviewerOpinion(@Validated @RequestBody ReviewSceneChangeTaskGetInfoRequest request){
Long id = Long.parseLong(request.getId());
return R.ok(reviewSceneChangeTaskService.getReviewerOpinion(id));
}
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ApiModel(value = "ReviewOpinionResponse", description = "评审动态")
@Data
public class ReviewOpinionResponse {
@ApiModelProperty("评审员名字")
private String name;
@ApiModelProperty("评审时间")
private Date decisionTime;
@ApiModelProperty("评审结果")
private String decision;
@ApiModelProperty("评审意见")
private String comment;
}
......@@ -75,6 +75,7 @@
<if test="request.inspectStandardId != null and request.inspectStandardId != ''">
and inspect_standard_id = #{request.inspectStandardId}
</if>
ORDER BY task_begin_time ASC
</select>
<select id="findFinishListByUserId" resultType="com.ruoyi.web.response.ReviewSceneChangeTaskResponse">
......@@ -94,6 +95,7 @@
<if test="request.inspectStandardId != null and request.inspectStandardId != ''">
and inspect_standard_id = #{request.inspectStandardId}
</if>
ORDER BY task_begin_time ASC
</select>
<select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
......@@ -114,6 +116,7 @@
<if test="request.inspectStandardId != null and request.inspectStandardId != ''">
and inspect_standard_id = #{request.inspectStandardId}
</if>
ORDER BY task_begin_time ASC
</select>
<select id="findSceneChangeTaskById" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
......@@ -160,5 +163,10 @@
from t_review_scene_change_task_user_relation
where task_id = #{id}
</select>
<select id="getReviewerOpinion" resultType="com.ruoyi.web.response.ReviewOpinionResponse">
select name,comment,decision,decision_time
from t_review_scene_change_task_user_relation
where task_id = #{id}
</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