单站监控-实时运行液冷数据

This commit is contained in:
2025-06-25 14:32:26 +08:00
parent 0d6b712e46
commit 4a69027f63
6 changed files with 438 additions and 0 deletions

View File

@ -89,4 +89,13 @@ public class EmsSiteMonitorController extends BaseController{
{ {
return success(iSingleSiteService.getBMSBatteryCluster(siteId)); return success(iSingleSiteService.getBMSBatteryCluster(siteId));
} }
/**
* 液冷设备参数
*/
@GetMapping("/getCoolingDataList")
public AjaxResult getCoolingDataList(@RequestParam Long siteId)
{
return success(iSingleSiteService.getCoolingDataList(siteId));
}
} }

View File

@ -0,0 +1,209 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 冷却系统参数对象 ems_cooling_data
*
* @author xzzn
* @date 2025-06-25
*/
public class EmsCoolingData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 系统名称如1#液冷 */
@Excel(name = "系统名称如1#液冷")
private String systemName;
/** 工作模式 */
@Excel(name = "工作模式")
private String workMode;
/** 当前温度 (℃) */
@Excel(name = "当前温度 (℃)")
private BigDecimal currentTemperature;
/** 制热开启点 (℃) */
@Excel(name = "制热开启点 (℃)")
private BigDecimal heatingStartPoint;
/** 制冷开启点 (℃) */
@Excel(name = "制冷开启点 (℃)")
private BigDecimal coolingStartPoint;
/** 高温告警点 (℃) */
@Excel(name = "高温告警点 (℃)")
private BigDecimal highTempAlarmPoint;
/** 制热停止点 (℃) */
@Excel(name = "制热停止点 (℃)")
private BigDecimal heatingStopPoint;
/** 制冷停止点 (℃) */
@Excel(name = "制冷停止点 (℃)")
private BigDecimal coolingStopPoint;
/** 低温告警点 (℃) */
@Excel(name = "低温告警点 (℃)")
private BigDecimal lowTempAlarmPoint;
/** 站点id */
@Excel(name = "站点id")
private Long siteId;
/** 设备唯一标识符 */
@Excel(name = "设备唯一标识符")
private Long deviceId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSystemName(String systemName)
{
this.systemName = systemName;
}
public String getSystemName()
{
return systemName;
}
public void setWorkMode(String workMode)
{
this.workMode = workMode;
}
public String getWorkMode()
{
return workMode;
}
public void setCurrentTemperature(BigDecimal currentTemperature)
{
this.currentTemperature = currentTemperature;
}
public BigDecimal getCurrentTemperature()
{
return currentTemperature;
}
public void setHeatingStartPoint(BigDecimal heatingStartPoint)
{
this.heatingStartPoint = heatingStartPoint;
}
public BigDecimal getHeatingStartPoint()
{
return heatingStartPoint;
}
public void setCoolingStartPoint(BigDecimal coolingStartPoint)
{
this.coolingStartPoint = coolingStartPoint;
}
public BigDecimal getCoolingStartPoint()
{
return coolingStartPoint;
}
public void setHighTempAlarmPoint(BigDecimal highTempAlarmPoint)
{
this.highTempAlarmPoint = highTempAlarmPoint;
}
public BigDecimal getHighTempAlarmPoint()
{
return highTempAlarmPoint;
}
public void setHeatingStopPoint(BigDecimal heatingStopPoint)
{
this.heatingStopPoint = heatingStopPoint;
}
public BigDecimal getHeatingStopPoint()
{
return heatingStopPoint;
}
public void setCoolingStopPoint(BigDecimal coolingStopPoint)
{
this.coolingStopPoint = coolingStopPoint;
}
public BigDecimal getCoolingStopPoint()
{
return coolingStopPoint;
}
public void setLowTempAlarmPoint(BigDecimal lowTempAlarmPoint)
{
this.lowTempAlarmPoint = lowTempAlarmPoint;
}
public BigDecimal getLowTempAlarmPoint()
{
return lowTempAlarmPoint;
}
public void setSiteId(Long siteId)
{
this.siteId = siteId;
}
public Long getSiteId()
{
return siteId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("systemName", getSystemName())
.append("workMode", getWorkMode())
.append("currentTemperature", getCurrentTemperature())
.append("heatingStartPoint", getHeatingStartPoint())
.append("coolingStartPoint", getCoolingStartPoint())
.append("highTempAlarmPoint", getHighTempAlarmPoint())
.append("heatingStopPoint", getHeatingStopPoint())
.append("coolingStopPoint", getCoolingStopPoint())
.append("lowTempAlarmPoint", getLowTempAlarmPoint())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.toString();
}
}

