对接第三方
This commit is contained in:
@@ -18,10 +18,10 @@ public class ModelEnvironmentIndexPageReqVO extends PageParam {
|
|||||||
private String cycleId;
|
private String cycleId;
|
||||||
|
|
||||||
@Schema(description = "设备分类")
|
@Schema(description = "设备分类")
|
||||||
private String deviceClass;
|
private Integer deviceClass;
|
||||||
|
|
||||||
@Schema(description = "环境指标")
|
@Schema(description = "环境指标")
|
||||||
private String indicators;
|
private Integer indicators;
|
||||||
|
|
||||||
@Schema(description = "最低值")
|
@Schema(description = "最低值")
|
||||||
private BigDecimal minimum;
|
private BigDecimal minimum;
|
||||||
|
|||||||
@@ -1,68 +1,68 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.modelenvironmentindex.vo;
|
package cn.iocoder.yudao.module.farm.controller.admin.modelenvironmentindex.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import cn.idev.excel.annotation.*;
|
import cn.idev.excel.annotation.*;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 模型管理-环境指标 Response VO")
|
@Schema(description = "管理后台 - 模型管理-环境指标 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class ModelEnvironmentIndexRespVO {
|
public class ModelEnvironmentIndexRespVO {
|
||||||
|
|
||||||
@Schema(description = "基础id", requiredMode = Schema.RequiredMode.REQUIRED, example = "704")
|
@Schema(description = "基础id", requiredMode = Schema.RequiredMode.REQUIRED, example = "704")
|
||||||
@ExcelProperty("基础id")
|
@ExcelProperty("基础id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "周期id", example = "26426")
|
@Schema(description = "周期id", example = "26426")
|
||||||
@ExcelProperty("周期id")
|
@ExcelProperty("周期id")
|
||||||
private String cycleId;
|
private String cycleId;
|
||||||
|
|
||||||
@Schema(description = "设备分类")
|
@Schema(description = "设备分类")
|
||||||
@ExcelProperty("设备分类")
|
@ExcelProperty("设备分类")
|
||||||
private String deviceClass;
|
private Integer deviceClass;
|
||||||
|
|
||||||
@Schema(description = "环境指标")
|
@Schema(description = "环境指标")
|
||||||
@ExcelProperty("环境指标")
|
@ExcelProperty("环境指标")
|
||||||
private String indicators;
|
private Integer indicators;
|
||||||
|
|
||||||
@Schema(description = "最低值")
|
@Schema(description = "最低值")
|
||||||
@ExcelProperty("最低值")
|
@ExcelProperty("最低值")
|
||||||
private BigDecimal minimum;
|
private BigDecimal minimum;
|
||||||
|
|
||||||
@Schema(description = "最高值")
|
@Schema(description = "最高值")
|
||||||
@ExcelProperty("最高值")
|
@ExcelProperty("最高值")
|
||||||
private BigDecimal maximum;
|
private BigDecimal maximum;
|
||||||
|
|
||||||
@Schema(description = "预警摘要说明", example = "你猜")
|
@Schema(description = "预警摘要说明", example = "你猜")
|
||||||
@ExcelProperty("预警摘要说明")
|
@ExcelProperty("预警摘要说明")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@Schema(description = "基地id", example = "23126")
|
@Schema(description = "基地id", example = "23126")
|
||||||
@ExcelProperty("基地id")
|
@ExcelProperty("基地id")
|
||||||
private String baseId;
|
private String baseId;
|
||||||
|
|
||||||
@Schema(description = "基地", example = "李四")
|
@Schema(description = "基地", example = "李四")
|
||||||
@ExcelProperty("基地")
|
@ExcelProperty("基地")
|
||||||
private String baseName;
|
private String baseName;
|
||||||
|
|
||||||
@Schema(description = "地块ID", example = "26021")
|
@Schema(description = "地块ID", example = "26021")
|
||||||
@ExcelProperty("地块ID")
|
@ExcelProperty("地块ID")
|
||||||
private String plotId;
|
private String plotId;
|
||||||
|
|
||||||
@Schema(description = "地块", example = "王五")
|
@Schema(description = "地块", example = "王五")
|
||||||
@ExcelProperty("地块")
|
@ExcelProperty("地块")
|
||||||
private String plotName;
|
private String plotName;
|
||||||
|
|
||||||
@Schema(description = "租户id", example = "20667")
|
@Schema(description = "租户id", example = "20667")
|
||||||
@ExcelProperty("租户id")
|
@ExcelProperty("租户id")
|
||||||
private String tenantId;
|
private String tenantId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ public class ModelEnvironmentIndexSaveReqVO {
|
|||||||
private String cycleId;
|
private String cycleId;
|
||||||
|
|
||||||
@Schema(description = "设备分类")
|
@Schema(description = "设备分类")
|
||||||
private String deviceClass;
|
private Integer deviceClass;
|
||||||
|
|
||||||
@Schema(description = "环境指标")
|
@Schema(description = "环境指标")
|
||||||
private String indicators;
|
private Integer indicators;
|
||||||
|
|
||||||
@Schema(description = "最低值")
|
@Schema(description = "最低值")
|
||||||
private BigDecimal minimum;
|
private BigDecimal minimum;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class MqttTestController {
|
|||||||
@PreAuthorize("@ss.hasPermission('farm:mqtt-connection:test')")
|
@PreAuthorize("@ss.hasPermission('farm:mqtt-connection:test')")
|
||||||
public CommonResult<String> publishTest(
|
public CommonResult<String> publishTest(
|
||||||
@PathVariable("deviceId") String deviceId,
|
@PathVariable("deviceId") String deviceId,
|
||||||
@RequestParam(value = "message", defaultValue = "{\"temperature\":25.5,\"humidity\":60.2}") String message) {
|
@RequestParam(value = "message") String message) {
|
||||||
try {
|
try {
|
||||||
deviceMqttService.publishTelemetry(deviceId, message);
|
deviceMqttService.publishTelemetry(deviceId, message);
|
||||||
return success("消息发送成功");
|
return success("消息发送成功");
|
||||||
|
|||||||
@@ -37,12 +37,11 @@ public class ModelEnvironmentIndexDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 设备分类
|
* 设备分类
|
||||||
*/
|
*/
|
||||||
@DictFormat("device_class")
|
private Integer deviceClass;
|
||||||
private String deviceClass;
|
|
||||||
/**
|
/**
|
||||||
* 环境指标
|
* 环境指标
|
||||||
*/
|
*/
|
||||||
private String indicators;
|
private Integer indicators;
|
||||||
/**
|
/**
|
||||||
* 最低值
|
* 最低值
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user