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