|
@@ -6,6 +6,7 @@ import com.xy.service.DeviceErrorsRecordService;
|
|
|
import com.xy.service.DeviceNetRecordService;
|
|
|
import com.xy.service.DeviceRecordsService;
|
|
|
import com.xy.service.DeviceTempRecordsService;
|
|
|
+import com.xy.utils.Emptys;
|
|
|
import com.xy.utils.MercAuthUtils;
|
|
|
import com.xy.utils.PageBean;
|
|
|
import com.xy.utils.R;
|
|
@@ -67,8 +68,12 @@ public class MercMiniDeviceRecordsController {
|
|
|
@ApiOperation("设备详情首页-联网记录")
|
|
|
@PostMapping("indexDeviceNetRecords")
|
|
|
public R<List<DeviceNetRecordDto.Vo>> indexDeviceNetRecords(@RequestBody @Validated MiniDeviceRecordsDto.DeviceIdDto dto) {
|
|
|
- DeviceNetRecordDto.Page page = (DeviceNetRecordDto.Page) new DeviceNetRecordDto.Page().setMercId(MercAuthUtils.getMercId())
|
|
|
- .setDeviceId(dto.getDeviceId());
|
|
|
+ DeviceNetRecordDto.Page page =
|
|
|
+ (DeviceNetRecordDto.Page) new DeviceNetRecordDto.Page()
|
|
|
+ .setMercId(MercAuthUtils.getMercId());
|
|
|
+ if(Emptys.check(dto.getDeviceId())){
|
|
|
+ page.setDeviceId(dto.getDeviceId());
|
|
|
+ }
|
|
|
page.setPage(getPageBean(INDEX_RECORDS_COUNT));
|
|
|
List<DeviceNetRecordDto.Vo> recordsList = deviceNetRecordPage(page).getData().getRecords();
|
|
|
return R.ok(recordsList);
|