Browse Source

Merge remote-tracking branch 'origin/dev_ic_data' into develop

dev_shibei_match
yinzuomei 4 years ago
parent
commit
81ff0f4893
  1. 13
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandDataDTO.java
  2. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandResearchAnalysisResultDTO.java
  3. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

13
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandDataDTO.java

@ -0,0 +1,13 @@
package com.epmet.dto.result.demand;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class DemandDataDTO implements Serializable {
private String firstCategoryCode;
private String firstCategoryName;
private List<IcResiUserReportDemandRes> demandList;
}

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandResearchAnalysisResultDTO.java

@ -20,8 +20,7 @@ public class DemandResearchAnalysisResultDTO implements Serializable {
private String houseId; private String houseId;
private List<HouseUserDTO> houseUserList; private List<HouseUserDTO> houseUserList;
private List<DemandDataDTO> demandData;
private List<IcResiUserReportDemandRes> demandList;
/** /**
* 入参中给的再返回去 * 入参中给的再返回去
*/ */

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -574,6 +574,15 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
IcResiUserBriefDTO icResiUserDTO = userRes.getData(); IcResiUserBriefDTO icResiUserDTO = userRes.getData();
DemandResearchAnalysisResultDTO resultDTO = ConvertUtils.sourceToTarget(icResiUserDTO, DemandResearchAnalysisResultDTO.class); DemandResearchAnalysisResultDTO resultDTO = ConvertUtils.sourceToTarget(icResiUserDTO, DemandResearchAnalysisResultDTO.class);
resultDTO.setEpmetUserIdList(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList()) ? formDTO.getEpmetUserIdList() : Collections.emptyList()); resultDTO.setEpmetUserIdList(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList()) ? formDTO.getEpmetUserIdList() : Collections.emptyList());
//返参格式套一层类别和类别名称
List<DemandDataDTO> demandData=new ArrayList<>();
DemandDataDTO demandDataDTO=new DemandDataDTO();
demandDataDTO.setFirstCategoryCode(formDTO.getFirstCategoryCode());
demandDataDTO.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),formDTO.getFirstCategoryCode()));
demandDataDTO.setDemandList(new ArrayList<>());
demandData.add(demandDataDTO);
//获取当前需求人,相同分类的需求列表。不分页,直接返回所有 //获取当前需求人,相同分类的需求列表。不分页,直接返回所有
List<String> userIds=new ArrayList<>(); List<String> userIds=new ArrayList<>();
userIds.add(formDTO.getIcResiUserId()); userIds.add(formDTO.getIcResiUserId());
@ -604,7 +613,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//一级分类名称 //一级分类名称
resDto.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),resDto.getFirstCategoryCode())); resDto.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),resDto.getFirstCategoryCode()));
} }
resultDTO.setDemandList(CollectionUtils.isNotEmpty(demandList) ? demandList : Collections.emptyList()); demandData.get(NumConstant.ZERO).setDemandList(CollectionUtils.isNotEmpty(demandList) ? demandList : Collections.emptyList());
} }
return resultDTO; return resultDTO;
} }

Loading…
Cancel
Save