This commit is contained in:
shuo.wang
2025-03-20 18:01:06 +08:00
parent c7ae833e0b
commit f0b814cccf

View File

@@ -414,9 +414,11 @@ public class DeskServiceImpl implements DeskService {
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
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<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
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<>();
@@ -426,7 +428,8 @@ public class DeskServiceImpl implements DeskService {
}
for (PreparationCommonPendingVO vo : list) {
if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus()) && deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
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(CoolDateUtils.DateFormat(constructionMap.get(vo.getShopId()),SPECIAL_DATE_START));
}
@@ -570,7 +573,7 @@ public class DeskServiceImpl implements DeskService {
Date date = DateUtils.dateTime(YYYY_MM_DD_HH_MM_SS, shopStageInfoDO.getActualCompleteTime());
dto.setActualCompleteTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, date));
dto.setShopSubStageStatus(shopStageInfoDO.getShopSubStageStatus());
deskStageMap.put(shopStageInfoDO.getShopId(), Collections.singletonList(dto));
deskStageMap.put(shopStageInfoDO.getShopId(), Arrays.asList(dto));
} else {
DeskStageDTO dto = new DeskStageDTO();
Date date = DateUtils.dateTime(YYYY_MM_DD_HH_MM_SS, shopStageInfoDO.getActualCompleteTime());