地质所 沉降监测网建设项目
chenhuan
2024-05-16 0fdd42e318f51f9e3c6581473416af1cca69877f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?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.javaweb.platform.mapper.ReturnInfoMapper">
    
    <resultMap type="ReturnInfo" id="ReturnInfoResult">
        <result property="id"    column="id"    />
        <result property="projNo"    column="proj_no"    />
        <result property="holeNo"    column="hole_no"    />
        <result property="returnNum"    column="return_num"    />
        <result property="officeCode"    column="office_code"    />
        <result property="startDepth"    column="start_depth"    />
        <result property="endDepth"    column="end_depth"    />
        <result property="footage"    column="footage"    />
        <result property="coreLength"    column="core_length"    />
        <result property="coreRate"    column="core_rate"    />
        <result property="rockQualityQuota"    column="rock_quality_quota"    />
        <result property="wallProtectMethod"    column="wall_protect_method"    />
        <result property="drillMethod"    column="drill_method"    />
        <result property="boreDiameter"    column="bore_diameter"    />
        <result property="drillAbnormalDesc"    column="drill_abnormal_desc"    />
        <result property="longitude"    column="longitude"    />
        <result property="latitude"    column="latitude"    />
        <result property="locationTime"    column="location_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remarks"    column="remarks"    />
        <result property="descriptor"    column="descriptor"    />
        <result property="driller"    column="driller"    />
        <result property="returnImg"    column="return_img"    />
        <result property="returnVideo"    column="return_video"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="ishistory"    column="isHistory"    />
        <result property="recordNo"    column="record_no"    />
        <result property="recordType"    column="record_type"    />
    </resultMap>
 
    <sql id="selectReturnInfoVo">
        select id, proj_no, hole_no, return_num, office_code, start_depth, end_depth, footage, core_length, core_rate, rock_quality_quota, wall_protect_method, drill_method, bore_diameter, drill_abnormal_desc, longitude, latitude, location_time, create_time, update_time, remarks, descriptor, driller, return_img, return_video, del_flag, isHistory, record_no, record_type from js_return_info
    </sql>
 
    <select id="selectReturnInfoList" parameterType="ReturnInfo" resultMap="ReturnInfoResult">
        <include refid="selectReturnInfoVo"/>
        <where>  
            <if test="projNo != null  and projNo != ''"> and proj_no = #{projNo}</if>
            <if test="holeNo != null  and holeNo != ''"> and hole_no = #{holeNo}</if>
            <if test="returnNum != null  and returnNum != ''"> and return_num = #{returnNum}</if>
            <if test="officeCode != null  and officeCode != ''"> and office_code = #{officeCode}</if>
            <if test="startDepth != null "> and start_depth = #{startDepth}</if>
            <if test="endDepth != null "> and end_depth = #{endDepth}</if>
            <if test="footage != null "> and footage = #{footage}</if>
            <if test="coreLength != null "> and core_length = #{coreLength}</if>
            <if test="coreRate != null "> and core_rate = #{coreRate}</if>
            <if test="rockQualityQuota != null "> and rock_quality_quota = #{rockQualityQuota}</if>
            <if test="wallProtectMethod != null  and wallProtectMethod != ''"> and wall_protect_method = #{wallProtectMethod}</if>
            <if test="drillMethod != null  and drillMethod != ''"> and drill_method = #{drillMethod}</if>
            <if test="boreDiameter != null "> and bore_diameter = #{boreDiameter}</if>
            <if test="drillAbnormalDesc != null  and drillAbnormalDesc != ''"> and drill_abnormal_desc = #{drillAbnormalDesc}</if>
            <if test="longitude != null "> and longitude = #{longitude}</if>
            <if test="latitude != null "> and latitude = #{latitude}</if>
            <if test="locationTime != null "> and location_time = #{locationTime}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="descriptor != null  and descriptor != ''"> and descriptor = #{descriptor}</if>
            <if test="driller != null  and driller != ''"> and driller = #{driller}</if>
            <if test="returnImg != null  and returnImg != ''"> and return_img = #{returnImg}</if>
            <if test="returnVideo != null  and returnVideo != ''"> and return_video = #{returnVideo}</if>
            <if test="ishistory != null  and ishistory != ''"> and isHistory = #{ishistory}</if>
            <if test="recordNo != null  and recordNo != ''"> and record_no = #{recordNo}</if>
            <if test="recordType != null  and recordType != ''"> and record_type = #{recordType}</if>
        </where>
    </select>
    
    <select id="selectReturnInfoById" parameterType="String" resultMap="ReturnInfoResult">
        <include refid="selectReturnInfoVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertReturnInfo" parameterType="ReturnInfo">
        insert into js_return_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null  and id != ''">id,</if>
            <if test="projNo != null  and projNo != ''">proj_no,</if>
            <if test="holeNo != null  and holeNo != ''">hole_no,</if>
            <if test="returnNum != null  and returnNum != ''">return_num,</if>
            <if test="officeCode != null  and officeCode != ''">office_code,</if>
            <if test="startDepth != null ">start_depth,</if>
            <if test="endDepth != null ">end_depth,</if>
            <if test="footage != null ">footage,</if>
            <if test="coreLength != null ">core_length,</if>
            <if test="coreRate != null ">core_rate,</if>
            <if test="rockQualityQuota != null ">rock_quality_quota,</if>
            <if test="wallProtectMethod != null  and wallProtectMethod != ''">wall_protect_method,</if>
            <if test="drillMethod != null  and drillMethod != ''">drill_method,</if>
            <if test="boreDiameter != null ">bore_diameter,</if>
            <if test="drillAbnormalDesc != null  and drillAbnormalDesc != ''">drill_abnormal_desc,</if>
            <if test="longitude != null ">longitude,</if>
            <if test="latitude != null ">latitude,</if>
            <if test="locationTime != null ">location_time,</if>
            <if test="createTime != null ">create_time,</if>
            <if test="updateTime != null ">update_time,</if>
            <if test="remarks != null  and remarks != ''">remarks,</if>
            <if test="descriptor != null  and descriptor != ''">descriptor,</if>
            <if test="driller != null  and driller != ''">driller,</if>
            <if test="returnImg != null  and returnImg != ''">return_img,</if>
            <if test="returnVideo != null  and returnVideo != ''">return_video,</if>
            <if test="delFlag != null  and delFlag != ''">del_flag,</if>
            <if test="ishistory != null  and ishistory != ''">isHistory,</if>
            <if test="recordNo != null  and recordNo != ''">record_no,</if>
            <if test="recordType != null  and recordType != ''">record_type,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null  and id != ''">#{id},</if>
            <if test="projNo != null  and projNo != ''">#{projNo},</if>
            <if test="holeNo != null  and holeNo != ''">#{holeNo},</if>
            <if test="returnNum != null  and returnNum != ''">#{returnNum},</if>
            <if test="officeCode != null  and officeCode != ''">#{officeCode},</if>
            <if test="startDepth != null ">#{startDepth},</if>
            <if test="endDepth != null ">#{endDepth},</if>
            <if test="footage != null ">#{footage},</if>
            <if test="coreLength != null ">#{coreLength},</if>
            <if test="coreRate != null ">#{coreRate},</if>
            <if test="rockQualityQuota != null ">#{rockQualityQuota},</if>
            <if test="wallProtectMethod != null  and wallProtectMethod != ''">#{wallProtectMethod},</if>
            <if test="drillMethod != null  and drillMethod != ''">#{drillMethod},</if>
            <if test="boreDiameter != null ">#{boreDiameter},</if>
            <if test="drillAbnormalDesc != null  and drillAbnormalDesc != ''">#{drillAbnormalDesc},</if>
            <if test="longitude != null ">#{longitude},</if>
            <if test="latitude != null ">#{latitude},</if>
            <if test="locationTime != null ">#{locationTime},</if>
            <if test="createTime != null ">#{createTime},</if>
            <if test="updateTime != null ">#{updateTime},</if>
            <if test="remarks != null  and remarks != ''">#{remarks},</if>
            <if test="descriptor != null  and descriptor != ''">#{descriptor},</if>
            <if test="driller != null  and driller != ''">#{driller},</if>
            <if test="returnImg != null  and returnImg != ''">#{returnImg},</if>
            <if test="returnVideo != null  and returnVideo != ''">#{returnVideo},</if>
            <if test="delFlag != null  and delFlag != ''">#{delFlag},</if>
            <if test="ishistory != null  and ishistory != ''">#{ishistory},</if>
            <if test="recordNo != null  and recordNo != ''">#{recordNo},</if>
            <if test="recordType != null  and recordType != ''">#{recordType},</if>
         </trim>
    </insert>
 
    <update id="updateReturnInfo" parameterType="ReturnInfo">
        update js_return_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="projNo != null  and projNo != ''">proj_no = #{projNo},</if>
            <if test="holeNo != null  and holeNo != ''">hole_no = #{holeNo},</if>
            <if test="returnNum != null  and returnNum != ''">return_num = #{returnNum},</if>
            <if test="officeCode != null  and officeCode != ''">office_code = #{officeCode},</if>
            <if test="startDepth != null ">start_depth = #{startDepth},</if>
            <if test="endDepth != null ">end_depth = #{endDepth},</if>
            <if test="footage != null ">footage = #{footage},</if>
            <if test="coreLength != null ">core_length = #{coreLength},</if>
            <if test="coreRate != null ">core_rate = #{coreRate},</if>
            <if test="rockQualityQuota != null ">rock_quality_quota = #{rockQualityQuota},</if>
            <if test="wallProtectMethod != null  and wallProtectMethod != ''">wall_protect_method = #{wallProtectMethod},</if>
            <if test="drillMethod != null  and drillMethod != ''">drill_method = #{drillMethod},</if>
            <if test="boreDiameter != null ">bore_diameter = #{boreDiameter},</if>
            <if test="drillAbnormalDesc != null  and drillAbnormalDesc != ''">drill_abnormal_desc = #{drillAbnormalDesc},</if>
            <if test="longitude != null ">longitude = #{longitude},</if>
            <if test="latitude != null ">latitude = #{latitude},</if>
            <if test="locationTime != null ">location_time = #{locationTime},</if>
            <if test="createTime != null ">create_time = #{createTime},</if>
            <if test="updateTime != null ">update_time = #{updateTime},</if>
            <if test="remarks != null  and remarks != ''">remarks = #{remarks},</if>
            <if test="descriptor != null  and descriptor != ''">descriptor = #{descriptor},</if>
            <if test="driller != null  and driller != ''">driller = #{driller},</if>
            <if test="returnImg != null  and returnImg != ''">return_img = #{returnImg},</if>
            <if test="returnVideo != null  and returnVideo != ''">return_video = #{returnVideo},</if>
            <if test="delFlag != null  and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="ishistory != null  and ishistory != ''">isHistory = #{ishistory},</if>
            <if test="recordNo != null  and recordNo != ''">record_no = #{recordNo},</if>
            <if test="recordType != null  and recordType != ''">record_type = #{recordType},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteReturnInfoById" parameterType="String">
        delete from js_return_info where id = #{id}
    </delete>
 
    <delete id="deleteReturnInfoByIds" parameterType="String">
        delete from js_return_info where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    
</mapper>