地质所 沉降监测网建设项目
zmk
2024-05-15 9e3afc6d0fa514f986d3fea40fa23124e6fb5070
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?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.TestInfoMapper">
    
    <resultMap type="TestInfo" id="TestInfoResult">
        <result property="id"    column="id"    />
        <result property="projNo"    column="proj_no"    />
        <result property="holeNo"    column="hole_no"    />
        <result property="testNo"    column="test_no"    />
        <result property="testMethod"    column="test_method"    />
        <result property="pipeLenth"    column="pipe_lenth"    />
        <result property="expectDepthStart"    column="expect_depth_start"    />
        <result property="expectDepthEnd"    column="expect_depth_end"    />
        <result property="firstDepthStart"    column="first_depth_start"    />
        <result property="firstDepthEnd"    column="first_depth_end"    />
        <result property="secondDepthStart"    column="second_depth_start"    />
        <result property="secondDepthEnd"    column="second_depth_end"    />
        <result property="thirdDepthStart"    column="third_depth_start"    />
        <result property="thirdDepthEnd"    column="third_depth_end"    />
        <result property="expectHammerTimes"    column="expect_hammer_times"    />
        <result property="firstHammerTimes"    column="first_hammer_times"    />
        <result property="secondHammerTimes"    column="second_hammer_times"    />
        <result property="thirdHammerTimes"    column="third_hammer_times"    />
        <result property="totalTimes"    column="total_times"    />
        <result property="footageSum"    column="footage_sum"    />
        <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="testImg"    column="test_img"    />
        <result property="testVideo"    column="test_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="selectTestInfoVo">
        select id, proj_no, hole_no, test_no, test_method, pipe_lenth, expect_depth_start, expect_depth_end, first_depth_start, first_depth_end, second_depth_start, second_depth_end, third_depth_start, third_depth_end, expect_hammer_times, first_hammer_times, second_hammer_times, third_hammer_times, total_times, footage_sum, longitude, latitude, location_time, create_time, update_time, remarks, descriptor, driller, test_img, test_video, del_flag, isHistory, record_no, record_type from js_test_info
    </sql>
 
    <select id="selectTestInfoList" parameterType="TestInfo" resultMap="TestInfoResult">
        <include refid="selectTestInfoVo"/>
        <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="testNo != null  and testNo != ''"> and test_no = #{testNo}</if>
            <if test="testMethod != null  and testMethod != ''"> and test_method = #{testMethod}</if>
            <if test="pipeLenth != null "> and pipe_lenth = #{pipeLenth}</if>
            <if test="expectDepthStart != null "> and expect_depth_start = #{expectDepthStart}</if>
            <if test="expectDepthEnd != null "> and expect_depth_end = #{expectDepthEnd}</if>
            <if test="firstDepthStart != null "> and first_depth_start = #{firstDepthStart}</if>
            <if test="firstDepthEnd != null "> and first_depth_end = #{firstDepthEnd}</if>
            <if test="secondDepthStart != null "> and second_depth_start = #{secondDepthStart}</if>
            <if test="secondDepthEnd != null "> and second_depth_end = #{secondDepthEnd}</if>
            <if test="thirdDepthStart != null "> and third_depth_start = #{thirdDepthStart}</if>
            <if test="thirdDepthEnd != null "> and third_depth_end = #{thirdDepthEnd}</if>
            <if test="expectHammerTimes != null "> and expect_hammer_times = #{expectHammerTimes}</if>
            <if test="firstHammerTimes != null "> and first_hammer_times = #{firstHammerTimes}</if>
            <if test="secondHammerTimes != null "> and second_hammer_times = #{secondHammerTimes}</if>
            <if test="thirdHammerTimes != null "> and third_hammer_times = #{thirdHammerTimes}</if>
            <if test="totalTimes != null "> and total_times = #{totalTimes}</if>
            <if test="footageSum != null "> and footage_sum = #{footageSum}</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="testImg != null  and testImg != ''"> and test_img = #{testImg}</if>
            <if test="testVideo != null  and testVideo != ''"> and test_video = #{testVideo}</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="selectTestInfoById" parameterType="String" resultMap="TestInfoResult">
        <include refid="selectTestInfoVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertTestInfo" parameterType="TestInfo">
        insert into js_test_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="testNo != null  and testNo != ''">test_no,</if>
            <if test="testMethod != null  and testMethod != ''">test_method,</if>
            <if test="pipeLenth != null ">pipe_lenth,</if>
            <if test="expectDepthStart != null ">expect_depth_start,</if>
            <if test="expectDepthEnd != null ">expect_depth_end,</if>
            <if test="firstDepthStart != null ">first_depth_start,</if>
            <if test="firstDepthEnd != null ">first_depth_end,</if>
            <if test="secondDepthStart != null ">second_depth_start,</if>
            <if test="secondDepthEnd != null ">second_depth_end,</if>
            <if test="thirdDepthStart != null ">third_depth_start,</if>
            <if test="thirdDepthEnd != null ">third_depth_end,</if>
            <if test="expectHammerTimes != null ">expect_hammer_times,</if>
            <if test="firstHammerTimes != null ">first_hammer_times,</if>
            <if test="secondHammerTimes != null ">second_hammer_times,</if>
            <if test="thirdHammerTimes != null ">third_hammer_times,</if>
            <if test="totalTimes != null ">total_times,</if>
            <if test="footageSum != null ">footage_sum,</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="testImg != null  and testImg != ''">test_img,</if>
            <if test="testVideo != null  and testVideo != ''">test_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="testNo != null  and testNo != ''">#{testNo},</if>
            <if test="testMethod != null  and testMethod != ''">#{testMethod},</if>
            <if test="pipeLenth != null ">#{pipeLenth},</if>
            <if test="expectDepthStart != null ">#{expectDepthStart},</if>
            <if test="expectDepthEnd != null ">#{expectDepthEnd},</if>
            <if test="firstDepthStart != null ">#{firstDepthStart},</if>
            <if test="firstDepthEnd != null ">#{firstDepthEnd},</if>
            <if test="secondDepthStart != null ">#{secondDepthStart},</if>
            <if test="secondDepthEnd != null ">#{secondDepthEnd},</if>
            <if test="thirdDepthStart != null ">#{thirdDepthStart},</if>
            <if test="thirdDepthEnd != null ">#{thirdDepthEnd},</if>
            <if test="expectHammerTimes != null ">#{expectHammerTimes},</if>
            <if test="firstHammerTimes != null ">#{firstHammerTimes},</if>
            <if test="secondHammerTimes != null ">#{secondHammerTimes},</if>
            <if test="thirdHammerTimes != null ">#{thirdHammerTimes},</if>
            <if test="totalTimes != null ">#{totalTimes},</if>
            <if test="footageSum != null ">#{footageSum},</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="testImg != null  and testImg != ''">#{testImg},</if>
            <if test="testVideo != null  and testVideo != ''">#{testVideo},</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="updateTestInfo" parameterType="TestInfo">
        update js_test_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="testNo != null  and testNo != ''">test_no = #{testNo},</if>
            <if test="testMethod != null  and testMethod != ''">test_method = #{testMethod},</if>
            <if test="pipeLenth != null ">pipe_lenth = #{pipeLenth},</if>
            <if test="expectDepthStart != null ">expect_depth_start = #{expectDepthStart},</if>
            <if test="expectDepthEnd != null ">expect_depth_end = #{expectDepthEnd},</if>
            <if test="firstDepthStart != null ">first_depth_start = #{firstDepthStart},</if>
            <if test="firstDepthEnd != null ">first_depth_end = #{firstDepthEnd},</if>
            <if test="secondDepthStart != null ">second_depth_start = #{secondDepthStart},</if>
            <if test="secondDepthEnd != null ">second_depth_end = #{secondDepthEnd},</if>
            <if test="thirdDepthStart != null ">third_depth_start = #{thirdDepthStart},</if>
            <if test="thirdDepthEnd != null ">third_depth_end = #{thirdDepthEnd},</if>
            <if test="expectHammerTimes != null ">expect_hammer_times = #{expectHammerTimes},</if>
            <if test="firstHammerTimes != null ">first_hammer_times = #{firstHammerTimes},</if>
            <if test="secondHammerTimes != null ">second_hammer_times = #{secondHammerTimes},</if>
            <if test="thirdHammerTimes != null ">third_hammer_times = #{thirdHammerTimes},</if>
            <if test="totalTimes != null ">total_times = #{totalTimes},</if>
            <if test="footageSum != null ">footage_sum = #{footageSum},</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="testImg != null  and testImg != ''">test_img = #{testImg},</if>
            <if test="testVideo != null  and testVideo != ''">test_video = #{testVideo},</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="deleteTestInfoById" parameterType="String">
        delete from js_test_info where id = #{id}
    </delete>
 
    <delete id="deleteTestInfoByIds" parameterType="String">
        delete from js_test_info where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    
</mapper>