zhongrj
2023-08-15 a65ae7bcc2a3ae10bf31a89fc0d2e7dfd0038a41
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
<?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="cn.gistack.sm.sjztmd.mapper.TbAttResBaseMapper">
 
    <!--查询水库填报详情信息-->
    <select id="getDetailByGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResBase">
        SELECT * FROM "tb_att_res_base" WHERE "guid" = #{guid}
    </select>
 
    <!--更新水库填报信息-->
    <update id="updateByGuid">
        UPDATE "tb_att_res_base" SET
        <if test="tbAttResBase.buildAddress !=null and tbAttResBase.buildAddress != ''">
            "build_address" = #{tbAttResBase.buildAddress},
        </if>
        <if test="tbAttResBase.resScal !=null">
            "res_scal" = #{tbAttResBase.resScal},
        </if>
        <if test="tbAttResBase.engGrad !=null and tbAttResBase.engGrad != ''">
            "eng_grad" = #{tbAttResBase.engGrad},
        </if>
        <if test="tbAttResBase.lgtd !=null and tbAttResBase.lgtd != ''">
            "lgtd" = #{tbAttResBase.lgtd},
        </if>
        <if test="tbAttResBase.lttd !=null and tbAttResBase.lttd != ''">
            "lttd" = #{tbAttResBase.lttd},
        </if>
        <if test="tbAttResBase.elevationSystem !=null and tbAttResBase.elevationSystem != ''">
            "elevation_system" = #{tbAttResBase.elevationSystem},
        </if>
        <if test="tbAttResBase.basCode !=null and tbAttResBase.basCode != ''">
            "bas_code" = #{tbAttResBase.basCode},
        </if>
        <if test="tbAttResBase.riverSysCode !=null and tbAttResBase.riverSysCode != ''">
            "river_sys_code" = #{tbAttResBase.riverSysCode},
        </if>
        <if test="tbAttResBase.comControlBas !=null and tbAttResBase.comControlBas != ''">
            "com_control_bas" = #{tbAttResBase.comControlBas},
        </if>
        <if test="tbAttResBase.importFloodBas !=null and tbAttResBase.importFloodBas != ''">
            "import_flood_bas" = #{tbAttResBase.importFloodBas},
        </if>
        <if test="tbAttResBase.locRvName !=null and tbAttResBase.locRvName != ''">
            "loc_rv_name" = #{tbAttResBase.locRvName},
        </if>
        <if test="tbAttResBase.resFunc !=null and tbAttResBase.resFunc != ''">
            "res_func" = #{tbAttResBase.resFunc},
        </if>
        <if test="tbAttResBase.checkState !=null">
            "check_state" = #{tbAttResBase.checkState},
        </if>
        <if test="tbAttResBase.checkLog !=null and tbAttResBase.checkLog != ''">
            "check_log" = #{tbAttResBase.checkLog},
        </if>
        <if test="tbAttResBase.log !=null and tbAttResBase.log != ''">
            "log" = #{tbAttResBase.log},
        </if>
        "name" = #{tbAttResBase.name}
        WHERE "guid" = #{tbAttResBase.guid}
    </update>
 
</mapper>