地质所 沉降监测网建设项目
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
<?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.hydrology.mapper.HydrologyWellInfoMapper">
    
    <resultMap type="HydrologyWellInfo" id="HydrologyWellInfoResult">
        <result property="id"    column="id"    />
        <result property="num"    column="num"    />
        <result property="scales"    column="scales"    />
        <result property="address"    column="address"    />
        <result property="lng"    column="lng"    />
        <result property="lat"    column="lat"    />
        <result property="wellDate"    column="well_date"    />
        <result property="constructionUnit"    column="construction_unit"    />
        <result property="depth"    column="depth"    />
        <result property="wellType"    column="well_type"    />
        <result property="wellBit"    column="well_bit"    />
        <result property="wellCasing"    column="well_casing"    />
        <result property="wellNature"    column="well_nature"    />
        <result property="eleResistivity"    column="ele_resistivity"    />
        <result property="machineType"    column="machine_type"    />
        <result property="interpretation"    column="interpretation"    />
        <result property="userExplain"    column="user_explain"    />
        <result property="userProof"    column="user_proof"    />
        <result property="userCheck"    column="user_check"    />
        <result property="surveyCompany"    column="survey_company"    />
        <result property="surveyCompanyAddr"    column="survey_company_addr"    />
        <result property="surveyEngineer"    column="survey_engineer"    />
        <result property="surveyTel"    column="survey_tel"    />
        <result property="remark"    column="remark"    />
    </resultMap>
 
    <sql id="selectHydrologyWellInfoVo">
        select id, num, scales , address, lng, lat, well_date, construction_unit, depth, well_type, well_bit, well_casing, well_nature, ele_resistivity, machine_type, interpretation, user_explain, user_proof, user_check, survey_company, survey_company_addr, survey_engineer, survey_tel, remark from js_hydrology_well_info
    </sql>
 
    <select id="selectHydrologyWellInfoList" parameterType="HydrologyWellInfo" resultMap="HydrologyWellInfoResult">
        <include refid="selectHydrologyWellInfoVo"/>
        <where>  
            <if test="num != null  and num != ''"> and num = #{num}</if>
            <if test="scales != null  and scales != ''"> and scales = #{scales}</if>
            <if test="address != null  and address != ''"> and address = #{address}</if>
            <if test="lng != null "> and lng = #{lng}</if>
            <if test="lat != null "> and lat = #{lat}</if>
            <if test="wellDate != null  and wellDate != ''"> and well_date = #{wellDate}</if>
            <if test="constructionUnit != null  and constructionUnit != ''"> and construction_unit = #{constructionUnit}</if>
            <if test="depth != null "> and depth = #{depth}</if>
            <if test="wellType != null  and wellType != ''"> and well_type = #{wellType}</if>
            <if test="wellBit != null  and wellBit != ''"> and well_bit = #{wellBit}</if>
            <if test="wellCasing != null  and wellCasing != ''"> and well_casing = #{wellCasing}</if>
            <if test="wellNature != null  and wellNature != ''"> and well_nature = #{wellNature}</if>
            <if test="eleResistivity != null  and eleResistivity != ''"> and ele_resistivity = #{eleResistivity}</if>
            <if test="machineType != null  and machineType != ''"> and machine_type = #{machineType}</if>
            <if test="interpretation != null  and interpretation != ''"> and interpretation = #{interpretation}</if>
            <if test="userExplain != null  and userExplain != ''"> and user_explain = #{userExplain}</if>
            <if test="userProof != null  and userProof != ''"> and user_proof = #{userProof}</if>
            <if test="userCheck != null  and userCheck != ''"> and user_check = #{userCheck}</if>
            <if test="surveyCompany != null  and surveyCompany != ''"> and survey_company = #{surveyCompany}</if>
            <if test="surveyCompanyAddr != null  and surveyCompanyAddr != ''"> and survey_company_addr = #{surveyCompanyAddr}</if>
            <if test="surveyEngineer != null  and surveyEngineer != ''"> and survey_engineer = #{surveyEngineer}</if>
            <if test="surveyTel != null  and surveyTel != ''"> and survey_tel = #{surveyTel}</if>
        </where>
    </select>
    
    <select id="selectHydrologyWellInfoById" parameterType="Long" resultMap="HydrologyWellInfoResult">
        <include refid="selectHydrologyWellInfoVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertHydrologyWellInfo" parameterType="HydrologyWellInfo" useGeneratedKeys="true" keyProperty="id">
        insert into js_hydrology_well_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="num != null  and num != ''">num,</if>
            <if test="scales != null  and scales != ''">scales,</if>
            <if test="address != null  and address != ''">address,</if>
            <if test="lng != null ">lng,</if>
            <if test="lat != null ">lat,</if>
            <if test="wellDate != null  and wellDate != ''">well_date,</if>
            <if test="constructionUnit != null  and constructionUnit != ''">construction_unit,</if>
            <if test="depth != null ">depth,</if>
            <if test="wellType != null  and wellType != ''">well_type,</if>
            <if test="wellBit != null  and wellBit != ''">well_bit,</if>
            <if test="wellCasing != null  and wellCasing != ''">well_casing,</if>
            <if test="wellNature != null  and wellNature != ''">well_nature,</if>
            <if test="eleResistivity != null  and eleResistivity != ''">ele_resistivity,</if>
            <if test="machineType != null  and machineType != ''">machine_type,</if>
            <if test="interpretation != null  and interpretation != ''">interpretation,</if>
            <if test="userExplain != null  and userExplain != ''">user_explain,</if>
            <if test="userProof != null  and userProof != ''">user_proof,</if>
            <if test="userCheck != null  and userCheck != ''">user_check,</if>
            <if test="surveyCompany != null  and surveyCompany != ''">survey_company,</if>
            <if test="surveyCompanyAddr != null  and surveyCompanyAddr != ''">survey_company_addr,</if>
            <if test="surveyEngineer != null  and surveyEngineer != ''">survey_engineer,</if>
            <if test="surveyTel != null  and surveyTel != ''">survey_tel,</if>
            <if test="remark != null  and remark != ''">remark,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="num != null  and num != ''">#{num},</if>
            <if test="scales != null  and scales != ''">#{scales},</if>
            <if test="address != null  and address != ''">#{address},</if>
            <if test="lng != null ">#{lng},</if>
            <if test="lat != null ">#{lat},</if>
            <if test="wellDate != null  and wellDate != ''">#{wellDate},</if>
            <if test="constructionUnit != null  and constructionUnit != ''">#{constructionUnit},</if>
            <if test="depth != null ">#{depth},</if>
            <if test="wellType != null  and wellType != ''">#{wellType},</if>
            <if test="wellBit != null  and wellBit != ''">#{wellBit},</if>
            <if test="wellCasing != null  and wellCasing != ''">#{wellCasing},</if>
            <if test="wellNature != null  and wellNature != ''">#{wellNature},</if>
            <if test="eleResistivity != null  and eleResistivity != ''">#{eleResistivity},</if>
            <if test="machineType != null  and machineType != ''">#{machineType},</if>
            <if test="interpretation != null  and interpretation != ''">#{interpretation},</if>
            <if test="userExplain != null  and userExplain != ''">#{userExplain},</if>
            <if test="userProof != null  and userProof != ''">#{userProof},</if>
            <if test="userCheck != null  and userCheck != ''">#{userCheck},</if>
            <if test="surveyCompany != null  and surveyCompany != ''">#{surveyCompany},</if>
            <if test="surveyCompanyAddr != null  and surveyCompanyAddr != ''">#{surveyCompanyAddr},</if>
            <if test="surveyEngineer != null  and surveyEngineer != ''">#{surveyEngineer},</if>
            <if test="surveyTel != null  and surveyTel != ''">#{surveyTel},</if>
            <if test="remark != null  and remark != ''">#{remark},</if>
         </trim>
    </insert>
 
    <update id="updateHydrologyWellInfo" parameterType="HydrologyWellInfo">
        update js_hydrology_well_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="num != null  and num != ''">num = #{num},</if>
            <if test="scales != null  and scales != ''">scales = #{scales},</if>
            <if test="address != null  and address != ''">address = #{address},</if>
            <if test="lng != null ">lng = #{lng},</if>
            <if test="lat != null ">lat = #{lat},</if>
            <if test="wellDate != null  and wellDate != ''">well_date = #{wellDate},</if>
            <if test="constructionUnit != null  and constructionUnit != ''">construction_unit = #{constructionUnit},</if>
            <if test="depth != null ">depth = #{depth},</if>
            <if test="wellType != null  and wellType != ''">well_type = #{wellType},</if>
            <if test="wellBit != null  and wellBit != ''">well_bit = #{wellBit},</if>
            <if test="wellCasing != null  and wellCasing != ''">well_casing = #{wellCasing},</if>
            <if test="wellNature != null  and wellNature != ''">well_nature = #{wellNature},</if>
            <if test="eleResistivity != null  and eleResistivity != ''">ele_resistivity = #{eleResistivity},</if>
            <if test="machineType != null  and machineType != ''">machine_type = #{machineType},</if>
            <if test="interpretation != null  and interpretation != ''">interpretation = #{interpretation},</if>
            <if test="userExplain != null  and userExplain != ''">user_explain = #{userExplain},</if>
            <if test="userProof != null  and userProof != ''">user_proof = #{userProof},</if>
            <if test="userCheck != null  and userCheck != ''">user_check = #{userCheck},</if>
            <if test="surveyCompany != null  and surveyCompany != ''">survey_company = #{surveyCompany},</if>
            <if test="surveyCompanyAddr != null  and surveyCompanyAddr != ''">survey_company_addr = #{surveyCompanyAddr},</if>
            <if test="surveyEngineer != null  and surveyEngineer != ''">survey_engineer = #{surveyEngineer},</if>
            <if test="surveyTel != null  and surveyTel != ''">survey_tel = #{surveyTel},</if>
            <if test="remark != null  and remark != ''">remark = #{remark},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteHydrologyWellInfoById" parameterType="Long">
        delete from js_hydrology_well_info where id = #{id}
    </delete>
 
    <delete id="deleteHydrologyWellInfoByIds" parameterType="String">
        delete from js_hydrology_well_info where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    
</mapper>