运营列表加字段阶段状态
This commit is contained in:
@@ -47,4 +47,7 @@ public class OpeningOperationPlanListVO {
|
||||
|
||||
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
||||
private Integer resultType;
|
||||
|
||||
@ApiModelProperty("阶段状态")
|
||||
private Integer subStageStatus;
|
||||
}
|
||||
|
||||
@@ -136,13 +136,14 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
log.error("查询运营方案列表没有数据");
|
||||
return new PageInfo<>();
|
||||
}
|
||||
List<Long> lines = openPlanShopInfoDTOS.stream().map(OpenPlanShopInfoDTO::getLineId).collect(Collectors.toList());
|
||||
List<Long> lines = openPlanShopInfoDTOS.stream().filter(o -> o.getLineId() != null).map(OpenPlanShopInfoDTO::getLineId).collect(Collectors.toList());
|
||||
List<PlanLineDTO> lineInfos = lineInfoDAO.getLines(lines);
|
||||
List<Long> shopIds = openPlanShopInfoDTOS.stream().filter(o -> o.getShopId() != null).map(OpenPlanShopInfoDTO::getShopId).collect(Collectors.toList());
|
||||
Map<Long, PlanLineDTO> lineInfoMap = lineInfos.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, dto -> dto));
|
||||
for (OpenPlanShopInfoDTO openPlanShopInfoDTO : openPlanShopInfoDTOS) {
|
||||
openPlanShopInfoDTO.setPartnerName(lineInfoMap.getOrDefault(openPlanShopInfoDTO.getLineId(),new PlanLineDTO()).getUsername());
|
||||
openPlanShopInfoDTO.setMobile(lineInfoMap.getOrDefault(openPlanShopInfoDTO.getLineId(),new PlanLineDTO()).getMobile());
|
||||
openPlanShopInfoDTO.setInvestmentManagerId(lineInfoMap.getOrDefault(openPlanShopInfoDTO.getLineId(),new PlanLineDTO()).getInvestmentManagerId());
|
||||
openPlanShopInfoDTO.setPartnerName(lineInfoMap.getOrDefault(openPlanShopInfoDTO.getLineId(), new PlanLineDTO()).getUsername());
|
||||
openPlanShopInfoDTO.setMobile(lineInfoMap.getOrDefault(openPlanShopInfoDTO.getLineId(), new PlanLineDTO()).getMobile());
|
||||
openPlanShopInfoDTO.setInvestmentManagerId(lineInfoMap.getOrDefault(openPlanShopInfoDTO.getLineId(), new PlanLineDTO()).getInvestmentManagerId());
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo<>(openPlanShopInfoDTOS);
|
||||
//开店负责人id,督导id,招商经理id //
|
||||
@@ -165,6 +166,9 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
List<Long> regionIds = openPlanShopInfoDTOS.stream()
|
||||
.filter(dto -> dto.getRegionId() != null).map(OpenPlanShopInfoDTO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
//阶段状态
|
||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_14.getShopSubStage());
|
||||
Map<Long, ShopStageInfoDO> subStageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, dto -> dto));
|
||||
List<OpeningOperationPlanListVO> openingOperationPlanListVOList = new ArrayList<>();
|
||||
openPlanShopInfoDTOS.forEach(x -> {
|
||||
OpeningOperationPlanListVO openingOperationPlanListVO = new OpeningOperationPlanListVO();
|
||||
@@ -182,6 +186,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
vonameMap.get(x.getSupervisorUserId()));
|
||||
openingOperationPlanListVO.setSubmissionTime(x.getSubmissionTime());
|
||||
openingOperationPlanListVO.setResultType(x.getResultType());
|
||||
openingOperationPlanListVO.setSubStageStatus(subStageMap.getOrDefault(x.getShopId(),new ShopStageInfoDO()).getShopSubStageStatus());
|
||||
openingOperationPlanListVOList.add(openingOperationPlanListVO);
|
||||
});
|
||||
pageInfo.setList(openingOperationPlanListVOList);
|
||||
|
||||
Reference in New Issue
Block a user