设备信息定时查询
天气预警数据定时查询
This commit is contained in:
@ -0,0 +1,429 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备传感数据表;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-5-8
|
||||
*/
|
||||
public class DeviceSense {
|
||||
/** id */
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
private Integer id ;
|
||||
|
||||
private String DeviceId;
|
||||
/** 光照强度[Lux] */
|
||||
private Double Sunlight ;
|
||||
/** 空气温度[°C] */
|
||||
private Double AirTemp ;
|
||||
/** 空气湿度[%] */
|
||||
private Double AirHumidity ;
|
||||
/** 土壤温度[°C] */
|
||||
private Double SoilTemp ;
|
||||
/** 土壤湿度[%] */
|
||||
private Double SoilHumidity ;
|
||||
/** 土壤电导率[uS/cm] */
|
||||
private Integer SoilConduct ;
|
||||
/** 二氧化碳浓度[ppm] */
|
||||
private Double CO2_ ;
|
||||
/** PH值 */
|
||||
private Double PH ;
|
||||
/** 设备1运行行程 */
|
||||
private Integer position1 ;
|
||||
/** 设备1运行状态 */
|
||||
private String run_status1 ;
|
||||
/** 设备1控制状态 */
|
||||
private String control_status1 ;
|
||||
/** 设备2运行行程 */
|
||||
private Integer position2 ;
|
||||
/** 设备2运行状态 */
|
||||
private String run_status2 ;
|
||||
/** 设备2控制状态 */
|
||||
private String control_status2 ;
|
||||
/** 设备3运行行程 */
|
||||
private Integer position3 ;
|
||||
/** 设备3运行状态 */
|
||||
private String run_status3 ;
|
||||
/** 设备3控制状态 */
|
||||
private String control_status3 ;
|
||||
/** 设备4运行行程 */
|
||||
private Integer position4 ;
|
||||
/** 设备4运行状态 */
|
||||
private String run_status4 ;
|
||||
/** 设备4控制状态 */
|
||||
private String control_status4 ;
|
||||
/** 设备5运行行程 */
|
||||
private Integer position5 ;
|
||||
/** 设备5运行状态 */
|
||||
private String run_status5 ;
|
||||
/** 设备5控制状态 */
|
||||
private String control_status5 ;
|
||||
/** 设备6运行行程 */
|
||||
private Integer position6 ;
|
||||
/** 设备6运行状态 */
|
||||
private String run_status6 ;
|
||||
/** 设备6控制状态 */
|
||||
private String control_status6 ;
|
||||
/** 设备7运行行程 */
|
||||
private Integer position7 ;
|
||||
/** 设备7运行状态 */
|
||||
private String run_status7 ;
|
||||
/** 设备7控制状态 */
|
||||
private String control_status7 ;
|
||||
/** 设备8运行行程 */
|
||||
private Integer position8 ;
|
||||
/** 设备8运行状态 */
|
||||
private String run_status8 ;
|
||||
/** 设备8控制状态 */
|
||||
private String control_status8 ;
|
||||
/** 备用1 */
|
||||
private Integer BeiYong1 ;
|
||||
/** 备用2 */
|
||||
private Integer BeiYong2 ;
|
||||
/** 上报时间 */
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date time ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return DeviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
DeviceId = deviceId;
|
||||
}
|
||||
|
||||
public Double getSunlight() {
|
||||
return Sunlight;
|
||||
}
|
||||
|
||||
public void setSunlight(Double sunlight) {
|
||||
Sunlight = sunlight;
|
||||
}
|
||||
|
||||
public Double getAirTemp() {
|
||||
return AirTemp;
|
||||
}
|
||||
|
||||
public void setAirTemp(Double airTemp) {
|
||||
AirTemp = airTemp;
|
||||
}
|
||||
|
||||
public Double getAirHumidity() {
|
||||
return AirHumidity;
|
||||
}
|
||||
|
||||
public void setAirHumidity(Double airHumidity) {
|
||||
AirHumidity = airHumidity;
|
||||
}
|
||||
|
||||
public Double getSoilTemp() {
|
||||
return SoilTemp;
|
||||
}
|
||||
|
||||
public void setSoilTemp(Double soilTemp) {
|
||||
SoilTemp = soilTemp;
|
||||
}
|
||||
|
||||
public Double getSoilHumidity() {
|
||||
return SoilHumidity;
|
||||
}
|
||||
|
||||
public void setSoilHumidity(Double soilHumidity) {
|
||||
SoilHumidity = soilHumidity;
|
||||
}
|
||||
|
||||
public Integer getSoilConduct() {
|
||||
return SoilConduct;
|
||||
}
|
||||
|
||||
public void setSoilConduct(Integer soilConduct) {
|
||||
SoilConduct = soilConduct;
|
||||
}
|
||||
|
||||
public Double getCO2_() {
|
||||
return CO2_;
|
||||
}
|
||||
|
||||
public void setCO2_(Double CO2_) {
|
||||
this.CO2_ = CO2_;
|
||||
}
|
||||
|
||||
public Double getPH() {
|
||||
return PH;
|
||||
}
|
||||
|
||||
public void setPH(Double PH) {
|
||||
this.PH = PH;
|
||||
}
|
||||
|
||||
public Integer getPosition1() {
|
||||
return position1;
|
||||
}
|
||||
|
||||
public void setPosition1(Integer position1) {
|
||||
this.position1 = position1;
|
||||
}
|
||||
|
||||
public String getRun_status1() {
|
||||
return run_status1;
|
||||
}
|
||||
|
||||
public void setRun_status1(String run_status1) {
|
||||
this.run_status1 = run_status1;
|
||||
}
|
||||
|
||||
public String getControl_status1() {
|
||||
return control_status1;
|
||||
}
|
||||
|
||||
public void setControl_status1(String control_status1) {
|
||||
this.control_status1 = control_status1;
|
||||
}
|
||||
|
||||
public Integer getPosition2() {
|
||||
return position2;
|
||||
}
|
||||
|
||||
public void setPosition2(Integer position2) {
|
||||
this.position2 = position2;
|
||||
}
|
||||
|
||||
public String getRun_status2() {
|
||||
return run_status2;
|
||||
}
|
||||
|
||||
public void setRun_status2(String run_status2) {
|
||||
this.run_status2 = run_status2;
|
||||
}
|
||||
|
||||
public String getControl_status2() {
|
||||
return control_status2;
|
||||
}
|
||||
|
||||
public void setControl_status2(String control_status2) {
|
||||
this.control_status2 = control_status2;
|
||||
}
|
||||
|
||||
public Integer getPosition3() {
|
||||
return position3;
|
||||
}
|
||||
|
||||
public void setPosition3(Integer position3) {
|
||||
this.position3 = position3;
|
||||
}
|
||||
|
||||
public String getRun_status3() {
|
||||
return run_status3;
|
||||
}
|
||||
|
||||
public void setRun_status3(String run_status3) {
|
||||
this.run_status3 = run_status3;
|
||||
}
|
||||
|
||||
public String getControl_status3() {
|
||||
return control_status3;
|
||||
}
|
||||
|
||||
public void setControl_status3(String control_status3) {
|
||||
this.control_status3 = control_status3;
|
||||
}
|
||||
|
||||
public Integer getPosition4() {
|
||||
return position4;
|
||||
}
|
||||
|
||||
public void setPosition4(Integer position4) {
|
||||
this.position4 = position4;
|
||||
}
|
||||
|
||||
public String getRun_status4() {
|
||||
return run_status4;
|
||||
}
|
||||
|
||||
public void setRun_status4(String run_status4) {
|
||||
this.run_status4 = run_status4;
|
||||
}
|
||||
|
||||
public String getControl_status4() {
|
||||
return control_status4;
|
||||
}
|
||||
|
||||
public void setControl_status4(String control_status4) {
|
||||
this.control_status4 = control_status4;
|
||||
}
|
||||
|
||||
public Integer getPosition5() {
|
||||
return position5;
|
||||
}
|
||||
|
||||
public void setPosition5(Integer position5) {
|
||||
this.position5 = position5;
|
||||
}
|
||||
|
||||
public String getRun_status5() {
|
||||
return run_status5;
|
||||
}
|
||||
|
||||
public void setRun_status5(String run_status5) {
|
||||
this.run_status5 = run_status5;
|
||||
}
|
||||
|
||||
public String getControl_status5() {
|
||||
return control_status5;
|
||||
}
|
||||
|
||||
public void setControl_status5(String control_status5) {
|
||||
this.control_status5 = control_status5;
|
||||
}
|
||||
|
||||
public Integer getPosition6() {
|
||||
return position6;
|
||||
}
|
||||
|
||||
public void setPosition6(Integer position6) {
|
||||
this.position6 = position6;
|
||||
}
|
||||
|
||||
public String getRun_status6() {
|
||||
return run_status6;
|
||||
}
|
||||
|
||||
public void setRun_status6(String run_status6) {
|
||||
this.run_status6 = run_status6;
|
||||
}
|
||||
|
||||
public String getControl_status6() {
|
||||
return control_status6;
|
||||
}
|
||||
|
||||
public void setControl_status6(String control_status6) {
|
||||
this.control_status6 = control_status6;
|
||||
}
|
||||
|
||||
public Integer getPosition7() {
|
||||
return position7;
|
||||
}
|
||||
|
||||
public void setPosition7(Integer position7) {
|
||||
this.position7 = position7;
|
||||
}
|
||||
|
||||
public String getRun_status7() {
|
||||
return run_status7;
|
||||
}
|
||||
|
||||
public void setRun_status7(String run_status7) {
|
||||
this.run_status7 = run_status7;
|
||||
}
|
||||
|
||||
public String getControl_status7() {
|
||||
return control_status7;
|
||||
}
|
||||
|
||||
public void setControl_status7(String control_status7) {
|
||||
this.control_status7 = control_status7;
|
||||
}
|
||||
|
||||
public Integer getPosition8() {
|
||||
return position8;
|
||||
}
|
||||
|
||||
public void setPosition8(Integer position8) {
|
||||
this.position8 = position8;
|
||||
}
|
||||
|
||||
public String getRun_status8() {
|
||||
return run_status8;
|
||||
}
|
||||
|
||||
public void setRun_status8(String run_status8) {
|
||||
this.run_status8 = run_status8;
|
||||
}
|
||||
|
||||
public String getControl_status8() {
|
||||
return control_status8;
|
||||
}
|
||||
|
||||
public void setControl_status8(String control_status8) {
|
||||
this.control_status8 = control_status8;
|
||||
}
|
||||
|
||||
public Integer getBeiYong1() {
|
||||
return BeiYong1;
|
||||
}
|
||||
|
||||
public void setBeiYong1(Integer beiYong1) {
|
||||
this.BeiYong1 = beiYong1;
|
||||
}
|
||||
|
||||
public Integer getBeiYong2() {
|
||||
return BeiYong2;
|
||||
}
|
||||
|
||||
public void setBeiYong2(Integer beiYong2) {
|
||||
this.BeiYong2 = beiYong2;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DeviceSense{" +
|
||||
"id=" + id +
|
||||
", DevicedId='" + DeviceId + '\'' +
|
||||
", Sunlight=" + Sunlight +
|
||||
", AirTemp=" + AirTemp +
|
||||
", AirHumidity=" + AirHumidity +
|
||||
", SoilTemp=" + SoilTemp +
|
||||
", SoilHumidity=" + SoilHumidity +
|
||||
", SoilConduct=" + SoilConduct +
|
||||
", CO2_=" + CO2_ +
|
||||
", PH=" + PH +
|
||||
", position1=" + position1 +
|
||||
", run_status1='" + run_status1 + '\'' +
|
||||
", control_status1='" + control_status1 + '\'' +
|
||||
", position2=" + position2 +
|
||||
", run_status2='" + run_status2 + '\'' +
|
||||
", control_status2='" + control_status2 + '\'' +
|
||||
", position3=" + position3 +
|
||||
", run_status3='" + run_status3 + '\'' +
|
||||
", control_status3='" + control_status3 + '\'' +
|
||||
", position4=" + position4 +
|
||||
", run_status4='" + run_status4 + '\'' +
|
||||
", control_status4='" + control_status4 + '\'' +
|
||||
", position5=" + position5 +
|
||||
", run_status5='" + run_status5 + '\'' +
|
||||
", control_status5='" + control_status5 + '\'' +
|
||||
", position6=" + position6 +
|
||||
", run_status6='" + run_status6 + '\'' +
|
||||
", control_status6='" + control_status6 + '\'' +
|
||||
", position7=" + position7 +
|
||||
", run_status7='" + run_status7 + '\'' +
|
||||
", control_status7='" + control_status7 + '\'' +
|
||||
", position8=" + position8 +
|
||||
", run_status8='" + run_status8 + '\'' +
|
||||
", control_status8='" + control_status8 + '\'' +
|
||||
", BeiYong1=" + BeiYong1 +
|
||||
", BeiYong2=" + BeiYong2 +
|
||||
", time=" + time +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,879 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 水肥机传感数据;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-5-10
|
||||
*/
|
||||
public class FertigationSense {
|
||||
/** id */
|
||||
private Integer id ;
|
||||
|
||||
private String DeviceId;
|
||||
/** EC实际值mS/cm */
|
||||
private Double EC ;
|
||||
/** PH实际值 */
|
||||
private Double pH ;
|
||||
/** 水泵实际压力MP */
|
||||
private Double PumpPressure ;
|
||||
/** 1#吸肥通道累计肥量使用量L */
|
||||
private Double AccumulativeInflow1 ;
|
||||
/** 1#吸肥通道肥量瞬时流量L/H */
|
||||
private Double InstantInflow1 ;
|
||||
/** 2#吸肥通道累计肥量使用量L */
|
||||
private Double AccumulativeInflow2 ;
|
||||
/** 2#吸肥通道肥量瞬时流量L/H */
|
||||
private Double InstantInflow2 ;
|
||||
/** 3#吸肥通道累计肥量使用量L */
|
||||
private Double AccumulativeInflow3 ;
|
||||
/** 3#吸肥通道肥量瞬时流量L/H */
|
||||
private Double InstantInflow3 ;
|
||||
/** 4#吸肥通道累计肥量使用量L */
|
||||
private Double AccumulativeInflow4 ;
|
||||
/** 4#吸肥通道肥量瞬时流量L/H */
|
||||
private Double InstantInflow4 ;
|
||||
/** 酸吸肥通道累计肥量使用量L */
|
||||
private Double AccumulativeInflowAcid ;
|
||||
/** 酸吸肥通道肥量瞬时流量L/H */
|
||||
private Double InstantInflowAcid ;
|
||||
/** 肥量累计使用量清零 */
|
||||
private Integer AccumulativeInflowClear ;
|
||||
/** 设备云状态 */
|
||||
private Integer CloudStatus ;
|
||||
/** 工作状态 */
|
||||
private Integer WorkStatus ;
|
||||
/** 控制方式 */
|
||||
private Integer ControlMode ;
|
||||
/** 自动工作方式 */
|
||||
private Integer AutoMode ;
|
||||
/** 水泵状态 */
|
||||
private Integer InflowPump ;
|
||||
/** 吸肥泵状态 */
|
||||
private Integer FeedingPump ;
|
||||
/** 1#通道吸肥阀状态 */
|
||||
private Integer FeedingPumpCH1 ;
|
||||
/** 1#通道吸肥阀输出占空比% */
|
||||
private Integer FeedingPumpCH1PWM ;
|
||||
/** 2#通道吸肥阀状态 */
|
||||
private Integer FeedingPumpCH2 ;
|
||||
/** 2#通道吸肥阀输出占空比% */
|
||||
private Integer FeedingPumpCH2PWM ;
|
||||
/** 3#通道吸肥阀状态 */
|
||||
private Integer FeedingPumpCH3 ;
|
||||
/** 3#通道吸肥阀输出占空比% */
|
||||
private Integer FeedingPumpCH3PWM ;
|
||||
/** 4#通道吸肥阀状态 */
|
||||
private Integer FeedingPumpCH4 ;
|
||||
/** 4#通道吸肥阀输出占空比% */
|
||||
private Integer FeedingPumpCH4PWM ;
|
||||
/** 酸通道吸肥阀状态 */
|
||||
private Integer FeedingPumpAcid ;
|
||||
/** 酸通道吸肥阀输出占空比% */
|
||||
private Integer FeedingPumpAcidPWM ;
|
||||
/** 1#搅拌状态 */
|
||||
private Integer Stir1 ;
|
||||
/** 2#搅拌状态 */
|
||||
private Integer Stir2 ;
|
||||
/** 3#搅拌状态 */
|
||||
private Integer Stir3 ;
|
||||
/** 4#搅拌状态 */
|
||||
private Integer Stir4 ;
|
||||
/** 5#搅拌状态 */
|
||||
private Integer Stir5 ;
|
||||
/** 1#田间电磁阀状态 */
|
||||
private Integer Valve1 ;
|
||||
/** 2#田间电磁阀状态 */
|
||||
private Integer Valve2 ;
|
||||
/** 3#田间电磁阀状态 */
|
||||
private Integer Valve3 ;
|
||||
/** 4#田间电磁阀状态 */
|
||||
private Integer Valve4 ;
|
||||
/** 5#田间电磁阀状态 */
|
||||
private Integer Valve5 ;
|
||||
/** 6#田间电磁阀状态 */
|
||||
private Integer Valve6 ;
|
||||
/** 7#田间电磁阀状态 */
|
||||
private Integer Valve7 ;
|
||||
/** 8#田间电磁阀状态 */
|
||||
private Integer Valve8 ;
|
||||
/** 9#田间电磁阀状态 */
|
||||
private Integer Valve9 ;
|
||||
/** 10#田间电磁阀状态 */
|
||||
private Integer Valve10 ;
|
||||
/** 11#田间电磁阀状态 */
|
||||
private Integer Valve11 ;
|
||||
/** 12#田间电磁阀状态 */
|
||||
private Integer Valve12 ;
|
||||
/** 13#田间电磁阀状态 */
|
||||
private Integer Valve13 ;
|
||||
/** 14#田间电磁阀状态 */
|
||||
private Integer Valve14 ;
|
||||
/** 15#田间电磁阀状态 */
|
||||
private Integer Valve15 ;
|
||||
/** 16#田间电磁阀状态 */
|
||||
private Integer Valve16 ;
|
||||
/** 17#田间电磁阀状态 */
|
||||
private Integer Valve17 ;
|
||||
/** 18#田间电磁阀状态 */
|
||||
private Integer Valve18 ;
|
||||
/** 19#田间电磁阀状态 */
|
||||
private Integer Valve19 ;
|
||||
/** 20#田间电磁阀状态 */
|
||||
private Integer Valve20 ;
|
||||
/** 21#田间电磁阀状态 */
|
||||
private Integer Valve21 ;
|
||||
/** 22#田间电磁阀状态 */
|
||||
private Integer Valve22 ;
|
||||
/** 23#田间电磁阀状态 */
|
||||
private Integer Valve23 ;
|
||||
/** 24#田间电磁阀状态 */
|
||||
private Integer Valve24 ;
|
||||
/** 25#田间电磁阀状态 */
|
||||
private Integer Valve25 ;
|
||||
/** 26#田间电磁阀状态 */
|
||||
private Integer Valve26 ;
|
||||
/** 27#田间电磁阀状态 */
|
||||
private Integer Valve27 ;
|
||||
/** 28#田间电磁阀状态 */
|
||||
private Integer Valve28 ;
|
||||
/** 29#田间电磁阀状态 */
|
||||
private Integer Valve29 ;
|
||||
/** 30#田间电磁阀状态 */
|
||||
private Integer Valve30 ;
|
||||
/** 31#田间电磁阀状态 */
|
||||
private Integer Valve31 ;
|
||||
/** 32#田间电磁阀状态 */
|
||||
private Integer Valve32 ;
|
||||
/** 33#田间电磁阀状态 */
|
||||
private Integer Valve33 ;
|
||||
/** 34#田间电磁阀状态 */
|
||||
private Integer Valve34 ;
|
||||
/** 35#田间电磁阀状态 */
|
||||
private Integer Valve35 ;
|
||||
/** 36#田间电磁阀状态 */
|
||||
private Integer Valve36 ;
|
||||
/** 37#田间电磁阀状态 */
|
||||
private Integer Valve37 ;
|
||||
/** 38#田间电磁阀状态 */
|
||||
private Integer Valve38 ;
|
||||
/** 39#田间电磁阀状态 */
|
||||
private Integer Valve39 ;
|
||||
/** 40#田间电磁阀状态 */
|
||||
private Integer Valve40 ;
|
||||
/** 上报时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date time ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return DeviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
DeviceId = deviceId;
|
||||
}
|
||||
|
||||
public Double getEC() {
|
||||
return EC;
|
||||
}
|
||||
|
||||
public void setEC(Double EC) {
|
||||
this.EC = EC;
|
||||
}
|
||||
|
||||
public Double getpH() {
|
||||
return pH;
|
||||
}
|
||||
|
||||
public void setpH(Double pH) {
|
||||
this.pH = pH;
|
||||
}
|
||||
|
||||
public Double getPumpPressure() {
|
||||
return PumpPressure;
|
||||
}
|
||||
|
||||
public void setPumpPressure(Double pumpPressure) {
|
||||
PumpPressure = pumpPressure;
|
||||
}
|
||||
|
||||
public Double getAccumulativeInflow1() {
|
||||
return AccumulativeInflow1;
|
||||
}
|
||||
|
||||
public void setAccumulativeInflow1(Double accumulativeInflow1) {
|
||||
AccumulativeInflow1 = accumulativeInflow1;
|
||||
}
|
||||
|
||||
public Double getInstantInflow1() {
|
||||
return InstantInflow1;
|
||||
}
|
||||
|
||||
public void setInstantInflow1(Double instantInflow1) {
|
||||
InstantInflow1 = instantInflow1;
|
||||
}
|
||||
|
||||
public Double getAccumulativeInflow2() {
|
||||
return AccumulativeInflow2;
|
||||
}
|
||||
|
||||
public void setAccumulativeInflow2(Double accumulativeInflow2) {
|
||||
AccumulativeInflow2 = accumulativeInflow2;
|
||||
}
|
||||
|
||||
public Double getInstantInflow2() {
|
||||
return InstantInflow2;
|
||||
}
|
||||
|
||||
public void setInstantInflow2(Double instantInflow2) {
|
||||
InstantInflow2 = instantInflow2;
|
||||
}
|
||||
|
||||
public Double getAccumulativeInflow3() {
|
||||
return AccumulativeInflow3;
|
||||
}
|
||||
|
||||
public void setAccumulativeInflow3(Double accumulativeInflow3) {
|
||||
AccumulativeInflow3 = accumulativeInflow3;
|
||||
}
|
||||
|
||||
public Double getInstantInflow3() {
|
||||
return InstantInflow3;
|
||||
}
|
||||
|
||||
public void setInstantInflow3(Double instantInflow3) {
|
||||
InstantInflow3 = instantInflow3;
|
||||
}
|
||||
|
||||
public Double getAccumulativeInflow4() {
|
||||
return AccumulativeInflow4;
|
||||
}
|
||||
|
||||
public void setAccumulativeInflow4(Double accumulativeInflow4) {
|
||||
AccumulativeInflow4 = accumulativeInflow4;
|
||||
}
|
||||
|
||||
public Double getInstantInflow4() {
|
||||
return InstantInflow4;
|
||||
}
|
||||
|
||||
public void setInstantInflow4(Double instantInflow4) {
|
||||
InstantInflow4 = instantInflow4;
|
||||
}
|
||||
|
||||
public Double getAccumulativeInflowAcid() {
|
||||
return AccumulativeInflowAcid;
|
||||
}
|
||||
|
||||
public void setAccumulativeInflowAcid(Double accumulativeInflowAcid) {
|
||||
AccumulativeInflowAcid = accumulativeInflowAcid;
|
||||
}
|
||||
|
||||
public Double getInstantInflowAcid() {
|
||||
return InstantInflowAcid;
|
||||
}
|
||||
|
||||
public void setInstantInflowAcid(Double instantInflowAcid) {
|
||||
InstantInflowAcid = instantInflowAcid;
|
||||
}
|
||||
|
||||
public Integer getAccumulativeInflowClear() {
|
||||
return AccumulativeInflowClear;
|
||||
}
|
||||
|
||||
public void setAccumulativeInflowClear(Integer accumulativeInflowClear) {
|
||||
AccumulativeInflowClear = accumulativeInflowClear;
|
||||
}
|
||||
|
||||
public Integer getCloudStatus() {
|
||||
return CloudStatus;
|
||||
}
|
||||
|
||||
public void setCloudStatus(Integer cloudStatus) {
|
||||
CloudStatus = cloudStatus;
|
||||
}
|
||||
|
||||
public Integer getWorkStatus() {
|
||||
return WorkStatus;
|
||||
}
|
||||
|
||||
public void setWorkStatus(Integer workStatus) {
|
||||
WorkStatus = workStatus;
|
||||
}
|
||||
|
||||
public Integer getControlMode() {
|
||||
return ControlMode;
|
||||
}
|
||||
|
||||
public void setControlMode(Integer controlMode) {
|
||||
ControlMode = controlMode;
|
||||
}
|
||||
|
||||
public Integer getAutoMode() {
|
||||
return AutoMode;
|
||||
}
|
||||
|
||||
public void setAutoMode(Integer autoMode) {
|
||||
AutoMode = autoMode;
|
||||
}
|
||||
|
||||
public Integer getInflowPump() {
|
||||
return InflowPump;
|
||||
}
|
||||
|
||||
public void setInflowPump(Integer inflowPump) {
|
||||
InflowPump = inflowPump;
|
||||
}
|
||||
|
||||
public Integer getFeedingPump() {
|
||||
return FeedingPump;
|
||||
}
|
||||
|
||||
public void setFeedingPump(Integer feedingPump) {
|
||||
FeedingPump = feedingPump;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH1() {
|
||||
return FeedingPumpCH1;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH1(Integer feedingPumpCH1) {
|
||||
FeedingPumpCH1 = feedingPumpCH1;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH1PWM() {
|
||||
return FeedingPumpCH1PWM;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH1PWM(Integer feedingPumpCH1PWM) {
|
||||
FeedingPumpCH1PWM = feedingPumpCH1PWM;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH2() {
|
||||
return FeedingPumpCH2;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH2(Integer feedingPumpCH2) {
|
||||
FeedingPumpCH2 = feedingPumpCH2;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH2PWM() {
|
||||
return FeedingPumpCH2PWM;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH2PWM(Integer feedingPumpCH2PWM) {
|
||||
FeedingPumpCH2PWM = feedingPumpCH2PWM;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH3() {
|
||||
return FeedingPumpCH3;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH3(Integer feedingPumpCH3) {
|
||||
FeedingPumpCH3 = feedingPumpCH3;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH3PWM() {
|
||||
return FeedingPumpCH3PWM;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH3PWM(Integer feedingPumpCH3PWM) {
|
||||
FeedingPumpCH3PWM = feedingPumpCH3PWM;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH4() {
|
||||
return FeedingPumpCH4;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH4(Integer feedingPumpCH4) {
|
||||
FeedingPumpCH4 = feedingPumpCH4;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpCH4PWM() {
|
||||
return FeedingPumpCH4PWM;
|
||||
}
|
||||
|
||||
public void setFeedingPumpCH4PWM(Integer feedingPumpCH4PWM) {
|
||||
FeedingPumpCH4PWM = feedingPumpCH4PWM;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpAcid() {
|
||||
return FeedingPumpAcid;
|
||||
}
|
||||
|
||||
public void setFeedingPumpAcid(Integer feedingPumpAcid) {
|
||||
FeedingPumpAcid = feedingPumpAcid;
|
||||
}
|
||||
|
||||
public Integer getFeedingPumpAcidPWM() {
|
||||
return FeedingPumpAcidPWM;
|
||||
}
|
||||
|
||||
public void setFeedingPumpAcidPWM(Integer feedingPumpAcidPWM) {
|
||||
FeedingPumpAcidPWM = feedingPumpAcidPWM;
|
||||
}
|
||||
|
||||
public Integer getStir1() {
|
||||
return Stir1;
|
||||
}
|
||||
|
||||
public void setStir1(Integer stir1) {
|
||||
Stir1 = stir1;
|
||||
}
|
||||
|
||||
public Integer getStir2() {
|
||||
return Stir2;
|
||||
}
|
||||
|
||||
public void setStir2(Integer stir2) {
|
||||
Stir2 = stir2;
|
||||
}
|
||||
|
||||
public Integer getStir3() {
|
||||
return Stir3;
|
||||
}
|
||||
|
||||
public void setStir3(Integer stir3) {
|
||||
Stir3 = stir3;
|
||||
}
|
||||
|
||||
public Integer getStir4() {
|
||||
return Stir4;
|
||||
}
|
||||
|
||||
public void setStir4(Integer stir4) {
|
||||
Stir4 = stir4;
|
||||
}
|
||||
|
||||
public Integer getStir5() {
|
||||
return Stir5;
|
||||
}
|
||||
|
||||
public void setStir5(Integer stir5) {
|
||||
Stir5 = stir5;
|
||||
}
|
||||
|
||||
public Integer getValve1() {
|
||||
return Valve1;
|
||||
}
|
||||
|
||||
public void setValve1(Integer valve1) {
|
||||
Valve1 = valve1;
|
||||
}
|
||||
|
||||
public Integer getValve2() {
|
||||
return Valve2;
|
||||
}
|
||||
|
||||
public void setValve2(Integer valve2) {
|
||||
Valve2 = valve2;
|
||||
}
|
||||
|
||||
public Integer getValve3() {
|
||||
return Valve3;
|
||||
}
|
||||
|
||||
public void setValve3(Integer valve3) {
|
||||
Valve3 = valve3;
|
||||
}
|
||||
|
||||
public Integer getValve4() {
|
||||
return Valve4;
|
||||
}
|
||||
|
||||
public void setValve4(Integer valve4) {
|
||||
Valve4 = valve4;
|
||||
}
|
||||
|
||||
public Integer getValve5() {
|
||||
return Valve5;
|
||||
}
|
||||
|
||||
public void setValve5(Integer valve5) {
|
||||
Valve5 = valve5;
|
||||
}
|
||||
|
||||
public Integer getValve6() {
|
||||
return Valve6;
|
||||
}
|
||||
|
||||
public void setValve6(Integer valve6) {
|
||||
Valve6 = valve6;
|
||||
}
|
||||
|
||||
public Integer getValve7() {
|
||||
return Valve7;
|
||||
}
|
||||
|
||||
public void setValve7(Integer valve7) {
|
||||
Valve7 = valve7;
|
||||
}
|
||||
|
||||
public Integer getValve8() {
|
||||
return Valve8;
|
||||
}
|
||||
|
||||
public void setValve8(Integer valve8) {
|
||||
Valve8 = valve8;
|
||||
}
|
||||
|
||||
public Integer getValve9() {
|
||||
return Valve9;
|
||||
}
|
||||
|
||||
public void setValve9(Integer valve9) {
|
||||
Valve9 = valve9;
|
||||
}
|
||||
|
||||
public Integer getValve10() {
|
||||
return Valve10;
|
||||
}
|
||||
|
||||
public void setValve10(Integer valve10) {
|
||||
Valve10 = valve10;
|
||||
}
|
||||
|
||||
public Integer getValve11() {
|
||||
return Valve11;
|
||||
}
|
||||
|
||||
public void setValve11(Integer valve11) {
|
||||
Valve11 = valve11;
|
||||
}
|
||||
|
||||
public Integer getValve12() {
|
||||
return Valve12;
|
||||
}
|
||||
|
||||
public void setValve12(Integer valve12) {
|
||||
Valve12 = valve12;
|
||||
}
|
||||
|
||||
public Integer getValve13() {
|
||||
return Valve13;
|
||||
}
|
||||
|
||||
public void setValve13(Integer valve13) {
|
||||
Valve13 = valve13;
|
||||
}
|
||||
|
||||
public Integer getValve14() {
|
||||
return Valve14;
|
||||
}
|
||||
|
||||
public void setValve14(Integer valve14) {
|
||||
Valve14 = valve14;
|
||||
}
|
||||
|
||||
public Integer getValve15() {
|
||||
return Valve15;
|
||||
}
|
||||
|
||||
public void setValve15(Integer valve15) {
|
||||
Valve15 = valve15;
|
||||
}
|
||||
|
||||
public Integer getValve16() {
|
||||
return Valve16;
|
||||
}
|
||||
|
||||
public void setValve16(Integer valve16) {
|
||||
Valve16 = valve16;
|
||||
}
|
||||
|
||||
public Integer getValve17() {
|
||||
return Valve17;
|
||||
}
|
||||
|
||||
public void setValve17(Integer valve17) {
|
||||
Valve17 = valve17;
|
||||
}
|
||||
|
||||
public Integer getValve18() {
|
||||
return Valve18;
|
||||
}
|
||||
|
||||
public void setValve18(Integer valve18) {
|
||||
Valve18 = valve18;
|
||||
}
|
||||
|
||||
public Integer getValve19() {
|
||||
return Valve19;
|
||||
}
|
||||
|
||||
public void setValve19(Integer valve19) {
|
||||
Valve19 = valve19;
|
||||
}
|
||||
|
||||
public Integer getValve20() {
|
||||
return Valve20;
|
||||
}
|
||||
|
||||
public void setValve20(Integer valve20) {
|
||||
Valve20 = valve20;
|
||||
}
|
||||
|
||||
public Integer getValve21() {
|
||||
return Valve21;
|
||||
}
|
||||
|
||||
public void setValve21(Integer valve21) {
|
||||
Valve21 = valve21;
|
||||
}
|
||||
|
||||
public Integer getValve22() {
|
||||
return Valve22;
|
||||
}
|
||||
|
||||
public void setValve22(Integer valve22) {
|
||||
Valve22 = valve22;
|
||||
}
|
||||
|
||||
public Integer getValve23() {
|
||||
return Valve23;
|
||||
}
|
||||
|
||||
public void setValve23(Integer valve23) {
|
||||
Valve23 = valve23;
|
||||
}
|
||||
|
||||
public Integer getValve24() {
|
||||
return Valve24;
|
||||
}
|
||||
|
||||
public void setValve24(Integer valve24) {
|
||||
Valve24 = valve24;
|
||||
}
|
||||
|
||||
public Integer getValve25() {
|
||||
return Valve25;
|
||||
}
|
||||
|
||||
public void setValve25(Integer valve25) {
|
||||
Valve25 = valve25;
|
||||
}
|
||||
|
||||
public Integer getValve26() {
|
||||
return Valve26;
|
||||
}
|
||||
|
||||
public void setValve26(Integer valve26) {
|
||||
Valve26 = valve26;
|
||||
}
|
||||
|
||||
public Integer getValve27() {
|
||||
return Valve27;
|
||||
}
|
||||
|
||||
public void setValve27(Integer valve27) {
|
||||
Valve27 = valve27;
|
||||
}
|
||||
|
||||
public Integer getValve28() {
|
||||
return Valve28;
|
||||
}
|
||||
|
||||
public void setValve28(Integer valve28) {
|
||||
Valve28 = valve28;
|
||||
}
|
||||
|
||||
public Integer getValve29() {
|
||||
return Valve29;
|
||||
}
|
||||
|
||||
public void setValve29(Integer valve29) {
|
||||
Valve29 = valve29;
|
||||
}
|
||||
|
||||
public Integer getValve30() {
|
||||
return Valve30;
|
||||
}
|
||||
|
||||
public void setValve30(Integer valve30) {
|
||||
Valve30 = valve30;
|
||||
}
|
||||
|
||||
public Integer getValve31() {
|
||||
return Valve31;
|
||||
}
|
||||
|
||||
public void setValve31(Integer valve31) {
|
||||
Valve31 = valve31;
|
||||
}
|
||||
|
||||
public Integer getValve32() {
|
||||
return Valve32;
|
||||
}
|
||||
|
||||
public void setValve32(Integer valve32) {
|
||||
Valve32 = valve32;
|
||||
}
|
||||
|
||||
public Integer getValve33() {
|
||||
return Valve33;
|
||||
}
|
||||
|
||||
public void setValve33(Integer valve33) {
|
||||
Valve33 = valve33;
|
||||
}
|
||||
|
||||
public Integer getValve34() {
|
||||
return Valve34;
|
||||
}
|
||||
|
||||
public void setValve34(Integer valve34) {
|
||||
Valve34 = valve34;
|
||||
}
|
||||
|
||||
public Integer getValve35() {
|
||||
return Valve35;
|
||||
}
|
||||
|
||||
public void setValve35(Integer valve35) {
|
||||
Valve35 = valve35;
|
||||
}
|
||||
|
||||
public Integer getValve36() {
|
||||
return Valve36;
|
||||
}
|
||||
|
||||
public void setValve36(Integer valve36) {
|
||||
Valve36 = valve36;
|
||||
}
|
||||
|
||||
public Integer getValve37() {
|
||||
return Valve37;
|
||||
}
|
||||
|
||||
public void setValve37(Integer valve37) {
|
||||
Valve37 = valve37;
|
||||
}
|
||||
|
||||
public Integer getValve38() {
|
||||
return Valve38;
|
||||
}
|
||||
|
||||
public void setValve38(Integer valve38) {
|
||||
Valve38 = valve38;
|
||||
}
|
||||
|
||||
public Integer getValve39() {
|
||||
return Valve39;
|
||||
}
|
||||
|
||||
public void setValve39(Integer valve39) {
|
||||
Valve39 = valve39;
|
||||
}
|
||||
|
||||
public Integer getValve40() {
|
||||
return Valve40;
|
||||
}
|
||||
|
||||
public void setValve40(Integer valve40) {
|
||||
Valve40 = valve40;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FertigationSense{" +
|
||||
"id=" + id +
|
||||
", DeviceId='" + DeviceId + '\'' +
|
||||
", EC=" + EC +
|
||||
", pH=" + pH +
|
||||
", PumpPressure=" + PumpPressure +
|
||||
", AccumulativeInflow1=" + AccumulativeInflow1 +
|
||||
", InstantInflow1=" + InstantInflow1 +
|
||||
", AccumulativeInflow2=" + AccumulativeInflow2 +
|
||||
", InstantInflow2=" + InstantInflow2 +
|
||||
", AccumulativeInflow3=" + AccumulativeInflow3 +
|
||||
", InstantInflow3=" + InstantInflow3 +
|
||||
", AccumulativeInflow4=" + AccumulativeInflow4 +
|
||||
", InstantInflow4=" + InstantInflow4 +
|
||||
", AccumulativeInflowAcid=" + AccumulativeInflowAcid +
|
||||
", InstantInflowAcid=" + InstantInflowAcid +
|
||||
", AccumulativeInflowClear=" + AccumulativeInflowClear +
|
||||
", CloudStatus=" + CloudStatus +
|
||||
", WorkStatus=" + WorkStatus +
|
||||
", ControlMode=" + ControlMode +
|
||||
", AutoMode=" + AutoMode +
|
||||
", InflowPump=" + InflowPump +
|
||||
", FeedingPump=" + FeedingPump +
|
||||
", FeedingPumpCH1=" + FeedingPumpCH1 +
|
||||
", FeedingPumpCH1PWM=" + FeedingPumpCH1PWM +
|
||||
", FeedingPumpCH2=" + FeedingPumpCH2 +
|
||||
", FeedingPumpCH2PWM=" + FeedingPumpCH2PWM +
|
||||
", FeedingPumpCH3=" + FeedingPumpCH3 +
|
||||
", FeedingPumpCH3PWM=" + FeedingPumpCH3PWM +
|
||||
", FeedingPumpCH4=" + FeedingPumpCH4 +
|
||||
", FeedingPumpCH4PWM=" + FeedingPumpCH4PWM +
|
||||
", FeedingPumpAcid=" + FeedingPumpAcid +
|
||||
", FeedingPumpAcidPWM=" + FeedingPumpAcidPWM +
|
||||
", Stir1=" + Stir1 +
|
||||
", Stir2=" + Stir2 +
|
||||
", Stir3=" + Stir3 +
|
||||
", Stir4=" + Stir4 +
|
||||
", Stir5=" + Stir5 +
|
||||
", Valve1=" + Valve1 +
|
||||
", Valve2=" + Valve2 +
|
||||
", Valve3=" + Valve3 +
|
||||
", Valve4=" + Valve4 +
|
||||
", Valve5=" + Valve5 +
|
||||
", Valve6=" + Valve6 +
|
||||
", Valve7=" + Valve7 +
|
||||
", Valve8=" + Valve8 +
|
||||
", Valve9=" + Valve9 +
|
||||
", Valve10=" + Valve10 +
|
||||
", Valve11=" + Valve11 +
|
||||
", Valve12=" + Valve12 +
|
||||
", Valve13=" + Valve13 +
|
||||
", Valve14=" + Valve14 +
|
||||
", Valve15=" + Valve15 +
|
||||
", Valve16=" + Valve16 +
|
||||
", Valve17=" + Valve17 +
|
||||
", Valve18=" + Valve18 +
|
||||
", Valve19=" + Valve19 +
|
||||
", Valve20=" + Valve20 +
|
||||
", Valve21=" + Valve21 +
|
||||
", Valve22=" + Valve22 +
|
||||
", Valve23=" + Valve23 +
|
||||
", Valve24=" + Valve24 +
|
||||
", Valve25=" + Valve25 +
|
||||
", Valve26=" + Valve26 +
|
||||
", Valve27=" + Valve27 +
|
||||
", Valve28=" + Valve28 +
|
||||
", Valve29=" + Valve29 +
|
||||
", Valve30=" + Valve30 +
|
||||
", Valve31=" + Valve31 +
|
||||
", Valve32=" + Valve32 +
|
||||
", Valve33=" + Valve33 +
|
||||
", Valve34=" + Valve34 +
|
||||
", Valve35=" + Valve35 +
|
||||
", Valve36=" + Valve36 +
|
||||
", Valve37=" + Valve37 +
|
||||
", Valve38=" + Valve38 +
|
||||
", Valve39=" + Valve39 +
|
||||
", Valve40=" + Valve40 +
|
||||
", time=" + time +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Meteorological {
|
||||
|
||||
/** ID */
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
private Integer id ;
|
||||
/** 预警消息ID */
|
||||
private String warnId ;
|
||||
/** 预警消息标题 */
|
||||
private String title ;
|
||||
/** 预警等级, 橙色/红色/蓝色/黄色/未知 */
|
||||
private String level ;
|
||||
/** 预警类型 */
|
||||
private String type ;
|
||||
/** 预警发布时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date time ;
|
||||
/** 省份, 可能为空 */
|
||||
private String province ;
|
||||
/** 城市, 可能为空 */
|
||||
private String city ;
|
||||
/** 区域, 可能为空 */
|
||||
private String district ;
|
||||
/** 预警详细内容 */
|
||||
private String content ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getWarnId() {
|
||||
return warnId;
|
||||
}
|
||||
|
||||
public void setWarnId(String warnId) {
|
||||
this.warnId = warnId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Meteorological{" +
|
||||
"id=" + id +
|
||||
", warnId='" + warnId + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", level='" + level + '\'' +
|
||||
", type='" + type + '\'' +
|
||||
", time=" + time +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", district='" + district + '\'' +
|
||||
", content='" + content + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -20,6 +20,10 @@ public class ServiceType {
|
||||
private String serviceName ;
|
||||
/** 样式 */
|
||||
private String style ;
|
||||
/** 文件名称 */
|
||||
private String fileName;
|
||||
/** 文件路径 */
|
||||
private String filePath;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
@ -61,6 +65,22 @@ public class ServiceType {
|
||||
this.style = style;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServiceType{" +
|
||||
@ -69,6 +89,8 @@ public class ServiceType {
|
||||
", time=" + time +
|
||||
", serviceName='" + serviceName + '\'' +
|
||||
", style='" + style + '\'' +
|
||||
", fileName='" + fileName + '\'' +
|
||||
", filePath='" + filePath + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
public class User {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
public class WaringNumber {
|
||||
private int dayNumber;
|
||||
private int weekNumber;
|
||||
private int monthNumber;
|
||||
|
||||
public int getDayNumber() {
|
||||
return dayNumber;
|
||||
}
|
||||
|
||||
public void setDayNumber(int dayNumber) {
|
||||
this.dayNumber = dayNumber;
|
||||
}
|
||||
|
||||
public int getWeekNumber() {
|
||||
return weekNumber;
|
||||
}
|
||||
|
||||
public void setWeekNumber(int weekNumber) {
|
||||
this.weekNumber = weekNumber;
|
||||
}
|
||||
|
||||
public int getMonthNumber() {
|
||||
return monthNumber;
|
||||
}
|
||||
|
||||
public void setMonthNumber(int monthNumber) {
|
||||
this.monthNumber = monthNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WaringNumber{" +
|
||||
"dayNumber=" + dayNumber +
|
||||
", weekNumber=" + weekNumber +
|
||||
", monthNumber=" + monthNumber +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -1,86 +1,112 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 预警信息统计;
|
||||
*
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class WarningInformation{
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 大棚编号 */
|
||||
private Integer greenhouseNumber ;
|
||||
/** 监测指标 */
|
||||
private String monitoringIndicators ;
|
||||
/** 监测数值 */
|
||||
private Double monitoringValues ;
|
||||
/** 异常原因 */
|
||||
private String abnormalCause ;
|
||||
/** 预警时间 */
|
||||
@JsonFormat(pattern = "yyyy/MM/dd")
|
||||
private Date warningTime ;
|
||||
public class WarningInformation {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
private Integer id;
|
||||
/**
|
||||
* 大棚编号
|
||||
*/
|
||||
private Integer greenhouseNumber;
|
||||
/**
|
||||
* 监测指标
|
||||
*/
|
||||
private String monitoringIndicators;
|
||||
/**
|
||||
* 监测数值
|
||||
*/
|
||||
private Double monitoringValues;
|
||||
/**
|
||||
* 异常原因
|
||||
*/
|
||||
private String abnormalCause;
|
||||
/**
|
||||
* 预警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date warningTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
private String aaus;
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Integer getGreenhouseNumber() {
|
||||
return greenhouseNumber;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setGreenhouseName(Integer greenhouseNumber) {
|
||||
this.greenhouseNumber = greenhouseNumber;
|
||||
}
|
||||
public Integer getGreenhouseNumber() {
|
||||
return greenhouseNumber;
|
||||
}
|
||||
|
||||
public String getMonitoringIndicators() {
|
||||
return monitoringIndicators;
|
||||
}
|
||||
public void setGreenhouseNumber(Integer greenhouseNumber) {
|
||||
this.greenhouseNumber = greenhouseNumber;
|
||||
}
|
||||
|
||||
public void setMonitoringIndicators(String monitoringIndicators) {
|
||||
this.monitoringIndicators = monitoringIndicators;
|
||||
}
|
||||
public String getMonitoringIndicators() {
|
||||
return monitoringIndicators;
|
||||
}
|
||||
|
||||
public Double getMonitoringValues() {
|
||||
return monitoringValues;
|
||||
}
|
||||
public void setMonitoringIndicators(String monitoringIndicators) {
|
||||
this.monitoringIndicators = monitoringIndicators;
|
||||
}
|
||||
|
||||
public void setMonitoringValues(Double monitoringValues) {
|
||||
this.monitoringValues = monitoringValues;
|
||||
}
|
||||
public Double getMonitoringValues() {
|
||||
return monitoringValues;
|
||||
}
|
||||
|
||||
public String getAbnormalCause() {
|
||||
return abnormalCause;
|
||||
}
|
||||
public void setMonitoringValues(Double monitoringValues) {
|
||||
this.monitoringValues = monitoringValues;
|
||||
}
|
||||
|
||||
public void setAbnormalCause(String abnormalCause) {
|
||||
this.abnormalCause = abnormalCause;
|
||||
}
|
||||
public String getAbnormalCause() {
|
||||
return abnormalCause;
|
||||
}
|
||||
|
||||
public Date getWarningTime() {
|
||||
return warningTime;
|
||||
}
|
||||
public void setAbnormalCause(String abnormalCause) {
|
||||
this.abnormalCause = abnormalCause;
|
||||
}
|
||||
|
||||
public void setWarningTime(Date warningTime) {
|
||||
this.warningTime = warningTime;
|
||||
}
|
||||
public Date getWarningTime() {
|
||||
return warningTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WarningInformation{" +
|
||||
"id=" + id +
|
||||
", greenhouseName=" + greenhouseNumber +
|
||||
", monitoringIndicators='" + monitoringIndicators + '\'' +
|
||||
", monitoringValues=" + monitoringValues +
|
||||
", abnormalCause='" + abnormalCause + '\'' +
|
||||
", warningTime=" + warningTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
public void setWarningTime(Date warningTime) {
|
||||
this.warningTime = warningTime;
|
||||
}
|
||||
|
||||
public String getAaus() {
|
||||
return aaus;
|
||||
}
|
||||
|
||||
public void setAaus(String aaus) {
|
||||
this.aaus = aaus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WarningInformation{" +
|
||||
"id=" + id +
|
||||
", greenhouseNumber=" + greenhouseNumber +
|
||||
", monitoringIndicators='" + monitoringIndicators + '\'' +
|
||||
", monitoringValues=" + monitoringValues +
|
||||
", abnormalCause='" + abnormalCause + '\'' +
|
||||
", warningTime=" + warningTime +
|
||||
", numericalUnit='" + aaus + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
package com.ruoyi.crops.domain.gsonBean;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GsonDeviceSenseBean {
|
||||
public Boolean result;
|
||||
public String msg;
|
||||
public String mapData;
|
||||
public Integer code;
|
||||
public Data data;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date time;
|
||||
|
||||
public class Data{
|
||||
public ArrayList<AttDataList> attDataList;
|
||||
}
|
||||
|
||||
public class AttDataList{
|
||||
public String showName;
|
||||
public String attributeValue;
|
||||
public String attributeName;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.ruoyi.crops.domain.gsonBean;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
public class GsonMeteorologicalBean {
|
||||
public String reason;
|
||||
public ArrayList<Meteorological> result;
|
||||
public String error_code;
|
||||
|
||||
|
||||
public class Meteorological{
|
||||
/** 预警消息ID */
|
||||
public String id ;
|
||||
/** 预警消息标题 */
|
||||
public String title ;
|
||||
/** 预警等级, 橙色/红色/蓝色/黄色/未知 */
|
||||
public String level ;
|
||||
/** 预警类型 */
|
||||
public String type ;
|
||||
/** 预警发布时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date time ;
|
||||
/** 省份, 可能为空 */
|
||||
public String province ;
|
||||
/** 城市, 可能为空 */
|
||||
public String city ;
|
||||
/** 区域, 可能为空 */
|
||||
public String district ;
|
||||
/** 预警详细内容 */
|
||||
public String content ;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
package com.ruoyi.crops.domain.gsonBean;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.util.ArrayList;
|
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.crops.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class DeviceSenseVo {
|
||||
/** 设备id */
|
||||
private String Did;
|
||||
/** 光照强度[Lux] */
|
||||
private Double AvgSunlight ;
|
||||
/** 空气温度[°C] */
|
||||
private Double AvgAirTemp ;
|
||||
/** 空气湿度[%] */
|
||||
private Double AvgAirHumidity ;
|
||||
/** 土壤温度[°C] */
|
||||
private Double AvgSoilTemp ;
|
||||
/** 土壤湿度[%] */
|
||||
private Double AvgSoilHumidity ;
|
||||
/** 二氧化碳浓度[ppm] */
|
||||
private Double AvgCO2 ;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date time ;
|
||||
|
||||
public String getDid() {
|
||||
return Did;
|
||||
}
|
||||
|
||||
public void setDid(String did) {
|
||||
Did = did;
|
||||
}
|
||||
|
||||
public Double getAvgSunlight() {
|
||||
return AvgSunlight;
|
||||
}
|
||||
|
||||
public void setAvgSunlight(Double avgSunlight) {
|
||||
AvgSunlight = avgSunlight;
|
||||
}
|
||||
|
||||
public Double getAvgAirTemp() {
|
||||
return AvgAirTemp;
|
||||
}
|
||||
|
||||
public void setAvgAirTemp(Double avgAirTemp) {
|
||||
AvgAirTemp = avgAirTemp;
|
||||
}
|
||||
|
||||
public Double getAvgAirHumidity() {
|
||||
return AvgAirHumidity;
|
||||
}
|
||||
|
||||
public void setAvgAirHumidity(Double avgAirHumidity) {
|
||||
AvgAirHumidity = avgAirHumidity;
|
||||
}
|
||||
|
||||
public Double getAvgSoilTemp() {
|
||||
return AvgSoilTemp;
|
||||
}
|
||||
|
||||
public void setAvgSoilTemp(Double avgSoilTemp) {
|
||||
AvgSoilTemp = avgSoilTemp;
|
||||
}
|
||||
|
||||
public Double getAvgSoilHumidity() {
|
||||
return AvgSoilHumidity;
|
||||
}
|
||||
|
||||
public void setAvgSoilHumidity(Double avgSoilHumidity) {
|
||||
AvgSoilHumidity = avgSoilHumidity;
|
||||
}
|
||||
|
||||
public Double getAvgCO2() {
|
||||
return AvgCO2;
|
||||
}
|
||||
|
||||
public void setAvgCO2(Double avgCO2) {
|
||||
AvgCO2 = avgCO2;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DeviceSenseVo{" +
|
||||
"Did='" + Did + '\'' +
|
||||
", AvgSunlight=" + AvgSunlight +
|
||||
", AvgAirTemp=" + AvgAirTemp +
|
||||
", AvgAirHumidity=" + AvgAirHumidity +
|
||||
", AvgSoilTemp=" + AvgSoilTemp +
|
||||
", AvgSoilHumidity=" + AvgSoilHumidity +
|
||||
", AvgCO2_=" + AvgCO2 +
|
||||
", time='" + time + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
import com.ruoyi.crops.domain.vo.DeviceSenseVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface DeviceSenseMapper {
|
||||
int insert(DeviceSense deviceSense);
|
||||
|
||||
//数据库判断重复数据后插入
|
||||
void dedupInsert(DeviceSense deviceSense);
|
||||
|
||||
List<DeviceSense> selectById(String deviceId);
|
||||
|
||||
List<DeviceSense> selectByTime(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<DeviceSenseVo> selecthours(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<DeviceSenseVo> selectdays(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.FertigationSense;
|
||||
|
||||
public interface FertigationSenseMapper {
|
||||
|
||||
void dedupInsert (FertigationSense fertigationSense);
|
||||
|
||||
int insert(FertigationSense fertigationSense);
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
public interface FoundationMapper {
|
||||
int insert(String id, Integer foundationId, String foundationName);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.Meteorological;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MeteorologicalMapper {
|
||||
|
||||
List<Meteorological> selectbyTime();
|
||||
|
||||
int insert(Meteorological ml);
|
||||
|
||||
// void insert2(Meteorological ml2);
|
||||
}
|
@ -13,4 +13,6 @@ public interface ServiceTypeMapper {
|
||||
List<ServiceType> selectAll();
|
||||
|
||||
int deleteByIds(Long[] ids);
|
||||
|
||||
int selectByfile(String name);
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
import com.ruoyi.crops.domain.gsonBean.GsonDeviceSenseBean;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface WarningMapper {
|
||||
List<WarningInformation> selectByNumber(Integer number);
|
||||
List<WarningInformation> selectByTime(@Param("startTime") Date startTime,@Param("endTime") Date endTime);
|
||||
|
||||
int insert(WarningInformation warningInformation);
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
import com.ruoyi.crops.domain.vo.DeviceSenseVo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface IDeviceSenseService {
|
||||
int insert(DeviceSense deviceSense);
|
||||
|
||||
//sql判断重复数据后插入
|
||||
void dedupInsert(DeviceSense deviceSense);
|
||||
|
||||
List<DeviceSense> selectById(String deviceId);
|
||||
|
||||
List<DeviceSense> selectByTime(String startTime, String endTime);
|
||||
|
||||
List<DeviceSenseVo> averageList(String type);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
import com.ruoyi.crops.domain.FertigationSense;
|
||||
|
||||
public interface IFertigationSenseService {
|
||||
void dedupInsert(FertigationSense fertigationSense);
|
||||
int insert(FertigationSense fertigationSense);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.ServiceType;
|
||||
|
||||
public interface IGeoServer {
|
||||
public String GeoServer(String workSpace, String storeName, String filePath) throws Exception;
|
||||
|
||||
int insert(ServiceType serviceType);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.Meteorological;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IMeteorologicalService {
|
||||
|
||||
List<Meteorological> selectByTime();
|
||||
|
||||
int insert(Meteorological ml);
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface IUploadService {
|
||||
String upload(String type,MultipartFile file, String fileRoot) throws IOException;
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.User;
|
||||
|
||||
public interface IUserInfoService {
|
||||
|
||||
String login(User user);
|
||||
}
|
@ -1,11 +1,16 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
import com.ruoyi.crops.domain.gsonBean.GsonDeviceSenseBean;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface IWarningService {
|
||||
List<WarningInformation> selectByNumber(Integer number);
|
||||
List<WarningInformation> selectByTime(Date startTime,Date endTime);
|
||||
|
||||
int insert(WarningInformation warningInformation);
|
||||
|
||||
int insertWarning(DeviceSense deviceSense);
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
public interface IexeService {
|
||||
public String execCommand(String type,String filePath,String boundaryDataPath);
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
|
||||
import com.ruoyi.common.utils.DateUtil;
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
|
||||
import com.ruoyi.crops.domain.vo.DeviceSenseVo;
|
||||
import com.ruoyi.crops.mapper.DeviceSenseMapper;
|
||||
import com.ruoyi.crops.service.IDeviceSenseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class DeviceSenseServiceImpl implements IDeviceSenseService {
|
||||
@Autowired
|
||||
private DeviceSenseMapper deviceSenseMapper;
|
||||
|
||||
@Override
|
||||
public int insert(DeviceSense deviceSense) {
|
||||
return deviceSenseMapper.insert(deviceSense);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据库判断重复数据后插入
|
||||
*
|
||||
* @param deviceSense
|
||||
*/
|
||||
@Override
|
||||
public void dedupInsert(DeviceSense deviceSense) {
|
||||
deviceSenseMapper.dedupInsert(deviceSense);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceSense> selectById(String deviceId) {
|
||||
return deviceSenseMapper.selectById(deviceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceSense> selectByTime(String startTime, String endTime) {
|
||||
return deviceSenseMapper.selectByTime(startTime, endTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceSenseVo> averageList(String type) {
|
||||
if (type.equals("hours")) {
|
||||
String dayBegin = new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getBeginDayOfYesterday());
|
||||
String dayend = new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getBeginDayOfTomorrow());
|
||||
return deviceSenseMapper.selecthours(dayBegin, dayend);
|
||||
} else if (type.equals("week")) {
|
||||
String weekBegin = new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getBeginDayOfWeek());
|
||||
String weekEnd = new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getEndDayOfWeek());
|
||||
return deviceSenseMapper.selectdays(weekBegin, weekEnd);
|
||||
} else if (type.equals("month")) {
|
||||
String monthBegin = new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getBeginDayOfMonth());
|
||||
String monthEnd = new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getEndDayOfMonth());
|
||||
return deviceSenseMapper.selectdays(monthBegin, monthEnd);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.BashUtils;
|
||||
import com.ruoyi.crops.service.IexeService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ExeServiceImpl implements IexeService {
|
||||
@Value("${path.exepath}")
|
||||
private String exePath;
|
||||
|
||||
@Override
|
||||
public String execCommand(String type, String filePath, String boundaryDataPath) {
|
||||
String path;
|
||||
if (type.equals("zzjg")) {
|
||||
path = exePath + "农作物种植结构.exe ";
|
||||
} else if (type.equals("zwzs")) {
|
||||
path = exePath + "农作物长势.exe ";
|
||||
} else if (type.equals("zwhq")) {
|
||||
path = exePath + "农作物旱情.exe ";
|
||||
} else if (type.equals("zyzd_hq")) {
|
||||
path = exePath + "旱情指导.exe ";
|
||||
} else if (type.equals("zyzd_zs")) {
|
||||
path = exePath + "长势指导.exe ";
|
||||
} else {
|
||||
path = exePath + "农作物产量.exe ";
|
||||
}
|
||||
|
||||
return BashUtils.execCommand(path + "\"" + filePath + "\"" + " \"" + boundaryDataPath + "\"");
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
import com.ruoyi.crops.domain.FertigationSense;
|
||||
import com.ruoyi.crops.mapper.FertigationSenseMapper;
|
||||
import com.ruoyi.crops.service.IFertigationSenseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class FertigationSenseImpl implements IFertigationSenseService {
|
||||
@Autowired
|
||||
private FertigationSenseMapper fertigationSenseMapper;
|
||||
|
||||
@Override
|
||||
public void dedupInsert(FertigationSense fertigationSense) {
|
||||
fertigationSenseMapper.dedupInsert(fertigationSense);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(FertigationSense fertigationSense) {
|
||||
return fertigationSenseMapper.insert(fertigationSense);
|
||||
}
|
||||
}
|
@ -2,7 +2,9 @@ package com.ruoyi.crops.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.ruoyi.crops.domain.GsonParseFoundationBean;
|
||||
import com.ruoyi.crops.domain.UserInfo;
|
||||
import com.ruoyi.crops.domain.gsonBean.GsonParseFoundationBean;
|
||||
import com.ruoyi.crops.mapper.FoundationMapper;
|
||||
import com.ruoyi.crops.service.IFoundationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -19,26 +21,32 @@ public class FoundationServiceImpl implements IFoundationService {
|
||||
private RedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private Gson gson;
|
||||
@Autowired
|
||||
private FoundationMapper foundationMapper;
|
||||
|
||||
@Value("${url.foundation}")
|
||||
private String url;
|
||||
|
||||
@Override
|
||||
public String getFoundation(String id) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();//存放参数
|
||||
map.put("id", id);
|
||||
HashMap<String, String> headers = new HashMap<>();//存放请求头,可以存放多个请求头
|
||||
String token = (String) redisTemplate.opsForValue().get(id);
|
||||
headers.put("token", token);
|
||||
//从redis中获取token
|
||||
UserInfo cropsUserInfo = (UserInfo) redisTemplate.opsForValue().get("cropsUserInfo");
|
||||
|
||||
headers.put("token", cropsUserInfo.getToken());
|
||||
String result = HttpUtil.createPost(url).addHeaders(headers).form(map).execute().body();
|
||||
|
||||
GsonParseFoundationBean model = gson.fromJson(result, GsonParseFoundationBean.class);
|
||||
ArrayList<GsonParseFoundationBean.Foundation> foundations = model.data;
|
||||
for (GsonParseFoundationBean.Foundation Foundation : foundations) {
|
||||
String userId = id;
|
||||
Integer foundationId = Foundation.foundationId;
|
||||
String foundationName = Foundation.foundationName;
|
||||
// insert(foundationId,foundationName);
|
||||
// foundationMapper.insert(id,foundationId,foundationName);
|
||||
}
|
||||
return token;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.ServiceType;
|
||||
import com.ruoyi.crops.mapper.ServiceTypeMapper;
|
||||
import com.ruoyi.crops.service.IGeoServer;
|
||||
import it.geosolutions.geoserver.rest.GeoServerRESTManager;
|
||||
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher;
|
||||
import it.geosolutions.geoserver.rest.decoder.RESTDataStore;
|
||||
import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder;
|
||||
import it.geosolutions.geoserver.rest.encoder.GSResourceEncoder;
|
||||
import it.geosolutions.geoserver.rest.encoder.datastore.GSGeoTIFFDatastoreEncoder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class GeoServerImpl implements IGeoServer {
|
||||
//GeoServer的连接配置
|
||||
@Value("${geoserver.url}")
|
||||
private String url;
|
||||
@Value("${geoserver.username}")
|
||||
private String username;
|
||||
@Value("${geoserver.password}")
|
||||
private String password;
|
||||
|
||||
@Autowired
|
||||
private ServiceTypeMapper serviceTypeMapper;
|
||||
|
||||
@Override
|
||||
public String GeoServer(String workSpace, String storeName, String filePath) throws Exception {
|
||||
|
||||
//待创建和发布图层的工作区名称workspace
|
||||
//待创建和发布图层的数据存储名称store
|
||||
//判断工作区(workspace)是否存在,不存在则创建
|
||||
URL u = new URL(url);
|
||||
GeoServerRESTManager manager = new GeoServerRESTManager(u, username, password);
|
||||
GeoServerRESTPublisher publisher = manager.getPublisher();
|
||||
List<String> workspaces = manager.getReader().getWorkspaceNames();
|
||||
if (!workspaces.contains(workSpace)) {
|
||||
boolean createws = publisher.createWorkspace(workSpace);
|
||||
System.out.println("create ws : " + createws);
|
||||
} else {
|
||||
System.out.println("workspace已经存在了,ws :" + workSpace);
|
||||
}
|
||||
|
||||
//判断数据存储(datastore)是否已经存在,不存在则创建
|
||||
|
||||
RESTDataStore restStore = manager.getReader().getDatastore(workSpace, storeName);
|
||||
if (restStore == null) {
|
||||
GSGeoTIFFDatastoreEncoder gsGeoTIFFDatastoreEncoder = new GSGeoTIFFDatastoreEncoder(storeName);
|
||||
gsGeoTIFFDatastoreEncoder.setWorkspaceName(workSpace);
|
||||
gsGeoTIFFDatastoreEncoder.setUrl(new URL("file:" + filePath));
|
||||
boolean createStore = manager.getStoreManager().create(workSpace, gsGeoTIFFDatastoreEncoder);
|
||||
System.out.println("create store (TIFF文件创建状态) : " + createStore);
|
||||
|
||||
boolean publish = manager.getPublisher().publishGeoTIFF(workSpace, storeName, new File(filePath));
|
||||
System.out.println("publish (TIFF文件发布状态) : " + publish);
|
||||
|
||||
return "create store (TIFF文件创建状态) : " + createStore + " publish (TIFF文件发布状态) : " + publish;
|
||||
} else {
|
||||
System.out.println("数据存储已经存在了,store:" + storeName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ServiceType serviceType) {
|
||||
return serviceTypeMapper.insert(serviceType);
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.Meteorological;
|
||||
import com.ruoyi.crops.mapper.MeteorologicalMapper;
|
||||
import com.ruoyi.crops.service.IMeteorologicalService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MeteorologicalServiceImpl implements IMeteorologicalService {
|
||||
@Autowired
|
||||
private MeteorologicalMapper meteorologicalMapper;
|
||||
|
||||
@Override
|
||||
public List<Meteorological> selectByTime() {
|
||||
return meteorologicalMapper.selectbyTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Meteorological ml) {
|
||||
return meteorologicalMapper.insert(ml);
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.mapper.ServiceTypeMapper;
|
||||
import com.ruoyi.crops.service.IUploadService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
@Service
|
||||
public class UploadServiceImpl implements IUploadService {
|
||||
@Autowired
|
||||
private ServiceTypeMapper serviceTypeMapper;
|
||||
@Override
|
||||
public String upload(String type,MultipartFile file, String fileRoot) throws IOException {
|
||||
prepareFilePath(fileRoot);
|
||||
|
||||
// 获取上传文件的原文件名
|
||||
String fileName = file.getOriginalFilename();
|
||||
|
||||
if (serviceTypeMapper.selectByfile(fileName)>0){
|
||||
return "文件已存在";
|
||||
}else {
|
||||
// 规则化之后的文件上传根路径
|
||||
String normalizeFileRoot = getNormalizeFileRoot(fileRoot);
|
||||
// 根据路径和文件名创建目标文件
|
||||
File targetFile = new File(normalizeFileRoot, fileName);
|
||||
|
||||
// 如果目标文件存在,删除
|
||||
if (targetFile.exists())
|
||||
targetFile.delete();
|
||||
|
||||
// 将目标文件进行转移
|
||||
file.transferTo(targetFile);
|
||||
|
||||
return String.format("%s\\%s", normalizeFileRoot, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
fileRoot:上传文件保存的根路径
|
||||
此方法是准备文件上传的路径,如果路径不存在,即创建
|
||||
*/
|
||||
private void prepareFilePath(String fileRoot) {
|
||||
File file = new File(normalizePath(fileRoot));
|
||||
if (!file.exists())
|
||||
file.mkdirs();
|
||||
}
|
||||
|
||||
/**
|
||||
该方法主要对文件路径进行规则化,如:D:\\\360Browser\///360Chrome\\//,
|
||||
像这种路径就不正确,此方法可以将路径规则化为:D:\360Browser\360Chrome
|
||||
*/
|
||||
private String getNormalizeFileRoot(String fileRoot) {
|
||||
return normalizePath(fileRoot);
|
||||
}
|
||||
public static String normalizePath(String path) {
|
||||
String result = path.replaceAll("/+", Matcher.quoteReplacement(File.separator));
|
||||
return result.replaceAll("\\\\+", Matcher.quoteReplacement(File.separator));
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.crops.domain.User;
|
||||
import com.ruoyi.crops.domain.UserInfo;
|
||||
import com.ruoyi.crops.service.IUserInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Service
|
||||
public class UserInfoServiceImpl implements IUserInfoService {
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
@Value("${url.userInfo}")
|
||||
private String url;
|
||||
|
||||
@Override
|
||||
public String login(User user) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("username", user.getUsername());
|
||||
paramMap.put("password", user.getPassword());
|
||||
String result = HttpUtil.post(url, paramMap);
|
||||
|
||||
UserInfo userInfo = JSONObject.parseObject(result, UserInfo.class);
|
||||
redisTemplate.opsForValue().set(userInfo.getId(), userInfo.getToken(), Duration.ofMillis(userInfo.getExpire()) );
|
||||
|
||||
return userInfo.toString();
|
||||
}
|
||||
}
|
@ -1,23 +1,142 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.DeviceSense;
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
import com.ruoyi.crops.mapper.WarningMapper;
|
||||
import com.ruoyi.crops.service.IWarningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.hutool.core.date.DateTime.now;
|
||||
|
||||
@Service
|
||||
public class WarningServiceImpl implements IWarningService {
|
||||
@Autowired
|
||||
private WarningMapper warningMapper;
|
||||
@Override
|
||||
public List<WarningInformation> selectByNumber(Integer number) {
|
||||
return warningMapper.selectByNumber(number);
|
||||
public List<WarningInformation> selectByTime(Date startTime,Date endTime) {
|
||||
return warningMapper.selectByTime(startTime,endTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(WarningInformation warningInformation) {
|
||||
return warningMapper.insert(warningInformation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWarning(DeviceSense deviceSense) {
|
||||
WarningInformation warningInformation = new WarningInformation();
|
||||
Double sunlight = deviceSense.getSunlight();
|
||||
if (sunlight > 2) {
|
||||
warningInformation.setMonitoringIndicators("光照强度");
|
||||
warningInformation.setMonitoringValues(sunlight);
|
||||
warningInformation.setAbnormalCause("偏高");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("Lux");
|
||||
warningMapper.insert(warningInformation);
|
||||
|
||||
} if (sunlight < 1) {
|
||||
warningInformation.setMonitoringIndicators("光照强度");
|
||||
warningInformation.setMonitoringValues(sunlight);
|
||||
warningInformation.setAbnormalCause("偏低");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("Lux");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
//空气温度[°C]
|
||||
Double airTemp = deviceSense.getAirTemp();
|
||||
if (airTemp>22.6){
|
||||
warningInformation.setMonitoringIndicators("空气温度");
|
||||
warningInformation.setMonitoringValues(airTemp);
|
||||
warningInformation.setAbnormalCause("偏高");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("°C");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
if (airTemp<22.2){
|
||||
warningInformation.setMonitoringIndicators("空气温度");
|
||||
warningInformation.setMonitoringValues(airTemp);
|
||||
warningInformation.setAbnormalCause("偏低");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("°C");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
//空气湿度[%]
|
||||
Double airHumidity = deviceSense.getAirHumidity();
|
||||
if (airHumidity>48){
|
||||
warningInformation.setMonitoringIndicators("空气湿度");
|
||||
warningInformation.setMonitoringValues(airHumidity);
|
||||
warningInformation.setAbnormalCause("偏高");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("%");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
if (airHumidity<45){
|
||||
warningInformation.setMonitoringIndicators("空气湿度");
|
||||
warningInformation.setMonitoringValues(airHumidity);
|
||||
warningInformation.setAbnormalCause("偏低");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("%");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
//土壤温度[°C]
|
||||
Double soilTemp = deviceSense.getSoilTemp();
|
||||
if (soilTemp>22.8){
|
||||
warningInformation.setMonitoringIndicators("土壤温度");
|
||||
warningInformation.setMonitoringValues(soilTemp);
|
||||
warningInformation.setAbnormalCause("偏高");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("°C");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
if (soilTemp<22.7){
|
||||
warningInformation.setMonitoringIndicators("土壤温度");
|
||||
warningInformation.setMonitoringValues(soilTemp);
|
||||
warningInformation.setAbnormalCause("偏低");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("°C");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
//土壤湿度[%]
|
||||
Double soilHumidity = deviceSense.getSoilHumidity();
|
||||
if (soilHumidity>3){
|
||||
warningInformation.setMonitoringIndicators("土壤湿度");
|
||||
warningInformation.setMonitoringValues(soilHumidity);
|
||||
warningInformation.setAbnormalCause("偏高");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("%");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
if (soilHumidity<1){
|
||||
warningInformation.setMonitoringIndicators("土壤湿度");
|
||||
warningInformation.setMonitoringValues(soilHumidity);
|
||||
warningInformation.setAbnormalCause("偏低");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("%");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
|
||||
//二氧化碳浓度[ppm]
|
||||
Double co2_ = deviceSense.getCO2_();
|
||||
if (co2_>800){
|
||||
warningInformation.setMonitoringIndicators("二氧化碳浓度");
|
||||
warningInformation.setMonitoringValues(co2_);
|
||||
warningInformation.setAbnormalCause("偏高");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("ppm");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
if (co2_<530){
|
||||
warningInformation.setMonitoringIndicators("二氧化碳浓度");
|
||||
warningInformation.setMonitoringValues(co2_);
|
||||
warningInformation.setAbnormalCause("偏低");
|
||||
warningInformation.setWarningTime(deviceSense.getTime());
|
||||
warningInformation.setAaus("ppm");
|
||||
warningMapper.insert(warningInformation);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.DeviceSenseMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.DeviceSense" id="DeviceSenseMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="deviceId" column="deviceId" jdbcType="VARCHAR"/>
|
||||
<result property="Sunlight" column="sunlight" jdbcType="DOUBLE"/>
|
||||
<result property="AirTemp" column="air_temp" jdbcType="DOUBLE"/>
|
||||
<result property="AirHumidity" column="air_humidity" jdbcType="INTEGER"/>
|
||||
<result property="SoilTemp" column="soil_temp" jdbcType="DOUBLE"/>
|
||||
<result property="SoilHumidity" column="soil_humidity" jdbcType="INTEGER"/>
|
||||
<result property="SoilConduct" column="soil_conduct" jdbcType="INTEGER"/>
|
||||
<result property="CO2_" column="co2" jdbcType="INTEGER"/>
|
||||
<result property="PH" column="ph" jdbcType="DOUBLE"/>
|
||||
<result property="position1" column="position1" jdbcType="INTEGER"/>
|
||||
<result property="run_status1" column="run_status1" jdbcType="VARCHAR"/>
|
||||
<result property="control_status1" column="control_status1" jdbcType="VARCHAR"/>
|
||||
<result property="position2" column="position2" jdbcType="INTEGER"/>
|
||||
<result property="run_status2" column="run_status2" jdbcType="VARCHAR"/>
|
||||
<result property="control_status2" column="control_status2" jdbcType="VARCHAR"/>
|
||||
<result property="position3" column="position3" jdbcType="INTEGER"/>
|
||||
<result property="run_status3" column="run_status3" jdbcType="VARCHAR"/>
|
||||
<result property="control_status3" column="control_status3" jdbcType="VARCHAR"/>
|
||||
<result property="position4" column="position4" jdbcType="INTEGER"/>
|
||||
<result property="run_status4" column="run_status4" jdbcType="VARCHAR"/>
|
||||
<result property="control_status4" column="control_status4" jdbcType="VARCHAR"/>
|
||||
<result property="position5" column="position5" jdbcType="INTEGER"/>
|
||||
<result property="run_status5" column="run_status5" jdbcType="VARCHAR"/>
|
||||
<result property="control_status5" column="control_status5" jdbcType="VARCHAR"/>
|
||||
<result property="position6" column="position6" jdbcType="INTEGER"/>
|
||||
<result property="run_status6" column="run_status6" jdbcType="VARCHAR"/>
|
||||
<result property="control_status6" column="control_status6" jdbcType="VARCHAR"/>
|
||||
<result property="position7" column="position7" jdbcType="INTEGER"/>
|
||||
<result property="run_status7" column="run_status7" jdbcType="VARCHAR"/>
|
||||
<result property="control_status7" column="control_status7" jdbcType="VARCHAR"/>
|
||||
<result property="position8" column="position8" jdbcType="INTEGER"/>
|
||||
<result property="run_status8" column="run_status8" jdbcType="VARCHAR"/>
|
||||
<result property="control_status8" column="control_status8" jdbcType="VARCHAR"/>
|
||||
<result property="BeiYong1" column="bei_yong1" jdbcType="INTEGER"/>
|
||||
<result property="BeiYong2" column="bei_yong2" jdbcType="INTEGER"/>
|
||||
<result property="time" column="time" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.device_sense (deviceId, sunlight, air_temp, air_humidity, soil_temp, soil_humidity,
|
||||
soil_conduct, co2, ph, position1, run_status1, control_status1, position2,
|
||||
run_status2, control_status2, position3, run_status3, control_status3,
|
||||
position4, run_status4, control_status4, position5, run_status5,
|
||||
control_status5, position6, run_status6, control_status6, position7,
|
||||
run_status7, control_status7, position8, run_status8, control_status8,
|
||||
bei_yong1, bei_yong2, time)
|
||||
value (#{deviceId}, #{Sunlight}, #{AirTemp}, #{AirHumidity}, #{SoilTemp}, #{SoilHumidity}, #{SoilConduct},
|
||||
#{CO2_}, #{PH}, #{position1}, #{run_status1}, #{control_status1}, #{position2}, #{run_status2},
|
||||
#{control_status2}, #{position3}, #{run_status3}, #{control_status3}, #{position4}, #{run_status4},
|
||||
#{control_status4}, #{position5}, #{run_status5}, #{control_status5}, #{position6}, #{run_status6},
|
||||
#{control_status6}, #{position7}, #{run_status7}, #{control_status7}, #{position8}, #{run_status8},
|
||||
#{control_status8}, #{BeiYong1}, #{BeiYong2}, #{time})
|
||||
</insert>
|
||||
<!--sql语句直接去重-->
|
||||
<insert id="dedupInsert">
|
||||
insert into ruoyi.device_sense(deviceId, sunlight, air_temp, air_humidity, soil_temp, soil_humidity,
|
||||
soil_conduct, co2, ph, position1, run_status1, control_status1, position2,
|
||||
run_status2, control_status2, position3, run_status3, control_status3,
|
||||
position4, run_status4, control_status4, position5, run_status5,
|
||||
control_status5, position6, run_status6, control_status6, position7,
|
||||
run_status7, control_status7, position8, run_status8, control_status8,
|
||||
bei_yong1, bei_yong2, time)
|
||||
select #{deviceId},
|
||||
#{Sunlight},
|
||||
#{AirTemp},
|
||||
#{AirHumidity},
|
||||
#{SoilTemp},
|
||||
#{SoilHumidity},
|
||||
#{SoilConduct},
|
||||
#{CO2_},
|
||||
#{PH},
|
||||
#{position1},
|
||||
#{run_status1},
|
||||
#{control_status1},
|
||||
#{position2},
|
||||
#{run_status2},
|
||||
#{control_status2},
|
||||
#{position3},
|
||||
#{run_status3},
|
||||
#{control_status3},
|
||||
#{position4},
|
||||
#{run_status4},
|
||||
#{control_status4},
|
||||
#{position5},
|
||||
#{run_status5},
|
||||
#{control_status5},
|
||||
#{position6},
|
||||
#{run_status6},
|
||||
#{control_status6},
|
||||
#{position7},
|
||||
#{run_status7},
|
||||
#{control_status7},
|
||||
#{position8},
|
||||
#{run_status8},
|
||||
#{control_status8},
|
||||
#{BeiYong1},
|
||||
#{BeiYong2},
|
||||
#{time}
|
||||
where not exists(select deviceId, time from ruoyi.device_sense where deviceId = #{deviceId} and time = #{time})
|
||||
</insert>
|
||||
|
||||
<select id="selectById" resultMap="DeviceSenseMap">
|
||||
select deviceId,
|
||||
sunlight,
|
||||
air_temp,
|
||||
air_humidity,
|
||||
soil_temp,
|
||||
soil_humidity,
|
||||
soil_conduct,
|
||||
co2,
|
||||
ph,
|
||||
position1,
|
||||
run_status1,
|
||||
control_status1,
|
||||
position2,
|
||||
run_status2,
|
||||
control_status2,
|
||||
position3,
|
||||
run_status3,
|
||||
control_status3,
|
||||
position4,
|
||||
run_status4,
|
||||
control_status4,
|
||||
position5,
|
||||
run_status5,
|
||||
control_status5,
|
||||
position6,
|
||||
run_status6,
|
||||
control_status6,
|
||||
position7,
|
||||
run_status7,
|
||||
control_status7,
|
||||
position8,
|
||||
run_status8,
|
||||
control_status8,
|
||||
bei_yong1,
|
||||
bei_yong2,
|
||||
time
|
||||
from ruoyi.device_sense
|
||||
where deviceId = #{deviceId}
|
||||
</select>
|
||||
|
||||
<select id="selectByTime" resultMap="DeviceSenseMap">
|
||||
select deviceId,
|
||||
sunlight,
|
||||
air_temp,
|
||||
air_humidity,
|
||||
soil_temp,
|
||||
soil_humidity,
|
||||
soil_conduct,
|
||||
co2,
|
||||
ph,
|
||||
position1,
|
||||
run_status1,
|
||||
control_status1,
|
||||
position2,
|
||||
run_status2,
|
||||
control_status2,
|
||||
position3,
|
||||
run_status3,
|
||||
control_status3,
|
||||
position4,
|
||||
run_status4,
|
||||
control_status4,
|
||||
position5,
|
||||
run_status5,
|
||||
control_status5,
|
||||
position6,
|
||||
run_status6,
|
||||
control_status6,
|
||||
position7,
|
||||
run_status7,
|
||||
control_status7,
|
||||
position8,
|
||||
run_status8,
|
||||
control_status8,
|
||||
bei_yong1,
|
||||
bei_yong2,
|
||||
time
|
||||
from ruoyi.device_sense
|
||||
where time between #{startTime} and #{endTime}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selecthours" resultType="com.ruoyi.crops.domain.vo.DeviceSenseVo">
|
||||
select *
|
||||
from (select did
|
||||
, avg(sunlight) as AvgSunlight
|
||||
, avg(air_temp) as AvgAirTemp
|
||||
, avg(air_humidity) as AvgAirHumidity
|
||||
, avg(soil_temp) as AvgSoilTemp
|
||||
, avg(soil_humidity) as AvgSoilHumidity
|
||||
, avg(co2) as AvgCO2
|
||||
, DATE_FORMAT(time, '%Y-%m-%d %H:%m:%s') time
|
||||
from (select ANY_VALUE(deviceId) as did,
|
||||
sunlight,
|
||||
air_temp,
|
||||
air_humidity,
|
||||
soil_temp,
|
||||
soil_humidity,
|
||||
co2,
|
||||
DATE_FORMAT(time, '%Y-%m-%d %H') as time
|
||||
from ruoyi.device_sense
|
||||
GROUP BY DATE_FORMAT(time, '%Y-%m-%d %H'),
|
||||
did, sunlight, air_temp, air_humidity, soil_temp, soil_humidity, co2
|
||||
) as t
|
||||
group by time) as tt
|
||||
where time between #{startTime} and #{endTime}
|
||||
</select>
|
||||
|
||||
<select id="selectdays" resultType="com.ruoyi.crops.domain.vo.DeviceSenseVo">
|
||||
select *
|
||||
from (select did
|
||||
, avg(sunlight) as AvgSunlight
|
||||
, avg(air_temp) as AvgAirTemp
|
||||
, avg(air_humidity) as AvgAirHumidity
|
||||
, avg(soil_temp) as AvgSoilTemp
|
||||
, avg(soil_humidity) as AvgSoilHumidity
|
||||
, avg(co2) as AvgCO2
|
||||
, time
|
||||
from (
|
||||
select ANY_VALUE(deviceId) as did,
|
||||
sunlight,
|
||||
air_temp,
|
||||
air_humidity,
|
||||
soil_temp,
|
||||
soil_humidity,
|
||||
co2,
|
||||
DATE_FORMAT(time, '%Y-%m-%d') as time
|
||||
from ruoyi.device_sense
|
||||
GROUP BY DATE_FORMAT(time, '%Y-%m-%d'),
|
||||
did, sunlight, air_temp, air_humidity, soil_temp, soil_humidity, co2
|
||||
) as t
|
||||
group by time) as tt
|
||||
where time between #{startTime} and #{endTime}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.FertigationSenseMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.FertigationSense" id="FertigationSenseMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="DeviceId" column="DeviceId" jdbcType="VARCHAR"/>
|
||||
<result property="EC" column="EC" jdbcType="DOUBLE"/>
|
||||
<result property="pH" column="pH" jdbcType="DOUBLE"/>
|
||||
<result property="PumpPressure" column="PumpPressure" jdbcType="DOUBLE"/>
|
||||
<result property="AccumulativeInflow1" column="AccumulativeInflow1" jdbcType="DOUBLE"/>
|
||||
<result property="InstantInflow1" column="InstantInflow1" jdbcType="DOUBLE"/>
|
||||
<result property="AccumulativeInflow2" column="AccumulativeInflow2" jdbcType="DOUBLE"/>
|
||||
<result property="InstantInflow2" column="InstantInflow2" jdbcType="DOUBLE"/>
|
||||
<result property="AccumulativeInflow3" column="AccumulativeInflow3" jdbcType="DOUBLE"/>
|
||||
<result property="InstantInflow3" column="InstantInflow3" jdbcType="DOUBLE"/>
|
||||
<result property="AccumulativeInflow4" column="AccumulativeInflow4" jdbcType="DOUBLE"/>
|
||||
<result property="InstantInflow4" column="InstantInflow4" jdbcType="DOUBLE"/>
|
||||
<result property="AccumulativeInflowAcid" column="AccumulativeInflowAcid" jdbcType="DOUBLE"/>
|
||||
<result property="InstantInflowAcid" column="InstantInflowAcid" jdbcType="DOUBLE"/>
|
||||
<result property="AccumulativeInflowClear" column="AccumulativeInflowClear" jdbcType="INTEGER"/>
|
||||
<result property="CloudStatus" column="CloudStatus" jdbcType="INTEGER"/>
|
||||
<result property="WorkStatus" column="WorkStatus" jdbcType="INTEGER"/>
|
||||
<result property="ControlMode" column="ControlMode" jdbcType="INTEGER"/>
|
||||
<result property="AutoMode" column="AutoMode" jdbcType="INTEGER"/>
|
||||
<result property="InflowPump" column="InflowPump" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPump" column="FeedingPump" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH1" column="FeedingPumpCH1" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH1PWM" column="FeedingPumpCH1PWM" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH2" column="FeedingPumpCH2" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH2PWM" column="FeedingPumpCH2PWM" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH3" column="FeedingPumpCH3" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH3PWM" column="FeedingPumpCH3PWM" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH4" column="FeedingPumpCH4" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpCH4PWM" column="FeedingPumpCH4PWM" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpAcid" column="FeedingPumpAcid" jdbcType="INTEGER"/>
|
||||
<result property="FeedingPumpAcidPWM" column="FeedingPumpAcidPWM" jdbcType="INTEGER"/>
|
||||
<result property="Stir1" column="Stir1" jdbcType="INTEGER"/>
|
||||
<result property="Stir2" column="Stir2" jdbcType="INTEGER"/>
|
||||
<result property="Stir3" column="Stir3" jdbcType="INTEGER"/>
|
||||
<result property="Stir4" column="Stir4" jdbcType="INTEGER"/>
|
||||
<result property="Stir5" column="Stir5" jdbcType="INTEGER"/>
|
||||
<result property="Valve1" column="Valve1" jdbcType="INTEGER"/>
|
||||
<result property="Valve2" column="Valve2" jdbcType="INTEGER"/>
|
||||
<result property="Valve3" column="Valve3" jdbcType="INTEGER"/>
|
||||
<result property="Valve4" column="Valve4" jdbcType="INTEGER"/>
|
||||
<result property="Valve5" column="Valve5" jdbcType="INTEGER"/>
|
||||
<result property="Valve6" column="Valve6" jdbcType="INTEGER"/>
|
||||
<result property="Valve7" column="Valve7" jdbcType="INTEGER"/>
|
||||
<result property="Valve8" column="Valve8" jdbcType="INTEGER"/>
|
||||
<result property="Valve9" column="Valve9" jdbcType="INTEGER"/>
|
||||
<result property="Valve10" column="Valve10" jdbcType="INTEGER"/>
|
||||
<result property="Valve11" column="Valve11" jdbcType="INTEGER"/>
|
||||
<result property="Valve12" column="Valve12" jdbcType="INTEGER"/>
|
||||
<result property="Valve13" column="Valve13" jdbcType="INTEGER"/>
|
||||
<result property="Valve14" column="Valve14" jdbcType="INTEGER"/>
|
||||
<result property="Valve15" column="Valve15" jdbcType="INTEGER"/>
|
||||
<result property="Valve16" column="Valve16" jdbcType="INTEGER"/>
|
||||
<result property="Valve17" column="Valve17" jdbcType="INTEGER"/>
|
||||
<result property="Valve18" column="Valve18" jdbcType="INTEGER"/>
|
||||
<result property="Valve19" column="Valve19" jdbcType="INTEGER"/>
|
||||
<result property="Valve20" column="Valve20" jdbcType="INTEGER"/>
|
||||
<result property="Valve21" column="Valve21" jdbcType="INTEGER"/>
|
||||
<result property="Valve22" column="Valve22" jdbcType="INTEGER"/>
|
||||
<result property="Valve23" column="Valve23" jdbcType="INTEGER"/>
|
||||
<result property="Valve24" column="Valve24" jdbcType="INTEGER"/>
|
||||
<result property="Valve25" column="Valve25" jdbcType="INTEGER"/>
|
||||
<result property="Valve26" column="Valve26" jdbcType="INTEGER"/>
|
||||
<result property="Valve27" column="Valve27" jdbcType="INTEGER"/>
|
||||
<result property="Valve28" column="Valve28" jdbcType="INTEGER"/>
|
||||
<result property="Valve29" column="Valve29" jdbcType="INTEGER"/>
|
||||
<result property="Valve30" column="Valve30" jdbcType="INTEGER"/>
|
||||
<result property="Valve31" column="Valve31" jdbcType="INTEGER"/>
|
||||
<result property="Valve32" column="Valve32" jdbcType="INTEGER"/>
|
||||
<result property="Valve33" column="Valve33" jdbcType="INTEGER"/>
|
||||
<result property="Valve34" column="Valve34" jdbcType="INTEGER"/>
|
||||
<result property="Valve35" column="Valve35" jdbcType="INTEGER"/>
|
||||
<result property="Valve36" column="Valve36" jdbcType="INTEGER"/>
|
||||
<result property="Valve37" column="Valve37" jdbcType="INTEGER"/>
|
||||
<result property="Valve38" column="Valve38" jdbcType="INTEGER"/>
|
||||
<result property="Valve39" column="Valve39" jdbcType="INTEGER"/>
|
||||
<result property="Valve40" column="Valve40" jdbcType="INTEGER"/>
|
||||
<result property="time" column="time" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<insert id="dedupInsert">
|
||||
insert into ruoyi.fertigation_sense(DeviceId,EC, pH, PumpPressure, AccumulativeInflow1, InstantInflow1,
|
||||
AccumulativeInflow2, InstantInflow2, AccumulativeInflow3, InstantInflow3,
|
||||
AccumulativeInflow4, InstantInflow4, AccumulativeInflowAcid,
|
||||
InstantInflowAcid, AccumulativeInflowClear, CloudStatus, WorkStatus,
|
||||
ControlMode, AutoMode, InflowPump, FeedingPump, FeedingPumpCH1,
|
||||
FeedingPumpCH1PWM, FeedingPumpCH2, FeedingPumpCH2PWM, FeedingPumpCH3,
|
||||
FeedingPumpCH3PWM, FeedingPumpCH4, FeedingPumpCH4PWM, FeedingPumpAcid,
|
||||
FeedingPumpAcidPWM, Stir1, Stir2, Stir3, Stir4, Stir5, Valve1, Valve2,
|
||||
Valve3, Valve4, Valve5, Valve6, Valve7, Valve8, Valve9, Valve10, Valve11,
|
||||
Valve12, Valve13, Valve14, Valve15, Valve16, Valve17, Valve18, Valve19,
|
||||
Valve20, Valve21, Valve22, Valve23, Valve24, Valve25, Valve26, Valve27,
|
||||
Valve28, Valve29, Valve30, Valve31, Valve32, Valve33, Valve34, Valve35,
|
||||
Valve36, Valve37, Valve38, Valve39, Valve40, time)
|
||||
select #{DeviceId},#{EC}, #{pH}, #{PumpPressure}, #{AccumulativeInflow1},#{InstantInflow1},
|
||||
#{AccumulativeInflow2}, #{InstantInflow2}, #{AccumulativeInflow3}, #{InstantInflow3},
|
||||
#{AccumulativeInflow4}, #{InstantInflow4}, #{AccumulativeInflowAcid}, #{InstantInflowAcid},
|
||||
#{AccumulativeInflowClear}, #{CloudStatus}, #{WorkStatus}, #{ControlMode}, #{AutoMode},
|
||||
#{InflowPump}, #{FeedingPump}, #{FeedingPumpCH1}, #{FeedingPumpCH1PWM}, #{FeedingPumpCH2},
|
||||
#{FeedingPumpCH2PWM}, #{FeedingPumpCH3}, #{FeedingPumpCH3PWM}, #{FeedingPumpCH4}, #{FeedingPumpCH4PWM},
|
||||
#{FeedingPumpAcid}, #{FeedingPumpAcidPWM}, #{Stir1}, #{Stir2}, #{Stir3}, #{Stir4}, #{Stir5},
|
||||
#{Valve1}, #{Valve2}, #{Valve3}, #{Valve4}, #{Valve5}, #{Valve6}, #{Valve7}, #{Valve8}, #{Valve9},
|
||||
#{Valve10}, #{Valve11}, #{Valve12}, #{Valve13}, #{Valve14}, #{Valve15}, #{Valve16}, #{Valve17},
|
||||
#{Valve18}, #{Valve19}, #{Valve20}, #{Valve21}, #{Valve22}, #{Valve23}, #{Valve24}, #{Valve25},
|
||||
#{Valve26}, #{Valve27}, #{Valve28}, #{Valve29}, #{Valve30}, #{Valve31}, #{Valve32}, #{Valve33},
|
||||
#{Valve34}, #{Valve35}, #{Valve36}, #{Valve37}, #{Valve38}, #{Valve39}, #{Valve40}, #{time}
|
||||
where not exists (select DeviceId,time from ruoyi.fertigation_sense where DeviceId =#{DeviceId} and time = #{time})
|
||||
</insert>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.fertigation_sense (DeviceId, EC, pH, PumpPressure, AccumulativeInflow1, InstantInflow1, AccumulativeInflow2, InstantInflow2, AccumulativeInflow3, InstantInflow3, AccumulativeInflow4, InstantInflow4, AccumulativeInflowAcid, InstantInflowAcid, AccumulativeInflowClear, CloudStatus, WorkStatus, ControlMode, AutoMode, InflowPump, FeedingPump, FeedingPumpCH1, FeedingPumpCH1PWM, FeedingPumpCH2, FeedingPumpCH2PWM, FeedingPumpCH3, FeedingPumpCH3PWM, FeedingPumpCH4, FeedingPumpCH4PWM, FeedingPumpAcid, FeedingPumpAcidPWM, Stir1, Stir2, Stir3, Stir4, Stir5, Valve1, Valve2, Valve3, Valve4, Valve5, Valve6, Valve7, Valve8, Valve9, Valve10, Valve11, Valve12, Valve13, Valve14, Valve15, Valve16, Valve17, Valve18, Valve19, Valve20, Valve21, Valve22, Valve23, Valve24, Valve25, Valve26, Valve27, Valve28, Valve29, Valve30, Valve31, Valve32, Valve33, Valve34, Valve35, Valve36, Valve37, Valve38, Valve39, Valve40, time)
|
||||
VALUE (#{DeviceId},#{EC}, #{pH}, #{PumpPressure}, #{AccumulativeInflow1},#{InstantInflow1},
|
||||
#{AccumulativeInflow2}, #{InstantInflow2}, #{AccumulativeInflow3}, #{InstantInflow3},
|
||||
#{AccumulativeInflow4}, #{InstantInflow4}, #{AccumulativeInflowAcid}, #{InstantInflowAcid},
|
||||
#{AccumulativeInflowClear}, #{CloudStatus}, #{WorkStatus}, #{ControlMode}, #{AutoMode},
|
||||
#{InflowPump}, #{FeedingPump}, #{FeedingPumpCH1}, #{FeedingPumpCH1PWM}, #{FeedingPumpCH2},
|
||||
#{FeedingPumpCH2PWM}, #{FeedingPumpCH3}, #{FeedingPumpCH3PWM}, #{FeedingPumpCH4}, #{FeedingPumpCH4PWM},
|
||||
#{FeedingPumpAcid}, #{FeedingPumpAcidPWM}, #{Stir1}, #{Stir2}, #{Stir3}, #{Stir4}, #{Stir5},
|
||||
#{Valve1}, #{Valve2}, #{Valve3}, #{Valve4}, #{Valve5}, #{Valve6}, #{Valve7}, #{Valve8}, #{Valve9},
|
||||
#{Valve10}, #{Valve11}, #{Valve12}, #{Valve13}, #{Valve14}, #{Valve15}, #{Valve16}, #{Valve17},
|
||||
#{Valve18}, #{Valve19}, #{Valve20}, #{Valve21}, #{Valve22}, #{Valve23}, #{Valve24}, #{Valve25},
|
||||
#{Valve26}, #{Valve27}, #{Valve28}, #{Valve29}, #{Valve30}, #{Valve31}, #{Valve32}, #{Valve33},
|
||||
#{Valve34}, #{Valve35}, #{Valve36}, #{Valve37}, #{Valve38}, #{Valve39}, #{Valve40}, #{time})
|
||||
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.FoundationMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.gsonBean.GsonParseFoundationBean" id="GsonParseFoundationBeanMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
||||
<result property="foundationId" column="foundation_id" jdbcType="INTEGER"/>
|
||||
<result property="foundationName" column="foundation_name" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.foundation (user_id,foundation_id, foundation_name)
|
||||
VALUE (#{userId},#{foundationId},#{foundationName})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.MeteorologicalMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.Meteorological" id="MeteorologicalMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="warnId" column="warn_id" jdbcType="VARCHAR"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="level" column="level" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
<result property="time" column="time" jdbcType="VARCHAR"/>
|
||||
<result property="province" column="province" jdbcType="VARCHAR"/>
|
||||
<result property="city" column="city" jdbcType="VARCHAR"/>
|
||||
<result property="district" column="district" jdbcType="VARCHAR"/>
|
||||
<result property="content" column="content" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectbyTime" resultMap="MeteorologicalMap">
|
||||
|
||||
select warn_id,title,level,type,time,province,city,district,content
|
||||
from ruoyi.meteorological
|
||||
where time BETWEEN CONCAT(CURDATE(),' 00:00:00') AND CONCAT(CURDATE(),' 23:59:59');
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.meteorological (warn_id, title, level, type, time, province, city, district, content)
|
||||
VALUE (#{warnId},#{title},#{level},#{type},#{time},#{province},#{city},#{district},#{content})
|
||||
</insert>
|
||||
|
||||
<!--sql语句直接去重-->
|
||||
<select id="insert2">
|
||||
insert into ruoyi.meteorological(warn_id, title, level, type, time, province, city, district, content)
|
||||
select #{warnId},#{title},#{level},#{type},#{time},#{province},#{city},#{district},#{content}
|
||||
where not exists(select warn_id ,time from ruoyi.meteorological where warn_id=#{warnId} and time=#{time})
|
||||
</select>
|
||||
</mapper>
|
@ -7,10 +7,12 @@
|
||||
<result property="time" column="time" jdbcType="DATE"/>
|
||||
<result property="serviceName" column="service_name" jdbcType="VARCHAR"/>
|
||||
<result property="style" column="style" jdbcType="VARCHAR"/>
|
||||
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
|
||||
<result property="filePath" column="file_path" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectServiceTypeVo">
|
||||
select id,service_type,time,service_name,style from ruoyi.service_type
|
||||
select id,service_type,time,service_name,style,file_name,file_path from ruoyi.service_type
|
||||
</sql>
|
||||
<select id="selectByType" resultMap="ServiceTypeMap">
|
||||
<include refid="selectServiceTypeVo">
|
||||
@ -19,8 +21,8 @@
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into ruoyi.service_type(service_type, time, service_name, style)
|
||||
value (#{serviceType},#{time},#{serviceName},#{style})
|
||||
insert into ruoyi.service_type(service_type, time, service_name, style,file_name,file_path)
|
||||
value (#{serviceType},#{time},#{serviceName},#{style},#{fileName},#{filePath})
|
||||
</insert>
|
||||
|
||||
<select id="selectAll" resultMap="ServiceTypeMap">
|
||||
@ -35,4 +37,7 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectByfile" resultType="java.lang.Integer">
|
||||
select count(*) from ruoyi.service_type where file_name=#{name};
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -7,16 +7,20 @@
|
||||
<result property="monitoringIndicators" column="monitoring_indicators" jdbcType="VARCHAR"/>
|
||||
<result property="monitoringValues" column="monitoring_values" jdbcType="DOUBLE"/>
|
||||
<result property="abnormalCause" column="abnormal_cause" jdbcType="VARCHAR"/>
|
||||
<result property="warningTime" column="warning_time" jdbcType="DATE"/>
|
||||
<result property="warningTime" column="warning_time" jdbcType="VARCHAR"/>
|
||||
<result property="aaus" column="aaus" jdbcType="VARCHAR"/>
|
||||
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByNumber" resultMap="WarningInformationMap">
|
||||
<select id="selectByTime" resultMap="WarningInformationMap">
|
||||
select * from ruoyi.warning_information
|
||||
where greenhouse_number= #{number}
|
||||
where warning_time between #{startTime} and #{endTime}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.warning_information(greenhouse_number, monitoring_indicators, monitoring_values, abnormal_cause, warning_time)
|
||||
VALUE(#{greenhouseNumber},#{monitoringIndicators},#{monitoringValues},#{abnormalCause},#{warningTime})
|
||||
insert into ruoyi.warning_information(greenhouse_number, monitoring_indicators, monitoring_values, abnormal_cause ,warning_time,aaus)
|
||||
VALUE(#{greenhouseNumber},#{monitoringIndicators},#{monitoringValues},#{abnormalCause},#{warningTime},#{aaus})
|
||||
</insert>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user