平台修改意见20251120-液冷设备新增字段-数据更新时间
This commit is contained in:
@ -1,7 +1,9 @@
|
|||||||
package com.xzzn.ems.domain;
|
package com.xzzn.ems.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.xzzn.common.core.domain.BaseEntity;
|
import com.xzzn.common.core.domain.BaseEntity;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@ -20,6 +22,11 @@ public class EmsCoolingData extends BaseEntity
|
|||||||
/** */
|
/** */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 数据更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date dataUpdateTime;
|
||||||
|
|
||||||
/** 系统名称,如1#液冷 */
|
/** 系统名称,如1#液冷 */
|
||||||
@Excel(name = "系统名称,如1#液冷")
|
@Excel(name = "系统名称,如1#液冷")
|
||||||
private String systemName;
|
private String systemName;
|
||||||
@ -102,6 +109,14 @@ public class EmsCoolingData extends BaseEntity
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataUpdateTime() {
|
||||||
|
return dataUpdateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataUpdateTime(Date dataUpdateTime) {
|
||||||
|
this.dataUpdateTime = dataUpdateTime;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSystemName(String systemName)
|
public void setSystemName(String systemName)
|
||||||
{
|
{
|
||||||
this.systemName = systemName;
|
this.systemName = systemName;
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
package com.xzzn.ems.domain.vo;
|
package com.xzzn.ems.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.xzzn.common.annotation.Excel;
|
import com.xzzn.common.annotation.Excel;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单站监控-液冷
|
* 单站监控-液冷
|
||||||
@ -13,6 +15,10 @@ public class CoolingDataViewVo {
|
|||||||
/** 设备名称 */
|
/** 设备名称 */
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
|
|
||||||
|
/** 数据更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date dataUpdateTime;
|
||||||
|
|
||||||
/** 供水温度 */
|
/** 供水温度 */
|
||||||
@Excel(name = "供水温度")
|
@Excel(name = "供水温度")
|
||||||
private BigDecimal gsTemp;
|
private BigDecimal gsTemp;
|
||||||
@ -52,6 +58,14 @@ public class CoolingDataViewVo {
|
|||||||
this.deviceName = deviceName;
|
this.deviceName = deviceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataUpdateTime() {
|
||||||
|
return dataUpdateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataUpdateTime(Date dataUpdateTime) {
|
||||||
|
this.dataUpdateTime = dataUpdateTime;
|
||||||
|
}
|
||||||
|
|
||||||
public BigDecimal getGsTemp() {
|
public BigDecimal getGsTemp() {
|
||||||
return gsTemp;
|
return gsTemp;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -199,12 +199,12 @@ public class DeviceDataProcessServiceImpl extends AbstractBatteryDataProcessor i
|
|||||||
} else if (deviceId.contains(SiteDevice.DH.name()) || deviceId.contains(SiteDevice.donghuan.name())) {
|
} else if (deviceId.contains(SiteDevice.DH.name()) || deviceId.contains(SiteDevice.donghuan.name())) {
|
||||||
dhDataProcess(siteId, deviceId, jsonData);
|
dhDataProcess(siteId, deviceId, jsonData);
|
||||||
} else if (deviceId.contains(SiteDevice.ZSLQ.name())) {
|
} else if (deviceId.contains(SiteDevice.ZSLQ.name())) {
|
||||||
coolingDataProcess(siteId, deviceId, jsonData);
|
coolingDataProcess(siteId, deviceId, jsonData, dataUpdateTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void coolingDataProcess(String siteId, String deviceId, String jsonData) {
|
private void coolingDataProcess(String siteId, String deviceId, String jsonData, Date dataUpdateTime) {
|
||||||
//中水冷却
|
//中水冷却
|
||||||
Map<String, Object> obj = JSON.parseObject(jsonData, new TypeReference<Map<String, Object>>() {
|
Map<String, Object> obj = JSON.parseObject(jsonData, new TypeReference<Map<String, Object>>() {
|
||||||
});
|
});
|
||||||
@ -219,6 +219,7 @@ public class DeviceDataProcessServiceImpl extends AbstractBatteryDataProcessor i
|
|||||||
|
|
||||||
saveDeviceData(pointMatchList, obj, coolingData);
|
saveDeviceData(pointMatchList, obj, coolingData);
|
||||||
|
|
||||||
|
coolingData.setDataUpdateTime(dataUpdateTime);
|
||||||
coolingData.setCreateBy("system");
|
coolingData.setCreateBy("system");
|
||||||
coolingData.setCreateTime(DateUtils.getNowDate());
|
coolingData.setCreateTime(DateUtils.getNowDate());
|
||||||
coolingData.setUpdateBy("system");
|
coolingData.setUpdateBy("system");
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<resultMap type="EmsCoolingData" id="EmsCoolingDataResult">
|
<resultMap type="EmsCoolingData" id="EmsCoolingDataResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="dataUpdateTime" column="data_update_time" />
|
||||||
<result property="systemName" column="system_name" />
|
<result property="systemName" column="system_name" />
|
||||||
<result property="workMode" column="work_mode" />
|
<result property="workMode" column="work_mode" />
|
||||||
<result property="currentTemperature" column="current_temperature" />
|
<result property="currentTemperature" column="current_temperature" />
|
||||||
@ -38,6 +39,7 @@
|
|||||||
<select id="selectEmsCoolingDataList" parameterType="EmsCoolingData" resultMap="EmsCoolingDataResult">
|
<select id="selectEmsCoolingDataList" parameterType="EmsCoolingData" resultMap="EmsCoolingDataResult">
|
||||||
<include refid="selectEmsCoolingDataVo"/>
|
<include refid="selectEmsCoolingDataVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="dataUpdateTime != null "> and data_update_time = #{dataUpdateTime}</if>
|
||||||
<if test="systemName != null and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if>
|
<if test="systemName != null and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if>
|
||||||
<if test="workMode != null and workMode != ''"> and work_mode = #{workMode}</if>
|
<if test="workMode != null and workMode != ''"> and work_mode = #{workMode}</if>
|
||||||
<if test="currentTemperature != null "> and current_temperature = #{currentTemperature}</if>
|
<if test="currentTemperature != null "> and current_temperature = #{currentTemperature}</if>
|
||||||
@ -67,6 +69,7 @@
|
|||||||
<insert id="insertEmsCoolingData" parameterType="EmsCoolingData" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertEmsCoolingData" parameterType="EmsCoolingData" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into ems_cooling_data
|
insert into ems_cooling_data
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="dataUpdateTime != null">data_update_time,</if>
|
||||||
<if test="systemName != null">system_name,</if>
|
<if test="systemName != null">system_name,</if>
|
||||||
<if test="workMode != null">work_mode,</if>
|
<if test="workMode != null">work_mode,</if>
|
||||||
<if test="currentTemperature != null">current_temperature,</if>
|
<if test="currentTemperature != null">current_temperature,</if>
|
||||||
@ -92,6 +95,7 @@
|
|||||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
|
||||||
<if test="systemName != null">#{systemName},</if>
|
<if test="systemName != null">#{systemName},</if>
|
||||||
<if test="workMode != null">#{workMode},</if>
|
<if test="workMode != null">#{workMode},</if>
|
||||||
<if test="currentTemperature != null">#{currentTemperature},</if>
|
<if test="currentTemperature != null">#{currentTemperature},</if>
|
||||||
@ -121,6 +125,7 @@
|
|||||||
<update id="updateEmsCoolingData" parameterType="EmsCoolingData">
|
<update id="updateEmsCoolingData" parameterType="EmsCoolingData">
|
||||||
update ems_cooling_data
|
update ems_cooling_data
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="dataUpdateTime != null">data_update_time = #{dataUpdateTime},</if>
|
||||||
<if test="systemName != null">system_name = #{systemName},</if>
|
<if test="systemName != null">system_name = #{systemName},</if>
|
||||||
<if test="workMode != null">work_mode = #{workMode},</if>
|
<if test="workMode != null">work_mode = #{workMode},</if>
|
||||||
<if test="currentTemperature != null">current_temperature = #{currentTemperature},</if>
|
<if test="currentTemperature != null">current_temperature = #{currentTemperature},</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user