|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonPropertyOrder; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @JsonPropertyOrder({ | 
|---|
|  |  |  | "id", "manureId", "manureName", "dt", "alarm", | 
|---|
|  |  |  | "stirRunning1", "stirRunning2", "stirRunning3", "stirRunning4", | 
|---|
|  |  |  | "injectRunning", "irrRunning", | 
|---|
|  |  |  | "manureFlow", "manureTime", "stirTime", | 
|---|
|  |  |  | "stirDuration", "injectDuration", | 
|---|
|  |  |  | "alarmStr", | 
|---|
|  |  |  | "stirRunning1Str", "stirRunning2Str", "stirRunning3Str", "stirRunning4Str", | 
|---|
|  |  |  | "injectRunningStr", "irrRunningStr" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public class VoManure  { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506251634001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 水肥机名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "水肥机名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Long manureName; | 
|---|
|  |  |  | public String manureName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @Schema(description = "注肥设定时间(秒)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Integer injectDuration; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "alarmStr") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getAlarmStr() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.alarm != null){ | 
|---|
|  |  |  | if(this.alarm == 1){ | 
|---|
|  |  |  | str = "故障" ; | 
|---|
|  |  |  | }else if(this.alarm == 0){ | 
|---|
|  |  |  | str = "正常" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "stirRunning1Str") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getStirRunning1Str() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.stirRunning1 != null){ | 
|---|
|  |  |  | if(this.stirRunning1 == 1){ | 
|---|
|  |  |  | str = "启动" ; | 
|---|
|  |  |  | }else if(this.stirRunning1 == 0){ | 
|---|
|  |  |  | str = "停止" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "stirRunning2Str") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getStirRunning2Str() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.stirRunning2 != null){ | 
|---|
|  |  |  | if(this.stirRunning2 == 1){ | 
|---|
|  |  |  | str = "启动" ; | 
|---|
|  |  |  | }else if(this.stirRunning2 == 0){ | 
|---|
|  |  |  | str = "停止" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "stirRunning3Str") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getStirRunning3Str() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.stirRunning3 != null){ | 
|---|
|  |  |  | if(this.stirRunning3 == 1){ | 
|---|
|  |  |  | str = "启动" ; | 
|---|
|  |  |  | }else if(this.stirRunning3 == 0){ | 
|---|
|  |  |  | str = "停止" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "stirRunning4Str") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getStirRunning4Str() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.stirRunning4 != null){ | 
|---|
|  |  |  | if(this.stirRunning4 == 1){ | 
|---|
|  |  |  | str = "启动" ; | 
|---|
|  |  |  | }else if(this.stirRunning4 == 0){ | 
|---|
|  |  |  | str = "停止" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "injectRunningStr") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getInjectRunningStr() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.injectRunning != null){ | 
|---|
|  |  |  | if(this.injectRunning == 1){ | 
|---|
|  |  |  | str = "启动" ; | 
|---|
|  |  |  | }else if(this.injectRunning == 0){ | 
|---|
|  |  |  | str = "停止" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Schema(hidden = true) | 
|---|
|  |  |  | @JSONField(name = "irrRunningStr") // 指定 JSON 中的字段名 | 
|---|
|  |  |  | public String getIrrRunningStr() { | 
|---|
|  |  |  | String str = "" ; | 
|---|
|  |  |  | if(this.irrRunning != null){ | 
|---|
|  |  |  | if(this.irrRunning == 1){ | 
|---|
|  |  |  | str = "启动" ; | 
|---|
|  |  |  | }else if(this.irrRunning == 0){ | 
|---|
|  |  |  | str = "停止" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return str ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|