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; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest; 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.ReviewOpinionResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.response.ReviewerListResponse; import com.ruoyi.web.response.ReviewerListResponse;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -63,6 +64,8 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang ...@@ -63,6 +64,8 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang
List<ReviewSceneChangeTaskResponse> findFinishList(@Param("userId") Long userId, @Param("request") ReviewSceneChangeTaskFindFinishRequest request); List<ReviewSceneChangeTaskResponse> findFinishList(@Param("userId") Long userId, @Param("request") ReviewSceneChangeTaskFindFinishRequest request);
List<ReviewerListResponse> selectReviewerListByTaskId(@Param("id") Long id); List<ReviewerListResponse> selectReviewerListByTaskId(@Param("id") Long id);
List<ReviewOpinionResponse> getReviewerOpinion(@Param("id") Long id);
} }
......
package com.ruoyi.service; package com.ruoyi.service;
import com.ruoyi.common.core.domain.entity.SysUser;
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.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;
import com.ruoyi.web.response.ReviewDetailsListResponse; import com.ruoyi.web.response.*;
import com.ruoyi.web.response.ReviewKeyPointListResponse;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.response.ReviewSceneListResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -120,4 +118,11 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange ...@@ -120,4 +118,11 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* 发起评审-获取场景列表 * 发起评审-获取场景列表
* */ * */
List<ReviewSceneListResponse> getSceneList(Long detailsId); 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; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.toolkit.Db; import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.R; 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.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
...@@ -17,6 +18,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService; ...@@ -17,6 +18,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.mapper.SysUserRoleMapper; import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest;
...@@ -28,6 +30,7 @@ import org.springframework.stereotype.Service; ...@@ -28,6 +30,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author wangfei * @author wangfei
...@@ -53,6 +56,9 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -53,6 +56,9 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
@Autowired @Autowired
private ReviewTaskInboxService reviewTaskInboxService; private ReviewTaskInboxService reviewTaskInboxService;
@Autowired
private ISysDeptService iSysDeptService;
@Autowired @Autowired
private ReviewSceneChangeTaskMapper reviewSceneChangeTaskMapper; private ReviewSceneChangeTaskMapper reviewSceneChangeTaskMapper;
...@@ -502,6 +508,29 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -502,6 +508,29 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
public List<ReviewSceneListResponse> getSceneList(Long detailsId) { public List<ReviewSceneListResponse> getSceneList(Long detailsId) {
return reviewKeyPointMapper.getSceneList(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; ...@@ -3,6 +3,7 @@ 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.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.common.utils.bean.BeanUtils;
...@@ -204,4 +205,30 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -204,4 +205,30 @@ public class ReviewSceneChangeTaskController extends BaseController {
List<ReviewSceneListResponse> list = reviewSceneChangeTaskService.getSceneList(id); List<ReviewSceneListResponse> list = reviewSceneChangeTaskService.getSceneList(id);
return R.ok(list); 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 @@ ...@@ -75,6 +75,7 @@
<if test="request.inspectStandardId != null and request.inspectStandardId != ''"> <if test="request.inspectStandardId != null and request.inspectStandardId != ''">
and inspect_standard_id = #{request.inspectStandardId} and inspect_standard_id = #{request.inspectStandardId}
</if> </if>
ORDER BY task_begin_time ASC
</select> </select>
<select id="findFinishListByUserId" resultType="com.ruoyi.web.response.ReviewSceneChangeTaskResponse"> <select id="findFinishListByUserId" resultType="com.ruoyi.web.response.ReviewSceneChangeTaskResponse">
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
<if test="request.inspectStandardId != null and request.inspectStandardId != ''"> <if test="request.inspectStandardId != null and request.inspectStandardId != ''">
and inspect_standard_id = #{request.inspectStandardId} and inspect_standard_id = #{request.inspectStandardId}
</if> </if>
ORDER BY task_begin_time ASC
</select> </select>
<select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask"> <select id="findCreateListByUserId" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
...@@ -114,6 +116,7 @@ ...@@ -114,6 +116,7 @@
<if test="request.inspectStandardId != null and request.inspectStandardId != ''"> <if test="request.inspectStandardId != null and request.inspectStandardId != ''">
and inspect_standard_id = #{request.inspectStandardId} and inspect_standard_id = #{request.inspectStandardId}
</if> </if>
ORDER BY task_begin_time ASC
</select> </select>
<select id="findSceneChangeTaskById" resultType="com.ruoyi.domain.ReviewSceneChangeTask"> <select id="findSceneChangeTaskById" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
...@@ -160,5 +163,10 @@ ...@@ -160,5 +163,10 @@
from t_review_scene_change_task_user_relation from t_review_scene_change_task_user_relation
where task_id = #{id} where task_id = #{id}
</select> </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> </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