虫情设备实时数据接口

This commit is contained in:
zhumeixiao
2024-11-27 10:34:29 +08:00
parent fea04d914c
commit 646c8f0fc5
6 changed files with 84 additions and 5 deletions

View File

@ -31,9 +31,7 @@ public class DeviceRealtimedataMoistureController {
public AjaxResult getLatestWeatherRealtimedata( String deviceId) {
return AjaxResult.success(deviceRealtimedataMoistureService.getLatestWeatherRealtimedata(deviceId));
}
/**
* 获取最新一条墒情设备下拉列表
*/
@GetMapping("/weather/pullDown")
public AjaxResult getLatestWeatherPullDown() {
return AjaxResult.success(deviceInformationMoistureService.selectDeviceInformationMoistureList(null));

View File

@ -0,0 +1,28 @@
package com.fastbee.data.controller.aaScreenAgricultural;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.deviceData.service.IDeviceRealtimedataMoistureService;
import com.fastbee.deviceData.service.impl.DeviceRealtimedataWormsServiceImpl;
import com.fastbee.deviceInfo.service.IDeviceInformationMoistureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController()
@RequestMapping("/worms")
public class DeviceRealtimedataWormsController {
@Autowired
private DeviceRealtimedataWormsServiceImpl deviceRealtimedataWormsServiceImpl;
/**
* 获取最新一条墒情数据
*/
@GetMapping("/weather/realtimedata")
public AjaxResult getLatestWeatherRealtimedata(String deviceId) {
return AjaxResult.success(deviceRealtimedataWormsServiceImpl.getLatestWeatherRealtimedata(deviceId));
}
}