|
|
@@ -46,7 +46,9 @@ import com.hz.pm.api.projectlib.model.entity.Project; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectService; |
|
|
|
import com.hz.pm.api.sys.model.dto.RegionDTO; |
|
|
|
import com.hz.pm.api.user.helper.MhUnitCache; |
|
|
|
import com.hz.pm.api.user.model.entity.UserInfo; |
|
|
|
import com.hz.pm.api.user.model.enumeration.RoleEnum; |
|
|
|
import com.hz.pm.api.user.security.model.UserInfoDetails; |
|
|
|
import com.hz.pm.api.user.service.IUserInfoService; |
|
|
|
import com.hz.pm.api.user.util.LoginUserUtil; |
|
|
@@ -105,6 +107,7 @@ public class MeetingManage { |
|
|
|
private final MhApiClient mhApiClient; |
|
|
|
private final IUserInfoService userInfoService; |
|
|
|
private final EnvironmentUtil environmentUtil; |
|
|
|
private final MhUnitCache mhUnitCache; |
|
|
|
|
|
|
|
private static final String INVITED_RULE_CREATE = "INVITED_RULE_CREATE:"; |
|
|
|
|
|
|
@@ -409,6 +412,23 @@ public class MeetingManage { |
|
|
|
.eq(req.getStatus() != null, Meeting::getStatus, req.getStatus()) |
|
|
|
.orderByDesc(Meeting::getCreateOn); |
|
|
|
meetingManageHelper.buildMeetingQuery(query, req); |
|
|
|
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); |
|
|
|
RoleEnum maxRoleAuth = userDetail.maxAuthRole(); |
|
|
|
switch (maxRoleAuth) { |
|
|
|
case SUPER_ADMIN: |
|
|
|
// 超管看所有 |
|
|
|
break; |
|
|
|
case COMPANY_MANAGER: |
|
|
|
List<Long> viewOrgIds = mhUnitCache.getViewChildIdsRecursion(userDetail.getMhUnitId()); |
|
|
|
if (viewOrgIds.isEmpty()) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
query.in(Meeting::getHoldOrgCode, viewOrgIds); |
|
|
|
break; |
|
|
|
default: |
|
|
|
query.eq(Meeting::getHoldOrgCode, userDetail.getMhUnitIdStr()); |
|
|
|
break; |
|
|
|
} |
|
|
|
Page<Meeting> page = meetingService.page(req.page(), query); |
|
|
|
if (page.getTotal() == 0) { |
|
|
|
return PageVo.empty(); |
|
|
@@ -929,6 +949,21 @@ public class MeetingManage { |
|
|
|
String meetingType = req.getMeetingType(); |
|
|
|
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getNewest, Boolean.TRUE); |
|
|
|
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); |
|
|
|
switch (userDetail.maxAuthRole()) { |
|
|
|
case SUPER_ADMIN: |
|
|
|
break; |
|
|
|
case COMPANY_MANAGER: |
|
|
|
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(userDetail.getMhUnitId()); |
|
|
|
if (CollUtil.isEmpty(viewUnitIds)) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
query.in(Project::getBuildOrgCode, viewUnitIds); |
|
|
|
break; |
|
|
|
default: |
|
|
|
query.eq(Project::getBuildOrgCode, userDetail.getMhUnitIdStr()); |
|
|
|
break; |
|
|
|
} |
|
|
|
switch (MeetingReviewTypeEnum.getByCode(meetingType)) { |
|
|
|
case PRELIMINARY_SCHEME_REVIEW: |
|
|
|
case CONSTRUCTION_SCHEME_REVIEW: |
|
|
|