|
|
@@ -86,7 +86,7 @@ public class IIotXycbCommService extends IotDeviceBaseServiceImpl implements Iot
|
|
|
return tableClass;
|
|
|
}
|
|
|
|
|
|
- public TableDataInfo dataList(IotDeviceDataListReqVo reqVo){
|
|
|
+ public TableDataInfo dataList(IotDeviceDataListReqVo reqVo, PageDomain pageDomain){
|
|
|
TableDataInfo rspData = new TableDataInfo();
|
|
|
rspData.setCode(ErrorCode.SUCCESS.getCode());
|
|
|
rspData.setMsg(ErrorCode.SUCCESS.getMessage());
|
|
|
@@ -109,11 +109,10 @@ public class IIotXycbCommService extends IotDeviceBaseServiceImpl implements Iot
|
|
|
Map<String, Object> cases = new HashMap<>();
|
|
|
cases.put("devBid", devBid);
|
|
|
cases.put("time_xycbdataCreatedDate", startTime + "," + endTime);
|
|
|
-
|
|
|
- PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- if(Objects.equals(pageDomain.getOrderByColumn(), "xycbdataCreatedDate")){
|
|
|
- pageDomain.setOrderByColumn("xycbdataCreatedDate");
|
|
|
+ if(pageDomain == null){
|
|
|
+ pageDomain = TableSupport.buildPageRequest();
|
|
|
}
|
|
|
+ pageDomain.setOrderByColumn("xycbdataCreatedDate");
|
|
|
Class tableClass = getTableClass(findDevice.getDevtypeBid());
|
|
|
IPage listPage = mongoService.findListPage(tableClass, cases, pageDomain);
|
|
|
|
|
|
@@ -146,6 +145,10 @@ public class IIotXycbCommService extends IotDeviceBaseServiceImpl implements Iot
|
|
|
return rspData;
|
|
|
}
|
|
|
|
|
|
+ public TableDataInfo dataList(IotDeviceDataListReqVo reqVo){
|
|
|
+ return dataList(reqVo, null);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取折线图数据列表接口
|
|
|
*
|
|
|
@@ -356,7 +359,10 @@ public class IIotXycbCommService extends IotDeviceBaseServiceImpl implements Iot
|
|
|
reqVo1.setStartTime(reqVo.getStartTime());
|
|
|
reqVo1.setEndTime(reqVo.getEndTime());
|
|
|
|
|
|
- TableDataInfo tableDataInfo = dataList(reqVo1);
|
|
|
+ PageDomain pageDomain = new PageDomain();
|
|
|
+ pageDomain.setPage(false);
|
|
|
+
|
|
|
+ TableDataInfo tableDataInfo = dataList(reqVo1, pageDomain);
|
|
|
List<IotYfXycbDataListRspVo> list = (List<IotYfXycbDataListRspVo>) tableDataInfo.getData();
|
|
|
ExcelUtil util = new ExcelUtil<>(IotYfXycbDataListRspVo.class);
|
|
|
util.exportExcel(response, list, "设备数据");
|