苗情设备实时数据逻辑修改
This commit is contained in:
parent
1d917357cb
commit
69de6ace01
@ -28,6 +28,11 @@ private static final long serialVersionUID = 1L;
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
@ApiModelProperty("设备id")
|
||||
private String deviceId;
|
||||
|
||||
/** 环境温度 */
|
||||
@Excel(name = "环境温度")
|
||||
@ApiModelProperty("环境温度")
|
||||
@ -138,6 +143,12 @@ private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty("远程通断电")
|
||||
private Long control;
|
||||
|
||||
/** 保存时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "保存时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("保存时间")
|
||||
private Date saveTime;
|
||||
|
||||
/** 实时时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实时时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
|
@ -31,7 +31,7 @@ private static final long serialVersionUID = 1L;
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
@ApiModelProperty("设备id")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 1#环境温度 */
|
||||
@Excel(name = "1#环境温度")
|
||||
@ -253,6 +253,12 @@ private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty("2#当月累计用电量")
|
||||
private BigDecimal cumEleMon2;
|
||||
|
||||
/** 保存时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "保存时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("保存时间")
|
||||
private Date saveTime;
|
||||
|
||||
/** 实时时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实时时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
|
@ -28,12 +28,13 @@
|
||||
<result property="cumEleAll" column="cum_ele_all" />
|
||||
<result property="shoudong" column="shoudong" />
|
||||
<result property="control" column="control" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="saveTime" column="save_time" />
|
||||
<result property="realTime" column="real_time" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceRealtimedataMiaoqingVo">
|
||||
select id, air_temp, mpp_temp, battery_cap, battery_volt, battery_cur, battery_power, load_volt, load_cur, load_power, phot_volt, phot_cur, phot_power, cum_charge_day, cum_charge_mon, cum_charge_year, cum_charge_all, cum_ele_day, cum_ele_mon, cum_ele_year, cum_ele_all, shoudong, control, create_time, real_time from iot_device_realtimedata_miaoQing
|
||||
select id, air_temp, mpp_temp, battery_cap, battery_volt, battery_cur, battery_power, load_volt, load_cur, load_power, phot_volt, phot_cur, phot_power, cum_charge_day, cum_charge_mon, cum_charge_year, cum_charge_all, cum_ele_day, cum_ele_mon, cum_ele_year, cum_ele_all, shoudong, control, save_time, real_time, device_id from iot_device_realtimedata_miaoQing
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceRealtimedataMiaoqingList" parameterType="DeviceRealtimedataMiaoqing" resultMap="DeviceRealtimedataMiaoqingResult">
|
||||
@ -61,7 +62,9 @@
|
||||
<if test="cumEleAll != null "> and cum_ele_all = #{cumEleAll}</if>
|
||||
<if test="shoudong != null "> and shoudong = #{shoudong}</if>
|
||||
<if test="control != null "> and control = #{control}</if>
|
||||
<if test="saveTime != null "> and save_time = #{saveTime}</if>
|
||||
<if test="realTime != null "> and real_time = #{realTime}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -95,8 +98,9 @@
|
||||
<if test="cumEleAll != null">cum_ele_all,</if>
|
||||
<if test="shoudong != null">shoudong,</if>
|
||||
<if test="control != null">control,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="saveTime != null">save_time,</if>
|
||||
<if test="realTime != null">real_time,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="airTemp != null">#{airTemp},</if>
|
||||
@ -121,8 +125,9 @@
|
||||
<if test="cumEleAll != null">#{cumEleAll},</if>
|
||||
<if test="shoudong != null">#{shoudong},</if>
|
||||
<if test="control != null">#{control},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="saveTime != null">#{saveTime},</if>
|
||||
<if test="realTime != null">#{realTime},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -151,8 +156,9 @@
|
||||
<if test="cumEleAll != null">cum_ele_all = #{cumEleAll},</if>
|
||||
<if test="shoudong != null">shoudong = #{shoudong},</if>
|
||||
<if test="control != null">control = #{control},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="saveTime != null">save_time = #{saveTime},</if>
|
||||
<if test="realTime != null">real_time = #{realTime},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -51,18 +51,18 @@
|
||||
<result property="shoudong2" column="shoudong_2" />
|
||||
<result property="control2" column="control_2" />
|
||||
<result property="cumEleMon2" column="cum_ele_mon_2" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="saveTime" column="save_time" />
|
||||
<result property="realTime" column="real_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceRealtimedataPhotovoltaicVo">
|
||||
select id, device_id, air_temp, mpp_temp, battery_cap, battery_volt, battery_cur, battery_power, load_volt, load_cur, load_power, phot_volt, phot_cur, phot_power, cum_charge_day, cum_charge_mon, cum_charge_year, cum_charge_all, cum_ele_day, cum_ele_mon, cum_ele_year, cum_ele_all, shoudong, control, air_temp_2, mpp_temp_2, battery_cap_2, battery_volt_2, battery_cur_2, battery_power_2, load_volt_2, load_cur_2, load_power_2, phot_volt_2, phot_cur_2, phot_power_2, cum_charge_day_2, cum_charge_mon_2, cum_charge_year_2, cum_charge_all_2, cum_ele_day_2, cum_ele_year_2, cum_ele_all_2, shoudong_2, control_2, cum_ele_mon_2, create_time, real_time from iot_device_realtimedata_photovoltaic
|
||||
select id, device_id, air_temp, mpp_temp, battery_cap, battery_volt, battery_cur, battery_power, load_volt, load_cur, load_power, phot_volt, phot_cur, phot_power, cum_charge_day, cum_charge_mon, cum_charge_year, cum_charge_all, cum_ele_day, cum_ele_mon, cum_ele_year, cum_ele_all, shoudong, control, air_temp_2, mpp_temp_2, battery_cap_2, battery_volt_2, battery_cur_2, battery_power_2, load_volt_2, load_cur_2, load_power_2, phot_volt_2, phot_cur_2, phot_power_2, cum_charge_day_2, cum_charge_mon_2, cum_charge_year_2, cum_charge_all_2, cum_ele_day_2, cum_ele_year_2, cum_ele_all_2, shoudong_2, control_2, cum_ele_mon_2, save_time, real_time from iot_device_realtimedata_photovoltaic
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceRealtimedataPhotovoltaicList" parameterType="DeviceRealtimedataPhotovoltaic" resultMap="DeviceRealtimedataPhotovoltaicResult">
|
||||
<include refid="selectDeviceRealtimedataPhotovoltaicVo"/>
|
||||
<where>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="airTemp != null "> and air_temp = #{airTemp}</if>
|
||||
<if test="mppTemp != null "> and mpp_temp = #{mppTemp}</if>
|
||||
<if test="batteryCap != null "> and battery_cap = #{batteryCap}</if>
|
||||
@ -107,6 +107,7 @@
|
||||
<if test="shoudong2 != null "> and shoudong_2 = #{shoudong2}</if>
|
||||
<if test="control2 != null "> and control_2 = #{control2}</if>
|
||||
<if test="cumEleMon2 != null "> and cum_ele_mon_2 = #{cumEleMon2}</if>
|
||||
<if test="saveTime != null "> and save_time = #{saveTime}</if>
|
||||
<if test="realTime != null "> and real_time = #{realTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
@ -164,7 +165,7 @@
|
||||
<if test="shoudong2 != null">shoudong_2,</if>
|
||||
<if test="control2 != null">control_2,</if>
|
||||
<if test="cumEleMon2 != null">cum_ele_mon_2,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="saveTime != null">save_time,</if>
|
||||
<if test="realTime != null">real_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -213,7 +214,7 @@
|
||||
<if test="shoudong2 != null">#{shoudong2},</if>
|
||||
<if test="control2 != null">#{control2},</if>
|
||||
<if test="cumEleMon2 != null">#{cumEleMon2},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="saveTime != null">#{saveTime},</if>
|
||||
<if test="realTime != null">#{realTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -266,7 +267,7 @@
|
||||
<if test="shoudong2 != null">shoudong_2 = #{shoudong2},</if>
|
||||
<if test="control2 != null">control_2 = #{control2},</if>
|
||||
<if test="cumEleMon2 != null">cum_ele_mon_2 = #{cumEleMon2},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="saveTime != null">save_time = #{saveTime},</if>
|
||||
<if test="realTime != null">real_time = #{realTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
|
Loading…
x
Reference in New Issue
Block a user