加盟商详情,门店列表
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import com.cool.store.enums.JoinModeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -36,8 +40,28 @@ public class MiniShopPageVO {
|
||||
private Long regionId;
|
||||
@ApiModelProperty("门店所属区域name")
|
||||
private String regionName;
|
||||
@ApiModelProperty("督导name")
|
||||
private String investmentName;
|
||||
@ApiModelProperty("督导userId")
|
||||
private String investmentUserId;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName,String shopCode,Boolean flag,Long pointId,Long regionId,String regionName) {
|
||||
@ApiModelProperty("预估完成时间")
|
||||
private Date planCompletionTime;
|
||||
|
||||
@ApiModelProperty("总项数")
|
||||
private Integer totalColumn;
|
||||
|
||||
@ApiModelProperty("完成项")
|
||||
private Integer completionColumn;
|
||||
|
||||
@ApiModelProperty("所属品牌")
|
||||
private String franchiseBrand;
|
||||
@ApiModelProperty("加盟模式")
|
||||
private String joinMode;
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantRegionName;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName, String shopCode, Boolean flag, Long pointId, Long regionId, String regionName) {
|
||||
this.shopId = shopId;
|
||||
this.shopName = shopName;
|
||||
this.shopCode = shopCode;
|
||||
@@ -47,7 +71,7 @@ public class MiniShopPageVO {
|
||||
this.regionName = regionName;
|
||||
}
|
||||
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList, Map<Long, ShopStageInfoDO> stageMap, Map<Long, String> regionNameMap ) {
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList, Map<Long, ShopStageInfoDO> stageMap, Map<Long, String> regionNameMap, Map<Long, ScheduleDTO> scheduleMap, Map<Long, String> wantRegionMap, Map<String, EnterpriseUserDO> userInfoMap) {
|
||||
List<MiniShopPageVO> resultList = new ArrayList<>();
|
||||
for (ShopInfoDO shopInfo : shopInfoList) {
|
||||
ShopStageInfoDO stageInfoDO = stageMap.get(shopInfo.getId());
|
||||
@@ -57,10 +81,26 @@ public class MiniShopPageVO {
|
||||
flag = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
if(Objects.isNull(regionNameMap)){
|
||||
if (Objects.isNull(regionNameMap)) {
|
||||
regionNameMap = new HashMap<>();
|
||||
}
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(),shopInfo.getShopCode(),flag,shopInfo.getPointId(),shopInfo.getRegionId(), regionNameMap.getOrDefault(shopInfo.getRegionId(),"")));
|
||||
MiniShopPageVO miniShopPageVO = new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(), shopInfo.getShopCode(), flag, shopInfo.getPointId(), shopInfo.getRegionId(), regionNameMap.getOrDefault(shopInfo.getRegionId(), ""));
|
||||
miniShopPageVO.setInvestmentUserId(shopInfo.getInvestmentManager());
|
||||
if (userInfoMap!=null){
|
||||
miniShopPageVO.setInvestmentName(userInfoMap.getOrDefault(shopInfo.getInvestmentManager(),new EnterpriseUserDO()).getName());
|
||||
}
|
||||
if (scheduleMap != null) {
|
||||
miniShopPageVO.setTotalColumn(scheduleMap.getOrDefault(shopInfo.getId(),new ScheduleDTO()).getTotalColumn());
|
||||
miniShopPageVO.setCompletionColumn(scheduleMap.getOrDefault(shopInfo.getId(),new ScheduleDTO()).getCompletionColumn());
|
||||
miniShopPageVO.setPlanCompletionTime(scheduleMap.getOrDefault(shopInfo.getId(),new ScheduleDTO()).getPlanCompleteTime());
|
||||
}
|
||||
miniShopPageVO.setFranchiseBrand(FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()));
|
||||
miniShopPageVO.setJoinMode(JoinModeEnum.getByCode(shopInfo.getJoinMode()));
|
||||
if (Objects.nonNull(wantRegionMap)) {
|
||||
miniShopPageVO.setWantRegionName(wantRegionMap.get(shopInfo.getWantShopAreaId()));
|
||||
}
|
||||
resultList.add(miniShopPageVO);
|
||||
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user