<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.xf.huludao.pipenetwork.dao.PipeNetworkLinestringPartMapper"> <!-- 通用查询映射结果 --> <resultMap id="PipeNetworkLinestringPartResultMap" type="com.xf.huludao.pipenetwork.entity.PipeNetworkLinestringPart"> <result column="ID" property="id"/> <result column="start_point_number" property="startPointNumber"/> <result column="end_point_number" property="endPointNumber"/> <result column="start_original_x" property="startOriginalX"/> <result column="start_original_y" property="startOriginalY"/> <result column="end_original_x" property="endOriginalX"/> <result column="end_original_y" property="endOriginalY"/> <result column="flow" property="flow"/> <result column="road_name" property="roadName"/> <result column="pipeline_type" property="pipelineType"/> <result column="pipeline_length" property="pipelineLength"/> <result column="start_cop_nose_elevation" property="startCopNoseElevation"/> <result column="end_cop_nose_elevation" property="endCopNoseElevation"/> <result column="section_data_one" property="sectionDataOne"/> <result column="section_data_two" property="sectionDataTwo"/> <result column="texture" property="texture"/> <result column="ownership_units" property="ownershipUnits"/> <result column="operational_units" property="operationalUnits"/> <result column="data_sources" property="dataSources"/> <result column="update_logo" property="updateLogo"/> <result column="model_id" property="modelId"/> <result column="z" property="z"/> <result column="create_user" property="createUser"/> <result column="create_time" property="createTime"/> <result column="update_user" property="updateUser"/> <result column="update_time" property="updateTime"/> <result column="st_code" property="stCode"/> <result column="is_deleted" property="isDeleted"/> <result column="section1" property="section1"/> <result column="remark" property="remark"/> <result column="Shape_Leng" property="shapeLeng"/> <result column="geometrys" property="geometrys" typeHandler="com.xf.huludao.commons.GeometryTypeHandler"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> t.ID , t.start_point_number , t.end_point_number , t.start_original_x , t.start_original_y , t.end_original_x , t.end_original_y , t.flow , t.road_name , t.pipeline_type , t.pipeline_length , t.start_cop_nose_elevation , t.end_cop_nose_elevation , t.section_data_one , t.section_data_two , t.texture , t.ownership_units , t.operational_units , t.data_sources , t.update_logo , t.model_id , t.z , t.create_user , t.create_time , t.update_user , t.update_time , t.st_code , t.is_deleted , t.section1 , t.remark , t.Shape_Leng , t.geometrys </sql> <sql id="Where_Condition"> <if test="request.id != null"> and t.ID = #{request.id} </if> <if test="request.startPointNumber != null and request.startPointNumber != ''"> and t.start_point_number = #{request.startPointNumber} </if> <if test="request.endPointNumber != null and request.endPointNumber != ''"> and t.end_point_number = #{request.endPointNumber} </if> <if test="request.startOriginalX != null and request.startOriginalX != ''"> and t.start_original_x = #{request.startOriginalX} </if> <if test="request.startOriginalY != null and request.startOriginalY != ''"> and t.start_original_y = #{request.startOriginalY} </if> <if test="request.endOriginalX != null and request.endOriginalX != ''"> and t.end_original_x = #{request.endOriginalX} </if> <if test="request.endOriginalY != null and request.endOriginalY != ''"> and t.end_original_y = #{request.endOriginalY} </if> <if test="request.flow != null and request.flow != ''"> and t.flow = #{request.flow} </if> <if test="request.roadName != null and request.roadName != ''"> and t.road_name = #{request.roadName} </if> <if test="request.pipelineType != null and request.pipelineType != ''"> and t.pipeline_type = #{request.pipelineType} </if> <if test="request.pipelineLength != null and request.pipelineLength != ''"> and t.pipeline_length = #{request.pipelineLength} </if> <if test="request.startCopNoseElevation != null and request.startCopNoseElevation != ''"> and t.start_cop_nose_elevation = #{request.startCopNoseElevation} </if> <if test="request.endCopNoseElevation != null and request.endCopNoseElevation != ''"> and t.end_cop_nose_elevation = #{request.endCopNoseElevation} </if> <if test="request.sectionDataOne != null and request.sectionDataOne != ''"> and t.section_data_one = #{request.sectionDataOne} </if> <if test="request.sectionDataTwo != null and request.sectionDataTwo != ''"> and t.section_data_two = #{request.sectionDataTwo} </if> <if test="request.texture != null and request.texture != ''"> and t.texture = #{request.texture} </if> <if test="request.ownershipUnits != null and request.ownershipUnits != ''"> and t.ownership_units = #{request.ownershipUnits} </if> <if test="request.operationalUnits != null and request.operationalUnits != ''"> and t.operational_units = #{request.operationalUnits} </if> <if test="request.dataSources != null and request.dataSources != ''"> and t.data_sources = #{request.dataSources} </if> <if test="request.updateLogo != null"> and t.update_logo = #{request.updateLogo} </if> <if test="request.modelId != null and request.modelId != ''"> and model_id = #{request.modelId} </if> <if test="request.z != null and request.z != ''"> and z = #{request.z} </if> <if test="request.stCode != null and request.stCode != ''"> and t.st_code = #{request.stCode} </if> <if test="request.section1 != null and request.section1 != ''"> and t.section1 = #{request.section1} </if> <if test="request.remark != null and request.remark != ''"> and t.remark = #{request.remark} </if> <if test="request.shapeLeng != null and request.shapeLeng != ''"> and t.Shape_Leng = #{request.shapeLeng} </if> <if test="request.geometrys != null and request.geometrys != ''"> and t.geometrys = #{request.geometrys} </if> </sql> <select id="selectByCondition" resultMap="PipeNetworkLinestringPartResultMap"> select <include refid="Base_Column_List"/> from pipe_network_linestring_part t where t.is_deleted = 0 <include refid="Where_Condition"/> </select> <select id="stationBaseList" resultType="com.xf.huludao.pipenetwork.vo.StationBaseView"> select * from station_base_view where installation_type in (4,5) and st_code not in( select site_code from rows_of_leakage_config where is_deleted = 0 ) </select> </mapper>