待办排序+更新时间
This commit is contained in:
@@ -353,7 +353,7 @@
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
order by update_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public class IntendPendingVO extends BaseInfoVO {
|
||||
@ApiModelProperty("加盟模式 1-社会加盟模式 2-强加盟模式")
|
||||
private Integer joinMode;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
public IntendPendingVO(){}
|
||||
|
||||
public IntendPendingVO(BaseInfoVO baseInfoVO) {
|
||||
|
||||
@@ -252,16 +252,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 +259,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 +283,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 +385,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
|
||||
@@ -628,7 +496,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);
|
||||
}
|
||||
@@ -709,6 +576,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);
|
||||
@@ -779,6 +647,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());
|
||||
|
||||
Reference in New Issue
Block a user