fix 待办增加字段

This commit is contained in:
shuo.wang
2024-10-30 15:41:03 +08:00
parent 5425f73338
commit b388e80ef1
2 changed files with 32 additions and 1 deletions

View File

@@ -15,6 +15,12 @@ public class PreparationCommonPendingVO {
private String storeName;
@ApiModelProperty("门店负责人名称")
private String shopManagerUserName;
@ApiModelProperty("门店编码")
private String storeNum;
@ApiModelProperty("店铺地址")
private String shopAddress;
@ApiModelProperty("督导")
private String investmentManager;
@ApiModelProperty("加盟商名称")
private String partnerName;
@ApiModelProperty("手机号")

View File

@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
@@ -79,6 +80,8 @@ public class DeskServiceImpl implements DeskService {
private DecorationDesignInfoDAO decorationDesignInfoDAO;
@Autowired
private AcceptanceInfoDAO acceptanceInfoDAO;
@Autowired
private PointInfoDAO pointInfoDAO;
@Override
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId) {
@@ -481,7 +484,10 @@ public class DeskServiceImpl implements DeskService {
//将lines 转为map
Map<Long, PlanLineDTO> lineMap = lines.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, line -> line));
List<Long> pointId = shopInfoList.stream().filter(x -> Objects.nonNull(x.getPointId())).map(ShopInfoDO::getPointId).collect(Collectors.toList());
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
List<Long> regionIds = shopInfoList.stream().map(ShopInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
@@ -538,10 +544,19 @@ public class DeskServiceImpl implements DeskService {
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
preparationCommonPendingVO.setLineId(x.getLineId());
preparationCommonPendingVO.setShopId(x.getShopId());
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
if (shopInfoDO != null) {
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getId());
if(pointInfoDO != null) {
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
}
preparationCommonPendingVO.setStoreNum(shopInfoDO.getStoreNum());
}
preparationCommonPendingVO.setInvestmentManager(lineMap.get(x.getLineId()).getInvestmentManagerName());
preparationCommonPendingVO.setStage(x.getShopStage());
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
if (ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())) {
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, finalShopPayDoMap.getOrDefault(x.getShopId(), new LinePayDO()).getCreateTime()));
}
@@ -616,7 +631,10 @@ public class DeskServiceImpl implements DeskService {
List<Long> lineIds = shopInfoList.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
List<PlanLineDTO> lines = lineInfoDAO.getLines(lineIds);
List<Long> pointId = shopInfoList.stream().filter(x -> Objects.nonNull(x.getPointId())).map(ShopInfoDO::getPointId).collect(Collectors.toList());
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
//将shopInfoList 转为map
Map<Long, ShopInfoDO> shopInfoMap = shopInfoList.stream().collect(Collectors.toMap(ShopInfoDO::getId, shop -> shop));
//将lines 转为map
@@ -631,6 +649,13 @@ public class DeskServiceImpl implements DeskService {
operationLogDOList.forEach(x -> {
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
if (shopInfoDO != null) {
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getId());
if(pointInfoDO != null) {
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
}
preparationCommonPendingVO.setStoreNum(shopInfoDO.getStoreNum());
}
preparationCommonPendingVO.setLineId(shopInfoDO.getLineId());
preparationCommonPendingVO.setShopId(x.getShopId());
preparationCommonPendingVO.setSubStage(x.getShopSubStage());