|
|
|
@@ -20,12 +20,10 @@ import com.cool.store.mapper.IntentAgreementMapper;
|
|
|
|
import com.cool.store.mapper.TrainingExperienceMapper;
|
|
|
|
import com.cool.store.mapper.TrainingExperienceMapper;
|
|
|
|
import com.cool.store.request.BusinessRemarkRequest;
|
|
|
|
import com.cool.store.request.BusinessRemarkRequest;
|
|
|
|
import com.cool.store.request.DeskRequest;
|
|
|
|
import com.cool.store.request.DeskRequest;
|
|
|
|
import com.cool.store.response.DeskStageResponse;
|
|
|
|
|
|
|
|
import com.cool.store.service.DeskService;
|
|
|
|
import com.cool.store.service.DeskService;
|
|
|
|
import com.cool.store.service.RegionService;
|
|
|
|
import com.cool.store.service.RegionService;
|
|
|
|
import com.cool.store.service.SysRoleService;
|
|
|
|
import com.cool.store.service.SysRoleService;
|
|
|
|
import com.cool.store.service.UserAuthMappingService;
|
|
|
|
import com.cool.store.service.UserAuthMappingService;
|
|
|
|
import com.cool.store.utils.CoolDateUtils;
|
|
|
|
|
|
|
|
import com.cool.store.utils.StringUtil;
|
|
|
|
import com.cool.store.utils.StringUtil;
|
|
|
|
import com.cool.store.utils.poi.DateUtils;
|
|
|
|
import com.cool.store.utils.poi.DateUtils;
|
|
|
|
import com.cool.store.vo.BaseInfoVO;
|
|
|
|
import com.cool.store.vo.BaseInfoVO;
|
|
|
|
@@ -102,9 +100,9 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
private ShopStageRemarkInfoDAO shopStageRemarkInfoDAO;
|
|
|
|
private ShopStageRemarkInfoDAO shopStageRemarkInfoDAO;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId,String keyword) {
|
|
|
|
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId, String keyword) {
|
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(INTENT_5.getCode()),keyword);
|
|
|
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(INTENT_5.getCode()), keyword);
|
|
|
|
PageInfo page = new PageInfo(lineInfoDOS);
|
|
|
|
PageInfo page = new PageInfo(lineInfoDOS);
|
|
|
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
|
|
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
|
|
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
|
|
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
|
|
|
@@ -129,9 +127,9 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user,String keyword) {
|
|
|
|
public PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user, String keyword) {
|
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()),keyword);
|
|
|
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()), keyword);
|
|
|
|
PageInfo page = new PageInfo(lineInfoDOS);
|
|
|
|
PageInfo page = new PageInfo(lineInfoDOS);
|
|
|
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
|
|
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
|
|
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
|
|
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
|
|
|
@@ -158,10 +156,10 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user,String keyword) {
|
|
|
|
public PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user, String keyword) {
|
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
|
|
|
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
|
|
|
|
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode()),keyword);
|
|
|
|
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode()), keyword);
|
|
|
|
PageInfo page = new PageInfo(lineInfoDOS);
|
|
|
|
PageInfo page = new PageInfo(lineInfoDOS);
|
|
|
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
|
|
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
|
|
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
|
|
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
|
|
|
@@ -257,7 +255,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
@@ -267,10 +265,11 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
pageInfo = commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_7,
|
|
|
|
pageInfo = commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_7,
|
|
|
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
|
|
|
|
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
|
|
|
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode()) || isAdmin) {
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode())||userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())){
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode()) || isAdmin) {
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!subStageStatusList.isEmpty()) {
|
|
|
|
if (!subStageStatusList.isEmpty()) {
|
|
|
|
@@ -283,48 +282,58 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
|
|
|
|
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
|
|
|
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode()) || isAdmin) {
|
|
|
|
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus());
|
|
|
|
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode()) || isAdmin) {
|
|
|
|
|
|
|
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_83.getShopSubStageStatus());
|
|
|
|
|
|
|
|
}
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_8,
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_8,
|
|
|
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_83.getShopSubStageStatus()), Boolean.TRUE);
|
|
|
|
subStageStatusList, Boolean.TRUE);
|
|
|
|
return pageInfo;
|
|
|
|
return pageInfo;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> invoiceReturnPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> invoiceReturnPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_8_5,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_8_5,
|
|
|
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> openingAndOperationPlanPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> openingAndOperationPlanPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_14, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_14, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> trainListPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> trainListPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_5,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_5,
|
|
|
|
Collections.singletonList(SHOP_SUB_STAGE_STATUS_50.getShopSubStageStatus()), Boolean.TRUE );
|
|
|
|
Collections.singletonList(SHOP_SUB_STAGE_STATUS_50.getShopSubStageStatus()), Boolean.TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> xinFaListPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> xinFaListPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_23,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_23,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_230.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_230.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> posListPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> posListPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
|
|
|
|
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_16,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_16,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_160.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_160.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> tentPassListPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> tentPassListPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
|
|
|
|
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_24,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_24,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_240.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_240.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
@@ -332,14 +341,14 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> orderSysPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> orderSysPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_17,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, null, ShopSubStageEnum.SHOP_STAGE_17,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> designPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> designPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
//报价员和管理员不指定人,看阶段符合的全部数据
|
|
|
|
//报价员和管理员不指定人,看阶段符合的全部数据
|
|
|
|
@@ -353,10 +362,10 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903.getShopSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return commonPendingVOPageInfo(deskRequest, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_9, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE );
|
|
|
|
return commonPendingVOPageInfo(deskRequest, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_9, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
List<PreparationCommonPendingVO> list = new ArrayList<>();
|
|
|
|
List<PreparationCommonPendingVO> list = new ArrayList<>();
|
|
|
|
list = getDesignPendingVO(deskRequest, user, userRoleIds );
|
|
|
|
list = getDesignPendingVO(deskRequest, user, userRoleIds);
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
return new PageInfo<>();
|
|
|
|
return new PageInfo<>();
|
|
|
|
@@ -391,46 +400,46 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<PreparationCommonPendingVO> getDesignPendingVO( DeskRequest deskRequest, LoginUserInfo user, List<Long> userRoleIds ) {
|
|
|
|
private List<PreparationCommonPendingVO> getDesignPendingVO(DeskRequest deskRequest, LoginUserInfo user, List<Long> userRoleIds) {
|
|
|
|
//只有设计组长 查询 指定当前用户和阶段为 900 待分配设计师
|
|
|
|
//只有设计组长 查询 指定当前用户和阶段为 900 待分配设计师
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode()) && !userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode()) && !userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode())) {
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
|
|
|
List<PreparationCommonPendingVO> resultList = decorationMeasureDAO.getShopIdListByDesignUserIdAndShopStage(user.getUserId(),deskRequest );
|
|
|
|
List<PreparationCommonPendingVO> resultList = decorationMeasureDAO.getShopIdListByDesignUserIdAndShopStage(user.getUserId(), deskRequest);
|
|
|
|
List<Long> shopIds = resultList.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
List<Long> shopIds = resultList.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoDOList = shopStageRemarkInfoDAO.getByShopIdsAndStage(shopIds, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()));
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoDOList = shopStageRemarkInfoDAO.getByShopIdsAndStage(shopIds, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()));
|
|
|
|
Map<Long, List<ShopStageRemarkInfoDO>> remarkInfoMap = remarkInfoDOList.stream().collect(Collectors.groupingBy(ShopStageRemarkInfoDO::getShopId));
|
|
|
|
Map<Long, List<ShopStageRemarkInfoDO>> remarkInfoMap = remarkInfoDOList.stream().collect(Collectors.groupingBy(ShopStageRemarkInfoDO::getShopId));
|
|
|
|
for (PreparationCommonPendingVO preparationCommonPendingVO : resultList){
|
|
|
|
for (PreparationCommonPendingVO preparationCommonPendingVO : resultList) {
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoList = remarkInfoMap.getOrDefault(preparationCommonPendingVO.getShopId(), new ArrayList<>());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoList = remarkInfoMap.getOrDefault(preparationCommonPendingVO.getShopId(), new ArrayList<>());
|
|
|
|
Map<Integer, String> remarkMapByShopSubStageStatus = remarkInfoList.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, ShopStageRemarkInfoDO::getRemark));
|
|
|
|
Map<Integer, String> remarkMapByShopSubStageStatus = remarkInfoList.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, ShopStageRemarkInfoDO::getRemark));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkMapByShopSubStageStatus.getOrDefault(preparationCommonPendingVO.getSubStageStatus(), ""));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkMapByShopSubStageStatus.getOrDefault(preparationCommonPendingVO.getSubStageStatus(), ""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return resultList;
|
|
|
|
return resultList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//只有设计师 查询 指定当前用户和阶段为 901
|
|
|
|
//只有设计师 查询 指定当前用户和阶段为 901
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && !userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && !userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
|
|
|
List<PreparationCommonPendingVO> resultList = decorationDesignInfoDAO.getByDesignUserIdAndShopStage(user.getUserId(),deskRequest);
|
|
|
|
List<PreparationCommonPendingVO> resultList = decorationDesignInfoDAO.getByDesignUserIdAndShopStage(user.getUserId(), deskRequest);
|
|
|
|
List<Long> shopIds = resultList.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
List<Long> shopIds = resultList.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoDOList = shopStageRemarkInfoDAO.getByShopIdsAndStage(shopIds, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus()));
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoDOList = shopStageRemarkInfoDAO.getByShopIdsAndStage(shopIds, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus()));
|
|
|
|
Map<Long, List<ShopStageRemarkInfoDO>> remarkInfoMap = remarkInfoDOList.stream().collect(Collectors.groupingBy(ShopStageRemarkInfoDO::getShopId));
|
|
|
|
Map<Long, List<ShopStageRemarkInfoDO>> remarkInfoMap = remarkInfoDOList.stream().collect(Collectors.groupingBy(ShopStageRemarkInfoDO::getShopId));
|
|
|
|
for (PreparationCommonPendingVO preparationCommonPendingVO : resultList){
|
|
|
|
for (PreparationCommonPendingVO preparationCommonPendingVO : resultList) {
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoList = remarkInfoMap.getOrDefault(preparationCommonPendingVO.getShopId(), new ArrayList<>());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoList = remarkInfoMap.getOrDefault(preparationCommonPendingVO.getShopId(), new ArrayList<>());
|
|
|
|
Map<Integer, String> remarkMapByShopSubStageStatus = remarkInfoList.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, ShopStageRemarkInfoDO::getRemark));
|
|
|
|
Map<Integer, String> remarkMapByShopSubStageStatus = remarkInfoList.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, ShopStageRemarkInfoDO::getRemark));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkMapByShopSubStageStatus.getOrDefault(preparationCommonPendingVO.getSubStageStatus(), ""));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkMapByShopSubStageStatus.getOrDefault(preparationCommonPendingVO.getSubStageStatus(), ""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return resultList;
|
|
|
|
return resultList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//有 设计组长 和 设计师 查询 指定当前用户和 阶段为 900 待分配设计师 阶段为 901 设计中
|
|
|
|
//有 设计组长 和 设计师 查询 指定当前用户和 阶段为 900 待分配设计师 阶段为 901 设计中
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
List<PreparationCommonPendingVO> resultList = decorationMeasureDAO.getShopIdListByDesignUserIdOrQuotationAndShopStage(user.getUserId(),deskRequest );
|
|
|
|
List<PreparationCommonPendingVO> resultList = decorationMeasureDAO.getShopIdListByDesignUserIdOrQuotationAndShopStage(user.getUserId(), deskRequest);
|
|
|
|
List<Long> shopIds = resultList.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
List<Long> shopIds = resultList.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoDOList = shopStageRemarkInfoDAO.getByShopIdsAndStage(shopIds, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus(),ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()));
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoDOList = shopStageRemarkInfoDAO.getByShopIdsAndStage(shopIds, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()));
|
|
|
|
Map<Long, List<ShopStageRemarkInfoDO>> remarkInfoMap = remarkInfoDOList.stream().collect(Collectors.groupingBy(ShopStageRemarkInfoDO::getShopId));
|
|
|
|
Map<Long, List<ShopStageRemarkInfoDO>> remarkInfoMap = remarkInfoDOList.stream().collect(Collectors.groupingBy(ShopStageRemarkInfoDO::getShopId));
|
|
|
|
for (PreparationCommonPendingVO preparationCommonPendingVO : resultList){
|
|
|
|
for (PreparationCommonPendingVO preparationCommonPendingVO : resultList) {
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoList = remarkInfoMap.getOrDefault(preparationCommonPendingVO.getShopId(), new ArrayList<>());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoList = remarkInfoMap.getOrDefault(preparationCommonPendingVO.getShopId(), new ArrayList<>());
|
|
|
|
Map<Integer, String> remarkMapByShopSubStageStatus = remarkInfoList.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, ShopStageRemarkInfoDO::getRemark));
|
|
|
|
Map<Integer, String> remarkMapByShopSubStageStatus = remarkInfoList.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, ShopStageRemarkInfoDO::getRemark));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkMapByShopSubStageStatus.getOrDefault(preparationCommonPendingVO.getSubStageStatus(), ""));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkMapByShopSubStageStatus.getOrDefault(preparationCommonPendingVO.getSubStageStatus(), ""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return resultList;
|
|
|
|
return resultList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -438,66 +447,66 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> constructionPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> constructionPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_11,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_11,
|
|
|
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus(),
|
|
|
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus(),
|
|
|
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus()), Boolean.TRUE);
|
|
|
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus()), Boolean.TRUE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> fitmentPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
|
|
|
|
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_12,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_12,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> DYPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> DYPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus()) );
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> KSPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> KSPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus()) );
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> MTPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> MTPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus()) );
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> MTBuyPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> MTBuyPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus()) );
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> ELMEPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> ELMEPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus()) );
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> buildInformationPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> buildInformationPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_15,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_15,
|
|
|
|
Collections.singletonList(SHOP_SUB_STAGE_STATUS_150.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(SHOP_SUB_STAGE_STATUS_150.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//如果不是财务角色或者即是财务又是自有店财务 则不需要标识
|
|
|
|
//如果不是财务角色或者即是财务又是自有店财务 则不需要标识
|
|
|
|
Boolean ownShopFlag = null;
|
|
|
|
Boolean ownShopFlag = null;
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())&&userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())){
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode()) && userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())) {
|
|
|
|
ownShopFlag = null;
|
|
|
|
ownShopFlag = null;
|
|
|
|
}else if(userRoleIds.contains(UserRoleEnum.FINANCE.getCode())){
|
|
|
|
} else if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())) {
|
|
|
|
ownShopFlag = Boolean.FALSE;
|
|
|
|
ownShopFlag = Boolean.FALSE;
|
|
|
|
}else if (userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())){
|
|
|
|
} else if (userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())) {
|
|
|
|
ownShopFlag = Boolean.TRUE;
|
|
|
|
ownShopFlag = Boolean.TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.LOGISTICS.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.LOGISTICS.getCode())) {
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())||userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode()) || userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())) {
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) {
|
|
|
|
@@ -517,11 +526,11 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
|
|
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return commonPendingVOPage(deskRequest, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE,ownShopFlag );
|
|
|
|
return commonPendingVOPage(deskRequest, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE, ownShopFlag);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> measurePendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> measurePendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
List<Integer> subStageStatusList = new ArrayList<>();
|
|
|
|
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
|
|
|
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
|
|
|
@@ -536,7 +545,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.MEASURE_OFFICE.getCode())) {
|
|
|
|
if (userRoleIds.contains(UserRoleEnum.MEASURE_OFFICE.getCode())) {
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
List<PreparationCommonPendingVO> list = decorationMeasureDAO.getByMeasureUserIdAndShopStage(user.getUserId() , deskRequest);
|
|
|
|
List<PreparationCommonPendingVO> list = decorationMeasureDAO.getByMeasureUserIdAndShopStage(user.getUserId(), deskRequest);
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
return new PageInfo<>();
|
|
|
|
return new PageInfo<>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -573,45 +582,46 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> businessLicensePendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> businessLicensePendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_3,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_3,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> foodLicensePendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> foodLicensePendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_4,
|
|
|
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_4,
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40.getShopSubStageStatus()), Boolean.FALSE );
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40.getShopSubStageStatus()), Boolean.FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<PreparationCommonPendingVO> JingDongPendingList( DeskRequest deskRequest, LoginUserInfo user ) {
|
|
|
|
public PageInfo<PreparationCommonPendingVO> JingDongPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_251.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_253.getShopSubStageStatus()) );
|
|
|
|
return commonPlatformBuild(deskRequest, user, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_251.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_253.getShopSubStageStatus()));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Integer submitBusinessRemark(BusinessRemarkRequest request, LoginUserInfo user){
|
|
|
|
public Integer submitBusinessRemark(BusinessRemarkRequest request, LoginUserInfo user) {
|
|
|
|
if (!((request.getShopId() != null&&request.getSubStage()!=null&&request.getSubStageStatus()!=null)
|
|
|
|
if (!((request.getShopId() != null && request.getSubStage() != null && request.getSubStageStatus() != null)
|
|
|
|
||(request.getLineId()!=null&&request.getWorkflowSubStage()!=null&&request.getWorkflowSubStageStatus()!=null))){
|
|
|
|
|| (request.getLineId() != null && request.getWorkflowSubStage() != null && request.getWorkflowSubStageStatus() != null))) {
|
|
|
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
|
|
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ShopStageRemarkInfoDO remarkInfoDO = new ShopStageRemarkInfoDO();
|
|
|
|
ShopStageRemarkInfoDO remarkInfoDO = new ShopStageRemarkInfoDO();
|
|
|
|
if (request.getShopId() != null){
|
|
|
|
if (request.getShopId() != null) {
|
|
|
|
remarkInfoDO = shopStageRemarkInfoDAO.getByShopIdAndStage(request.getShopId(),request.getSubStageStatus());
|
|
|
|
remarkInfoDO = shopStageRemarkInfoDAO.getByShopIdAndStage(request.getShopId(), request.getSubStageStatus());
|
|
|
|
remarkInfoDO.setShopId(request.getShopId());
|
|
|
|
remarkInfoDO.setShopId(request.getShopId());
|
|
|
|
remarkInfoDO.setShopSubStage(request.getSubStage());
|
|
|
|
remarkInfoDO.setShopSubStage(request.getSubStage());
|
|
|
|
remarkInfoDO.setShopSubStageStatus(request.getSubStageStatus());
|
|
|
|
remarkInfoDO.setShopSubStageStatus(request.getSubStageStatus());
|
|
|
|
}else if (request.getLineId() != null){
|
|
|
|
} else if (request.getLineId() != null) {
|
|
|
|
remarkInfoDO = shopStageRemarkInfoDAO.getByLineIdAndStage(request.getLineId(),request.getWorkflowSubStageStatus());
|
|
|
|
remarkInfoDO = shopStageRemarkInfoDAO.getByLineIdAndStage(request.getLineId(), request.getWorkflowSubStageStatus());
|
|
|
|
remarkInfoDO.setLineId(request.getLineId());
|
|
|
|
remarkInfoDO.setLineId(request.getLineId());
|
|
|
|
remarkInfoDO.setWorkflowSubStage(request.getWorkflowSubStage());
|
|
|
|
remarkInfoDO.setWorkflowSubStage(request.getWorkflowSubStage());
|
|
|
|
remarkInfoDO.setWorkflowSubStageStatus(request.getWorkflowSubStageStatus());
|
|
|
|
remarkInfoDO.setWorkflowSubStageStatus(request.getWorkflowSubStageStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
remarkInfoDO.setRemark(request.getBusinessRemark());
|
|
|
|
remarkInfoDO.setRemark(request.getBusinessRemark());
|
|
|
|
if(remarkInfoDO.getCreateTime()==null){
|
|
|
|
if (remarkInfoDO.getCreateTime() == null) {
|
|
|
|
remarkInfoDO.setCreateTime(new Date());
|
|
|
|
remarkInfoDO.setCreateTime(new Date());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (StringUtil.isBlank(remarkInfoDO.getCreateUserId())){
|
|
|
|
if (StringUtil.isBlank(remarkInfoDO.getCreateUserId())) {
|
|
|
|
remarkInfoDO.setCreateUserId(user.getUserId());
|
|
|
|
remarkInfoDO.setCreateUserId(user.getUserId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
remarkInfoDO.setUpdateTime(new Date());
|
|
|
|
remarkInfoDO.setUpdateTime(new Date());
|
|
|
|
@@ -619,45 +629,29 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
return shopStageRemarkInfoDAO.insertOrUpdate(remarkInfoDO);
|
|
|
|
return shopStageRemarkInfoDAO.insertOrUpdate(remarkInfoDO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<DeskStageResponse> getDeskStageList(Integer shopSubStage, String userId) {
|
|
|
|
|
|
|
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(userId);
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(userRoleIds)){
|
|
|
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<DeskStageResponse> responses = new ArrayList<>();
|
|
|
|
|
|
|
|
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.getByShopSubStage(shopSubStage);
|
|
|
|
|
|
|
|
if (shopSubStageEnum == null){
|
|
|
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return responses;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 通用查询
|
|
|
|
* 通用查询
|
|
|
|
|
|
|
|
|
|
|
|
* @param user
|
|
|
|
* @param user
|
|
|
|
* @param shopSubStageEnum
|
|
|
|
* @param shopSubStageEnum
|
|
|
|
* @param subStageStatusList
|
|
|
|
* @param subStageStatusList
|
|
|
|
* @param filterFlag
|
|
|
|
* @param filterFlag
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private PageInfo<PreparationCommonPendingVO> commonPendingVOPageInfo( DeskRequest deskRequest, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag ){
|
|
|
|
private PageInfo<PreparationCommonPendingVO> commonPendingVOPageInfo(DeskRequest deskRequest, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag) {
|
|
|
|
return this.commonPendingVOPage(deskRequest,user,shopSubStageEnum,subStageStatusList,filterFlag,null );
|
|
|
|
return this.commonPendingVOPage(deskRequest, user, shopSubStageEnum, subStageStatusList, filterFlag, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 通用查询
|
|
|
|
* 通用查询
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
|
|
|
|
* @param user
|
|
|
|
* @param user
|
|
|
|
* @param shopSubStageEnum
|
|
|
|
* @param shopSubStageEnum
|
|
|
|
* @param subStageStatusList
|
|
|
|
* @param subStageStatusList
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private PageInfo<PreparationCommonPendingVO> commonPendingVOPage( DeskRequest deskRequest, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag,Boolean ownShopFlag ) {
|
|
|
|
private PageInfo<PreparationCommonPendingVO> commonPendingVOPage(DeskRequest deskRequest, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag, Boolean ownShopFlag) {
|
|
|
|
//user.getJobNumber()
|
|
|
|
//user.getJobNumber()
|
|
|
|
List<String> authRegionIds = new ArrayList<>();
|
|
|
|
List<String> authRegionIds = new ArrayList<>();
|
|
|
|
if (filterFlag) {
|
|
|
|
if (filterFlag) {
|
|
|
|
@@ -665,9 +659,9 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
|
|
|
authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
|
|
|
List<ShopStageInfoDO> specialShopStageInfo = shopStageInfoDAO.getSpecialShopStageInfo(null, shopSubStageEnum.getShopSubStage(),
|
|
|
|
List<ShopStageInfoDO> specialShopStageInfo = shopStageInfoDAO.getSpecialShopStageInfo(null, shopSubStageEnum.getShopSubStage(),
|
|
|
|
subStageStatusList, user == null ? null : user.getUserId(), authRegionIds,ownShopFlag,deskRequest );
|
|
|
|
subStageStatusList, user == null ? null : user.getUserId(), authRegionIds, ownShopFlag, deskRequest);
|
|
|
|
PageInfo result = new PageInfo<>(specialShopStageInfo);
|
|
|
|
PageInfo result = new PageInfo<>(specialShopStageInfo);
|
|
|
|
List<Long> shopIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
|
|
|
List<Long> shopIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
|
|
|
List<Long> lineIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getLineId).collect(Collectors.toList());
|
|
|
|
List<Long> lineIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getLineId).collect(Collectors.toList());
|
|
|
|
@@ -696,7 +690,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
specialShopStageInfo.forEach(x -> {
|
|
|
|
specialShopStageInfo.forEach(x -> {
|
|
|
|
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
|
|
|
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoMapOrDefault = remarkInfoMap.getOrDefault(x.getShopId(), new ArrayList<>());
|
|
|
|
List<ShopStageRemarkInfoDO> remarkInfoMapOrDefault = remarkInfoMap.getOrDefault(x.getShopId(), new ArrayList<>());
|
|
|
|
Map<Integer, ShopStageRemarkInfoDO> remarkInfoMapByStageStatus = remarkInfoMapOrDefault.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, Function.identity()));
|
|
|
|
Map<Integer, ShopStageRemarkInfoDO> remarkInfoMapByStageStatus = remarkInfoMapOrDefault.stream().collect(Collectors.toMap(ShopStageRemarkInfoDO::getShopSubStageStatus, Function.identity()));
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkInfoMapByStageStatus.getOrDefault(x.getShopSubStageStatus(), new ShopStageRemarkInfoDO()).getRemark());
|
|
|
|
preparationCommonPendingVO.setBusinessRemark(remarkInfoMapByStageStatus.getOrDefault(x.getShopSubStageStatus(), new ShopStageRemarkInfoDO()).getRemark());
|
|
|
|
preparationCommonPendingVO.setLineId(x.getLineId());
|
|
|
|
preparationCommonPendingVO.setLineId(x.getLineId());
|
|
|
|
preparationCommonPendingVO.setShopId(x.getShopId());
|
|
|
|
preparationCommonPendingVO.setShopId(x.getShopId());
|
|
|
|
@@ -755,9 +749,9 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//平台建店通用查询
|
|
|
|
//平台建店通用查询
|
|
|
|
private PageInfo<PreparationCommonPendingVO> commonPlatformBuild( DeskRequest deskRequest, LoginUserInfo user, List<Integer> subStageStatusList ) {
|
|
|
|
private PageInfo<PreparationCommonPendingVO> commonPlatformBuild(DeskRequest deskRequest, LoginUserInfo user, List<Integer> subStageStatusList) {
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
PageHelper.startPage(deskRequest);
|
|
|
|
List<OperationLogDO> operationLogDOList = operationLogDAO.getBySubStageStatusAndUser(user.getUserId(), subStageStatusList,deskRequest);
|
|
|
|
List<OperationLogDO> operationLogDOList = operationLogDAO.getBySubStageStatusAndUser(user.getUserId(), subStageStatusList, deskRequest);
|
|
|
|
if (CollectionUtils.isEmpty(operationLogDOList)) {
|
|
|
|
if (CollectionUtils.isEmpty(operationLogDOList)) {
|
|
|
|
return new PageInfo<>();
|
|
|
|
return new PageInfo<>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|