| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- <?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.com.goldenwater.dcproj.dao.AttSwhsBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttSwhsBase" id="attSwhsBaseResultMap">
- <result property="id" column="ID"/>
- <result property="swhsCode" column="SWHS_CODE"/>
- <result property="swhsName" column="SWHS_NAME"/>
- <result property="swhsLong" column="SWHS_LONG"/>
- <result property="swhsLat" column="SWHS_LAT"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="swhsLoc" column="SWHS_LOC"/>
- <result property="wainWasoType" column="WAIN_WASO_TYPE"/>
- <result property="watArea" column="WAT_AREA"/>
- <result property="wainNum" column="WAIN_NUM"/>
- <result property="wainUse" column="WAIN_USE"/>
- <result property="wasuObjType" column="WASU_OBJ_TYPE"/>
- <result property="wasuTownName" column="WASU_TOWN_NAME"/>
- <result property="wasuTownName2" column="WASU_TOWN_NAME_2"/>
- <result property="wasuTownName3" column="WASU_TOWN_NAME_3"/>
- <result property="desAnnWain" column="DES_ANN_WAIN"/>
- <result property="desAnnWasuPop" column="DES_ANN_WASU_POP"/>
- <result property="runYear" column="RUN_YEAR"/>
- <result property="wintRvName" column="WINT_RV_NAME"/>
- <result property="wintLakeName" column="WINT_LAKE_NAME"/>
- <result property="wintRsName" column="WINT_RS_NAME"/>
- <result property="waquGoal" column="WAQU_GOAL"/>
- <result property="ifMonWqua" column="IF_MON_WQUA"/>
- <result property="wquaCat" column="WQUA_CAT"/>
- <result property="ifWquaUptoSta" column="IF_WQUA_UPTO_STA"/>
- <result property="ifWsProt" column="IF_WS_PROT"/>
- <result property="watArea1stProt" column="WAT_AREA_1ST_PROT"/>
- <result property="landArea1stProt" column="LAND_AREA_1ST_PROT"/>
- <result property="watArea2ndProt" column="WAT_AREA_2ND_PROT"/>
- <result property="landArea2ndProt" column="LAND_AREA_2ND_PROT"/>
- <result property="qusProt" column="QUS_PROT"/>
- <result property="insName" column="INS_NAME"/>
- <result property="tra" column="TRA"/>
- <result property="persId" column="PERS_ID"/>
- <result property="note" column="NOTE"/>
- <result property="effDate" column="EFF_DATE"/>
- <result property="exprDate" column="EXPR_DATE"/>
- <result property="swhsLongGd" column="SWHS_LONG_GD"/>
- <result property="swhsLatGd" column="SWHS_LAT_GD"/>
- <result property="displayLevel" column="DISPLAY_LEVEL"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- SWHS_CODE,
- SWHS_NAME,
- SWHS_LONG,
- SWHS_LAT,
- AD_CODE,
- SWHS_LOC,
- WAIN_WASO_TYPE,
- WAT_AREA,
- WAIN_NUM,
- WAIN_USE,
- WASU_OBJ_TYPE,
- WASU_TOWN_NAME,
- WASU_TOWN_NAME_2,
- WASU_TOWN_NAME_3,
- DES_ANN_WAIN,
- DES_ANN_WASU_POP,
- RUN_YEAR,
- WINT_RV_NAME,
- WINT_LAKE_NAME,
- WINT_RS_NAME,
- WAQU_GOAL,
- IF_MON_WQUA,
- WQUA_CAT,
- IF_WQUA_UPTO_STA,
- IF_WS_PROT,
- WAT_AREA_1ST_PROT,
- LAND_AREA_1ST_PROT,
- WAT_AREA_2ND_PROT,
- LAND_AREA_2ND_PROT,
- QUS_PROT,
- INS_NAME,
- TRA,
- PERS_ID,
- NOTE,
- EFF_DATE,
- EXPR_DATE,
- SWHS_LONG_GD,
- SWHS_LAT_GD,
- DISPLAY_LEVEL
- </sql>
- <sql id="entity_properties">
- #{id},
- #{swhsCode},
- #{swhsName},
- #{swhsLong},
- #{swhsLat},
- #{adCode},
- #{swhsLoc},
- #{wainWasoType},
- #{watArea},
- #{wainNum},
- #{wainUse},
- #{wasuObjType},
- #{wasuTownName},
- #{wasuTownName2},
- #{wasuTownName3},
- #{desAnnWain},
- #{desAnnWasuPop},
- #{runYear},
- #{wintRvName},
- #{wintLakeName},
- #{wintRsName},
- #{waquGoal},
- #{ifMonWqua},
- #{wquaCat},
- #{ifWquaUptoSta},
- #{ifWsProt},
- #{watArea1stProt},
- #{landArea1stProt},
- #{watArea2ndProt},
- #{landArea2ndProt},
- #{qusProt},
- #{insName},
- #{tra},
- #{persId},
- #{note},
- #{effDate},
- #{exprDate},
- #{swhsLongGd},
- #{swhsLatGd},
- #{displayLevel}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="swhsCode != null and swhsCode != ''">and SWHS_CODE = #{swhsCode}</if>
- <if test="swhsName != null and swhsName != ''">and SWHS_NAME like '${swhsName}%'</if>
- <if test="swhsLong != null and swhsLong != ''">and SWHS_LONG = #{swhsLong}</if>
- <if test="swhsLat != null and swhsLat != ''">and SWHS_LAT = #{swhsLat}</if>
- <if test="adCode != null and adCode != ''">and ad_Code like '${adCode}%'</if>
- <if test="swhsLoc != null and swhsLoc != ''">and SWHS_LOC = #{swhsLoc}</if>
- <if test="wainWasoType != null and wainWasoType != ''">and WAIN_WASO_TYPE = #{wainWasoType}</if>
- <if test="watArea != null and watArea != ''">and WAT_AREA = #{watArea}</if>
- <if test="wainNum != null and wainNum != ''">and WAIN_NUM = #{wainNum}</if>
- <if test="wainUse != null and wainUse != ''">and WAIN_USE = #{wainUse}</if>
- <if test="wasuObjType != null and wasuObjType != ''">and WASU_OBJ_TYPE = #{wasuObjType}</if>
- <if test="wasuTownName != null and wasuTownName != ''">and WASU_TOWN_NAME = #{wasuTownName}</if>
- <if test="wasuTownName2 != null and wasuTownName2 != ''">and WASU_TOWN_NAME_2 = #{wasuTownName2}</if>
- <if test="wasuTownName3 != null and wasuTownName3 != ''">and WASU_TOWN_NAME_3 = #{wasuTownName3}</if>
- <if test="desAnnWain != null and desAnnWain != ''">and DES_ANN_WAIN = #{desAnnWain}</if>
- <if test="desAnnWasuPop != null and desAnnWasuPop != ''">and DES_ANN_WASU_POP = #{desAnnWasuPop}</if>
- <if test="runYear != null and runYear != ''">and RUN_YEAR = #{runYear}</if>
- <if test="wintRvName != null and wintRvName != ''">and WINT_RV_NAME = #{wintRvName}</if>
- <if test="wintLakeName != null and wintLakeName != ''">and WINT_LAKE_NAME = #{wintLakeName}</if>
- <if test="wintRsName != null and wintRsName != ''">and WINT_RS_NAME = #{wintRsName}</if>
- <if test="waquGoal != null and waquGoal != ''">and WAQU_GOAL = #{waquGoal}</if>
- <if test="ifMonWqua != null and ifMonWqua != ''">and IF_MON_WQUA = #{ifMonWqua}</if>
- <if test="wquaCat != null and wquaCat != ''">and WQUA_CAT = #{wquaCat}</if>
- <if test="ifWquaUptoSta != null and ifWquaUptoSta != ''">and IF_WQUA_UPTO_STA = #{ifWquaUptoSta}</if>
- <if test="ifWsProt != null and ifWsProt != ''">and IF_WS_PROT = #{ifWsProt}</if>
- <if test="watArea1stProt != null and watArea1stProt != ''">and WAT_AREA_1ST_PROT = #{watArea1stProt}</if>
- <if test="landArea1stProt != null and landArea1stProt != ''">and LAND_AREA_1ST_PROT = #{landArea1stProt}
- </if>
- <if test="watArea2ndProt != null and watArea2ndProt != ''">and WAT_AREA_2ND_PROT = #{watArea2ndProt}</if>
- <if test="landArea2ndProt != null and landArea2ndProt != ''">and LAND_AREA_2ND_PROT = #{landArea2ndProt}
- </if>
- <if test="qusProt != null and qusProt != ''">and QUS_PROT = #{qusProt}</if>
- <if test="insName != null and insName != ''">and INS_NAME = #{insName}</if>
- <if test="tra != null and tra != ''">and TRA = #{tra}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="effDate != null">and EFF_DATE = #{effDate}</if>
- <if test="exprDate != null">and EXPR_DATE = #{exprDate}</if>
- <if test="swhsLongGd != null and swhsLongGd != ''">and SWHS_LONG_GD = #{swhsLongGd}</if>
- <if test="swhsLatGd != null and swhsLatGd != ''">and SWHS_LAT_GD = #{swhsLatGd}</if>
- <if test="displayLevel != null and displayLevel != ''">and DISPLAY_LEVEL = #{displayLevel}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attSwhsBaseResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_SWHS_BASE where ID = #{id}
- </select>
- <select id="getBy" resultMap="attSwhsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_SWHS_BASE
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attSwhsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_SWHS_BASE
- </select>
- <select id="findList" resultMap="attSwhsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_SWHS_BASE
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ATT_SWHS_BASE
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- insert into ATT_SWHS_BASE(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_SWHS_BASE where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- delete from ATT_SWHS_BASE
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_SWHS_BASE set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- update ATT_SWHS_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="swhsCode != null and swhsCode != ''">SWHS_CODE = #{swhsCode},</if>
- <if test="swhsName != null and swhsName != ''">SWHS_NAME = #{swhsName},</if>
- <if test="swhsLong != null and swhsLong != ''">SWHS_LONG = #{swhsLong},</if>
- <if test="swhsLat != null and swhsLat != ''">SWHS_LAT = #{swhsLat},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="swhsLoc != null and swhsLoc != ''">SWHS_LOC = #{swhsLoc},</if>
- <if test="wainWasoType != null and wainWasoType != ''">WAIN_WASO_TYPE = #{wainWasoType},</if>
- <if test="watArea != null and watArea != ''">WAT_AREA = #{watArea},</if>
- <if test="wainNum != null and wainNum != ''">WAIN_NUM = #{wainNum},</if>
- <if test="wainUse != null and wainUse != ''">WAIN_USE = #{wainUse},</if>
- <if test="wasuObjType != null and wasuObjType != ''">WASU_OBJ_TYPE = #{wasuObjType},</if>
- <if test="wasuTownName != null and wasuTownName != ''">WASU_TOWN_NAME = #{wasuTownName},</if>
- <if test="wasuTownName2 != null and wasuTownName2 != ''">WASU_TOWN_NAME_2 = #{wasuTownName2},</if>
- <if test="wasuTownName3 != null and wasuTownName3 != ''">WASU_TOWN_NAME_3 = #{wasuTownName3},</if>
- <if test="desAnnWain != null and desAnnWain != ''">DES_ANN_WAIN = #{desAnnWain},</if>
- <if test="desAnnWasuPop != null and desAnnWasuPop != ''">DES_ANN_WASU_POP = #{desAnnWasuPop},</if>
- <if test="runYear != null and runYear != ''">RUN_YEAR = #{runYear},</if>
- <if test="wintRvName != null and wintRvName != ''">WINT_RV_NAME = #{wintRvName},</if>
- <if test="wintLakeName != null and wintLakeName != ''">WINT_LAKE_NAME = #{wintLakeName},</if>
- <if test="wintRsName != null and wintRsName != ''">WINT_RS_NAME = #{wintRsName},</if>
- <if test="waquGoal != null and waquGoal != ''">WAQU_GOAL = #{waquGoal},</if>
- <if test="ifMonWqua != null and ifMonWqua != ''">IF_MON_WQUA = #{ifMonWqua},</if>
- <if test="wquaCat != null and wquaCat != ''">WQUA_CAT = #{wquaCat},</if>
- <if test="ifWquaUptoSta != null and ifWquaUptoSta != ''">IF_WQUA_UPTO_STA = #{ifWquaUptoSta},</if>
- <if test="ifWsProt != null and ifWsProt != ''">IF_WS_PROT = #{ifWsProt},</if>
- <if test="watArea1stProt != null and watArea1stProt != ''">WAT_AREA_1ST_PROT = #{watArea1stProt},</if>
- <if test="landArea1stProt != null and landArea1stProt != ''">LAND_AREA_1ST_PROT = #{landArea1stProt},</if>
- <if test="watArea2ndProt != null and watArea2ndProt != ''">WAT_AREA_2ND_PROT = #{watArea2ndProt},</if>
- <if test="landArea2ndProt != null and landArea2ndProt != ''">LAND_AREA_2ND_PROT = #{landArea2ndProt},</if>
- <if test="qusProt != null and qusProt != ''">QUS_PROT = #{qusProt},</if>
- <if test="insName != null and insName != ''">INS_NAME = #{insName},</if>
- <if test="tra != null and tra != ''">TRA = #{tra},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="effDate != null">EFF_DATE = #{effDate},</if>
- <if test="exprDate != null">EXPR_DATE = #{exprDate},</if>
- <if test="swhsLongGd != null and swhsLongGd != ''">SWHS_LONG_GD = #{swhsLongGd},</if>
- <if test="swhsLatGd != null and swhsLatGd != ''">SWHS_LAT_GD = #{swhsLatGd},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- update ATT_SWHS_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="swhsCode != null and swhsCode != ''">SWHS_CODE = #{swhsCode},</if>
- <if test="swhsName != null and swhsName != ''">SWHS_NAME = #{swhsName},</if>
- <if test="swhsLong != null and swhsLong != ''">SWHS_LONG = #{swhsLong},</if>
- <if test="swhsLat != null and swhsLat != ''">SWHS_LAT = #{swhsLat},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="swhsLoc != null and swhsLoc != ''">SWHS_LOC = #{swhsLoc},</if>
- <if test="wainWasoType != null and wainWasoType != ''">WAIN_WASO_TYPE = #{wainWasoType},</if>
- <if test="watArea != null and watArea != ''">WAT_AREA = #{watArea},</if>
- <if test="wainNum != null and wainNum != ''">WAIN_NUM = #{wainNum},</if>
- <if test="wainUse != null and wainUse != ''">WAIN_USE = #{wainUse},</if>
- <if test="wasuObjType != null and wasuObjType != ''">WASU_OBJ_TYPE = #{wasuObjType},</if>
- <if test="wasuTownName != null and wasuTownName != ''">WASU_TOWN_NAME = #{wasuTownName},</if>
- <if test="wasuTownName2 != null and wasuTownName2 != ''">WASU_TOWN_NAME_2 = #{wasuTownName2},</if>
- <if test="wasuTownName3 != null and wasuTownName3 != ''">WASU_TOWN_NAME_3 = #{wasuTownName3},</if>
- <if test="desAnnWain != null and desAnnWain != ''">DES_ANN_WAIN = #{desAnnWain},</if>
- <if test="desAnnWasuPop != null and desAnnWasuPop != ''">DES_ANN_WASU_POP = #{desAnnWasuPop},</if>
- <if test="runYear != null and runYear != ''">RUN_YEAR = #{runYear},</if>
- <if test="wintRvName != null and wintRvName != ''">WINT_RV_NAME = #{wintRvName},</if>
- <if test="wintLakeName != null and wintLakeName != ''">WINT_LAKE_NAME = #{wintLakeName},</if>
- <if test="wintRsName != null and wintRsName != ''">WINT_RS_NAME = #{wintRsName},</if>
- <if test="waquGoal != null and waquGoal != ''">WAQU_GOAL = #{waquGoal},</if>
- <if test="ifMonWqua != null and ifMonWqua != ''">IF_MON_WQUA = #{ifMonWqua},</if>
- <if test="wquaCat != null and wquaCat != ''">WQUA_CAT = #{wquaCat},</if>
- <if test="ifWquaUptoSta != null and ifWquaUptoSta != ''">IF_WQUA_UPTO_STA = #{ifWquaUptoSta},</if>
- <if test="ifWsProt != null and ifWsProt != ''">IF_WS_PROT = #{ifWsProt},</if>
- <if test="watArea1stProt != null and watArea1stProt != ''">WAT_AREA_1ST_PROT = #{watArea1stProt},</if>
- <if test="landArea1stProt != null and landArea1stProt != ''">LAND_AREA_1ST_PROT = #{landArea1stProt},</if>
- <if test="watArea2ndProt != null and watArea2ndProt != ''">WAT_AREA_2ND_PROT = #{watArea2ndProt},</if>
- <if test="landArea2ndProt != null and landArea2ndProt != ''">LAND_AREA_2ND_PROT = #{landArea2ndProt},</if>
- <if test="qusProt != null and qusProt != ''">QUS_PROT = #{qusProt},</if>
- <if test="insName != null and insName != ''">INS_NAME = #{insName},</if>
- <if test="tra != null and tra != ''">TRA = #{tra},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="effDate != null">EFF_DATE = #{effDate},</if>
- <if test="exprDate != null">EXPR_DATE = #{exprDate},</if>
- <if test="swhsLongGd != null and swhsLongGd != ''">SWHS_LONG_GD = #{swhsLongGd},</if>
- <if test="swhsLatGd != null and swhsLatGd != ''">SWHS_LAT_GD = #{swhsLatGd},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="getMaxCwsCode" resultType="string" parameterType="string">
- select MAX(swhs_Code) as swhsCode from ATT_SWHS_BASE e where e.ad_code LIKE concat(#{adCode},'%')
- </select>
- <select id="findListBy" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- SELECT ID,
- SWHS_CODE,
- SWHS_NAME,
- SWHS_LONG,
- SWHS_LAT,
- AD_CODE,
- SWHS_LOC,
- WAIN_WASO_TYPE,
- WAT_AREA,
- WAIN_NUM,
- WAIN_USE,
- WASU_OBJ_TYPE,
- WASU_TOWN_NAME,
- WASU_TOWN_NAME_2,
- WASU_TOWN_NAME_3,
- DES_ANN_WAIN,
- DES_ANN_WASU_POP,
- RUN_YEAR,
- WINT_RV_NAME,
- WINT_LAKE_NAME,
- WINT_RS_NAME,
- WAQU_GOAL,
- IF_MON_WQUA,
- WQUA_CAT,
- IF_WQUA_UPTO_STA,
- IF_WS_PROT,
- WAT_AREA_1ST_PROT,
- LAND_AREA_1ST_PROT,
- WAT_AREA_2ND_PROT,
- LAND_AREA_2ND_PROT,
- QUS_PROT,
- INS_NAME,
- TRA,
- PERS_ID,
- NOTE,
- EFF_DATE,
- EXPR_DATE,
- SWHS_LONG_GD,
- SWHS_LAT_GD,
- DISPLAY_LEVEL FROM ATT_SWHS_BASE WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and AD_CODE LIKE '${adCode}%'</if>
- <if test="stnm != null and stnm != ''">and SWHS_NAME LIKE '%${stnm}%'</if>
- <if test="desAnnWasuPop != null and desAnnWasuPop != ''">and DES_ANN_WASU_POP >= #{desAnnWasuPop}</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and SWHS_LONG BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and SWHS_LAT BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- <if test="displayLevel != null and displayLevel != ''">and cast(DISPLAY_LEVEL as signed) <=
- cast(#{displayLevel} as signed)
- </if>
- </select>
- <sql id="orgIdSql">
- <choose>
- <when test="orgId !=null and orgId !=''">
- and ORG_ID=#{orgId}
- </when>
- <otherwise>
- and ORG_ID is null
- </otherwise>
- </choose>
- </sql>
- <select id="getObjByPersId" resultType="cn.com.goldenwater.dcproj.model.AttSwhsBase" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam">
- SELECT A.* ,B.OBJ_ID,B.ID groupId,C.ID rgstrId FROM ATT_SWHS_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.id = B.CODE
- LEFT JOIN BIS_INSP_SWHS_RGSTR C ON B.OBJ_ID = C.OBJ_ID
- WHERE B.PTYPE = #{objType} AND
- B.id in (${inIdsSql})
- <if test="adName != null and adName != ''">and A.SWHS_NAME LIKE '%${adName}%'</if>
- <if test="adCode != null and adCode != ''">and A.AD_CODE LIKE '${adCode}%'</if>
- </select>
- <update id="updateLevelByCode" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- update ATT_SWHS_BASE set DISPLAY_LEVEL = #{displayLevel} where SWHS_CODE = #{swhsCode}
- </update>
- <select id="getObjListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttSwhsBase" parameterType="String">
- select t.*
- from ATT_SWHS_BASE t
- where t.id not in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%') and B.obj_type=#{objType}
- <choose>
- <when test="province !=null and province !=''">
- and B.AD_CODE =#{province}
- </when>
- <otherwise>
- and B.AD_CODE is null
- </otherwise>
- </choose>
- )
- <if test="adName != null and adName != ''">and t.nm LIKE '%${adName}%'</if>
- <if test="adCode != null and adCode != ''">and t.AD_CODE LIKE '${adCode}%'</if>
- </select>
- </mapper>
|