|
|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.util.CollUtils; |
|
|
|
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; |
|
|
|
import com.ningdatech.pmapi.common.util.BizUtils; |
|
|
|
import com.ningdatech.pmapi.common.util.StrUtils; |
|
|
|
import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum; |
|
|
@@ -33,6 +34,7 @@ import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; |
|
|
|
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meta.helper.DictionaryCache; |
|
|
|
import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; |
|
|
|
import com.ningdatech.pmapi.sys.model.dto.RegionDTO; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
@@ -57,6 +59,7 @@ public class MeetingManageHelper { |
|
|
|
private final IMeetingExpertService meetingExpertService; |
|
|
|
private final IExpertInviteRuleService inviteRuleService; |
|
|
|
private final IExpertInviteAvoidRuleService inviteAvoidRuleService; |
|
|
|
private final RegionCacheHelper regionCacheHelper; |
|
|
|
|
|
|
|
public void checkReviewProject(MeetingBasicDTO meetingBasic) { |
|
|
|
if (meetingBasic.getIsInnerProject()) { |
|
|
@@ -125,6 +128,11 @@ public class MeetingManageHelper { |
|
|
|
} |
|
|
|
|
|
|
|
public void buildMeetingQuery(LambdaQueryWrapper<Meeting> query, MeetingListReq req) { |
|
|
|
if (StrUtils.isNotBlank(req.getRegionCode())) { |
|
|
|
List<RegionDTO> regions = regionCacheHelper.listChildren(req.getRegionCode(), req.getRegionLevel()); |
|
|
|
List<String> regionCodes = CollUtils.fieldList(regions, RegionDTO::getRegionCode); |
|
|
|
query.in(Meeting::getRegionCode, regionCodes).ge(Meeting::getRegionLevel, req.getRegionLevel()); |
|
|
|
} |
|
|
|
if (StrUtil.isNotBlank(req.getName())) { |
|
|
|
query.like(Meeting::getName, req.getName()); |
|
|
|
} |
|
|
|