| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- <?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.BisInspRectPblmProvinceDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince" id="bisInspRectPblmProvinceResultMap">
- <result property="inspPblmType" column="INSP_PBLM_TYPE"/>
- <result property="inspPblmCode" column="INSP_PBLM_CODE"/>
- <result property="inspPblmName" column="INSP_PBLM_NAME"/>
- <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
- <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
- <result property="inspPblmTm" column="INSP_PBLM_TM"/>
- <result property="crrtTm" column="CRRT_TM"/>
- <result property="rectConc" column="RECT_CONC"/>
- <result property="rectTm" column="RECT_TM"/>
- <result property="rectNote" column="RECT_NOTE"/>
- <result property="rectPersId" column="RECT_PERS_ID"/>
- <result property="rectPersNm" column="RECT_PERS_NM"/>
- <result property="chkState" column="CHK_STATE"/>
- <result property="isTranc" column="IS_TRANC"/>
- <result property="satOrgId" column="SAT_ORG_ID"/>
- <result property="satOrgName" column="SAT_ORG_NAME"/>
- <result property="note" column="NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="id" column="ID"/>
- <result property="rectId" column="RECT_ID"/>
- <result property="code" column="CODE"/>
- <result property="objType" column="OBJ_TYPE"/>
- <result property="name" column="NAME"/>
- <result property="regid" column="REGID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="jchkState" column="JCHK_STATE"/>
- <result property="chkStateNote" column="CHK_STATE_NOTE"/>
- <result property="jchkStateNote" column="JCHK_STATE_NOTE"/>
- </resultMap>
-
- <sql id="table_columns">
- INSP_PBLM_TYPE,
- INSP_PBLM_CODE,
- INSP_PBLM_NAME,
- INSP_PBLM_DESC,
- INSP_PBLM_CATE,
- INSP_PBLM_TM,
- CRRT_TM,
- RECT_CONC,
- RECT_TM,
- RECT_NOTE,
- RECT_PERS_ID,
- RECT_PERS_NM,
- CHK_STATE,
- IS_TRANC,
- SAT_ORG_ID,
- SAT_ORG_NAME,
- NOTE,
- PERS_ID,
- PERS_NAME,
- INTM,
- UPTM,
- DATA_STAT,
- ID,
- RECT_ID,
- CODE,
- OBJ_TYPE,
- NAME,
- REGID,
- OBJ_ID,
- AD_CODE,
- AD_NAME,
- PBLM_ID,
- JCHK_STATE,
- CHK_STATE_NOTE,
- JCHK_STATE_NOTE
- </sql>
- <sql id="entity_properties">
- #{inspPblmType},
- #{inspPblmCode},
- #{inspPblmName},
- #{inspPblmDesc},
- #{inspPblmCate},
- #{inspPblmTm},
- #{crrtTm},
- #{rectConc},
- #{rectTm},
- #{rectNote},
- #{rectPersId},
- #{rectPersNm},
- #{chkState},
- #{isTranc},
- #{satOrgId},
- #{satOrgName},
- #{note},
- #{persId},
- #{persName},
- #{intm},
- #{uptm},
- #{dataStat},
- #{id},
- #{rectId},
- #{code},
- #{objType},
- #{name},
- #{regid},
- #{objId},
- #{adCode},
- #{adName},
- #{pblmId},
- #{jchkState},
- #{chkStateNote},
- #{jchkStateNote}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="chkStateNote != null and chkStateNote != ''">and CHK_STATE_NOTE = #{chkStateNote}</if>
- <if test="jchkStateNote != null and jchkStateNote != ''">and JCHK_STATE_NOTE = #{jchkStateNote}</if>
- <if test="inspPblmCode != null and inspPblmCode != ''">and INSP_PBLM_CODE = #{inspPblmCode}</if>
- <if test="inspPblmName != null and inspPblmName != ''">and INSP_PBLM_NAME = #{inspPblmName}</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">and INSP_PBLM_DESC like '%${inspPblmDesc}%' </if>
- <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
- <if test="inspPblmTm != null">and INSP_PBLM_TM = #{inspPblmTm}</if>
- <if test="crrtTm != null">and CRRT_TM = #{crrtTm}</if>
- <if test="rectConc != null and rectConc != ''">and RECT_CONC = #{rectConc}</if>
- <if test="rectTm != null">and RECT_TM = #{rectTm}</if>
- <if test="rectNote != null and rectNote != ''">and RECT_NOTE = #{rectNote}</if>
- <if test="rectPersId != null and rectPersId != ''">and RECT_PERS_ID = #{rectPersId}</if>
- <if test="rectPersNm != null and rectPersNm != ''">and RECT_PERS_NM = #{rectPersNm}</if>
- <if test="chkState != null and chkState != ''">and CHK_STATE = #{chkState}</if>
- <if test="isTranc != null and isTranc != ''">and IS_TRANC = #{isTranc}</if>
- <if test="satOrgId != null and satOrgId != ''">and SAT_ORG_ID = #{satOrgId}</if>
- <if test="satOrgName != null and satOrgName != ''">and SAT_ORG_NAME = #{satOrgName}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="rectId != null and rectId != ''">and RECT_ID = #{rectId}</if>
- <if test="code != null and code != ''">and CODE = #{code}</if>
- <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
- <if test="name != null and name != ''">and NAME like '%${name}%' </if>
- <if test="regid != null and regid != ''">and REGID = #{regid}</if>
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="jchkState != null and jchkState != ''">and JCHK_STATE = #{jchkState}</if>
- <if test="satOrg != null and satOrg != ''"> and id in
- (select rect_id from bis_insp_rect_pblm_province where is_tranc='1' and sat_org_id=#{satOrg})</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspRectPblmProvinceResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspRectPblmProvinceResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspRectPblmProvinceResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE
- </select>
- <select id="findList" resultMap="bisInspRectPblmProvinceResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE <include refid="page_where" /> order by name, UPTM desc
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_RECT_PBLM_PROVINCE <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
- insert into BIS_INSP_RECT_PBLM_PROVINCE( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_RECT_PBLM_PROVINCE set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
- update BIS_INSP_RECT_PBLM_PROVINCE set DATA_STAT='9' <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_RECT_PBLM_PROVINCE set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
- update BIS_INSP_RECT_PBLM_PROVINCE
- <trim prefix="set" suffixOverrides=",">
- <if test="chkStateNote != null and chkStateNote != ''">CHK_STATE_NOTE = #{chkStateNote},</if>
- <if test="jchkStateNote != null and jchkStateNote != ''">JCHK_STATE_NOTE = #{jchkStateNote},</if>
- <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
- <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="inspPblmTm != null">INSP_PBLM_TM = #{inspPblmTm},</if>
- <if test="crrtTm != null">CRRT_TM = #{crrtTm},</if>
- <if test="rectConc != null and rectConc != ''">RECT_CONC = #{rectConc},</if>
- <if test="rectTm != null">RECT_TM = #{rectTm},</if>
- <if test="rectNote != null and rectNote != ''">RECT_NOTE = #{rectNote},</if>
- <if test="rectPersId != null and rectPersId != ''">RECT_PERS_ID = #{rectPersId},</if>
- <if test="rectPersNm != null and rectPersNm != ''">RECT_PERS_NM = #{rectPersNm},</if>
- <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
- <if test="isTranc != null and isTranc != ''">IS_TRANC = #{isTranc},</if>
- <if test="satOrgId != null and satOrgId != ''">SAT_ORG_ID = #{satOrgId},</if>
- <if test="satOrgName != null and satOrgName != ''">SAT_ORG_NAME = #{satOrgName},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="rectId != null and rectId != ''">RECT_ID = #{rectId},</if>
- <if test="code != null and code != ''">CODE = #{code},</if>
- <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
- <if test="name != null and name != ''">NAME = #{name},</if>
- <if test="regid != null and regid != ''">REGID = #{regid},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="jchkState != null and jchkState != ''">JCHK_STATE = #{jchkState},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
- update BIS_INSP_RECT_PBLM_PROVINCE
- <trim prefix="set" suffixOverrides=",">
- <if test="chkStateNote != null and chkStateNote != ''">CHK_STATE_NOTE = #{chkStateNote},</if>
- <if test="jchkStateNote != null and jchkStateNote != ''">JCHK_STATE_NOTE = #{jchkStateNote},</if>
- <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
- <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="inspPblmTm != null">INSP_PBLM_TM = #{inspPblmTm},</if>
- <if test="crrtTm != null">CRRT_TM = #{crrtTm},</if>
- <if test="rectConc != null and rectConc != ''">RECTONC = #{rectConc},</if>
- <if test="rectTm != null">RECT_TM = #{rectTm},</if>
- <if test="rectNote != null and rectNote != ''">RECT_NOTE = #{rectNote},</if>
- <if test="rectPersId != null and rectPersId != ''">RECT_PERS_ID = #{rectPersId},</if>
- <if test="rectPersNm != null and rectPersNm != ''">RECT_PERS_NM = #{rectPersNm},</if>
- <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
- <if test="isTranc != null and isTranc != ''">IS_TRANC = #{isTranc},</if>
- <if test="satOrgId != null and satOrgId != ''">SAT_ORG_ID = #{satOrgId},</if>
- <if test="satOrgName != null and satOrgName != ''">SAT_ORG_NAME = #{satOrgName},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="rectId != null and rectId != ''">RECT_ID = #{rectId},</if>
- <if test="code != null and code != ''">CODE = #{code},</if>
- <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
- <if test="name != null and name != ''">NAME = #{name},</if>
- <if test="regid != null and regid != ''">REGID = #{regid},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="jchkState != null and jchkState != ''">JCHK_STATE = #{jchkState},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <!-- 其他自定义SQL -->
- <select id="getPrjctSize" resultType="java.lang.Integer">
- select count(distinct(name))con from BIS_INSP_RECT_PBLM_PROVINCE t where rect_id=#{rectId} and DATA_STAT='0'
- </select>
- </mapper>
|