|
|
|
|
@@ -107,6 +107,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
IntendPendingVO intendPendingVO = new IntendPendingVO(baseInfoVO);
|
|
|
|
|
intendPendingVO.setJoinTime(new Date());
|
|
|
|
|
intendPendingVO.setJoinMode(x.getJoinMode());
|
|
|
|
|
intendPendingVO.setUpdateTime(x.getUpdateTime());
|
|
|
|
|
list.add(intendPendingVO);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@@ -133,7 +134,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
if (linePayDO != null && linePayDO.getPayTime() != null) {
|
|
|
|
|
payStagePendingVO.setPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, linePayDO.getPayTime()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
payStagePendingVO.setUpdateTime(x.getUpdateTime());
|
|
|
|
|
|
|
|
|
|
list.add(payStagePendingVO);
|
|
|
|
|
});
|
|
|
|
|
@@ -161,6 +162,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
if (date != null) {
|
|
|
|
|
signingPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, date));
|
|
|
|
|
}
|
|
|
|
|
signingPendingVO.setUpdateTime(x.getUpdateTime());
|
|
|
|
|
list.add(signingPendingVO);
|
|
|
|
|
});
|
|
|
|
|
page.setList(list);
|
|
|
|
|
@@ -197,6 +199,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
baseInfoVO.setUserPortraitList(labelBaseInfoList);
|
|
|
|
|
baseInfoVO.setJoinMode(lineInfoDO.getJoinMode());
|
|
|
|
|
baseInfoVO.setWantShopAreaName(wantShopAreaMap.get(lineInfoDO.getWantShopAreaId()));
|
|
|
|
|
|
|
|
|
|
return baseInfoVO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -252,16 +255,6 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
subStageStatusList, Boolean.TRUE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<PreparationCommonPendingVO> list = pageInfo.getList();
|
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
|
return pageInfo;
|
|
|
|
|
}
|
|
|
|
|
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
|
Map<Long, LinePayDO> shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
|
|
|
|
|
for (PreparationCommonPendingVO vo : list) {
|
|
|
|
|
vo.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
|
|
|
|
|
}
|
|
|
|
|
pageInfo.setList(list);
|
|
|
|
|
return pageInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -269,19 +262,6 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, 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);
|
|
|
|
|
|
|
|
|
|
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_7.getShopSubStage());
|
|
|
|
|
doThing(deskStageMap, subStageList);
|
|
|
|
|
for (PreparationCommonPendingVO vo : list) {
|
|
|
|
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
|
|
|
|
}
|
|
|
|
|
pageInfo.setList(list);
|
|
|
|
|
return pageInfo;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@@ -306,91 +286,32 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> xinFaListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_23,
|
|
|
|
|
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_23,
|
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_230.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_15.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;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> posListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_16,
|
|
|
|
|
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_16,
|
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_160.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_15.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;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> tentPassListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_24,
|
|
|
|
|
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_24,
|
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_240.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_15.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;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> orderSysPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_17,
|
|
|
|
|
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_17,
|
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.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_15.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;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@@ -467,67 +388,17 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
|
|
|
|
|
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
|
|
|
|
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus(),
|
|
|
|
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus()), Boolean.TRUE);
|
|
|
|
|
List<PreparationCommonPendingVO> list = pageInfo.getList();
|
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
|
return pageInfo;
|
|
|
|
|
}
|
|
|
|
|
List<Long> shopIds = list.stream().filter(o -> Objects.equals(o.getSubStageStatus(), SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())).map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
|
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
|
|
|
|
List<Long> shopIds1 = list.stream().filter(o -> Objects.equals(o.getSubStageStatus(), SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())).map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds1, ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
|
|
|
|
doThing(deskStageMap, subStageList);
|
|
|
|
|
//施工待提交阶段提交的表单用作施工中的提交时间
|
|
|
|
|
Map<Long, Date> constructionMap = new HashMap<>();
|
|
|
|
|
List<DecorationDesignInfoDO> byIds = decorationDesignInfoDAO.getByIds(shopIds);
|
|
|
|
|
if (byIds != null) {
|
|
|
|
|
constructionMap = byIds.stream().collect(Collectors.toMap(DecorationDesignInfoDO::getShopId, DecorationDesignInfoDO::getConstructionCreateTime));
|
|
|
|
|
}
|
|
|
|
|
for (PreparationCommonPendingVO vo : list) {
|
|
|
|
|
if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus()) && deskStageMap.get(vo.getShopId()) != null) {
|
|
|
|
|
if (deskStageMap.get(vo.getShopId()) != null) {
|
|
|
|
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
|
|
|
|
}
|
|
|
|
|
} else if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())) {
|
|
|
|
|
vo.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, constructionMap.get(vo.getShopId())));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
pageInfo.setList(list);
|
|
|
|
|
return pageInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
|
|
|
|
|
|
|
|
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
|
|
|
|
|
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
|
|
|
|
|
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.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<AcceptanceInfoDO> acceptanceInfoDOList = acceptanceInfoDAO.selectByShopIds(shopIds);
|
|
|
|
|
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOList) {
|
|
|
|
|
DeskStageDTO dto = new DeskStageDTO();
|
|
|
|
|
dto.setActualCompleteTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, acceptanceInfoDO.getCreateTime()));
|
|
|
|
|
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus());
|
|
|
|
|
deskStageMap.put(acceptanceInfoDO.getShopId(), Collections.singletonList(dto));
|
|
|
|
|
}
|
|
|
|
|
for (PreparationCommonPendingVO vo : list) {
|
|
|
|
|
for (DeskStageDTO deskStageDTO : deskStageMap.get(vo.getShopId())) {
|
|
|
|
|
if (vo.getSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
|
|
|
|
|
vo.setSubmitTime(deskStageDTO.getActualCompleteTime());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
pageInfo.setList(list);
|
|
|
|
|
return pageInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@@ -637,7 +508,6 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
preparationCommonPendingVO.setPartnerPhone(lineInfoDO.getMobile());
|
|
|
|
|
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(preparationCommonPendingVO.getRegionId(), ""));
|
|
|
|
|
preparationCommonPendingVO.setInvestmentManager(userNameMap.getOrDefault(preparationCommonPendingVO.getInvestmentManager(), ""));
|
|
|
|
|
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, preparationCommonPendingVO.getUpdateTime()));
|
|
|
|
|
}
|
|
|
|
|
return new PageInfo<>(list);
|
|
|
|
|
}
|
|
|
|
|
@@ -733,6 +603,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
preparationCommonPendingVO.setPartnerPhone(planLineDTO.getMobile());
|
|
|
|
|
preparationCommonPendingVO.setShopManagerUserName(userNameMap.getOrDefault(shopInfoDO.getShopManagerUserId(), ""));
|
|
|
|
|
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
|
|
|
|
|
preparationCommonPendingVO.setUpdateTime(x.getUpdateTime());
|
|
|
|
|
list.add(preparationCommonPendingVO);
|
|
|
|
|
});
|
|
|
|
|
result.setList(list);
|
|
|
|
|
@@ -803,6 +674,7 @@ public class DeskServiceImpl implements DeskService {
|
|
|
|
|
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
|
|
|
|
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
|
|
|
|
|
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, x.getCreateTime()));
|
|
|
|
|
preparationCommonPendingVO.setUpdateTime(x.getUpdateTime());
|
|
|
|
|
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
|
|
|
|
|
PlanLineDTO planLineDTO = lineMap.getOrDefault(shopInfoDO.getLineId(), new PlanLineDTO());
|
|
|
|
|
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());
|
|
|
|
|
|