修改监测点查询逻辑
This commit is contained in:
@@ -18,4 +18,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface AppLineTopologyDiagramMapper extends BaseMapper<AppLineTopologyDiagramPO> {
|
public interface AppLineTopologyDiagramMapper extends BaseMapper<AppLineTopologyDiagramPO> {
|
||||||
List<AppLineTopologyDiagramVO> queryByTopoId(@Param("id") String id);
|
List<AppLineTopologyDiagramVO> queryByTopoId(@Param("id") String id);
|
||||||
|
|
||||||
|
List<AppLineTopologyDiagramVO> queryByLineIds(@Param("lineIds")List<String> lineIds);
|
||||||
}
|
}
|
||||||
@@ -20,4 +20,11 @@
|
|||||||
<select id="queryByTopoId" resultType="com.njcn.csdevice.pojo.vo.AppLineTopologyDiagramVO">
|
<select id="queryByTopoId" resultType="com.njcn.csdevice.pojo.vo.AppLineTopologyDiagramVO">
|
||||||
select a.*,b.position linePostion from cs_line_topology_diagram a LEFT JOIN cs_line b on a.line_id=b.line_id where a.id=#{id}
|
select a.*,b.position linePostion from cs_line_topology_diagram a LEFT JOIN cs_line b on a.line_id=b.line_id where a.id=#{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryByLineIds" resultType="com.njcn.csdevice.pojo.vo.AppLineTopologyDiagramVO">
|
||||||
|
select a.*,b.position linePostion from cs_line_topology_diagram a LEFT JOIN cs_line b on a.line_id=b.line_id where a.line_id in
|
||||||
|
<foreach collection='lineIds' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -58,7 +58,7 @@ public class AppLineTopologyDiagramServiceImpl extends ServiceImpl<AppLineTopolo
|
|||||||
throw new BusinessException("设备下未找到拓扑图信息");
|
throw new BusinessException("设备下未找到拓扑图信息");
|
||||||
}
|
}
|
||||||
AppTopologyDiagramVO appTopologyDiagramVO = appTopologyDiagramVOS.get(0);
|
AppTopologyDiagramVO appTopologyDiagramVO = appTopologyDiagramVOS.get(0);
|
||||||
appTopologyDiagramVO.setAppsLineTopologyDiagramPO(this.queryByTopoId(appTopologyDiagramVO.getId()));
|
appTopologyDiagramVO.setAppsLineTopologyDiagramPO(this.queryByLineIds(collect));
|
||||||
appTopologyDiagramVO.setDevName(one.getName());
|
appTopologyDiagramVO.setDevName(one.getName());
|
||||||
return appTopologyDiagramVO;
|
return appTopologyDiagramVO;
|
||||||
}
|
}
|
||||||
@@ -69,6 +69,14 @@ public class AppLineTopologyDiagramServiceImpl extends ServiceImpl<AppLineTopolo
|
|||||||
result = this.getBaseMapper().queryByTopoId( id);
|
result = this.getBaseMapper().queryByTopoId( id);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
public List<AppLineTopologyDiagramVO> queryByLineIds(List<String> lineIds) {
|
||||||
|
List<AppLineTopologyDiagramVO> result = new ArrayList<>();
|
||||||
|
if (lineIds != null && lineIds.size() > 0) {
|
||||||
|
result = this.getBaseMapper().queryByLineIds( lineIds);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user