Merge #152 into master from cc_20260528_fix
feat:开业 * cc_20260528_fix: (1 commits squashed) - feat:开业 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/152
This commit is contained in:
@@ -451,7 +451,21 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="operationsConsultant!=null and operationsConsultant!=''">
|
<if test="operationsConsultant!=null and operationsConsultant!=''">
|
||||||
and si.operations_consultant = #{operationsConsultant}
|
and (
|
||||||
|
si.operations_consultant = #{operationsConsultant}
|
||||||
|
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||||
|
or (
|
||||||
|
si.region_id in
|
||||||
|
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
or si.invest_region_id in
|
||||||
|
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="request.shopKeyword !=null and request.shopKeyword !=''">
|
<if test="request.shopKeyword !=null and request.shopKeyword !=''">
|
||||||
and (si.shop_name like concat('%',#{request.shopKeyword},'%') or si.shop_code like concat('%',#{request.shopKeyword},'%'))
|
and (si.shop_name like concat('%',#{request.shopKeyword},'%') or si.shop_code like concat('%',#{request.shopKeyword},'%'))
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ public class DeskRequest {
|
|||||||
@ApiModelProperty(value = "签约类型")
|
@ApiModelProperty(value = "签约类型")
|
||||||
private List<Integer> signTypes;
|
private List<Integer> signTypes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "管辖区域IDs")
|
||||||
|
private List<String> authRegionIds;
|
||||||
|
|
||||||
@ApiModelProperty(value = "阶段状态")
|
@ApiModelProperty(value = "阶段状态")
|
||||||
private List<Integer> stageStatus;
|
private List<Integer> stageStatus;
|
||||||
|
|
||||||
|
|||||||
@@ -608,26 +608,35 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> openingAcceptance(DeskRequest deskRequest, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> openingAcceptance(DeskRequest deskRequest, LoginUserInfo user) {
|
||||||
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
||||||
//如果运营顾问 查询直接返回
|
|
||||||
List<Integer> stageList = new ArrayList<>();
|
boolean isSupervision = userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode());
|
||||||
Boolean flag = Boolean.FALSE;
|
boolean isOperationGeneralConsultant = userRoleIds.contains(UserRoleEnum.OPERATION_GENERAL_CONSULTANT.getCode());
|
||||||
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
|
||||||
stageList.addAll(Arrays.asList(SHOP_SUB_STAGE_STATUS_270.getShopSubStageStatus(),SHOP_SUB_STAGE_STATUS_274.getShopSubStageStatus()));
|
// 两个角色同时存在:使用OR条件一次查询
|
||||||
return operationCustomQueryList(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_27, stageList);
|
if (isSupervision && isOperationGeneralConsultant) {
|
||||||
|
List<Integer> stageList = Arrays.asList(SHOP_SUB_STAGE_STATUS_270.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_274.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_272.getShopSubStageStatus());
|
||||||
|
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(user.getUserId(), null);
|
||||||
|
return operationCustomQueryList(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_27, stageList, authRegionIds);
|
||||||
}
|
}
|
||||||
if (userRoleIds.contains(UserRoleEnum.OPERATION_GENERAL_CONSULTANT.getCode()) ) {
|
|
||||||
stageList.add(SHOP_SUB_STAGE_STATUS_272.getShopSubStageStatus());
|
// 仅运营顾问:按运营顾问ID精确查询
|
||||||
flag = Boolean.TRUE;
|
if (isSupervision) {
|
||||||
|
List<Integer> stageList = Arrays.asList(SHOP_SUB_STAGE_STATUS_270.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_274.getShopSubStageStatus());
|
||||||
|
return operationCustomQueryList(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_27, stageList, null);
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isEmpty(stageList)){
|
|
||||||
return new PageInfo<>();
|
// 仅运营总顾问:按管辖范围过滤查询
|
||||||
|
if (isOperationGeneralConsultant) {
|
||||||
|
List<Integer> stageList = Collections.singletonList(SHOP_SUB_STAGE_STATUS_272.getShopSubStageStatus());
|
||||||
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_27, stageList, Boolean.TRUE);
|
||||||
}
|
}
|
||||||
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_27, stageList, flag);
|
|
||||||
|
return new PageInfo<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> openingConfirmPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> openingConfirmPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
||||||
return operationCustomQueryList(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_30, Arrays.asList(SHOP_SUB_STAGE_STATUS_310.getShopSubStageStatus()));
|
return operationCustomQueryList(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_30, Arrays.asList(SHOP_SUB_STAGE_STATUS_310.getShopSubStageStatus()), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -940,9 +949,13 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
* @param user
|
* @param user
|
||||||
* @param shopSubStageEnum
|
* @param shopSubStageEnum
|
||||||
* @param subStageStatusList
|
* @param subStageStatusList
|
||||||
|
* @param authRegionIds 管辖区域IDs(可选,用于两角色同时存在时的OR条件)
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private PageInfo<PreparationCommonPendingVO> operationCustomQueryList(DeskRequest deskRequest, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList) {
|
private PageInfo<PreparationCommonPendingVO> operationCustomQueryList(DeskRequest deskRequest, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, List<String> authRegionIds) {
|
||||||
|
if (CollectionUtils.isNotEmpty(authRegionIds)) {
|
||||||
|
deskRequest.setAuthRegionIds(authRegionIds);
|
||||||
|
}
|
||||||
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
||||||
List<ShopStageInfoDO> specialShopStageInfo = shopStageInfoDAO.getOperationsConsultantStageInfo(null, shopSubStageEnum.getShopSubStage(),
|
List<ShopStageInfoDO> specialShopStageInfo = shopStageInfoDAO.getOperationsConsultantStageInfo(null, shopSubStageEnum.getShopSubStage(),
|
||||||
subStageStatusList, user.getUserId(), deskRequest);
|
subStageStatusList, user.getUserId(), deskRequest);
|
||||||
|
|||||||
Reference in New Issue
Block a user