地质所 沉降监测网建设项目
zmk
2024-10-23 3f47c88e7cb4e53b3637620794420181f47b5a5e
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml
@@ -29,6 +29,7 @@
        <result property="reason"    column="reason"    />
        <result property="rate"    column="rate"    />
        <result property="footage"    column="footage"    />
        <result property="totalFootage"    column="total_footage"    />
        <result property="footageCpl"    column="footage_cpl"    />
        <result property="status"    column="status"    />
        <result property="isDeleted"    column="is_deleted"    />
@@ -36,7 +37,7 @@
    </resultMap>
    <sql id="selectHoleVo">
        select ids, project_id, code, create_time, update_time, description, type, elevation, depth, longitude, latitude, survey_x, survey_y, survey_z, survey_latitude, survey_longitude, map_latitude, map_longitude, map_time, position, locate_time, reason, rate, footage, footage_cpl, status, is_deleted, is_flag from js_hole
        select ids, project_id, code, create_time, update_time, description, type, elevation, depth, longitude, latitude, survey_x, survey_y, survey_z, survey_latitude, survey_longitude, map_latitude, map_longitude, map_time, position, locate_time, reason, rate, footage,total_footage, footage_cpl, status, is_deleted, is_flag from js_hole
    </sql>
    <select id="selectHoleList" parameterType="Hole" resultMap="HoleResult">
@@ -99,6 +100,20 @@
        <include refid="selectHoleVo"/> WHERE project_id = #{projectId}
    </select>
    <select id="selectHoleTotalProcess" resultMap="HoleResult">
        select sum(footage_cpl) as footage_cpl, sum(footage) as footage  from js_hole
    </select>
    <select id="selectHoleProjectProcess" resultMap="HoleResult">
        select project_id as project_id,  sum(footage_cpl) as footage_cpl, sum(footage) as footage
        from js_hole  GROUP BY project_id
    </select>
    <select id="selectProjectProcess" resultMap="HoleResult" >
       select project_id as project_id,  sum(footage_cpl) as footage_cpl, sum(footage) as footage
        from js_hole where project_id = #{projectId}
    </select>
    <insert id="insertHole" parameterType="Hole">
        insert into js_hole
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -126,6 +141,7 @@
            <if test="reason != null  and reason != ''">reason,</if>
            <if test="rate != null">rate,</if>
            <if test="footage != null">footage,</if>
            <if test="totalFootage != null">total_footage,</if>
            <if test="footageCpl != null">footage_cpl,</if>
            <if test="status != null  and status != ''">status,</if>
            <if test="isDeleted != null  and isDeleted != ''">is_deleted,</if>
@@ -156,6 +172,7 @@
            <if test="reason != null  and reason != ''">#{reason},</if>
            <if test="rate != null">#{rate},</if>
            <if test="footage != null">#{footage},</if>
            <if test="totalFootage != null">#{totalFootage},</if>
            <if test="footageCpl != null">#{footageCpl},</if>
            <if test="status != null  and status != ''">#{status},</if>
            <if test="isDeleted != null  and isDeleted != ''">#{isDeleted},</if>
@@ -189,6 +206,7 @@
            <if test="reason != null  and reason != ''">reason = #{reason},</if>
            <if test="rate != null">rate = #{rate},</if>
            <if test="footage != null">footage = #{footage},</if>
            <if test="totalFootage != null">total_footage = #{totalFootage},</if>
            <if test="footageCpl != null">footage_cpl = #{footageCpl},</if>
            <if test="status != null  and status != ''">status = #{status},</if>
            <if test="isDeleted != null  and isDeleted != ''">is_deleted = #{isDeleted},</if>