修改链路配置及映射表相关操作

This commit is contained in:
houwei 2024-10-25 14:47:43 +08:00
parent 8247e8c668
commit eae815e784
7 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,6 @@
package com.das.modules.node.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
@ -31,5 +32,6 @@ public class EquipmentVo {
/**
* 设备Iot 地址 对应设备表中的 iot_addr 字段
*/
@JsonInclude(JsonInclude.Include.ALWAYS)
private String iotAddr;
}

View File

@ -35,6 +35,10 @@ public class SysTabMappingVo {
* 设备名称
*/
private String equipmentName;
/**
* 设备编码
*/
private String equipmentCode;
/**
* 测点类型
*/

View File

@ -14,7 +14,7 @@ import java.util.List;
* @description: 映射表相关操作Mapper
*/
@Mapper
public interface SysImpTabMappingMapper extends BaseMapperPlus<SysTabMapping, SysTabMapping> {
public interface SysImpTabMappingMapper extends BaseMapperPlus<SysTabMapping, SysTabMappingVo> {
/**
* 根据linkeId 获取该链路下所有的映射表配置信息
* @param linkId 链路id
@ -30,12 +30,7 @@ public interface SysImpTabMappingMapper extends BaseMapperPlus<SysTabMapping, Sy
*/
List<SysTabMappingVo> getMappingInfoListByLinkIdAndType(@Param("linkId") Long linkId, @Param("type") Integer type);
/**
* 根据linkId 和设备id 获取该链路下 对应类型的映射表配置信息
* @param linkId 链路id
* @param deviceId 设备id
* @return 映射表记录列表
*/
List<SysTabMappingVo> getMappingInfoListByLinkIdAndDeviceId(@Param("linkId") Long linkId, @Param("deviceId") Long deviceId);
/**

View File

@ -190,7 +190,8 @@ public class SysNodeServiceImpl implements SysNodeService {
*/
@Override
public List<SysTabMappingVo> getMappingList(QueryTabMappingParamDto queryParam) {
return sysImptabmappingMapper.getMappingInfoListByLinkIdAndType(queryParam.getLinkId(),queryParam.getType());
List<SysTabMappingVo> list =sysImptabmappingMapper.getMappingInfoListByLinkIdAndType(queryParam.getLinkId(),queryParam.getType());
return list;
}
/**

View File

@ -3,7 +3,7 @@
<mapper namespace="com.das.modules.node.mapper.SysImpTabMappingMapper">
<resultMap type="com.das.modules.node.domain.vo.SysTabMappingVo" id="SysImpTabMappingMap">
<result property="id" column="id" jdbcType="BIGINT"/>
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="linkId" column="link_id" jdbcType="BIGINT"/>
<result property="linkName" column="link_name" jdbcType="VARCHAR"/>
@ -22,7 +22,7 @@
</resultMap>
<resultMap type="com.das.modules.node.domain.vo.EquipmentVo" id="EquipmentMap">
<result property="id" column="id" jdbcType="BIGINT"/>
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="iotModelId" column="iot_model_id" jdbcType="BIGINT"/>
<result property="iotAddr" column="iot_addr" jdbcType="VARCHAR"/>

View File

@ -53,6 +53,6 @@
</select>
<select id="selectModelFieldListByModelId" resultMap="SysIotModelFieldMap">
select * from sys_iot_model_field where iot_model_id = #{iotModelId} order by porder
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
</select>
</mapper>

View File

@ -42,6 +42,6 @@
</select>
<select id="selectModelServiceListByModelId" resultMap="SysIotModelServiceMap">
select * from sys_iot_model_service where iot_model_id = #{iotModelId} order by porder
select * from sys_iot_model_service where iot_model_id = #{modelId} order by porder
</select>
</mapper>