| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | String dataScope = sysUser.getDataScope(); |
| | | List<MgtDeptStaffListVo> deptStaffListVoList; |
| | | if(dataScope.equals("4")){ |
| | | if(dataScope!=null&&dataScope.equals("4")){ |
| | | deptStaffListVoList = sysStaffMapper.listMgtDeptStaffByDept(sysUser.getDeptId(),null); |
| | | }else if(dataScope.equals("5")){ |
| | | }else if(dataScope!=null&&dataScope.equals("5")){ |
| | | deptStaffListVoList = sysStaffMapper.listMgtDeptStaffByDept(sysUser.getDeptId(),sysUser.getUserId()); |
| | | }else{ |
| | | deptStaffListVoList = sysStaffMapper.listMgtDeptStaff(); |
| | |
| | | queryWrapper.eq(SysStaff::getDelFlag,0); |
| | | queryWrapper.eq(SysStaff::getStaffMobile,mgtStaffEditDto.getStaffMobile()); |
| | | SysStaff sysStaffSame = this.getOne(queryWrapper, false); |
| | | if(StringUtils.isBlank(mgtStaffEditDto.getStaffAvatar())){ |
| | | mgtStaffEditDto.setStaffAvatar("https://hongruitang.oss-cn-beijing.aliyuncs.com/default.png"); |
| | | } |
| | | if(mgtStaffEditDto.getSysUserId()!=null){ |
| | | if(sysStaffSame!=null&&!sysStaffSame.getUserId().equals(mgtStaffEditDto.getSysUserId())){ |
| | | throw new ServiceException(AppErrorConstant.STAFF_MOBILE_DOUBLE); |