feat(感知数据接收接口):
This commit is contained in:
parent
1aee5c1744
commit
623e1ac614
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.web.controller.sensor;
|
||||
|
||||
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.sensor.domain.PerceptionParams;
|
||||
import com.ruoyi.sensor.service.ISensorDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/sensor/data")
|
||||
public class OpenSensorDataController {
|
||||
|
||||
@Autowired
|
||||
private ISensorDataService sensorDataService;
|
||||
|
||||
@Anonymous
|
||||
@PostMapping("/judge")
|
||||
public void list(PerceptionParams perceptionParams) {
|
||||
sensorDataService.perceptionParamsHandler(perceptionParams);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.ruoyi.sensor.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PerceptionParams {
|
||||
|
||||
/**
|
||||
* 感知类型: 雾 / 冰 或者 0/1/2/3 表示
|
||||
*/
|
||||
private String perceptionType;
|
||||
|
||||
/**
|
||||
* 感知值: 浮点数,精度为小数点后 2 位
|
||||
*/
|
||||
private Double perceptionValue;
|
||||
|
||||
/**
|
||||
* 情报板 IP 地址
|
||||
*/
|
||||
private String boardIp;
|
||||
|
||||
/**
|
||||
* 情报板协议
|
||||
*/
|
||||
private String boardProtocol;
|
||||
}
|
Loading…
Reference in New Issue