|
@@ -136,23 +136,8 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
public List<ParkRoomResponse> listAll(ParkRoomResponse model, DateTrans dt) {
|
|
|
|
|
|
|
|
|
- List<ParkRoomResponse> parkRoomResponses = extendMapper.selectByModel(model);
|
|
|
- List<HouseType> houseTypes = houseTypeMapper.selectByExample(new HouseTypeExample());
|
|
|
- Map<String, HouseType> houseTypesMap = houseTypes.stream()
|
|
|
- .collect(Collectors.toMap(
|
|
|
- HouseType::getId,
|
|
|
- HouseType->HouseType,
|
|
|
- (existing, replacement) -> existing // 保留现有值
|
|
|
- ));
|
|
|
-
|
|
|
- for(ParkRoomResponse room:parkRoomResponses){
|
|
|
- if(StringUtils.isNotEmpty(room.getHouseTypeId()) && houseTypesMap.containsKey(room.getHouseTypeId())){
|
|
|
- HouseType houseType = houseTypesMap.get(room.getHouseTypeId());
|
|
|
- String str = houseType.getName() + "," + houseType.getBuildArea() + ",使用面积" + houseType.getUseArea();
|
|
|
- room.setHouseTypeStr(str);
|
|
|
- }
|
|
|
- }
|
|
|
- return parkRoomResponses;
|
|
|
+ List<ParkRoomResponse> list = extendMapper.selectByModel(model);
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
private ParkRoomExample getCondition(ParkRoom model, DateTrans dt) {
|
|
@@ -271,6 +256,21 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
*/
|
|
|
public List<ParkRoomResponse> excelList(ParkRoomResponse model, DateTrans dt) {
|
|
|
List<ParkRoomResponse> list = extendMapper.selectByModel(model);
|
|
|
+ List<HouseType> houseTypes = houseTypeMapper.selectByExample(new HouseTypeExample());
|
|
|
+ Map<String, HouseType> houseTypesMap = houseTypes.stream()
|
|
|
+ .collect(Collectors.toMap(
|
|
|
+ HouseType::getId,
|
|
|
+ HouseType->HouseType,
|
|
|
+ (existing, replacement) -> existing // 保留现有值
|
|
|
+ ));
|
|
|
+
|
|
|
+ for(ParkRoomResponse room:list){
|
|
|
+ if(StringUtils.isNotEmpty(room.getHouseTypeId()) && houseTypesMap.containsKey(room.getHouseTypeId())){
|
|
|
+ HouseType houseType = houseTypesMap.get(room.getHouseTypeId());
|
|
|
+ String str = houseType.getName() + "," + houseType.getBuildArea() + ",使用面积" + houseType.getUseArea();
|
|
|
+ room.setHouseTypeStr(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
return list;
|
|
|
}
|
|
|
|