水肥、气象、墒情最新、历史数据查询测试并修改bug
|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonPropertyOrder; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @JsonPropertyOrder({ | 
|---|
|  |  |  | "id", "manureId", "manureName", "dt", "alarm", | 
|---|
|  |  |  | "stirRunning1", "stirRunning2", "stirRunning3", "stirRunning4", | 
|---|
|  |  |  | "injectRunning", "irrRunning", | 
|---|
|  |  |  | "manureFlow", "manureTime", "stirTime", | 
|---|
|  |  |  | "stirDuration", "injectDuration" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public class VoManure  { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506251634001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 水肥机名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "水肥机名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Long manureName; | 
|---|
|  |  |  | public String manureName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonPropertyOrder; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @JsonPropertyOrder({ | 
|---|
|  |  |  | "id", "soilId", "soilName", "dt", | 
|---|
|  |  |  | "soilHumidity1", "soilHumidity2", "soilHumidity3", "soilHumidity4", "soilHumidity5", | 
|---|
|  |  |  | "soilTemperature1", "soilTemperature2", "soilTemperature3", "soilTemperature4", "soilTemperature5" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public class VoSoil { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506260903001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 墒情站名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "墒情站名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Long soilName; | 
|---|
|  |  |  | public String soilName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonPropertyOrder; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @JsonPropertyOrder({ | 
|---|
|  |  |  | "id", "soilId", "soilName", "dt", | 
|---|
|  |  |  | "soilHumidity1", "soilHumidity2", "soilHumidity3", "soilHumidity4", "soilHumidity5", | 
|---|
|  |  |  | "soilTemperature1", "soilTemperature2", "soilTemperature3", "soilTemperature4", "soilTemperature5" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public class VoSoilDay { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506261020001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 墒情站名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "墒情站名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Long soilName; | 
|---|
|  |  |  | public String soilName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonPropertyOrder; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @JsonPropertyOrder({ | 
|---|
|  |  |  | "id", "weatherId", "weatherName", "dt", | 
|---|
|  |  |  | "airTemperature", "airHumidity", | 
|---|
|  |  |  | "ultraviolet", "lightIntensity", | 
|---|
|  |  |  | "rainfall", "windSpeed", | 
|---|
|  |  |  | "windDirection", "windDirectionStr" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public class VoWeather { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506260903001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 气象站名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "气象站名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Long weatherName; | 
|---|
|  |  |  | public String weatherName; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | <include refid="part_Column_List" /> | 
|---|
|  |  |  | FROM pr_st_manure | 
|---|
|  |  |  | WHERE deleted = 0 AND fbox_id=#{fbox_id,jdbcType=VARCHAR} AND no=#{fbox_id,jdbcType=INTEGER} | 
|---|
|  |  |  | WHERE deleted != 1 AND fbox_id=#{fbox_id,jdbcType=VARCHAR} AND no=#{no,jdbcType=INTEGER} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | <include refid="part_Column_List" /> | 
|---|
|  |  |  | FROM pr_st_soil | 
|---|
|  |  |  | WHERE deleted = 0 AND fbox_id=#{fbox_id,jdbcType=VARCHAR} AND no=#{fbox_id,jdbcType=INTEGER} | 
|---|
|  |  |  | WHERE deleted != 1 AND fbox_id=#{fbox_id,jdbcType=VARCHAR} AND no=#{no,jdbcType=INTEGER} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | <include refid="part_Column_List" /> | 
|---|
|  |  |  | FROM pr_st_weather | 
|---|
|  |  |  | WHERE deleted = 0 AND fbox_id=#{fbox_id,jdbcType=VARCHAR} AND no=#{fbox_id,jdbcType=INTEGER} | 
|---|
|  |  |  | WHERE deleted != 1 AND fbox_id=#{fbox_id,jdbcType=VARCHAR} AND no=#{no,jdbcType=INTEGER} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectAllSimple" resultType="com.dy.pipIrrGlobal.voPr.VoMqttSimple"> | 
|---|
|  |  |  | 
|---|
|  |  |  | id, manure_id, dt, stir_running1, stir_running2, stir_running3, stir_running4, inject_running, | 
|---|
|  |  |  | irr_running, alarm, manure_flow, manure_time, stir_time, stir_duration, inject_duration | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.manure_id, ${alias}.dt, | 
|---|
|  |  |  | ${alias}.stir_running1, ${alias}.stir_running2, | 
|---|
|  |  |  | ${alias}.stir_running3, ${alias}.stir_running4, | 
|---|
|  |  |  | ${alias}.inject_running, ${alias}.irr_running, | 
|---|
|  |  |  | ${alias}.alarm, ${alias}.manure_flow, | 
|---|
|  |  |  | ${alias}.manure_time, ${alias}.stir_time, | 
|---|
|  |  |  | ${alias}.stir_duration, ${alias}.inject_duration | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND htb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询历史记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoManure"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="htb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS manureName | 
|---|
|  |  |  | FROM rm_manure_history htb | 
|---|
|  |  |  | INNER JOIN pr_st_manure mtb ON mtb.id = htb.manure_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND htb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | stir_running4, inject_running, irr_running, alarm, manure_flow, manure_time, stir_time, | 
|---|
|  |  |  | stir_duration, inject_duration | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.last_history_id, ${alias}.manure_id, ${alias}.dt, ${alias}.stir_running1, ${alias}.stir_running2, ${alias}.stir_running3, | 
|---|
|  |  |  | ${alias}.stir_running4, ${alias}.inject_running, ${alias}.irr_running, ${alias}.alarm, ${alias}.manure_flow, ${alias}.manure_time, ${alias}.stir_time, | 
|---|
|  |  |  | ${alias}.stir_duration, ${alias}.inject_duration | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoManure"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="ltb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS manureName | 
|---|
|  |  |  | FROM rm_manure_last ltb | 
|---|
|  |  |  | INNER JOIN pr_st_manure mtb ON mtb.id = ltb.manure_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | soil_sum_humidity4, soil_sum_humidity5, soil_sum_temperature1, soil_sum_temperature2, | 
|---|
|  |  |  | soil_sum_temperature3, soil_sum_temperature4, soil_sum_temperature5 | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.soil_id, ${alias}.dt, ${alias}.ymd, | 
|---|
|  |  |  | ${alias}.soil_humidity1, ${alias}.soil_humidity2, ${alias}.soil_humidity3, ${alias}.soil_humidity4, ${alias}.soil_humidity5, | 
|---|
|  |  |  | ${alias}.soil_temperature1, ${alias}.soil_temperature2, ${alias}.soil_temperature3, ${alias}.soil_temperature4, ${alias}.soil_temperature5, | 
|---|
|  |  |  | ${alias}.times, | 
|---|
|  |  |  | ${alias}.soil_sum_humidity1, ${alias}.soil_sum_humidity2, ${alias}.soil_sum_humidity3, ${alias}.soil_sum_humidity4, ${alias}.soil_sum_humidity5, | 
|---|
|  |  |  | ${alias}.soil_sum_temperature1, ${alias}.soil_sum_temperature2, ${alias}.soil_sum_temperature3, ${alias}.soil_sum_temperature4, ${alias}.soil_sum_temperature5 | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <sql id="Part_Column_List"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | id, soil_id, dt, ymd, soil_humidity1, soil_humidity2, soil_humidity3, soil_humidity4, | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoSoilDay"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="ltb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS soilName | 
|---|
|  |  |  | FROM rm_soil_day ltb | 
|---|
|  |  |  | INNER JOIN pr_st_soil mtb ON mtb.id = ltb.soil_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | soil_humidity5, soil_temperature1, soil_temperature2, soil_temperature3, soil_temperature4, | 
|---|
|  |  |  | soil_temperature5 | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.soil_id, ${alias}.dt, ${alias}.soil_humidity1, | 
|---|
|  |  |  | ${alias}.soil_humidity2, ${alias}.soil_humidity3, ${alias}.soil_humidity4, | 
|---|
|  |  |  | ${alias}.soil_humidity5, ${alias}.soil_temperature1, ${alias}.soil_temperature2, | 
|---|
|  |  |  | ${alias}.soil_temperature3, ${alias}.soil_temperature4, ${alias}.soil_temperature5 | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND htb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询历史记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoSoil"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="htb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS soilName | 
|---|
|  |  |  | FROM rm_soil_history htb | 
|---|
|  |  |  | INNER JOIN pr_st_soil mtb ON mtb.id = htb.soil_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND htb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | soil_humidity4, soil_humidity5, soil_temperature1, soil_temperature2, soil_temperature3, | 
|---|
|  |  |  | soil_temperature4, soil_temperature5 | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.last_history_id, ${alias}.soil_id, ${alias}.dt, ${alias}.soil_humidity1, | 
|---|
|  |  |  | ${alias}.soil_humidity2, ${alias}.soil_humidity3, ${alias}.soil_humidity4, | 
|---|
|  |  |  | ${alias}.soil_humidity5, ${alias}.soil_temperature1, ${alias}.soil_temperature2, | 
|---|
|  |  |  | ${alias}.soil_temperature3, ${alias}.soil_temperature4, ${alias}.soil_temperature5 | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoSoil"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="ltb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS soilName | 
|---|
|  |  |  | FROM rm_soil_last ltb | 
|---|
|  |  |  | INNER JOIN pr_st_soil mtb ON mtb.id = ltb.soil_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | id, weather_id, dt, air_temperature, air_humidity, ultraviolet, light_intensity, | 
|---|
|  |  |  | rainfall, wind_speed, wind_direction | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.weather_id, ${alias}.dt, ${alias}.air_temperature, | 
|---|
|  |  |  | ${alias}.air_humidity, ${alias}.ultraviolet, ${alias}.light_intensity, | 
|---|
|  |  |  | ${alias}.rainfall, ${alias}.wind_speed, ${alias}.wind_direction | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND htb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询历史记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoWeather"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="htb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS weatherName | 
|---|
|  |  |  | FROM rm_weather_history htb | 
|---|
|  |  |  | INNER JOIN pr_st_weather mtb ON mtb.id = htb.weather_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND htb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | id, last_history_id, weather_id, dt, air_temperature, air_humidity, ultraviolet, | 
|---|
|  |  |  | light_intensity, rainfall, wind_speed, wind_direction | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <sql id="Base_Column_List_with_alias"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | ${alias}.id, ${alias}.last_history_id, ${alias}.weather_id, ${alias}.dt, ${alias}.air_temperature, | 
|---|
|  |  |  | ${alias}.air_humidity, ${alias}.ultraviolet, ${alias}.light_intensity, | 
|---|
|  |  |  | ${alias}.rainfall, ${alias}.wind_speed, ${alias}.wind_direction | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!--根据指定条件查询记录--> | 
|---|
|  |  |  | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoWeather"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | <include refid="Base_Column_List" />, | 
|---|
|  |  |  | <include refid="Base_Column_List_with_alias" > | 
|---|
|  |  |  | <property name="alias" value="ltb"/> | 
|---|
|  |  |  | </include>, | 
|---|
|  |  |  | mtb.`name` AS weatherName | 
|---|
|  |  |  | FROM rm_weather_last ltb | 
|---|
|  |  |  | INNER JOIN pr_st_weather mtb ON mtb.id = ltb.weather_id | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test = "name != null and name !=''"> | 
|---|
|  |  |  | AND mtb.name LIKE CONCAT('%',#{name},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''"> | 
|---|
|  |  |  | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | 
|---|
|  |  |  | static{ | 
|---|
|  |  |  | commands = new String[]{ | 
|---|
|  |  |  | "config 查看配置信息", | 
|---|
|  |  |  | "mw 121 [tag] 命令含义:通信中间件在云服务器(121.199.41.121)上的[tag](元谋ym,沙盘sp测试test,梅江mj,民勤mq,延庆yq,黑龙江hlj,甘州gz,凉州lz,金川jc,嘉峪关jyg)系统配置", | 
|---|
|  |  |  | "mw 233 [tag] 命令含义:通信中间件在云服务器(8.130.130.233)上的[tag](元谋ym,沙盘sp测试test,梅江mj,民勤mq,延庆yq,黑龙江hlj,甘州gz,凉州lz,金川jc,嘉峪关jyg)系统配置", | 
|---|
|  |  |  | "mw 121 [tag] 命令含义:通信中间件在云服务器(121.199.41.121)上的[tag](民勤mq,延庆yq,黑龙江hlj,甘州gz,凉州lz,金川jc,嘉峪关jyg)系统配置", | 
|---|
|  |  |  | "mw 233 [tag] 命令含义:通信中间件在云服务器(8.130.130.233)上的[tag](元谋ym,沙盘sp,测试test,梅江mj)系统配置", | 
|---|
|  |  |  | "web 121 命令含义:web模块在云服务器(121.199.41.121)上的配置", | 
|---|
|  |  |  | "web 233 命令含义:web模块在云服务器(8.130.130.233)上的配置", | 
|---|
|  |  |  | "exit 退出", | 
|---|