设备信息
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
package com.fastbee.data.controller.aaScreenAgricultural;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.deviceInfo.mapper.DeviceInformationWormsMapper;
|
||||
import com.fastbee.deviceInfo.domain.*;
|
||||
import com.fastbee.deviceInfo.mapper.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -15,14 +18,29 @@ public class DeviceInfoController extends BaseController {
|
||||
@Autowired
|
||||
private DeviceInformationWormsMapper deviceInformationWormsMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMeteorologyMapper deviceInformationMeteorologyMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMoistureMapper deviceInformationMoistureMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationTargetpestsMapper deviceInformationTargetpestsMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMiaoqingMapper deviceInformationMiaoqingMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMonitorMapper deviceInformationMonitorMapper;
|
||||
/**
|
||||
* 查询虫情设备列表
|
||||
*/
|
||||
@GetMapping("/wormList")
|
||||
public AjaxResult getDeviceList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationMeteorology> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMeteorology::getId,DeviceInformationMeteorology::getName,
|
||||
DeviceInformationMeteorology::getLongitude,DeviceInformationMeteorology::getLatitude);
|
||||
return success(deviceInformationMeteorologyMapper.selectList(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,7 +48,10 @@ public class DeviceInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/weatherList")
|
||||
public AjaxResult getWeatherList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationWorms> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationWorms::getId,DeviceInformationWorms::getName,
|
||||
DeviceInformationWorms::getLongitude,DeviceInformationWorms::getLatitude);
|
||||
return success(deviceInformationWormsMapper.selectList(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,13 +59,39 @@ public class DeviceInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/soilList")
|
||||
public AjaxResult getSoilList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationMoisture> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMoisture::getId,DeviceInformationMoisture::getName,
|
||||
DeviceInformationMoisture::getLongitude,DeviceInformationMoisture::getLatitude);
|
||||
return success(deviceInformationMoistureMapper.selectList(queryWrapper));
|
||||
}
|
||||
/**
|
||||
* 查询杀虫灯设备列表
|
||||
*/
|
||||
@GetMapping("/lightList")
|
||||
public AjaxResult getLightList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationTargetpests> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationTargetpests::getId,DeviceInformationTargetpests::getName,
|
||||
DeviceInformationTargetpests::getLongitude,DeviceInformationTargetpests::getLatitude);
|
||||
return success(deviceInformationTargetpestsMapper.selectList(queryWrapper));
|
||||
}
|
||||
/**
|
||||
* 查询苗情设备列表
|
||||
*/
|
||||
@GetMapping("/miaoList")
|
||||
public AjaxResult getmiaoList() {
|
||||
LambdaQueryWrapper<DeviceInformationMiaoqing> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMiaoqing::getId,DeviceInformationMiaoqing::getName,
|
||||
DeviceInformationMiaoqing::getLongitude,DeviceInformationMiaoqing::getLatitude);
|
||||
return success(deviceInformationMiaoqingMapper.selectList(queryWrapper));
|
||||
}
|
||||
/**
|
||||
* 查询监控站设备列表
|
||||
*/
|
||||
@GetMapping("/monitorList")
|
||||
public AjaxResult getmonitorList() {
|
||||
LambdaQueryWrapper<DeviceInformationMonitor> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMonitor::getId,DeviceInformationMonitor::getName,
|
||||
DeviceInformationMonitor::getLongitude,DeviceInformationMonitor::getLatitude);
|
||||
return success(deviceInformationMonitorMapper.selectList(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user