|
|
@@ -3,7 +3,23 @@ package com.zksy.base.mapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.zksy.base.domain.EquipmentPointRel;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Mapper
|
|
|
public interface EquipmentPointRelMapper extends BaseMapper<EquipmentPointRel> {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据设备ID联表查询关联的监测点信息(point_code / point_name 等)
|
|
|
+ */
|
|
|
+ @Select("SELECT t1.rel_id AS relId, t1.equipment_id AS equipmentId, t1.point_id AS pointId, "
|
|
|
+ + "t2.point_code AS pointCode, t2.point_name AS pointName, t1.create_time AS createTime "
|
|
|
+ + "FROM equipment_point_rel t1 "
|
|
|
+ + "INNER JOIN monitor_point t2 ON t1.point_id = t2.point_id "
|
|
|
+ + "WHERE t1.equipment_id = #{equipmentId} "
|
|
|
+ + "AND t1.del_flag = '0' AND t2.del_flag = '0'")
|
|
|
+ List<Map<String, Object>> selectPointRelByEquipmentId(@Param("equipmentId") String equipmentId);
|
|
|
}
|