dev #2
@ -9,7 +9,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 点位匹配对象 ems_point_match
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-09-13
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public class EmsPointMatch extends BaseEntity
|
||||
{
|
||||
@ -18,8 +18,8 @@ public class EmsPointMatch extends BaseEntity
|
||||
/** 设备ID,主键自增长 */
|
||||
private Long id;
|
||||
|
||||
/** 点位名称 */
|
||||
@Excel(name = "点位名称")
|
||||
/** 存储点位名称 */
|
||||
@Excel(name = "存储点位名称")
|
||||
private String pointName;
|
||||
|
||||
/** 点位所在表 */
|
||||
@ -50,6 +50,18 @@ public class EmsPointMatch extends BaseEntity
|
||||
@Excel(name = "数据点位来源设备")
|
||||
private String dataDevice;
|
||||
|
||||
/** 数据单位 */
|
||||
@Excel(name = "数据单位")
|
||||
private String dataUnit;
|
||||
|
||||
/** 数据类型:1-瞬时值 2-增量 */
|
||||
@Excel(name = "数据类型:1-瞬时值 2-增量")
|
||||
private Long dataType;
|
||||
|
||||
/** 点位是否需要区分多设备:0-不需要 1-需要 */
|
||||
@Excel(name = "点位是否需要区分多设备:0-不需要 1-需要")
|
||||
private Long needDiffDeviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -140,6 +152,36 @@ public class EmsPointMatch extends BaseEntity
|
||||
return dataDevice;
|
||||
}
|
||||
|
||||
public void setDataUnit(String dataUnit)
|
||||
{
|
||||
this.dataUnit = dataUnit;
|
||||
}
|
||||
|
||||
public String getDataUnit()
|
||||
{
|
||||
return dataUnit;
|
||||
}
|
||||
|
||||
public void setDataType(Long dataType)
|
||||
{
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public Long getDataType()
|
||||
{
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setNeedDiffDeviceId(Long needDiffDeviceId)
|
||||
{
|
||||
this.needDiffDeviceId = needDiffDeviceId;
|
||||
}
|
||||
|
||||
public Long getNeedDiffDeviceId()
|
||||
{
|
||||
return needDiffDeviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -152,6 +194,9 @@ public class EmsPointMatch extends BaseEntity
|
||||
.append("dataPoint", getDataPoint())
|
||||
.append("dataPointName", getDataPointName())
|
||||
.append("dataDevice", getDataDevice())
|
||||
.append("dataUnit", getDataUnit())
|
||||
.append("dataType", getDataType())
|
||||
.append("needDiffDeviceId", getNeedDiffDeviceId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
|
||||
@ -38,6 +38,18 @@ public class PointQueryResponse
|
||||
@Excel(name = "点位最新数据")
|
||||
private int isNeedDeviceId;
|
||||
|
||||
/** 数据单位 */
|
||||
@Excel(name = "数据单位")
|
||||
private String dataUnit;
|
||||
|
||||
public String getDataUnit() {
|
||||
return dataUnit;
|
||||
}
|
||||
|
||||
public void setDataUnit(String dataUnit) {
|
||||
this.dataUnit = dataUnit;
|
||||
}
|
||||
|
||||
public int getIsNeedDeviceId() {
|
||||
return isNeedDeviceId;
|
||||
}
|
||||
|
||||
@ -115,7 +115,6 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
|
||||
batteryStackDataProcess(deviceId, jsonData);
|
||||
|
||||
} else if (deviceId.contains("BMSC")) {
|
||||
log.info("BMSC data:"+ jsonData);
|
||||
batteryClusterDataProcess(deviceId, jsonData);
|
||||
batteryDataProcess(deviceId, jsonData,dataUpdateTime);
|
||||
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
<result property="dataPoint" column="data_point" />
|
||||
<result property="dataPointName" column="data_point_name" />
|
||||
<result property="dataDevice" column="data_device" />
|
||||
<result property="dataUnit" column="data_unit" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="needDiffDeviceId" column="need_diff_device_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@ -22,7 +25,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsPointMatchVo">
|
||||
select id, point_name, match_table, match_field, site_id, device_category, data_point, data_point_name, data_device, create_by, create_time, update_by, update_time, remark from ems_point_match
|
||||
select id, point_name, match_table, match_field, site_id, device_category, data_point, data_point_name, data_device, data_unit, data_type, need_diff_device_id, create_by, create_time, update_by, update_time, remark from ems_point_match
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsPointMatchList" parameterType="EmsPointMatch" resultMap="EmsPointMatchResult">
|
||||
@ -36,6 +39,9 @@
|
||||
<if test="dataPoint != null and dataPoint != ''"> and data_point = #{dataPoint}</if>
|
||||
<if test="dataPointName != null and dataPointName != ''"> and data_point_name like concat('%', #{dataPointName}, '%')</if>
|
||||
<if test="dataDevice != null and dataDevice != ''"> and data_device = #{dataDevice}</if>
|
||||
<if test="dataUnit != null and dataUnit != ''"> and data_unit = #{dataUnit}</if>
|
||||
<if test="dataType != null "> and data_type = #{dataType}</if>
|
||||
<if test="needDiffDeviceId != null "> and need_diff_device_id = #{needDiffDeviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -55,6 +61,9 @@
|
||||
<if test="dataPoint != null">data_point,</if>
|
||||
<if test="dataPointName != null">data_point_name,</if>
|
||||
<if test="dataDevice != null">data_device,</if>
|
||||
<if test="dataUnit != null">data_unit,</if>
|
||||
<if test="dataType != null">data_type,</if>
|
||||
<if test="needDiffDeviceId != null">need_diff_device_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@ -70,6 +79,9 @@
|
||||
<if test="dataPoint != null">#{dataPoint},</if>
|
||||
<if test="dataPointName != null">#{dataPointName},</if>
|
||||
<if test="dataDevice != null">#{dataDevice},</if>
|
||||
<if test="dataUnit != null">#{dataUnit},</if>
|
||||
<if test="dataType != null">#{dataType},</if>
|
||||
<if test="needDiffDeviceId != null">#{needDiffDeviceId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@ -89,6 +101,9 @@
|
||||
<if test="dataPoint != null">data_point = #{dataPoint},</if>
|
||||
<if test="dataPointName != null">data_point_name = #{dataPointName},</if>
|
||||
<if test="dataDevice != null">data_device = #{dataDevice},</if>
|
||||
<if test="dataUnit != null">data_unit = #{dataUnit},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
<if test="needDiffDeviceId != null">need_diff_device_id = #{needDiffDeviceId},</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>
|
||||
@ -323,7 +338,8 @@
|
||||
t.data_point as dataPoint,
|
||||
t.data_point_name as dataPointName,
|
||||
t.data_device as dataDevice,
|
||||
t.need_diff_device_id as isNeedDeviceId
|
||||
t.need_diff_device_id as isNeedDeviceId,
|
||||
t.data_unit as dataUnit
|
||||
from ems_point_match t
|
||||
where 1=1
|
||||
<if test="siteId != null and siteId != ''">
|
||||
@ -344,14 +360,16 @@
|
||||
SELECT tmp.pointName,
|
||||
tmp.dataPoint,
|
||||
tmp.dataDevice,
|
||||
tmp.dataPointName
|
||||
tmp.dataPointName,
|
||||
tmp.dataUnit
|
||||
FROM ( select t.point_name as pointName,
|
||||
case
|
||||
when t.need_diff_device_id = 1 and t.data_device = 'PCS' then concat(#{deviceId}, t.data_point)
|
||||
when t.need_diff_device_id = 1 and t.data_device = 'BMSD' then concat(#{parentDeviceId}, t.data_point)
|
||||
else t.data_point end as dataPoint,
|
||||
t.data_point_name as dataPointName,
|
||||
t.data_device as dataDevice
|
||||
t.data_device as dataDevice,
|
||||
t.data_unit as dataUnit
|
||||
from ems_point_match t
|
||||
where 1=1
|
||||
<if test="siteId != null and siteId != ''">
|
||||
|
||||
Reference in New Issue
Block a user