筹建列表 筹建详情

This commit is contained in:
苏竹红
2024-04-28 10:55:57 +08:00
parent 56fb6764b2
commit 1cc13fd901
4 changed files with 26 additions and 3 deletions

View File

@@ -131,13 +131,16 @@
<select id="ListByCondition" resultType="com.cool.store.dto.Preparation.PreparationDTO">
select
a.id as id,
a.line_id as lineId,
a.shop_name as shopName,
a.store_num as storeNum,
a.shop_manager_user_id as shopManagerUserId,
a.supervisor_user_id as supervisorUserId,
a.region_id as regionId,
a.plan_open_time as planOpenTime,
b.username as username,
b.mobile as mobile
b.mobile as mobile,
b.investment_manager as investmentManager
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
where a.deleted = 0
<if test="request.keyword != null and request.keyword != ''">

View File

@@ -14,6 +14,8 @@ public class PreparationDTO {
private Long id;
private Long lineId;
private String shopName;
private String storeNum;
@@ -28,5 +30,9 @@ public class PreparationDTO {
private String mobile;
private String investmentManager;
private String supervisorUserId;
}

View File

@@ -50,6 +50,15 @@ public class PreparationScheduleVO {
@ApiModelProperty("所属站区")
private String regionNodeName;
@ApiModelProperty("招商经理名称")
private String investmentManagerName;
private Long lineId;
@ApiModelProperty("督导")
private String supervisionName;
public void setDays() {
if (this.planOpenTime==null|| this.ContractCompletionTime==null){
return;

View File

@@ -79,8 +79,10 @@ public class PreparationServiceImpl implements PreparationService {
Map<Long, ShopStageInfoDO> shopStageInfoDOMap = shopContractActualCompletionTime.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, x -> x));
List<Long> regionIds = preparationDTOS.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
List<String> userIds = preparationDTOS.stream().map(PreparationDTO::getShopManagerUserId).collect(Collectors.toList());
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
Set<String> userIds = preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getShopManagerUserId())).map(PreparationDTO::getShopManagerUserId).collect(Collectors.toSet());
userIds.addAll(preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getInvestmentManager())).map(PreparationDTO::getInvestmentManager).collect(Collectors.toSet()));
userIds.addAll(preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getSupervisorUserId())).map(PreparationDTO::getSupervisorUserId).collect(Collectors.toSet()));
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(new ArrayList<>(userIds));
List<PreparationScheduleVO> preparationScheduleVOS = new ArrayList<>();
preparationDTOS.forEach(x->{
@@ -88,10 +90,13 @@ public class PreparationServiceImpl implements PreparationService {
preparationScheduleVO.setMobile(x.getMobile());
preparationScheduleVO.setUsername(x.getUsername());
preparationScheduleVO.setShopId(x.getId());
preparationScheduleVO.setLineId(x.getLineId());
preparationScheduleVO.setShopName(x.getShopName());
preparationScheduleVO.setPlanOpenTime(x.getPlanOpenTime());
preparationScheduleVO.setStoreNum(x.getStoreNum());
preparationScheduleVO.setShopManagerUserName(userInfoMap.getOrDefault(x.getShopManagerUserId(), new EnterpriseUserDO()).getName());
preparationScheduleVO.setSupervisionName(userInfoMap.getOrDefault(x.getSupervisorUserId(), new EnterpriseUserDO()).getName());
preparationScheduleVO.setInvestmentManagerName(userInfoMap.getOrDefault(x.getInvestmentManager(), new EnterpriseUserDO()).getName());
preparationScheduleVO.setRegionNodeName(regionNameMap.getOrDefault(x.getRegionId(), ""));
ScheduleDTO dto = scheduleDTOMap.getOrDefault(x.getId(), new ScheduleDTO());
preparationScheduleVO.setCompletionColumn(dto.getCompletionColumn());