Commit e9b4f431 authored by yuanshuo's avatar yuanshuo

2024/11/27新增和修改方法

获取用户暂存任务时 新增获取字段enterpriseId和enterpriseName
更改获取任务Leader相关逻辑代码,获取前端传过来的用户第一个isLeader属性是1的
给审查标准、要点、细则、场景加deleted字段
parent e0c90a67
......@@ -89,4 +89,7 @@ public class ReviewDetails {
@TableField(exist = false)
private String reviewKeypointText;
@ApiModelProperty("逻辑删除")
private Integer deleted;
}
......@@ -55,5 +55,8 @@ public class ReviewKeyPoint {
@TableField(exist = false)
private List<ReviewDetails> reviewDetailsList;
@ApiModelProperty("逻辑删除")
private Integer deleted;
}
......@@ -45,4 +45,7 @@ public class ReviewScene {
@ApiModelProperty("审查细则id")
private Long reviewDetailsId;
@ApiModelProperty("逻辑删除")
private Integer deleted;
}
......@@ -117,4 +117,7 @@ public class ReviewStandard {
@ApiModelProperty("不符合")
private String inconformity;
@ApiModelProperty("逻辑删除")
private Integer deleted;
}
......@@ -200,13 +200,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
TaskUserRelation leader = null;
List<TaskUserRelation> auditors = request.getAuditors();
for(TaskUserRelation auditor : auditors) {
List<Long> roleIdList = sysUserRoleMapper.selectRoleIdByUserId(auditor.getUserId());
for (Long roleId : roleIdList){
if (roleId.equals(112L)){
if(auditor.getIsLeader() == 1){
leader = auditor;
auditor.setIsLeader(1);
break;
}
}
if (leader != null){
break;
......@@ -345,13 +340,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
TaskUserRelation leader = null;
List<TaskUserRelation> auditors = request.getAuditors();
for(TaskUserRelation auditor : auditors) {
List<Long> roleIdList = sysUserRoleMapper.selectRoleIdByUserId(auditor.getUserId());
for (Long roleId : roleIdList){
if (roleId.equals(112L)){
if(auditor.getIsLeader() ==1){
leader = auditor;
auditor.setIsLeader(1);
break;
}
}
if (leader != null){
break;
......@@ -616,13 +606,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
TaskUserRelation leader = null;
List<TaskUserRelation> auditors = request.getAuditors();
for(TaskUserRelation auditor : auditors) {
List<Long> roleIdList = sysUserRoleMapper.selectRoleIdByUserId(auditor.getUserId());
for (Long roleId : roleIdList){
if (roleId.equals(112L)){
if(auditor.getIsLeader() == 1){
leader = auditor;
auditor.setIsLeader(1);
break;
}
}
if (leader != null){
task.setLeaderId(leader.getUserId());
......@@ -698,13 +683,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
TaskUserRelation leader = null;
List<TaskUserRelation> auditors = request.getAuditors();
for(TaskUserRelation auditor : auditors) {
List<Long> roleIdList = sysUserRoleMapper.selectRoleIdByUserId(auditor.getUserId());
for (Long roleId : roleIdList){
if (roleId.equals(112L)){
if(auditor.getIsLeader() == 1){
leader = auditor;
auditor.setIsLeader(1);
break;
}
}
if (leader != null){
task.setLeaderId(leader.getUserId());
......@@ -765,7 +745,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// String taskList = response.getTaskList().substring(1);
// response.setTaskList(taskList);
// }
response.setEnterpriseName(task.getEnterpriseName());
response.setEnterpriseId(String.valueOf(task.getEnterpriseId()));
// 小组成员
response.setAuditors(setAuditors(task.getId()));
......
......@@ -15,7 +15,7 @@
<foreach collection="reviewKeyPointList" item="keyPoint" open="(" separator="," close=")">
#{keyPoint.id}
</foreach>
AND deleted != 1
</select>
<select id="findNoResult" resultType="com.ruoyi.domain.ReviewDetails">
......
......@@ -10,6 +10,7 @@
<foreach collection="reviewStandardList" item="standard" open="(" separator="," close=")">
#{standard.id}
</foreach>
AND deleted != 1
</select>
<select id="findKeyPointList" resultType="com.ruoyi.domain.ReviewKeyPoint">
SELECT id, text, review_standard_id FROM t_review_keypoint
......
......@@ -36,7 +36,9 @@
</select>
<select id="findListByStandardIdAndType" resultType="com.ruoyi.domain.ReviewStandard">
SELECT id, type, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard WHERE standard_id = #{standardId} AND type = #{type};
SELECT id, type, chapter, text, standard_id, name, standard_no, file, conformity, inconformity
FROM t_review_standard
WHERE standard_id = #{standardId} AND type = #{type} AND deleted != 1;
</select>
<select id="selectReviewStandardList" parameterType="com.ruoyi.web.request.ReviewStandardListByPageRequest" resultType="com.ruoyi.web.response.ReviewStandardResponse">
......
......@@ -264,7 +264,7 @@
task_initiator_id,task_initiator,task_initiator_dept,
task_begin_time,task_end_time,create_time,
leader_id,leader,standard_id,name,
standard_no,file,task_list
standard_no,file,task_list,enterprise_id,enterprise_name
FROM t_task
WHERE task_initiator_id = #{userId} and task_status = 'TEMPORARILY'
</select>
......
......@@ -634,10 +634,11 @@ public class SysUserServiceImpl implements ISysUserService
sysUserVONew.setRoleId(roleId);
}
// 使用Stream API进行去重,基于userId字段
/*List<SysUserVO> deduplicatedList = userList.stream()
List<SysUserVONew> deduplicatedList = userList.stream()
.filter(distinctByKey(user -> user.getUserId()))
.collect(Collectors.toList());*/
return userList;
.collect(Collectors.toList());
return deduplicatedList;
// return userList;
}
// 辅助方法,用于去重
......
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