feat: 装修测量阶段+设计阶段流程优化
This commit is contained in:
@@ -46,7 +46,8 @@ public class RedisUtilConfig {
|
||||
jedisPoolConfig.setTestOnBorrow(false);
|
||||
|
||||
List<JedisShardInfo> shards = new ArrayList<>();
|
||||
JedisShardInfo jedisShardInfo = new JedisShardInfo(REDIS_HOST_URI);
|
||||
JedisShardInfo jedisShardInfo = new JedisShardInfo("121.37.140.51",9101);
|
||||
jedisShardInfo.setPassword("Q1w2e3r4t5");
|
||||
shards.add(jedisShardInfo);
|
||||
redisUtil.setShardedJedisPool(new ShardedJedisPool(jedisPoolConfig, shards));
|
||||
return redisUtil;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.DecorationMeasureRequest;
|
||||
import com.cool.store.vo.DecorationMeasureVO;
|
||||
|
||||
public interface DecorationMeasureService {
|
||||
|
||||
/**
|
||||
* 根据门店ID获取获取测量数据数据
|
||||
*
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
DecorationMeasureVO getDecorationMeasureByShopId(Long shopId);
|
||||
|
||||
/**
|
||||
* 提交测量数据
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean submitDecorationMeasure(DecorationMeasureRequest request);
|
||||
|
||||
/**
|
||||
* 保存测量数据
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean saveDecorationMeasure(DecorationMeasureRequest request);
|
||||
}
|
||||
@@ -163,4 +163,12 @@ public interface DecorationService {
|
||||
* @return
|
||||
*/
|
||||
Boolean confirmComplete(Long shopId, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* 保存设计数据
|
||||
* @param request
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user);
|
||||
}
|
||||
|
||||
@@ -177,4 +177,13 @@ public interface DeskService {
|
||||
*/
|
||||
PageInfo<PreparationCommonPendingVO> buildInformationPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* 测量阶段
|
||||
* @param pageNum
|
||||
* @param pageSize
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PreparationCommonPendingVO> measurePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.UserAuthMappingDO;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.response.oppty.UserResponse;
|
||||
import com.cool.store.request.SysRoleRequest;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -20,6 +20,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 获取用户权限
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@@ -27,6 +28,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 获取用户授权的所有区域id
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@@ -34,6 +36,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 获取用户授权的所有门店id
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@@ -41,6 +44,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
||||
*
|
||||
* @param userRoleEnum
|
||||
* @param wantShopAreaId
|
||||
* @return
|
||||
@@ -49,6 +53,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 获取有区域权限和职位 的人
|
||||
*
|
||||
* @param userRoleEnum
|
||||
* @param regionId
|
||||
* @return
|
||||
@@ -59,13 +64,16 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 获取有区域权限和职位 所有人
|
||||
*
|
||||
* @param userRoleEnum
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserDO> getUserByRoleEnumAndRegionIdList(UserRoleEnum userRoleEnum, Long regionId);
|
||||
|
||||
/**
|
||||
* 跟进角色和战区获取用户id
|
||||
*
|
||||
* @param roleIds
|
||||
* @param regionId
|
||||
* @return
|
||||
@@ -74,6 +82,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@@ -81,6 +90,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 【铺位1】所属战区没有战区经理、营运经理和大区经理,开店负责人展示【王磊】
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getShopManagerUserId();
|
||||
@@ -88,6 +98,7 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 找督导,如果小区没有督导则带入战区经理,没有战区经理则带入大区经理、如果都没有则带入王磊
|
||||
*
|
||||
* @param supervision
|
||||
* @param regionId
|
||||
* @return
|
||||
@@ -95,4 +106,12 @@ public interface UserAuthMappingService {
|
||||
EnterpriseUserDO hierarchicalSearch(UserRoleEnum supervision, Long regionId);
|
||||
|
||||
PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 根据角色查询用户列表
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserDO> findUserListByRole(SysRoleRequest request);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.DecorationMeasureDAO;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.DecorationMeasureDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.request.DecorationMeasureRequest;
|
||||
import com.cool.store.service.DecorationMeasureService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.DecorationMeasureVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||
|
||||
private final DecorationMeasureDAO decorationMeasureDAO;
|
||||
private final EnterpriseUserDAO enterpriseUserDAO;
|
||||
private final RedisUtilPool redisUtilPool;
|
||||
private final ShopStageInfoDAO shopStageInfoDAO;
|
||||
private final ShopInfoDAO shopInfoDAO;
|
||||
private final CommonService commonService;
|
||||
@Resource
|
||||
private LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Override
|
||||
public DecorationMeasureVO getDecorationMeasureByShopId(Long shopId) {
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||
if (measureDO == null) {
|
||||
return new DecorationMeasureVO();
|
||||
}
|
||||
|
||||
DecorationMeasureVO measureVO = BeanUtil.toBean(measureDO, DecorationMeasureVO.class);
|
||||
|
||||
// 收集需要查询的用户ID
|
||||
Set<String> userIds = new HashSet<>();
|
||||
Optional.ofNullable(measureVO.getMeasureUserId()).ifPresent(userIds::add);
|
||||
Optional.ofNullable(measureVO.getDesignUserId()).ifPresent(userIds::add);
|
||||
|
||||
// 只有当有用户ID需要查询时才进行查询
|
||||
if (!userIds.isEmpty()) {
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
measureVO.setMeasureUserName(userNameMap.getOrDefault(measureVO.getMeasureUserId(), null));
|
||||
measureVO.setDesignUserName(userNameMap.getOrDefault(measureVO.getDesignUserId(), null));
|
||||
}
|
||||
|
||||
return measureVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitDecorationMeasure(DecorationMeasureRequest request) {
|
||||
// 重复提交校验(3秒内不能重复提交)
|
||||
String lockKey = "submitDecorationMeasure:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
ShopStageInfoDO subStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_6);
|
||||
// 获取当前登录用户
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
DecorationMeasureDO saveDO = request.buildDecorationMeasureDO();
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(request.getShopId());
|
||||
if (Objects.nonNull(measureDO)) {
|
||||
// 更新已有数据
|
||||
BeanUtil.copyProperties(saveDO, measureDO, "id");
|
||||
measureDO.setSubmitTime(new Date());
|
||||
decorationMeasureDAO.updateByPrimaryKeySelective(measureDO, user.getUserId());
|
||||
Integer currentStatus = subStage.getShopSubStageStatus();
|
||||
|
||||
// 处理状态861->862
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus().equals(currentStatus)) {
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90));
|
||||
// 给测量员发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), request.getMeasureUserId());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
// 处理状态862->863
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus().equals(currentStatus)) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_863);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
} else {
|
||||
// 插入新数据
|
||||
saveDO.setSubmitTime(new Date());
|
||||
decorationMeasureDAO.insertSelective(saveDO, user.getUserId());
|
||||
// 更新设计状态和测量状态
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),
|
||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90));
|
||||
// 给测量员发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), request.getMeasureUserId());
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送测量消息给测量员
|
||||
*/
|
||||
private void sendMeasureUserMessage(Long shopId, String userId) {
|
||||
// 获取商店信息
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
if (shopInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>(4);
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(
|
||||
Collections.singletonList(userId),
|
||||
MessageEnum.MESSAGE_55,
|
||||
map
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean saveDecorationMeasure(DecorationMeasureRequest request) {
|
||||
// 参数校验
|
||||
if (request == null || request.getShopId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
// 获取当前登录用户
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
DecorationMeasureDO saveDO = request.buildDecorationMeasureDO();
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(request.getShopId());
|
||||
|
||||
if (Objects.nonNull(measureDO)) {
|
||||
// 更新已有数据
|
||||
BeanUtil.copyProperties(saveDO, measureDO, "id");
|
||||
decorationMeasureDAO.updateByPrimaryKeySelective(measureDO, user.getUserId());
|
||||
} else {
|
||||
// 插入新数据
|
||||
decorationMeasureDAO.insertSelective(saveDO, user.getUserId());
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
@@ -6,19 +6,15 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.decoration.*;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.request.*;
|
||||
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
@@ -27,11 +23,9 @@ import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -40,12 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -99,6 +88,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
RedisUtilPool redisUtilPool;
|
||||
@Resource
|
||||
DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||
@Resource
|
||||
DecorationMeasureDAO decorationMeasureDAO;
|
||||
|
||||
@Override
|
||||
public DesignInfoVo DesignInfo(Long shopId) {
|
||||
return null;
|
||||
@@ -349,7 +341,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
if (!request.miniCheck()){
|
||||
if (!request.miniCheck()) {
|
||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||
}
|
||||
//加盟商
|
||||
@@ -383,7 +375,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) {
|
||||
List<Long> regions = new ArrayList<>();
|
||||
if ( !sysRoleService.checkIsAdmin(user.getUserId())){
|
||||
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||
for (String authRegionId : authRegionIds) {
|
||||
regions.add(Long.parseLong(authRegionId));
|
||||
@@ -543,25 +535,58 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
// //必须是待提交状态才能提交
|
||||
// ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
||||
// if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
// throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||
// }
|
||||
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (Objects.nonNull(decoration)) {
|
||||
//更新设计阶段状态
|
||||
ShopStageInfoDO subStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||
decorationDesignInfoDO.setId(decoration.getId());
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
decorationDesignInfoDO.setDesignSubmitTime(new Date());
|
||||
}
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
decorationDesignInfoDO.setQuotationSubmitTime(new Date());
|
||||
}
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
} else {
|
||||
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("shopName", shopInfo.getShopName());
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||
// 给设计师发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903);
|
||||
// 给报价员发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), request.getQuotationUserId(), MessageEnum.MESSAGE_55);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
//更新设计阶段状态=待确认,装修子流程=待进场
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("shopName", shopInfo.getShopName());
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||
// 发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), shopInfo.getInvestmentManager(), MessageEnum.MESSAGE_36);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
} else {
|
||||
decorationDesignInfoDO.setCreateTime(new Date());
|
||||
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||
decorationDesignInfoDO.setDesignSubmitTime(new Date());
|
||||
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||
// 给设计师发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
@@ -572,16 +597,29 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||
if (!Objects.isNull(decoration)) {
|
||||
if (decoration == null) {
|
||||
//查询测量阶段的设计组长
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||
if (measureDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||
decorationDesignVO.setDesignUrl(decoration.getDesignUrl());
|
||||
decorationDesignVO.setRemark(decoration.getRemark());
|
||||
decorationDesignVO.setQuotationUrl(decoration.getQuotationUrl());
|
||||
decorationDesignVO.setShopId(decoration.getShopId());
|
||||
decorationDesignVO.setPartnerAcceptanceSignatures(decoration.getPartnerAcceptanceSignatures());
|
||||
decorationDesignVO.setDesignUserId(measureDO.getDesignUserId());
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getMeasureUserId().toString());
|
||||
decorationDesignVO.setDesignUserName(userName);
|
||||
return decorationDesignVO;
|
||||
}
|
||||
return null;
|
||||
DecorationDesignVO decorationDesignVO = BeanUtil.toBean(decoration, DecorationDesignVO.class);
|
||||
//查询员工名称
|
||||
Set<String> userIds = new HashSet<>();
|
||||
Optional.ofNullable(decorationDesignVO.getDesignLeaderId()).ifPresent(userIds::add);
|
||||
Optional.ofNullable(decorationDesignVO.getDesignUserId()).ifPresent(userIds::add);
|
||||
Optional.ofNullable(decorationDesignVO.getQuotationUserId()).ifPresent(userIds::add);
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
decorationDesignVO.setDesignLeaderName(userNameMap.get(decorationDesignVO.getDesignLeaderId()));
|
||||
decorationDesignVO.setQuotationUserName(userNameMap.get(decorationDesignVO.getQuotationUserId()));
|
||||
decorationDesignVO.setDesignUserName(userNameMap.get(decorationDesignVO.getDesignUserId()));
|
||||
return decorationDesignVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -638,10 +676,10 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (StringUtils.isBlank(decoration.getQuotationUrl())){
|
||||
if (StringUtils.isBlank(decoration.getQuotationUrl())) {
|
||||
throw new ServiceException(ErrorCodeEnum.QUOTATION_URL_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(decoration.getDesignUrl())){
|
||||
if (StringUtils.isBlank(decoration.getDesignUrl())) {
|
||||
throw new ServiceException(ErrorCodeEnum.DESIGN_URL_REQUIRED);
|
||||
}
|
||||
//重复提交校验 3秒内不能重复提交
|
||||
@@ -653,20 +691,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
if (Objects.nonNull(decoration)) {
|
||||
decorationDesignInfoDO.setId(decoration.getId());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
BeanUtil.copyProperties(decorationDesignInfoDO, decoration, "id");
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||
}
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_36,
|
||||
map);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91));
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -698,7 +727,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||
if(StringUtils.isAnyBlank(request.getShopDoorwayPhoto(),request.getShopInteriorPhoto())){
|
||||
if (StringUtils.isAnyBlank(request.getShopDoorwayPhoto(), request.getShopInteriorPhoto())) {
|
||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||
}
|
||||
//营运部 验收签名
|
||||
@@ -767,6 +796,25 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
||||
//校验参数
|
||||
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (Objects.nonNull(decoration)) {
|
||||
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||
decorationDesignInfoDO.setId(decoration.getId());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
} else {
|
||||
decorationDesignInfoDO.setCreateTime(new Date());
|
||||
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
private DecorationDTO getDecorationDTO(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
@@ -783,4 +831,25 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送测量消息给测量员
|
||||
*/
|
||||
private void sendMeasureUserMessage(Long shopId, String userId, MessageEnum messageEnum) {
|
||||
// 获取商店信息
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
if (shopInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>(4);
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(
|
||||
Collections.singletonList(userId),
|
||||
messageEnum,
|
||||
map
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.DeskStageDTO;
|
||||
import com.cool.store.dto.InvestmentCountDTO;
|
||||
import com.cool.store.dto.PendingCountDTO;
|
||||
import com.cool.store.dto.DeskStageDTO;
|
||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
@@ -25,7 +25,10 @@ import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.vo.BaseInfoVO;
|
||||
import com.cool.store.vo.LabelBaseInfoVO;
|
||||
import com.cool.store.vo.desk.*;
|
||||
import com.cool.store.vo.desk.IntendPendingVO;
|
||||
import com.cool.store.vo.desk.PayStagePendingVO;
|
||||
import com.cool.store.vo.desk.PreparationCommonPendingVO;
|
||||
import com.cool.store.vo.desk.SigningPendingVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -504,27 +507,47 @@ public class DeskServiceImpl implements DeskService {
|
||||
}
|
||||
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())) {
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
||||
}
|
||||
}
|
||||
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) {
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus());
|
||||
}
|
||||
if (userRoleIds.contains(UserRoleEnum.VICE_PRESIDENT_IN_CHARGE.getCode()) ) {
|
||||
if (userRoleIds.contains(UserRoleEnum.VICE_PRESIDENT_IN_CHARGE.getCode())) {
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
||||
}
|
||||
if (userRoleIds.contains(UserRoleEnum.PRESIDENT.getCode()) ) {
|
||||
if (userRoleIds.contains(UserRoleEnum.PRESIDENT.getCode())) {
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
||||
}
|
||||
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
||||
if(isAdmin){
|
||||
if (isAdmin) {
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus());
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
||||
}
|
||||
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin?null:user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin?Boolean.FALSE:Boolean.TRUE);
|
||||
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PreparationCommonPendingVO> measurePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_8_6,
|
||||
Arrays.asList(SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus(),SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus()), Boolean.FALSE);
|
||||
List<PreparationCommonPendingVO> list = pageInfo.getList();
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return pageInfo;
|
||||
}
|
||||
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
||||
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||
doThing(deskStageMap, subStageList);
|
||||
for (PreparationCommonPendingVO vo : list) {
|
||||
if (deskStageMap.get(vo.getShopId()) != null) {
|
||||
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||
}
|
||||
}
|
||||
pageInfo.setList(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用查询
|
||||
|
||||
@@ -204,7 +204,7 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_150);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, list);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.EnterpriseUserRoleDao;
|
||||
import com.cool.store.dao.RegionAreaConfigDao;
|
||||
import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.entity.*;
|
||||
@@ -11,6 +12,7 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.RegionMapper;
|
||||
import com.cool.store.mapper.SysRoleMapper;
|
||||
import com.cool.store.mapper.UserAuthMappingMapper;
|
||||
import com.cool.store.request.SysRoleRequest;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.utils.RedisConstantUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
@@ -71,6 +73,10 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
@Value("${spring.profiles.active}")
|
||||
private String active;
|
||||
|
||||
@Resource
|
||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserAuthMappingDO> listUserAuthMappingByUserId(String userId) {
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
@@ -305,7 +311,7 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
@Override
|
||||
public String getShopManagerUserId() {
|
||||
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
||||
return isOnline ? CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_ONLINE : CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_TEST;
|
||||
return isOnline ? CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_ONLINE : CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_TEST;
|
||||
}
|
||||
|
||||
// 查找有战区权限的人
|
||||
@@ -399,11 +405,11 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
private String getDefaultJobnumber(UserRoleEnum userRoleEnum) {
|
||||
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
||||
// 如果找不到招商专员,则分配给默认的招商经理
|
||||
if (UserRoleEnum.INVESTMENT_COMMISSIONER.equals(userRoleEnum)|| UserRoleEnum.STRONG_INVESTMENT_COMMISSIONER.equals(userRoleEnum)) {
|
||||
return isOnline ? CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_ONLINE : CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_TEST;
|
||||
if (UserRoleEnum.INVESTMENT_COMMISSIONER.equals(userRoleEnum) || UserRoleEnum.STRONG_INVESTMENT_COMMISSIONER.equals(userRoleEnum)) {
|
||||
return isOnline ? CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_ONLINE : CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_TEST;
|
||||
} else if (UserRoleEnum.SELECT_SITE_COMMISSIONER.equals(userRoleEnum)) {
|
||||
// 如果找不到选址专员,则分配给默认的选址经理
|
||||
return isOnline ? CommonConstants.DEAULT_SELECT_SITE_MANAGER_ONLINE : CommonConstants.DEAULT_SELECT_SITE_MANAGER_TEST;
|
||||
return isOnline ? CommonConstants.DEAULT_SELECT_SITE_MANAGER_ONLINE : CommonConstants.DEAULT_SELECT_SITE_MANAGER_TEST;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -420,32 +426,32 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
List<RegionDO> bigRegions = regionByRegionIds.stream().filter(item -> Constants.ONE_STRING.equals(item.getThirdRegionType())).collect(Collectors.toList());
|
||||
RegionDO fightRegion = new RegionDO();
|
||||
RegionDO bigRegion = new RegionDO();
|
||||
if (CollectionUtils.isNotEmpty(fightRegions)){
|
||||
if (CollectionUtils.isNotEmpty(fightRegions)) {
|
||||
fightRegion = fightRegions.get(0);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(bigRegions)){
|
||||
if (CollectionUtils.isNotEmpty(bigRegions)) {
|
||||
bigRegion = bigRegions.get(0);
|
||||
}
|
||||
try {
|
||||
if (Objects.isNull(supervisionUser)){
|
||||
if (Objects.isNull(supervisionUser)) {
|
||||
//战区经理
|
||||
EnterpriseUserDO theaterManager = getUserByRoleEnumAndRegionId(UserRoleEnum.THEATER_MANAGER, fightRegion.getId());
|
||||
if (Objects.isNull(theaterManager)){
|
||||
if (Objects.isNull(theaterManager)) {
|
||||
//大区总
|
||||
EnterpriseUserDO regionManager = getUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, bigRegion.getId());
|
||||
if (Objects.isNull(regionManager)){
|
||||
if (Objects.isNull(regionManager)) {
|
||||
EnterpriseUserDO userInfoByJobnumber = enterpriseUserDAO.getUserInfoByJobnumber(Constants.WANG_LEI_JOB_NUMBER);
|
||||
if (Objects.isNull(userInfoByJobnumber)){
|
||||
if (Objects.isNull(userInfoByJobnumber)) {
|
||||
throw new ServiceException("找不到督导");
|
||||
}else {
|
||||
} else {
|
||||
return userInfoByJobnumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
return theaterManager;
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("hierarchicalSearch errorMessage:{}",e.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("hierarchicalSearch errorMessage:{}", e.getMessage());
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
}
|
||||
|
||||
@@ -454,11 +460,24 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
|
||||
@Override
|
||||
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
|
||||
return new PageInfo<>(allUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EnterpriseUserDO> findUserListByRole(SysRoleRequest request) {
|
||||
UserRoleEnum userRoleEnum = UserRoleEnum.getByDesc(request.getRoleName());
|
||||
List<String> hasRoleUserIdList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Collections.singletonList(userRoleEnum.getCode()));
|
||||
if (CollectionUtils.isEmpty(hasRoleUserIdList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(hasRoleUserIdList)) {
|
||||
return enterpriseUserDAO.findUserInfoByUserIdsAndKeyword(hasRoleUserIdList, request.getKeyword());
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
private List<String> extractNumbers(String regionPath) {
|
||||
List<String> regionIds = new ArrayList<>();
|
||||
Pattern pattern = Pattern.compile("\\d+");
|
||||
|
||||
Reference in New Issue
Block a user