| | |
| | | package cn.huge.module.ctuser.service; |
| | | |
| | | import cn.huge.base.common.bo.R; |
| | | import cn.huge.base.common.bo.ReturnBO; |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.*; |
| | |
| | | import cn.huge.module.ctuser.domain.po.*; |
| | | import cn.huge.module.ctuser.dto.*; |
| | | import cn.huge.module.cust.constant.UserBaseConsts; |
| | | import cn.huge.module.rsoper.domain.po.RsRole; |
| | | import cn.huge.module.sys.dto.GridTokenBaseDTO; |
| | | import cn.huge.module.sys.dto.GridUserBaseDTO; |
| | | import cn.huge.module.sys.dto.GridUserRoleDTO; |
| | | import cn.huge.module.sys.vo.GridRoleMenuVo; |
| | | import cn.huge.module.sys.vo.GridUserRoleVo; |
| | | import cn.huge.module.utils.JwtUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | |
| | | } else if (parts.length >= 4) { |
| | | return parts[0] + parts[1] + parts[2] + "-" + parts[3]; |
| | | } else if (parts.length >= 5) { |
| | | return parts[0] + parts[1] + parts[2] + "-" + parts[3]+"-" + parts[4]; |
| | | return parts[0] + parts[1] + parts[2] + "-" + parts[3] + "-" + parts[4]; |
| | | } else { |
| | | return input; // 或抛出异常 |
| | | } |
| | |
| | | GridUserRoleVo gridUserRoleVo = new GridUserRoleVo(); |
| | | gridUserRoleVo.setUserId(userId); |
| | | GridUserRoleDTO userRoleDTO = sysClient.getUserRoleList(gridUserRoleVo); |
| | | if (StringUtils.isEmpty(userRoleDTO.getRoleName()) || !userRoleDTO.getRoleName().contains("(M)")) { |
| | | if (StringUtils.isEmpty(userRoleDTO.getRoleName()) || (!userRoleDTO.getRoleName().contains("(M)") && !userRoleDTO.getRoleName().contains("领导") && !userRoleDTO.getRoleName().contains("调度干部"))) { |
| | | return ReturnFailUtils.getRepInfo("该用户没有矛调系统的权限"); |
| | | } |
| | | CtUserole ctUserole = new CtUserole(); |
| | |
| | | switch (grade) { |
| | | case 1: |
| | | //市级级 |
| | | ctUnit.setLevel(grade ); |
| | | ctUnit.setLevel(grade); |
| | | ctUnit.setUnitGrade(grade); |
| | | ctUnit.setUnitType(UserBaseConsts.UNIT_TYPE_102); |
| | | ctUnit.setParentId("2024000000000001"); |