From e2a02c09b9d087a49ae5dd9f70856967390237de Mon Sep 17 00:00:00 2001 From: bsw215583320 <baoshiwei121@163.com> Date: 星期五, 01 十一月 2024 16:54:23 +0800 Subject: [PATCH] 兼容机台自建配方,实时数据通过mqtt转发 --- jeecg-module-dry/jeecg-module-dry-api/src/main/java/org/jeecg/modules/dry/entity/DryHerbFormula.java | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/jeecg-module-dry/jeecg-module-dry-api/src/main/java/org/jeecg/modules/dry/entity/DryHerbFormula.java b/jeecg-module-dry/jeecg-module-dry-api/src/main/java/org/jeecg/modules/dry/entity/DryHerbFormula.java index 6a3d545..9f63439 100644 --- a/jeecg-module-dry/jeecg-module-dry-api/src/main/java/org/jeecg/modules/dry/entity/DryHerbFormula.java +++ b/jeecg-module-dry/jeecg-module-dry-api/src/main/java/org/jeecg/modules/dry/entity/DryHerbFormula.java @@ -1,15 +1,14 @@ package org.jeecg.modules.dry.entity; import java.io.Serializable; -import java.io.UnsupportedEncodingException; import java.util.Date; -import java.math.BigDecimal; + import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.TableLogic; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; +import org.jeecg.modules.dry.vo.RealTimeDataVo; import org.springframework.format.annotation.DateTimeFormat; import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecg.common.aspect.annotation.Dict; @@ -127,4 +126,19 @@ @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "鏇存柊鏃堕棿") private Date updateTime; + + + public DryHerbFormula(){} + public DryHerbFormula(RealTimeDataVo realTimeDataVo) { + this.code = realTimeDataVo.getIndex() + ""; + this.delay = realTimeDataVo.getDelay(); + this.name = realTimeDataVo.getName(); + this.delay = realTimeDataVo.getDelay(); + this.turn = realTimeDataVo.getTurntime(); + this.feed = realTimeDataVo.getWeight1(); + this.target = realTimeDataVo.getMoisture3(); + this.windTemp = realTimeDataVo.getTemp3(); + this.et = realTimeDataVo.getTime1(); + this.tenantId = realTimeDataVo.getTenantid(); + } } -- Gitblit v1.9.3