优化待办接口
This commit is contained in:
@@ -354,14 +354,40 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.FALSE);
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_72.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, LinePayDO> shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
|
||||||
|
for (PreparationCommonPendingVO vo:list){
|
||||||
|
vo.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_8,
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_8,
|
||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus()), Boolean.TRUE);
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -382,54 +408,180 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> trainListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> trainListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_5,
|
return commonPendingVOPageInfo(pageNum, pageSize, 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(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> xinFaListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_23,
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, 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);
|
||||||
|
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){
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> posListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> posListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_16,
|
|
||||||
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, 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);
|
||||||
|
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){
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> tentPassListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> tentPassListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_24,
|
|
||||||
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, 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);
|
||||||
|
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){
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> orderSysPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> orderSysPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_17,
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, 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);
|
||||||
|
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){
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> designPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> designPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_9,
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_9,
|
||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()), Boolean.TRUE);
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_90.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_8.getShopSubStage());
|
||||||
|
doThing(deskStageMap, subStageList);
|
||||||
|
for (PreparationCommonPendingVO vo :list){
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
|
PageInfo<PreparationCommonPendingVO> pageInfo =commonPendingVOPageInfo(pageNum, pageSize, 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);
|
||||||
|
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());
|
||||||
|
List<DecorationDesignInfoDO> decorationDesignInfos = decorationDesignInfoDAO.getByIds(shopIds);
|
||||||
|
doThing(deskStageMap, subStageList);
|
||||||
|
for (DecorationDesignInfoDO decorationDesignInfoDO : decorationDesignInfos) {
|
||||||
|
List<DeskStageDTO> deskStages = new ArrayList<>();
|
||||||
|
deskStages.addAll(deskStageMap.get(decorationDesignInfoDO.getShopId()));
|
||||||
|
if (CollectionUtils.isEmpty(deskStages)) {
|
||||||
|
DeskStageDTO dto = new DeskStageDTO();
|
||||||
|
dto.setActualCompleteTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, decorationDesignInfoDO.getCreateTime()));
|
||||||
|
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus());
|
||||||
|
deskStageMap.put(decorationDesignInfoDO.getShopId(), Collections.singletonList(dto));
|
||||||
|
} else {
|
||||||
|
DeskStageDTO dto = new DeskStageDTO();
|
||||||
|
dto.setActualCompleteTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, decorationDesignInfoDO.getCreateTime()));
|
||||||
|
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus());
|
||||||
|
deskStages.add(dto);
|
||||||
|
deskStageMap.put(decorationDesignInfoDO.getShopId(), deskStages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
|
|
||||||
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, 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);
|
||||||
|
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
|
@Override
|
||||||
@@ -499,53 +651,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
|
|
||||||
|
|
||||||
Map<Long, LinePayDO> shopPayDoMap = new HashMap<>(16);
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
|
|
||||||
}
|
|
||||||
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_16.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_17.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_23.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_24.getShopSubStage().equals(shopSubStageEnum.getShopSubStage()) ){
|
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
|
||||||
doThing(deskStageMap, subStageList);
|
|
||||||
} else if (ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage());
|
|
||||||
doThing(deskStageMap, subStageList);
|
|
||||||
} else if (ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
|
||||||
List<DecorationDesignInfoDO> decorationDesignInfos = decorationDesignInfoDAO.getByIds(shopIds);
|
|
||||||
doThing(deskStageMap, subStageList);
|
|
||||||
for (DecorationDesignInfoDO decorationDesignInfoDO : decorationDesignInfos) {
|
|
||||||
List<DeskStageDTO> deskStages = new ArrayList<>();
|
|
||||||
deskStages.addAll(deskStageMap.get(decorationDesignInfoDO.getShopId()));
|
|
||||||
if (CollectionUtils.isEmpty(deskStages)) {
|
|
||||||
DeskStageDTO dto = new DeskStageDTO();
|
|
||||||
dto.setActualCompleteTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, decorationDesignInfoDO.getCreateTime()));
|
|
||||||
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus());
|
|
||||||
deskStageMap.put(decorationDesignInfoDO.getShopId(), Collections.singletonList(dto));
|
|
||||||
} else {
|
|
||||||
DeskStageDTO dto = new DeskStageDTO();
|
|
||||||
dto.setActualCompleteTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, decorationDesignInfoDO.getCreateTime()));
|
|
||||||
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus());
|
|
||||||
deskStages.add(dto);
|
|
||||||
deskStageMap.put(decorationDesignInfoDO.getShopId(), deskStages);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
List<AcceptanceInfoDO> list = acceptanceInfoDAO.selectByShopIds(shopIds);
|
|
||||||
for (AcceptanceInfoDO acceptanceInfoDO : list) {
|
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<PreparationCommonPendingVO> list = new ArrayList<>();
|
List<PreparationCommonPendingVO> list = new ArrayList<>();
|
||||||
Map<Long, LinePayDO> finalShopPayDoMap = shopPayDoMap;
|
|
||||||
specialShopStageInfo.forEach(x -> {
|
specialShopStageInfo.forEach(x -> {
|
||||||
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
||||||
preparationCommonPendingVO.setLineId(x.getLineId());
|
preparationCommonPendingVO.setLineId(x.getLineId());
|
||||||
@@ -553,45 +659,15 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||||
if (shopInfoDO != null) {
|
if (shopInfoDO != null) {
|
||||||
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
||||||
if(pointInfoDO != null) {
|
if (pointInfoDO != null) {
|
||||||
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
||||||
}
|
}
|
||||||
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
||||||
}
|
}
|
||||||
preparationCommonPendingVO.setInvestmentManager(lineMap.getOrDefault(x.getLineId(),new PlanLineDTO()).getInvestmentManagerName());
|
preparationCommonPendingVO.setInvestmentManager(lineMap.getOrDefault(x.getLineId(), new PlanLineDTO()).getInvestmentManagerName());
|
||||||
preparationCommonPendingVO.setStage(x.getShopStage());
|
preparationCommonPendingVO.setStage(x.getShopStage());
|
||||||
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
||||||
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
|
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
|
||||||
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, finalShopPayDoMap.getOrDefault(x.getShopId(), new LinePayDO()).getCreateTime()));
|
|
||||||
}
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
preparationCommonPendingVO.setSubmitTime(deskStageMap.get(x.getShopId()).get(0).getActualCompleteTime());
|
|
||||||
}
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_16.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_17.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_23.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())
|
|
||||||
|| ShopSubStageEnum.SHOP_STAGE_24.getShopSubStage().equals(shopSubStageEnum.getShopSubStage()) ){
|
|
||||||
preparationCommonPendingVO.setSubmitTime(deskStageMap.get(x.getShopId()).get(0).getActualCompleteTime());
|
|
||||||
}
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
for (DeskStageDTO deskStageDTO : deskStageMap.get(x.getShopId())) {
|
|
||||||
if (x.getShopSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
|
|
||||||
preparationCommonPendingVO.setSubmitTime(deskStageDTO.getActualCompleteTime());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
|
|
||||||
for (DeskStageDTO deskStageDTO : deskStageMap.get(x.getShopId())) {
|
|
||||||
if (x.getShopSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
|
|
||||||
preparationCommonPendingVO.setSubmitTime(deskStageDTO.getActualCompleteTime());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
|
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
|
||||||
PlanLineDTO planLineDTO = lineMap.getOrDefault(x.getLineId(), new PlanLineDTO());
|
PlanLineDTO planLineDTO = lineMap.getOrDefault(x.getLineId(), new PlanLineDTO());
|
||||||
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());
|
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());
|
||||||
@@ -657,7 +733,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||||
if (shopInfoDO != null) {
|
if (shopInfoDO != null) {
|
||||||
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
||||||
if(pointInfoDO != null) {
|
if (pointInfoDO != null) {
|
||||||
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
||||||
}
|
}
|
||||||
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
||||||
|
|||||||
Reference in New Issue
Block a user