61541 - 项目未符合项跟踪,系统管理员拥有最大权限,其它角色的用户只能查看跟自己相关的数据。
This commit is contained in:
+9
-6
@@ -80,12 +80,15 @@
|
|||||||
or prehomo_flow_task_status =#{ncrTrackVO.inconformity} or prehomo_flow_task_status =#{ncrTrackVO.track}
|
or prehomo_flow_task_status =#{ncrTrackVO.inconformity} or prehomo_flow_task_status =#{ncrTrackVO.track}
|
||||||
or verify_flow_task_status =#{ncrTrackVO.inconformity} or verify_flow_task_status =#{ncrTrackVO.track}
|
or verify_flow_task_status =#{ncrTrackVO.inconformity} or verify_flow_task_status =#{ncrTrackVO.track}
|
||||||
)
|
)
|
||||||
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
<!--如果当前操作人不是系统管理员角色,查询跟自己相关的数据,如果是系统管理员,查询所有的-->
|
||||||
and (pli.regulation_owner_id =#{ncrTrackVO.userId}
|
<if test="ncrTrackVO.administrator == 'false'">
|
||||||
or pli.homologation_engineer_id =#{ncrTrackVO.userId}
|
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
||||||
or pli.engineering_interface_person =#{ncrTrackVO.userId}
|
and (pli.regulation_owner_id =#{ncrTrackVO.userId}
|
||||||
or ptid.user_id =#{ncrTrackVO.userId}
|
or pli.homologation_engineer_id =#{ncrTrackVO.userId}
|
||||||
)
|
or pli.engineering_interface_person =#{ncrTrackVO.userId}
|
||||||
|
or ptid.user_id =#{ncrTrackVO.userId}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
order by pli.create_time desc
|
order by pli.create_time desc
|
||||||
|
|
||||||
|
|||||||
+5
@@ -80,6 +80,11 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
|
|
||||||
ncrTrackVO.setInconformity(ReviewResultEnum.INCONFORMITY.getValue());
|
ncrTrackVO.setInconformity(ReviewResultEnum.INCONFORMITY.getValue());
|
||||||
ncrTrackVO.setTrack(ReviewResultEnum.TO_TRACK.getValue());
|
ncrTrackVO.setTrack(ReviewResultEnum.TO_TRACK.getValue());
|
||||||
|
|
||||||
|
//如果当前登录用户是系统管理员角色,可以查看所有的数据
|
||||||
|
boolean administrator = this.sysUserService.isAdministrator();
|
||||||
|
ncrTrackVO.setAdministrator(administrator ? "true":"false");
|
||||||
|
|
||||||
List<NcrTrackVO> infoList = ncrTrackMapper.getInfoList(ncrTrackVO);
|
List<NcrTrackVO> infoList = ncrTrackMapper.getInfoList(ncrTrackVO);
|
||||||
infoList = infoList.stream().distinct().collect(Collectors.toList());
|
infoList = infoList.stream().distinct().collect(Collectors.toList());
|
||||||
List<NcrTrackVO> trackVOList = new ArrayList<>();
|
List<NcrTrackVO> trackVOList = new ArrayList<>();
|
||||||
|
|||||||
+2
-2
@@ -137,8 +137,8 @@ public class NcrTrackVO implements Serializable {
|
|||||||
private String projectTaskInventoryDetailId;
|
private String projectTaskInventoryDetailId;
|
||||||
//任务节点定义key
|
//任务节点定义key
|
||||||
private String taskDefinitionKey;
|
private String taskDefinitionKey;
|
||||||
|
//是否是系统管理员角色
|
||||||
|
private String administrator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user