dev #2
@ -52,6 +52,11 @@ public class RedisKeyConstants
|
||||
*/
|
||||
public static final String ORIGINAL_BMSD = "BMSD_";
|
||||
|
||||
/**
|
||||
* 冷却数据 redis key
|
||||
*/
|
||||
public static final String COOLING = "COOLING_";
|
||||
|
||||
/**
|
||||
* 存放单个设备同步过来的原始数据
|
||||
*/
|
||||
|
||||
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 冷却系统参数对象 ems_cooling_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
* @date 2025-09-26
|
||||
*/
|
||||
public class EmsCoolingData extends BaseEntity
|
||||
{
|
||||
@ -24,8 +24,8 @@ public class EmsCoolingData extends BaseEntity
|
||||
@Excel(name = "系统名称,如1#液冷")
|
||||
private String systemName;
|
||||
|
||||
/** 工作模式 */
|
||||
@Excel(name = "工作模式")
|
||||
/** 工作模式:0-正常 1-停止 */
|
||||
@Excel(name = "工作模式:0-正常 1-停止")
|
||||
private String workMode;
|
||||
|
||||
/** 当前温度 (℃) */
|
||||
@ -56,6 +56,34 @@ public class EmsCoolingData extends BaseEntity
|
||||
@Excel(name = "低温告警点 (℃)")
|
||||
private BigDecimal lowTempAlarmPoint;
|
||||
|
||||
/** 供水温度 */
|
||||
@Excel(name = "供水温度")
|
||||
private BigDecimal gsTemp;
|
||||
|
||||
/** 回水温度 */
|
||||
@Excel(name = "回水温度")
|
||||
private BigDecimal hsTemp;
|
||||
|
||||
/** 供水压力 */
|
||||
@Excel(name = "供水压力")
|
||||
private BigDecimal gsPressure;
|
||||
|
||||
/** 回水压力 */
|
||||
@Excel(name = "回水压力")
|
||||
private BigDecimal hsPressure;
|
||||
|
||||
/** 冷源水温度 */
|
||||
@Excel(name = "冷源水温度")
|
||||
private BigDecimal lysTemp;
|
||||
|
||||
/** VB01开度 */
|
||||
@Excel(name = "VB01开度")
|
||||
private BigDecimal vb01Kd;
|
||||
|
||||
/** VB02开度 */
|
||||
@Excel(name = "VB02开度")
|
||||
private BigDecimal vb02Kd;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
@ -164,6 +192,76 @@ public class EmsCoolingData extends BaseEntity
|
||||
return lowTempAlarmPoint;
|
||||
}
|
||||
|
||||
public void setGsTemp(BigDecimal gsTemp)
|
||||
{
|
||||
this.gsTemp = gsTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getGsTemp()
|
||||
{
|
||||
return gsTemp;
|
||||
}
|
||||
|
||||
public void setHsTemp(BigDecimal hsTemp)
|
||||
{
|
||||
this.hsTemp = hsTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getHsTemp()
|
||||
{
|
||||
return hsTemp;
|
||||
}
|
||||
|
||||
public void setGsPressure(BigDecimal gsPressure)
|
||||
{
|
||||
this.gsPressure = gsPressure;
|
||||
}
|
||||
|
||||
public BigDecimal getGsPressure()
|
||||
{
|
||||
return gsPressure;
|
||||
}
|
||||
|
||||
public void setHsPressure(BigDecimal hsPressure)
|
||||
{
|
||||
this.hsPressure = hsPressure;
|
||||
}
|
||||
|
||||
public BigDecimal getHsPressure()
|
||||
{
|
||||
return hsPressure;
|
||||
}
|
||||
|
||||
public void setLysTemp(BigDecimal lysTemp)
|
||||
{
|
||||
this.lysTemp = lysTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getLysTemp()
|
||||
{
|
||||
return lysTemp;
|
||||
}
|
||||
|
||||
public void setVb01Kd(BigDecimal vb01Kd)
|
||||
{
|
||||
this.vb01Kd = vb01Kd;
|
||||
}
|
||||
|
||||
public BigDecimal getVb01Kd()
|
||||
{
|
||||
return vb01Kd;
|
||||
}
|
||||
|
||||
public void setVb02Kd(BigDecimal vb02Kd)
|
||||
{
|
||||
this.vb02Kd = vb02Kd;
|
||||
}
|
||||
|
||||
public BigDecimal getVb02Kd()
|
||||
{
|
||||
return vb02Kd;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
@ -197,6 +295,13 @@ public class EmsCoolingData extends BaseEntity
|
||||
.append("heatingStopPoint", getHeatingStopPoint())
|
||||
.append("coolingStopPoint", getCoolingStopPoint())
|
||||
.append("lowTempAlarmPoint", getLowTempAlarmPoint())
|
||||
.append("gsTemp", getGsTemp())
|
||||
.append("hsTemp", getHsTemp())
|
||||
.append("gsPressure", getGsPressure())
|
||||
.append("hsPressure", getHsPressure())
|
||||
.append("lysTemp", getLysTemp())
|
||||
.append("vb01Kd", getVb01Kd())
|
||||
.append("vb02Kd", getVb02Kd())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 单站监控-液冷
|
||||
*
|
||||
*/
|
||||
public class CoolingDataViewVo {
|
||||
|
||||
/** 设备名称 */
|
||||
private String deviceName;
|
||||
|
||||
/** 供水温度 */
|
||||
@Excel(name = "供水温度")
|
||||
private BigDecimal gsTemp;
|
||||
|
||||
/** 回水温度 */
|
||||
@Excel(name = "回水温度")
|
||||
private BigDecimal hsTemp;
|
||||
|
||||
/** 供水压力 */
|
||||
@Excel(name = "供水压力")
|
||||
private BigDecimal gsPressure;
|
||||
|
||||
/** 回水压力 */
|
||||
@Excel(name = "回水压力")
|
||||
private BigDecimal hsPressure;
|
||||
|
||||
/** 冷源水温度 */
|
||||
@Excel(name = "冷源水温度")
|
||||
private BigDecimal lysTemp;
|
||||
|
||||
/** VB01开度 */
|
||||
@Excel(name = "VB01开度")
|
||||
private BigDecimal vb01Kd;
|
||||
|
||||
/** VB02开度 */
|
||||
@Excel(name = "VB02开度")
|
||||
private BigDecimal vb02Kd;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
private String deviceId;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public BigDecimal getGsTemp() {
|
||||
return gsTemp;
|
||||
}
|
||||
|
||||
public void setGsTemp(BigDecimal gsTemp) {
|
||||
this.gsTemp = gsTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getHsTemp() {
|
||||
return hsTemp;
|
||||
}
|
||||
|
||||
public void setHsTemp(BigDecimal hsTemp) {
|
||||
this.hsTemp = hsTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getGsPressure() {
|
||||
return gsPressure;
|
||||
}
|
||||
|
||||
public void setGsPressure(BigDecimal gsPressure) {
|
||||
this.gsPressure = gsPressure;
|
||||
}
|
||||
|
||||
public BigDecimal getHsPressure() {
|
||||
return hsPressure;
|
||||
}
|
||||
|
||||
public void setHsPressure(BigDecimal hsPressure) {
|
||||
this.hsPressure = hsPressure;
|
||||
}
|
||||
|
||||
public BigDecimal getLysTemp() {
|
||||
return lysTemp;
|
||||
}
|
||||
|
||||
public void setLysTemp(BigDecimal lysTemp) {
|
||||
this.lysTemp = lysTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getVb01Kd() {
|
||||
return vb01Kd;
|
||||
}
|
||||
|
||||
public void setVb01Kd(BigDecimal vb01Kd) {
|
||||
this.vb01Kd = vb01Kd;
|
||||
}
|
||||
|
||||
public BigDecimal getVb02Kd() {
|
||||
return vb02Kd;
|
||||
}
|
||||
|
||||
public void setVb02Kd(BigDecimal vb02Kd) {
|
||||
this.vb02Kd = vb02Kd;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ public interface IEmsAlarmRecordsService
|
||||
public List<AlarmRecordListResponseVo> getAlarmRecordDetailList(AlarmRecordListRequestVo requestVo);
|
||||
|
||||
/**
|
||||
* 生产工单号
|
||||
* 生产工单号并设置告警处理中
|
||||
*
|
||||
* @param id
|
||||
* @param userId
|
||||
|
||||
@ -25,7 +25,7 @@ public interface ISingleSiteService
|
||||
|
||||
public List<BMSBatteryClusterVo> getBMSBatteryCluster(String siteId);
|
||||
|
||||
public List<EmsCoolingData> getCoolingDataList(String siteId);
|
||||
public List<CoolingDataViewVo> getCoolingDataList(String siteId);
|
||||
|
||||
public List<BatteryDataStatsListVo> getClusterDataInfoList(String clusterDeviceId,String siteId,
|
||||
String stackDeviceId, String batteryId);
|
||||
|
||||
@ -145,6 +145,7 @@ public class EmsAlarmRecordsServiceImpl implements IEmsAlarmRecordsService
|
||||
ticketNo = createRandomTicketNo();
|
||||
// 更新告警表
|
||||
emsAlarmRecords.setTicketNo(ticketNo);
|
||||
emsAlarmRecords.setStatus(AlarmStatus.PROCESSING.getCode());
|
||||
emsAlarmRecordsMapper.updateEmsAlarmRecords(emsAlarmRecords);
|
||||
// 不存在-默认userId
|
||||
if (userId == null) {
|
||||
|
||||
@ -67,6 +67,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
|
||||
private EmsDhDataMapper emsDhDataMapper;
|
||||
@Autowired
|
||||
private IEmsAlarmRecordsService iEmsAlarmRecordsService;
|
||||
@Autowired
|
||||
private EmsCoolingDataMapper emsCoolingDataMapper;
|
||||
|
||||
// 构造方法(调用父类构造)
|
||||
public FXXDataProcessServiceImpl(ObjectMapper objectMapper) {
|
||||
@ -112,10 +114,38 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
|
||||
meteDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("donghuan")) {
|
||||
dhDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("ZSLQ")) {
|
||||
coolingDataProcess(deviceId, jsonData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void coolingDataProcess(String deviceId, String jsonData) {
|
||||
//中水冷却
|
||||
Map<String, Object> obj = JSON.parseObject(jsonData, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
EmsCoolingData coolingData = new EmsCoolingData();
|
||||
coolingData.setGsTemp(StringUtils.getBigDecimal(obj.get("GSWD")));
|
||||
coolingData.setHsTemp(StringUtils.getBigDecimal(obj.get("HSWD")));
|
||||
coolingData.setGsPressure(StringUtils.getBigDecimal(obj.get("GSYL")));
|
||||
coolingData.setHsPressure(StringUtils.getBigDecimal(obj.get("HSYL")));
|
||||
coolingData.setLysTemp(StringUtils.getBigDecimal(obj.get("LYSWD")));
|
||||
coolingData.setVb01Kd(StringUtils.getBigDecimal(obj.get("VB1KD")));
|
||||
coolingData.setVb02Kd(StringUtils.getBigDecimal(obj.get("VB2KD")));
|
||||
|
||||
coolingData.setCreateBy("system");
|
||||
coolingData.setCreateTime(DateUtils.getNowDate());
|
||||
coolingData.setUpdateBy("system");
|
||||
coolingData.setUpdateTime(DateUtils.getNowDate());
|
||||
coolingData.setSiteId(SITE_ID);
|
||||
coolingData.setDeviceId(deviceId);
|
||||
|
||||
emsCoolingDataMapper.insertEmsCoolingData(coolingData);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.COOLING + SITE_ID + "_" +deviceId, coolingData);
|
||||
}
|
||||
|
||||
private void dhDataProcess(String deviceId, String dataJson) {
|
||||
//动环
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
|
||||
@ -542,10 +542,21 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
|
||||
// 获取液冷设备参数
|
||||
@Override
|
||||
public List<EmsCoolingData> getCoolingDataList(String siteId) {
|
||||
List<EmsCoolingData> emsCoolingDataList = new ArrayList<>();
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
emsCoolingDataList = emsCoolingDataMapper.getCoolingDataList(siteId);
|
||||
public List<CoolingDataViewVo> getCoolingDataList(String siteId) {
|
||||
List<CoolingDataViewVo> emsCoolingDataList = new ArrayList<>();
|
||||
|
||||
List<Map<String, Object>> deviceIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.COOLING.getCode());
|
||||
for (Map<String, Object> deviceId : deviceIds) {
|
||||
CoolingDataViewVo dataViewVo = new CoolingDataViewVo();
|
||||
dataViewVo.setDeviceName(deviceId.get("deviceName").toString());
|
||||
// 从redis取堆单个详细数据
|
||||
String coolingId = deviceId.get("id").toString();
|
||||
EmsCoolingData coolingData = redisCache.getCacheObject(RedisKeyConstants.COOLING + siteId + "_" + coolingId);
|
||||
if (coolingData != null) {
|
||||
BeanUtils.copyProperties(coolingData, dataViewVo);
|
||||
}
|
||||
|
||||
emsCoolingDataList.add(dataViewVo);
|
||||
}
|
||||
return emsCoolingDataList;
|
||||
}
|
||||
|
||||
@ -15,6 +15,13 @@
|
||||
<result property="heatingStopPoint" column="heating_stop_point" />
|
||||
<result property="coolingStopPoint" column="cooling_stop_point" />
|
||||
<result property="lowTempAlarmPoint" column="low_temp_alarm_point" />
|
||||
<result property="gsTemp" column="gs_temp" />
|
||||
<result property="hsTemp" column="hs_temp" />
|
||||
<result property="gsPressure" column="gs_pressure" />
|
||||
<result property="hsPressure" column="hs_pressure" />
|
||||
<result property="lysTemp" column="lys_temp" />
|
||||
<result property="vb01Kd" column="vb01_kd" />
|
||||
<result property="vb02Kd" column="vb02_kd" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@ -25,7 +32,7 @@
|
||||
</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
|
||||
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, gs_temp, hs_temp, gs_pressure, hs_pressure, lys_temp, vb01_kd, vb02_kd, 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">
|
||||
@ -40,6 +47,13 @@
|
||||
<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="gsTemp != null "> and gs_temp = #{gsTemp}</if>
|
||||
<if test="hsTemp != null "> and hs_temp = #{hsTemp}</if>
|
||||
<if test="gsPressure != null "> and gs_pressure = #{gsPressure}</if>
|
||||
<if test="hsPressure != null "> and hs_pressure = #{hsPressure}</if>
|
||||
<if test="lysTemp != null "> and lys_temp = #{lysTemp}</if>
|
||||
<if test="vb01Kd != null "> and vb01_kd = #{vb01Kd}</if>
|
||||
<if test="vb02Kd != null "> and vb02_kd = #{vb02Kd}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
@ -62,6 +76,13 @@
|
||||
<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="gsTemp != null">gs_temp,</if>
|
||||
<if test="hsTemp != null">hs_temp,</if>
|
||||
<if test="gsPressure != null">gs_pressure,</if>
|
||||
<if test="hsPressure != null">hs_pressure,</if>
|
||||
<if test="lysTemp != null">lys_temp,</if>
|
||||
<if test="vb01Kd != null">vb01_kd,</if>
|
||||
<if test="vb02Kd != null">vb02_kd,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@ -80,6 +101,13 @@
|
||||
<if test="heatingStopPoint != null">#{heatingStopPoint},</if>
|
||||
<if test="coolingStopPoint != null">#{coolingStopPoint},</if>
|
||||
<if test="lowTempAlarmPoint != null">#{lowTempAlarmPoint},</if>
|
||||
<if test="gsTemp != null">#{gsTemp},</if>
|
||||
<if test="hsTemp != null">#{hsTemp},</if>
|
||||
<if test="gsPressure != null">#{gsPressure},</if>
|
||||
<if test="hsPressure != null">#{hsPressure},</if>
|
||||
<if test="lysTemp != null">#{lysTemp},</if>
|
||||
<if test="vb01Kd != null">#{vb01Kd},</if>
|
||||
<if test="vb02Kd != null">#{vb02Kd},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@ -102,6 +130,13 @@
|
||||
<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="gsTemp != null">gs_temp = #{gsTemp},</if>
|
||||
<if test="hsTemp != null">hs_temp = #{hsTemp},</if>
|
||||
<if test="gsPressure != null">gs_pressure = #{gsPressure},</if>
|
||||
<if test="hsPressure != null">hs_pressure = #{hsPressure},</if>
|
||||
<if test="lysTemp != null">lys_temp = #{lysTemp},</if>
|
||||
<if test="vb01Kd != null">vb01_kd = #{vb01Kd},</if>
|
||||
<if test="vb02Kd != null">vb02_kd = #{vb02Kd},</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>
|
||||
|
||||
Reference in New Issue
Block a user