|
|
@@ -1,5 +1,6 @@
|
|
|
package com.happy.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.happy.Model.Holiday;
|
|
|
import com.happy.Model.House;
|
|
|
@@ -78,11 +79,12 @@ public class HouseNumberStatusImplService implements HouseNumberStatusService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public JSONObject queryData(HouseNumberStatusDto houseNumberStatusDto) {
|
|
|
+ public JSONObject queryData(HouseNumberStatusDto houseNumberStatusDto,Integer pageNumber, Integer pageSize) {
|
|
|
String managerId = houseNumberStatusDto.getManagerId();
|
|
|
Integer showType = houseNumberStatusDto.getShowType();
|
|
|
if (StringUtils.isBlank(managerId) || showType == null) return null;
|
|
|
- List<House> houseList = housePriceService.queryHouseListByManagerId(houseNumberStatusDto.getManagerId());
|
|
|
+ JSONObject housePage = housePriceService.queryPageHouseListByManagerId(houseNumberStatusDto.getManagerId(),pageNumber,pageSize);
|
|
|
+ List<House> houseList = JSON.parseArray(housePage.getJSONArray("pageList").toJSONString(), House.class);
|
|
|
if (houseList == null || houseList.isEmpty()) return null;
|
|
|
HouseNumberDto houseNumberDto = new HouseNumberDto();
|
|
|
houseNumberDto.setHouseIdList(houseList.stream().map(House::getId).collect(Collectors.toList()));
|
|
|
@@ -141,7 +143,6 @@ public class HouseNumberStatusImplService implements HouseNumberStatusService {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- JSONObject result = new JSONObject();
|
|
|
if (houseNumberStatusDto.getShowType() == 1) {
|
|
|
List<String> dateListBetween = DateUtil.getDateStrListBetween(startDate, endDate);
|
|
|
|
|
|
@@ -227,13 +228,13 @@ public class HouseNumberStatusImplService implements HouseNumberStatusService {
|
|
|
System.out.println("错误信息:"+e.getMessage());
|
|
|
}
|
|
|
|
|
|
- result.put("dateTimes", dataTimes);
|
|
|
- result.put("datas", datas);
|
|
|
- return result;
|
|
|
+ housePage.put("dateTimes", dataTimes);
|
|
|
+ housePage.put("pageList", datas);
|
|
|
+ return housePage;
|
|
|
}
|
|
|
if (houseNumberStatusDto.getShowType() == 2) {
|
|
|
- result.put("data", buildResultOne(houseList, houseNumberList));
|
|
|
- return result;
|
|
|
+ housePage.put("pageList", buildResultOne(houseList, houseNumberList));
|
|
|
+ return housePage;
|
|
|
}
|
|
|
return null;
|
|
|
}
|