|
@@ -363,14 +363,17 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
//如果修改了角色,需要重新登录
|
|
//如果修改了角色,需要重新登录
|
|
if (count > 0 || dbUserRolesList.size() != userRolesList.size()) {
|
|
if (count > 0 || dbUserRolesList.size() != userRolesList.size()) {
|
|
// 如果涉及到区协和工程师身份的互相转变,则需要判断该用户没有在途的sop
|
|
// 如果涉及到区协和工程师身份的互相转变,则需要判断该用户没有在途的sop
|
|
- Long sysCoordinatorRoleId = sysRoleService.findRoleInfoByArchivesType(RoleTypeEnum.REGION_COORDINATOR).getRoleId();
|
|
|
|
- Long sysEffectRoleId = sysRoleService.findRoleInfoByArchivesType(RoleTypeEnum.EFFECT_ENGINEER).getRoleId();
|
|
|
|
|
|
+ Long sysCoordinatorRoleId = sysRoleService.findRoleInfoByArchivesType(
|
|
|
|
+ RoleTypeEnum.REGION_COORDINATOR).getRoleId();
|
|
|
|
+ Long sysEffectRoleId = sysRoleService.findRoleInfoByArchivesType(RoleTypeEnum.EFFECT_ENGINEER)
|
|
|
|
+ .getRoleId();
|
|
Long sysAssistantRoleId = sysRoleService.findRoleInfoByArchivesType(RoleTypeEnum.ASSISTANT_ENGINEER)
|
|
Long sysAssistantRoleId = sysRoleService.findRoleInfoByArchivesType(RoleTypeEnum.ASSISTANT_ENGINEER)
|
|
.getRoleId();
|
|
.getRoleId();
|
|
|
|
|
|
- if (userRolesList.contains(sysCoordinatorRoleId) && (dbUserRolesList.contains(sysEffectRoleId) || dbUserRolesList.contains(sysAssistantRoleId))
|
|
|
|
- || ((userRolesList.contains(sysEffectRoleId) || userRolesList.contains(sysAssistantRoleId))
|
|
|
|
- && dbUserRolesList.contains(sysCoordinatorRoleId))) {
|
|
|
|
|
|
+ if (userRolesList.contains(sysCoordinatorRoleId) && (dbUserRolesList.contains(sysEffectRoleId)
|
|
|
|
+ || dbUserRolesList.contains(sysAssistantRoleId)) || (
|
|
|
|
+ (userRolesList.contains(sysEffectRoleId) || userRolesList.contains(sysAssistantRoleId))
|
|
|
|
+ && dbUserRolesList.contains(sysCoordinatorRoleId))) {
|
|
// 判断是否有在途的sop
|
|
// 判断是否有在途的sop
|
|
List<String> onPassageSopNoList = this.findOnPassageSopNoByUserId(sysUser.getId());
|
|
List<String> onPassageSopNoList = this.findOnPassageSopNoByUserId(sysUser.getId());
|
|
if (!CollectionUtils.isEmpty(onPassageSopNoList)) {
|
|
if (!CollectionUtils.isEmpty(onPassageSopNoList)) {
|
|
@@ -614,11 +617,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
.eq(TBUserArchivesAllocation::getUserId, userId));
|
|
.eq(TBUserArchivesAllocation::getUserId, userId));
|
|
dto.setHasProjectManager(count > 0);
|
|
dto.setHasProjectManager(count > 0);
|
|
|
|
|
|
- if (!dto.getHasProjectManager() && !dto.getHasRegionManager() && !dto.getHasAssistantEngineer()
|
|
|
|
- && !dto.getHasAssistantEngineer()) {
|
|
|
|
- dto.setHasEffectEngineer(true);
|
|
|
|
- dto.setHasAssistantEngineer(true);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (!dto.getHasProjectManager() && !dto.getHasRegionManager() && !dto.getHasAssistantEngineer()
|
|
|
|
+ // && !dto.getHasAssistantEngineer() && !dto.getHasQA() && !dto.getHasCustom()) {
|
|
|
|
+ // dto.setHasEffectEngineer(true);
|
|
|
|
+ // dto.setHasAssistantEngineer(true);
|
|
|
|
+ // }
|
|
if (dto.getHasThirdPmo() || dto.getHasDeviceDelivery()) {
|
|
if (dto.getHasThirdPmo() || dto.getHasDeviceDelivery()) {
|
|
Long supplierId = sysUser.getSupplierId();
|
|
Long supplierId = sysUser.getSupplierId();
|
|
if (supplierId == null || supplierId == 0) {
|
|
if (supplierId == null || supplierId == 0) {
|