| | |
| | | c.name, |
| | | c.text, |
| | | c.voice, |
| | | c.dept_id, |
| | | c.user_id, |
| | | d.dept_id, |
| | | u.user_id, |
| | | c.create_by, |
| | | c.create_time, |
| | | c.update_by, |
| | |
| | | <if test="name != null and name != ''">and name like '%'||#{name}||'%'</if> |
| | | <if test="text != null and text != ''">and text = #{text}</if> |
| | | <if test="voice != null and voice != ''">and voice = #{voice}</if> |
| | | <if test="deptId != null and deptId != 0 "> |
| | | and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </where> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectArdAppTaskById" parameterType="String" resultMap="ArdAppTaskSubResult"> |
| | |
| | | <if test="longitude != null ">and c.longitude = #{longitude}</if> |
| | | <if test="latitude != null ">and c.latitude = #{latitude}</if> |
| | | <if test="altitude != null ">and c.altitude = #{altitude}</if> |
| | | <if test="userId != null and userId != ''">and c.user_id = #{userId}</if> |
| | | <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <if test="camHeading != null ">and c.cam_heading = #{camHeading}</if> |
| | | <if test="camPitch != null ">and c.cam_pitch = #{camPitch}</if> |
| | | <if test="camRoll != null ">and c.cam_roll = #{camRoll}</if> |
| | |
| | | { |
| | | return userId != null && userId.equals("1"); |
| | | } |
| | | public boolean isApp() |
| | | { |
| | | return isApp(this.userId); |
| | | } |
| | | public boolean isApp(String userId) |
| | | { |
| | | return userId != null && this.getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().contains("appLeader")); |
| | | } |
| | | |
| | | public Long getDeptId() |
| | | { |
| | |
| | | { |
| | | SysUser currentUser = loginUser.getUser(); |
| | | // 如果是超级管理员,则不过滤数据 |
| | | if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()) |
| | | if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()&& !currentUser.isApp()) |
| | | { |
| | | String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), PermissionContextHolder.getContext()); |
| | | dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), |