@@ -48,6 +48,9 @@ public class Meeting implements Serializable { | |||||
@ApiModelProperty("地区编码") | @ApiModelProperty("地区编码") | ||||
private String regionCode; | private String regionCode; | ||||
@ApiModelProperty("地区层级") | |||||
private Integer regionLevel; | |||||
@ApiModelProperty("联系人") | @ApiModelProperty("联系人") | ||||
private String connecter; | private String connecter; | ||||
@@ -45,4 +45,10 @@ public class MeetingListReq extends PagePo { | |||||
@ApiModelProperty("项目名称") | @ApiModelProperty("项目名称") | ||||
private String projectName; | private String projectName; | ||||
@ApiModelProperty("区域编码") | |||||
private String regionCode; | |||||
@ApiModelProperty("区域层级") | |||||
private Integer regionLevel; | |||||
} | } |
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
import com.ningdatech.basic.util.CollUtils; | 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.BizUtils; | ||||
import com.ningdatech.pmapi.common.util.StrUtils; | import com.ningdatech.pmapi.common.util.StrUtils; | ||||
import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum; | 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.constant.DictExpertInfoTypeEnum; | ||||
import com.ningdatech.pmapi.meta.helper.DictionaryCache; | import com.ningdatech.pmapi.meta.helper.DictionaryCache; | ||||
import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; | import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; | ||||
import com.ningdatech.pmapi.sys.model.dto.RegionDTO; | |||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import org.apache.commons.collections4.CollectionUtils; | import org.apache.commons.collections4.CollectionUtils; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -57,6 +59,7 @@ public class MeetingManageHelper { | |||||
private final IMeetingExpertService meetingExpertService; | private final IMeetingExpertService meetingExpertService; | ||||
private final IExpertInviteRuleService inviteRuleService; | private final IExpertInviteRuleService inviteRuleService; | ||||
private final IExpertInviteAvoidRuleService inviteAvoidRuleService; | private final IExpertInviteAvoidRuleService inviteAvoidRuleService; | ||||
private final RegionCacheHelper regionCacheHelper; | |||||
public void checkReviewProject(MeetingBasicDTO meetingBasic) { | public void checkReviewProject(MeetingBasicDTO meetingBasic) { | ||||
if (meetingBasic.getIsInnerProject()) { | if (meetingBasic.getIsInnerProject()) { | ||||
@@ -125,6 +128,11 @@ public class MeetingManageHelper { | |||||
} | } | ||||
public void buildMeetingQuery(LambdaQueryWrapper<Meeting> query, MeetingListReq req) { | 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())) { | if (StrUtil.isNotBlank(req.getName())) { | ||||
query.like(Meeting::getName, req.getName()); | query.like(Meeting::getName, req.getName()); | ||||
} | } | ||||
@@ -126,6 +126,7 @@ public class MeetingManage { | |||||
meeting.setHoldOrg(userDetail.getOrganizationName()); | meeting.setHoldOrg(userDetail.getOrganizationName()); | ||||
meeting.setHoldOrgCode(userDetail.getOrganizationCode()); | meeting.setHoldOrgCode(userDetail.getOrganizationCode()); | ||||
meeting.setRegionCode(userDetail.getRegionCode()); | meeting.setRegionCode(userDetail.getRegionCode()); | ||||
meeting.setRegionLevel(userDetail.getRegionLevel()); | |||||
meeting.setCreator(userDetail.getUsername()); | meeting.setCreator(userDetail.getUsername()); | ||||
meeting.setInviteStatus(Boolean.FALSE); | meeting.setInviteStatus(Boolean.FALSE); | ||||
meeting.setConfirmedRoster(Boolean.FALSE); | meeting.setConfirmedRoster(Boolean.FALSE); | ||||
@@ -38,6 +38,7 @@ public class AgentLoginUserDetailService implements UserDetailsService { | |||||
userInfoDetails.setRealName(userFullInfoDTO.getRealName()); | userInfoDetails.setRealName(userFullInfoDTO.getRealName()); | ||||
userInfoDetails.setUserRoleList(userFullInfoDTO.getUserRoleList()); | userInfoDetails.setUserRoleList(userFullInfoDTO.getUserRoleList()); | ||||
userInfoDetails.setRegionCode(userFullInfoDTO.getRegionCode()); | userInfoDetails.setRegionCode(userFullInfoDTO.getRegionCode()); | ||||
userInfoDetails.setRegionLevel(userFullInfoDTO.getRegionLevel()); | |||||
userInfoDetails.setIdentifier(userFullInfoDTO.getIdentifier()); | userInfoDetails.setIdentifier(userFullInfoDTO.getIdentifier()); | ||||
userInfoDetails.setPassword(userFullInfoDTO.getCredential()); | userInfoDetails.setPassword(userFullInfoDTO.getCredential()); | ||||
userInfoDetails.setEmployeeCode(userFullInfoDTO.getEmployeeCode()); | userInfoDetails.setEmployeeCode(userFullInfoDTO.getEmployeeCode()); | ||||
@@ -59,6 +59,7 @@ public class CredentialLoginUserDetailService implements UserDetailsService { | |||||
userInfoDetails.setRealName(userFullInfoDTO.getRealName()); | userInfoDetails.setRealName(userFullInfoDTO.getRealName()); | ||||
userInfoDetails.setUserRoleList(userFullInfoDTO.getUserRoleList()); | userInfoDetails.setUserRoleList(userFullInfoDTO.getUserRoleList()); | ||||
userInfoDetails.setRegionCode(userFullInfoDTO.getRegionCode()); | userInfoDetails.setRegionCode(userFullInfoDTO.getRegionCode()); | ||||
userInfoDetails.setRegionLevel(userFullInfoDTO.getRegionLevel()); | |||||
userInfoDetails.setIdentifier(userFullInfoDTO.getIdentifier()); | userInfoDetails.setIdentifier(userFullInfoDTO.getIdentifier()); | ||||
userInfoDetails.setPassword(userFullInfoDTO.getCredential()); | userInfoDetails.setPassword(userFullInfoDTO.getCredential()); | ||||
userInfoDetails.setEmployeeCode(userFullInfoDTO.getEmployeeCode()); | userInfoDetails.setEmployeeCode(userFullInfoDTO.getEmployeeCode()); | ||||
@@ -27,6 +27,10 @@ public class UserFullInfoDTO { | |||||
* 所属区域编码 | * 所属区域编码 | ||||
*/ | */ | ||||
private String regionCode; | private String regionCode; | ||||
/** | |||||
* 所属区域编码 | |||||
*/ | |||||
private Integer regionLevel; | |||||
/** | /** | ||||
* 浙政钉扫码 员工code | * 浙政钉扫码 员工code | ||||
@@ -37,6 +37,11 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails { | |||||
private String regionCode; | private String regionCode; | ||||
/** | /** | ||||
* 所属区域层级 | |||||
*/ | |||||
private Integer regionLevel; | |||||
/** | |||||
* 浙政钉扫码 员工code | * 浙政钉扫码 员工code | ||||
*/ | */ | ||||
private String employeeCode; | private String employeeCode; | ||||