View File

@ -0,0 +1,68 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsCoolingData;
/**
* 冷却系统参数Mapper接口
*
* @author xzzn
* @date 2025-06-25
*/
public interface EmsCoolingDataMapper
{
/**
* 查询冷却系统参数
*
* @param id 冷却系统参数主键
* @return 冷却系统参数
*/
public EmsCoolingData selectEmsCoolingDataById(Long id);
/**
* 查询冷却系统参数列表
*
* @param emsCoolingData 冷却系统参数
* @return 冷却系统参数集合
*/
public List<EmsCoolingData> selectEmsCoolingDataList(EmsCoolingData emsCoolingData);
/**
* 新增冷却系统参数
*
* @param emsCoolingData 冷却系统参数
* @return 结果
*/
public int insertEmsCoolingData(EmsCoolingData emsCoolingData);
/**
* 修改冷却系统参数
*
* @param emsCoolingData 冷却系统参数
* @return 结果
*/
public int updateEmsCoolingData(EmsCoolingData emsCoolingData);
/**
* 删除冷却系统参数
*
* @param id 冷却系统参数主键
* @return 结果
*/
public int deleteEmsCoolingDataById(Long id);
/**
* 批量删除冷却系统参数
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsCoolingDataByIds(Long[] ids);
/**
* 获取液冷数据
* @param siteId
* @return
*/
public List<EmsCoolingData> getCoolingDataList(Long siteId);
}

View File

@ -1,5 +1,6 @@
package com.xzzn.ems.service; package com.xzzn.ems.service;
import com.xzzn.ems.domain.EmsCoolingData;
import com.xzzn.ems.domain.vo.*; import com.xzzn.ems.domain.vo.*;
import java.util.List; import java.util.List;
@ -23,4 +24,6 @@ public interface ISingleSiteService
public List<BMSOverViewVo> getBMSOverView(Long siteId); public List<BMSOverViewVo> getBMSOverView(Long siteId);
public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId); public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId);
public List<EmsCoolingData> getCoolingDataList(Long siteId);
} }

View File

@ -2,6 +2,7 @@ package com.xzzn.ems.service.impl;
import com.xzzn.common.utils.StringUtils; import com.xzzn.common.utils.StringUtils;
import com.xzzn.ems.domain.EmsBatteryData; import com.xzzn.ems.domain.EmsBatteryData;
import com.xzzn.ems.domain.EmsCoolingData;
import com.xzzn.ems.domain.vo.*; import com.xzzn.ems.domain.vo.*;
import com.xzzn.ems.mapper.*; import com.xzzn.ems.mapper.*;
import com.xzzn.ems.service.ISingleSiteService; import com.xzzn.ems.service.ISingleSiteService;
@ -32,6 +33,8 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
private EmsBatteryClusterMapper emsBatteryClusterMapper; private EmsBatteryClusterMapper emsBatteryClusterMapper;
@Autowired @Autowired
private EmsPcsBranchDataMapper emsPcsBranchDataMapper; private EmsPcsBranchDataMapper emsPcsBranchDataMapper;
@Autowired
private EmsCoolingDataMapper emsCoolingDataMapper;
@Override @Override
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId) { public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId) {
@ -187,4 +190,14 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
return bmsBatteryClusterVoList; return bmsBatteryClusterVoList;
} }
// 获取液冷设备参数
@Override
public List<EmsCoolingData> getCoolingDataList(Long siteId) {
List<EmsCoolingData> emsCoolingDataList = new ArrayList<>();
if (siteId != null) {
emsCoolingDataList = emsCoolingDataMapper.getCoolingDataList(siteId);
}
return emsCoolingDataList;
}
} }

View File

