筹建列表 筹建详情
This commit is contained in:
@@ -131,13 +131,16 @@
|
|||||||
<select id="ListByCondition" resultType="com.cool.store.dto.Preparation.PreparationDTO">
|
<select id="ListByCondition" resultType="com.cool.store.dto.Preparation.PreparationDTO">
|
||||||
select
|
select
|
||||||
a.id as id,
|
a.id as id,
|
||||||
|
a.line_id as lineId,
|
||||||
a.shop_name as shopName,
|
a.shop_name as shopName,
|
||||||
a.store_num as storeNum,
|
a.store_num as storeNum,
|
||||||
a.shop_manager_user_id as shopManagerUserId,
|
a.shop_manager_user_id as shopManagerUserId,
|
||||||
|
a.supervisor_user_id as supervisorUserId,
|
||||||
a.region_id as regionId,
|
a.region_id as regionId,
|
||||||
a.plan_open_time as planOpenTime,
|
a.plan_open_time as planOpenTime,
|
||||||
b.username as username,
|
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
|
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||||
where a.deleted = 0
|
where a.deleted = 0
|
||||||
<if test="request.keyword != null and request.keyword != ''">
|
<if test="request.keyword != null and request.keyword != ''">
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ public class PreparationDTO {
|
|||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
private String shopName;
|
private String shopName;
|
||||||
|
|
||||||
private String storeNum;
|
private String storeNum;
|
||||||
@@ -28,5 +30,9 @@ public class PreparationDTO {
|
|||||||
|
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
private String investmentManager;
|
||||||
|
|
||||||
|
private String supervisorUserId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,15 @@ public class PreparationScheduleVO {
|
|||||||
@ApiModelProperty("所属站区")
|
@ApiModelProperty("所属站区")
|
||||||
private String regionNodeName;
|
private String regionNodeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商经理名称")
|
||||||
|
private String investmentManagerName;
|
||||||
|
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("督导")
|
||||||
|
private String supervisionName;
|
||||||
|
|
||||||
public void setDays() {
|
public void setDays() {
|
||||||
if (this.planOpenTime==null|| this.ContractCompletionTime==null){
|
if (this.planOpenTime==null|| this.ContractCompletionTime==null){
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -79,8 +79,10 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
Map<Long, ShopStageInfoDO> shopStageInfoDOMap = shopContractActualCompletionTime.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, x -> x));
|
Map<Long, ShopStageInfoDO> shopStageInfoDOMap = shopContractActualCompletionTime.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, x -> x));
|
||||||
List<Long> regionIds = preparationDTOS.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
List<Long> regionIds = preparationDTOS.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
||||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
List<String> userIds = preparationDTOS.stream().map(PreparationDTO::getShopManagerUserId).collect(Collectors.toList());
|
Set<String> userIds = preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getShopManagerUserId())).map(PreparationDTO::getShopManagerUserId).collect(Collectors.toSet());
|
||||||
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
|
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<>();
|
List<PreparationScheduleVO> preparationScheduleVOS = new ArrayList<>();
|
||||||
preparationDTOS.forEach(x->{
|
preparationDTOS.forEach(x->{
|
||||||
@@ -88,10 +90,13 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
preparationScheduleVO.setMobile(x.getMobile());
|
preparationScheduleVO.setMobile(x.getMobile());
|
||||||
preparationScheduleVO.setUsername(x.getUsername());
|
preparationScheduleVO.setUsername(x.getUsername());
|
||||||
preparationScheduleVO.setShopId(x.getId());
|
preparationScheduleVO.setShopId(x.getId());
|
||||||
|
preparationScheduleVO.setLineId(x.getLineId());
|
||||||
preparationScheduleVO.setShopName(x.getShopName());
|
preparationScheduleVO.setShopName(x.getShopName());
|
||||||
preparationScheduleVO.setPlanOpenTime(x.getPlanOpenTime());
|
preparationScheduleVO.setPlanOpenTime(x.getPlanOpenTime());
|
||||||
preparationScheduleVO.setStoreNum(x.getStoreNum());
|
preparationScheduleVO.setStoreNum(x.getStoreNum());
|
||||||
preparationScheduleVO.setShopManagerUserName(userInfoMap.getOrDefault(x.getShopManagerUserId(), new EnterpriseUserDO()).getName());
|
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(), ""));
|
preparationScheduleVO.setRegionNodeName(regionNameMap.getOrDefault(x.getRegionId(), ""));
|
||||||
ScheduleDTO dto = scheduleDTOMap.getOrDefault(x.getId(), new ScheduleDTO());
|
ScheduleDTO dto = scheduleDTOMap.getOrDefault(x.getId(), new ScheduleDTO());
|
||||||
preparationScheduleVO.setCompletionColumn(dto.getCompletionColumn());
|
preparationScheduleVO.setCompletionColumn(dto.getCompletionColumn());
|
||||||
|
|||||||
Reference in New Issue
Block a user