<?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.PipeNetworkLinestringMapper"> <!-- 通用映射列 --> <resultMap id="BaseResultMap" type="com.xf.huludao.pipenetwork.entity.PipeNetworkLinestring"> <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="start_transfrom_x" property="startTransfromX"/> <result column="start_transfrom_y" property="startTransfromY"/> <result column="end_transfrom_x" property="endTransfromX"/> <result column="end_transfrom_y" property="endTransfromY"/> <result column="geometrys" property="geometrys"/> <result column="flow" property="flow"/> <result column="drainage_system" property="drainageSystem"/> <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="system_laying" property="systemLaying"/> <result column="section_form" property="sectionForm"/> <result column="inverted_siphon" property="invertedSiphon"/> <result column="section_data_one" property="sectionDataOne"/> <result column="section_data_two" property="sectionDataTwo"/> <result column="texture" property="texture"/> <result column="pipe_roughness" property="pipeRoughness"/> <result column="interface_means" property="interfaceMeans"/> <result column="connection_type" property="connectionType"/> <result column="wrong_answer" property="wrongAnswer"/> <result column="pipeline_health" property="pipelineHealth"/> <result column="defect_type" property="defectType"/> <result column="construction_date" property="constructionDate"/> <result column="state_facilities" property="stateFacilities"/> <result column="repair" property="repair"/> <result column="ownership_units" property="ownershipUnits"/> <result column="operational_units" property="operationalUnits"/> <result column="data_sources" property="dataSources"/> <result column="data_gain_time" property="dataGainTime"/> <result column="remark" property="remark"/> <result column="update_logo" property="updateLogo"/> <result column="model_id" property="modelId"/> <result column="z" property="z"/> <result column="start_ground_depth" property="startGroundDepth"/> <result column="end_ground_depth" property="endGroundDepth"/> <result column="st_code" property="stCode"/> <result column="sludge_ratio" property="sludgeRatio"/> <result column="sludge_volume" property="sludgeVolume"/> <result column="starting_point_ground_height" property="startingPointGroundHeight"/> <result column="ending_point_ground_height" property="endingPointGroundHeight"/> <result column="create_user" property="createUser"/> <result column="create_dept" property="createDept"/> <result column="create_time" property="createTime"/> <result column="update_user" property="updateUser"/> <result column="update_time" property="updateTime"/> <result column="status" property="status"/> <result column="is_deleted" property="isDeleted"/> </resultMap> <!-- 通用映射列 --> <resultMap id="PipelineInfoEntityResultMap" type="com.xf.huludao.pipenetwork.entity.analysis.PipelineInfoEntity"> <result column="id" property="id"/> <result column="start_point_number" property="inJuncId"/> <result column="end_point_number" property="outJuncId"/> <result column="texture" property="pipelineMaterial"/> <result column="section_data_one" property="pipelineDiameter"/> <result column="end_ground_depth" property="pipeBottomDepth"/> <result column="start_ground_depth" property="pipeTailDepth"/> <result column="end_cop_nose_elevation" property="pipeBottomElevation"/> <result column="start_cop_nose_elevation" property="pipeTailElevation"/> <result column="pipeline_length" property="pipeLength"/> <result column="road_name" property="pipelineTrend"/> <result column="road_name" property="roadName"/> <result column="geometrys" property="geometry"/> </resultMap> <sql id="Pipe_Column_List"> id, start_point_number, end_point_number, texture, section_data_one, start_ground_depth, end_ground_depth, start_cop_nose_elevation, end_cop_nose_elevation, pipeline_length, road_name, road_name, st_code, ST_AsText(geometrys) as geometrys </sql> <!-- 通用数据库列 --> <sql id="Base_Column_List"> id, start_point_number, end_point_number, start_original_x, start_original_y, end_original_x, end_original_y, start_transfrom_x, start_transfrom_y, end_transfrom_x, end_transfrom_y, ST_AsText(geometrys) as geometrys, flow, drainage_system, road_name, pipeline_type, pipeline_length, start_cop_nose_elevation, end_cop_nose_elevation, system_laying, section_form, inverted_siphon, section_data_one, section_data_two, texture, pipe_roughness, interface_means, connection_type, wrong_answer, pipeline_health, defect_type, construction_date, state_facilities, repair, ownership_units, operational_units, data_sources, data_gain_time, remark, update_logo, model_id, z, start_ground_depth, end_ground_depth, sludge_ratio, sludge_volume, starting_point_ground_height, ending_point_ground_height, create_user, create_dept, create_time, update_user, update_time, status, is_deleted </sql> <sql id="Where_Condition"> <if test="request.id != null and request.id != ''"> and id = #{request.id} </if> <if test="request.startPointNumber != null and request.startPointNumber != ''"> and start_point_number = #{request.startPointNumber} </if> <if test="request.endPointNumber != null and request.endPointNumber != ''"> and end_point_number = #{request.endPointNumber} </if> <if test="request.startOriginalX != null and request.startOriginalX != ''"> and start_original_x = #{request.startOriginalX} </if> <if test="request.startOriginalY != null and request.startOriginalY != ''"> and start_original_y = #{request.startOriginalY} </if> <if test="request.endOriginalX != null and request.endOriginalX != ''"> and end_original_x = #{request.endOriginalX} </if> <if test="request.endOriginalY != null and request.endOriginalY != ''"> and end_original_y = #{request.endOriginalY} </if> <if test="request.startTransfromX != null and request.startTransfromX != ''"> and start_transfrom_x = #{request.startTransfromX} </if> <if test="request.startTransfromY != null and request.startTransfromY != ''"> and start_transfrom_y = #{request.startTransfromY} </if> <if test="request.endTransfromX != null and request.endTransfromX != ''"> and end_transfrom_x = #{request.endTransfromX} </if> <if test="request.endTransfromY != null and request.endTransfromY != ''"> and end_transfrom_y = #{request.endTransfromY} </if> <if test="request.geometrys != null and request.geometrys != ''"> and geometrys = #{request.geometrys} </if> <if test="request.flow != null and request.flow != ''"> and flow = #{request.flow} </if> <if test="request.drainageSystem != null and request.drainageSystem != ''"> and drainage_system = #{request.drainageSystem} </if> <if test="request.roadName != null and request.roadName != ''"> and road_name like concat('%',#{request.roadName},'%') </if> <if test="request.pipelineType != null and request.pipelineType != ''"> and pipeline_type = #{request.pipelineType} </if> <if test="request.pipelineLength != null and request.pipelineLength != ''"> and pipeline_length = #{request.pipelineLength} </if> <if test="request.startCopNoseElevation != null and request.startCopNoseElevation != ''"> and start_cop_nose_elevation = #{request.startCopNoseElevation} </if> <if test="request.endCopNoseElevation != null and request.endCopNoseElevation != ''"> and end_cop_nose_elevation = #{request.endCopNoseElevation} </if> <if test="request.systemLaying != null and request.systemLaying != ''"> and system_laying = #{request.systemLaying} </if> <if test="request.sectionForm != null and request.sectionForm != ''"> and section_form = #{request.sectionForm} </if> <if test="request.invertedSiphon != null and request.invertedSiphon != ''"> and inverted_siphon = #{request.invertedSiphon} </if> <if test="request.sectionDataOne != null and request.sectionDataOne != ''"> and section_data_one = #{request.sectionDataOne} </if> <if test="request.sectionDataTwo != null and request.sectionDataTwo != ''"> and section_data_two = #{request.sectionDataTwo} </if> <if test="request.texture != null and request.texture != ''"> and texture = #{request.texture} </if> <if test="request.pipeRoughness != null and request.pipeRoughness != ''"> and pipe_roughness = #{request.pipeRoughness} </if> <if test="request.interfaceMeans != null and request.interfaceMeans != ''"> and interface_means = #{request.interfaceMeans} </if> <if test="request.connectionType != null and request.connectionType != ''"> and connection_type = #{request.connectionType} </if> <if test="request.wrongAnswer != null and request.wrongAnswer != ''"> and wrong_answer = #{request.wrongAnswer} </if> <if test="request.pipelineHealth != null and request.pipelineHealth != ''"> and pipeline_health = #{request.pipelineHealth} </if> <if test="request.defectType != null and request.defectType != ''"> and defect_type = #{request.defectType} </if> <if test="request.constructionDate != null and request.constructionDate != ''"> and construction_date = #{request.constructionDate} </if> <if test="request.stateFacilities != null and request.stateFacilities != ''"> and state_facilities = #{request.stateFacilities} </if> <if test="request.repair != null and request.repair != ''"> and repair = #{request.repair} </if> <if test="request.ownershipUnits != null and request.ownershipUnits != ''"> and ownership_units = #{request.ownershipUnits} </if> <if test="request.operationalUnits != null and request.operationalUnits != ''"> and operational_units = #{request.operationalUnits} </if> <if test="request.dataSources != null and request.dataSources != ''"> and data_sources = #{request.dataSources} </if> <if test="request.dataGainTime != null and request.dataGainTime != ''"> and data_gain_time = #{request.dataGainTime} </if> <if test="request.remark != null and request.remark != ''"> and remark = #{request.remark} </if> <if test="request.updateLogo != null and request.updateLogo != ''"> and 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.startGroundDepth != null and request.startGroundDepth != ''"> and start_ground_depth = #{request.startGroundDepth} </if> <if test="request.endGroundDepth != null and request.endGroundDepth != ''"> and end_ground_depth = #{request.endGroundDepth} </if> <if test="request.createUser != null and request.createUser != ''"> and create_user = #{request.endGroundDepth} </if> <if test="request.createDept != null and request.createDept != ''"> and create_dept = #{request.createDept} </if> <if test="request.createTime != null and request.createTime != ''"> and create_time = #{request.createTime} </if> <if test="request.updateUser != null and request.updateUser != ''"> and update_user = #{request.updateUser} </if> <if test="request.updateTime != null and request.updateTime != ''"> and update_time = #{request.updateTime} </if> <if test="request.status != null and request.status != ''"> and status = #{request.status} </if> <if test="request.isDeleted != null and request.isDeleted != ''"> and is_deleted = #{request.isDeleted} </if> </sql> <select id="selectPipe" resultMap="PipelineInfoEntityResultMap"> select <include refid="Pipe_Column_List"/> from pipe_network_linestring where is_deleted = 0 <include refid="Where_Condition"/> </select> <select id="selectByCondition" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from pipe_network_linestring where is_deleted = 0 <include refid="Where_Condition"/> </select> <select id="exportPipeNetworkLinestring" resultType="com.xf.huludao.pipenetwork.entity.PipeNetworkLinestring"> SELECT * FROM pipe_network_linestring ${ew.customSqlSegment} </select> <select id="statisticsLineString" resultType="com.xf.huludao.pipenetwork.vo.DataStatistisVO"> select texture as `name`,count(id) as count from pipe_network_linestring GROUP BY texture </select> <select id="selectPointsAndLines" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from pipe_network_linestring where is_deleted = 0 <include refid="Where_Condition"/> </select> <select id="selectAll" resultType="com.xf.huludao.pipenetwork.entity.dto.PipeDataDto"> select id, ST_AsText(geometrys) as geometrys from pipe_network_linestring where is_deleted = 0 </select> <select id="getDetailByModelId" resultType="com.xf.huludao.pipenetwork.entity.PipeNetworkLinestring"> select <include refid="Base_Column_List"/> from pipe_network_linestring where is_deleted = 0 <include refid="Where_Condition"/> limit 1 </select> </mapper>