@ -0,0 +1,136 @@
<?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.xzzn.ems.mapper.EmsCoolingDataMapper">
<resultMap type="EmsCoolingData" id="EmsCoolingDataResult">
<result property="id" column="id" />
<result property="systemName" column="system_name" />
<result property="workMode" column="work_mode" />
<result property="currentTemperature" column="current_temperature" />
<result property="heatingStartPoint" column="heating_start_point" />
<result property="coolingStartPoint" column="cooling_start_point" />
<result property="highTempAlarmPoint" column="high_temp_alarm_point" />
<result property="heatingStopPoint" column="heating_stop_point" />
<result property="coolingStopPoint" column="cooling_stop_point" />
<result property="lowTempAlarmPoint" column="low_temp_alarm_point" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="siteId" column="site_id" />
<result property="deviceId" column="device_id" />
</resultMap>
<sql id="selectEmsCoolingDataVo">
select id, system_name, work_mode, current_temperature, heating_start_point, cooling_start_point, high_temp_alarm_point, heating_stop_point, cooling_stop_point, low_temp_alarm_point, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_cooling_data
</sql>
<select id="selectEmsCoolingDataList" parameterType="EmsCoolingData" resultMap="EmsCoolingDataResult">
<include refid="selectEmsCoolingDataVo"/>
<where>
<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="currentTemperature != null "> and current_temperature = #{currentTemperature}</if>
<if test="heatingStartPoint != null "> and heating_start_point = #{heatingStartPoint}</if>
<if test="coolingStartPoint != null "> and cooling_start_point = #{coolingStartPoint}</if>
<if test="highTempAlarmPoint != null "> and high_temp_alarm_point = #{highTempAlarmPoint}</if>
<if test="heatingStopPoint != null "> and heating_stop_point = #{heatingStopPoint}</if>
<if test="coolingStopPoint != null "> and cooling_stop_point = #{coolingStopPoint}</if>
<if test="lowTempAlarmPoint != null "> and low_temp_alarm_point = #{lowTempAlarmPoint}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
</where>
</select>
<select id="selectEmsCoolingDataById" parameterType="Long" resultMap="EmsCoolingDataResult">
<include refid="selectEmsCoolingDataVo"/>
where id = #{id}
</select>
<insert id="insertEmsCoolingData" parameterType="EmsCoolingData" useGeneratedKeys="true" keyProperty="id">
insert into ems_cooling_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="systemName != null">system_name,</if>
<if test="workMode != null">work_mode,</if>
<if test="currentTemperature != null">current_temperature,</if>
<if test="heatingStartPoint != null">heating_start_point,</if>
<if test="coolingStartPoint != null">cooling_start_point,</if>
<if test="highTempAlarmPoint != null">high_temp_alarm_point,</if>
<if test="heatingStopPoint != null">heating_stop_point,</if>
<if test="coolingStopPoint != null">cooling_stop_point,</if>
<if test="lowTempAlarmPoint != null">low_temp_alarm_point,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="siteId != null">site_id,</if>
<if test="deviceId != null">device_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="systemName != null">#{systemName},</if>
<if test="workMode != null">#{workMode},</if>
<if test="currentTemperature != null">#{currentTemperature},</if>
<if test="heatingStartPoint != null">#{heatingStartPoint},</if>
<if test="coolingStartPoint != null">#{coolingStartPoint},</if>
<if test="highTempAlarmPoint != null">#{highTempAlarmPoint},</if>
<if test="heatingStopPoint != null">#{heatingStopPoint},</if>
<if test="coolingStopPoint != null">#{coolingStopPoint},</if>
<if test="lowTempAlarmPoint != null">#{lowTempAlarmPoint},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="siteId != null">#{siteId},</if>
<if test="deviceId != null">#{deviceId},</if>
</trim>
</insert>
<update id="updateEmsCoolingData" parameterType="EmsCoolingData">
update ems_cooling_data
<trim prefix="SET" suffixOverrides=",">
<if test="systemName != null">system_name = #{systemName},</if>
<if test="workMode != null">work_mode = #{workMode},</if>
<if test="currentTemperature != null">current_temperature = #{currentTemperature},</if>
<if test="heatingStartPoint != null">heating_start_point = #{heatingStartPoint},</if>
<if test="coolingStartPoint != null">cooling_start_point = #{coolingStartPoint},</if>
<if test="highTempAlarmPoint != null">high_temp_alarm_point = #{highTempAlarmPoint},</if>
<if test="heatingStopPoint != null">heating_stop_point = #{heatingStopPoint},</if>
<if test="coolingStopPoint != null">cooling_stop_point = #{coolingStopPoint},</if>
<if test="lowTempAlarmPoint != null">low_temp_alarm_point = #{lowTempAlarmPoint},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="siteId != null">site_id = #{siteId},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmsCoolingDataById" parameterType="Long">
delete from ems_cooling_data where id = #{id}
</delete>
<delete id="deleteEmsCoolingDataByIds" parameterType="String">
delete from ems_cooling_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getCoolingDataList" parameterType="Long" resultMap="EmsCoolingDataResult">
select t.*
from ems_cooling_data t
where t.site_id = 1
and t.update_time = (
select MAX(tcd.update_time) from ems_cooling_data tcd where tcd.site_id = t.site_id and tcd.device_id = t.device_id)
order by t.system_name
</select>
</mapper>