地质所 沉降监测网建设项目
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
<?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.StageInfoMapper">
    
    <resultMap type="StageInfo" id="StageInfoResult">
        <result property="id"    column="id"    />
        <result property="projNo"    column="proj_no"    />
        <result property="holeNo"    column="hole_no"    />
        <result property="stageNo"    column="stage_no"    />
        <result property="initialWaterLevel"    column="initial_water_level"    />
        <result property="staticWaterLevel"    column="static_water_level"    />
        <result property="initialWaterTime"    column="initial_water_time"    />
        <result property="staticWaterTime"    column="static_water_time"    />
        <result property="timeInterval"    column="time_interval"    />
        <result property="ifFetchWater"    column="if_fetch_water"    />
        <result property="groundwaterType"    column="groundwater_type"    />
        <result property="waterIntakeDepth"    column="water_intake_depth"    />
        <result property="waterIntakeWay"    column="water_intake_way"    />
        <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="stageImg"    column="stage_img"    />
        <result property="stageVideo"    column="stage_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="selectStageInfoVo">
        select id, proj_no, hole_no, stage_no, initial_water_level, static_water_level, initial_water_time, static_water_time, time_interval, if_fetch_water, groundwater_type, water_intake_depth, water_intake_way, longitude, latitude, location_time, create_time, update_time, remarks, descriptor, driller, stage_img, stage_video, del_flag, isHistory, record_no, record_type from js_stage_info
    </sql>
 
    <select id="selectStageInfoList" parameterType="StageInfo" resultMap="StageInfoResult">
        <include refid="selectStageInfoVo"/>
        <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="stageNo != null  and stageNo != ''"> and stage_no = #{stageNo}</if>
            <if test="initialWaterLevel != null "> and initial_water_level = #{initialWaterLevel}</if>
            <if test="staticWaterLevel != null "> and static_water_level = #{staticWaterLevel}</if>
            <if test="initialWaterTime != null "> and initial_water_time = #{initialWaterTime}</if>
            <if test="staticWaterTime != null "> and static_water_time = #{staticWaterTime}</if>
            <if test="timeInterval != null "> and time_interval = #{timeInterval}</if>
            <if test="ifFetchWater != null  and ifFetchWater != ''"> and if_fetch_water = #{ifFetchWater}</if>
            <if test="groundwaterType != null  and groundwaterType != ''"> and groundwater_type = #{groundwaterType}</if>
            <if test="waterIntakeDepth != null  and waterIntakeDepth != ''"> and water_intake_depth = #{waterIntakeDepth}</if>
            <if test="waterIntakeWay != null  and waterIntakeWay != ''"> and water_intake_way = #{waterIntakeWay}</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="stageImg != null  and stageImg != ''"> and stage_img = #{stageImg}</if>
            <if test="stageVideo != null  and stageVideo != ''"> and stage_video = #{stageVideo}</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="selectStageInfoById" parameterType="String" resultMap="StageInfoResult">
        <include refid="selectStageInfoVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertStageInfo" parameterType="StageInfo">
        insert into js_stage_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="stageNo != null  and stageNo != ''">stage_no,</if>
            <if test="initialWaterLevel != null ">initial_water_level,</if>
            <if test="staticWaterLevel != null ">static_water_level,</if>
            <if test="initialWaterTime != null ">initial_water_time,</if>
            <if test="staticWaterTime != null ">static_water_time,</if>
            <if test="timeInterval != null ">time_interval,</if>
            <if test="ifFetchWater != null  and ifFetchWater != ''">if_fetch_water,</if>
            <if test="groundwaterType != null  and groundwaterType != ''">groundwater_type,</if>
            <if test="waterIntakeDepth != null  and waterIntakeDepth != ''">water_intake_depth,</if>
            <if test="waterIntakeWay != null  and waterIntakeWay != ''">water_intake_way,</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="stageImg != null  and stageImg != ''">stage_img,</if>
            <if test="stageVideo != null  and stageVideo != ''">stage_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="stageNo != null  and stageNo != ''">#{stageNo},</if>
            <if test="initialWaterLevel != null ">#{initialWaterLevel},</if>
            <if test="staticWaterLevel != null ">#{staticWaterLevel},</if>
            <if test="initialWaterTime != null ">#{initialWaterTime},</if>
            <if test="staticWaterTime != null ">#{staticWaterTime},</if>
            <if test="timeInterval != null ">#{timeInterval},</if>
            <if test="ifFetchWater != null  and ifFetchWater != ''">#{ifFetchWater},</if>
            <if test="groundwaterType != null  and groundwaterType != ''">#{groundwaterType},</if>
            <if test="waterIntakeDepth != null  and waterIntakeDepth != ''">#{waterIntakeDepth},</if>
            <if test="waterIntakeWay != null  and waterIntakeWay != ''">#{waterIntakeWay},</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="stageImg != null  and stageImg != ''">#{stageImg},</if>
            <if test="stageVideo != null  and stageVideo != ''">#{stageVideo},</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="updateStageInfo" parameterType="StageInfo">
        update js_stage_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="stageNo != null  and stageNo != ''">stage_no = #{stageNo},</if>
            <if test="initialWaterLevel != null ">initial_water_level = #{initialWaterLevel},</if>
            <if test="staticWaterLevel != null ">static_water_level = #{staticWaterLevel},</if>
            <if test="initialWaterTime != null ">initial_water_time = #{initialWaterTime},</if>
            <if test="staticWaterTime != null ">static_water_time = #{staticWaterTime},</if>
            <if test="timeInterval != null ">time_interval = #{timeInterval},</if>
            <if test="ifFetchWater != null  and ifFetchWater != ''">if_fetch_water = #{ifFetchWater},</if>
            <if test="groundwaterType != null  and groundwaterType != ''">groundwater_type = #{groundwaterType},</if>
            <if test="waterIntakeDepth != null  and waterIntakeDepth != ''">water_intake_depth = #{waterIntakeDepth},</if>
            <if test="waterIntakeWay != null  and waterIntakeWay != ''">water_intake_way = #{waterIntakeWay},</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="stageImg != null  and stageImg != ''">stage_img = #{stageImg},</if>
            <if test="stageVideo != null  and stageVideo != ''">stage_video = #{stageVideo},</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="deleteStageInfoById" parameterType="String">
        delete from js_stage_info where id = #{id}
    </delete>
 
    <delete id="deleteStageInfoByIds" parameterType="String">
        delete from js_stage_info where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    
</mapper>