| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <?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.ObjInspPblmsRsvrDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.ObjInspPblmsRsvr" id="objInspPblmsRsvrResultMap">
- <result property="pguid" column="PGUID"/>
- <result property="sn" column="SN"/>
- <result property="inspPblmsName" column="INSP_PBLMS_NAME"/>
- <result property="inspObjType" column="INSP_OBJ_TYPE"/>
- <result property="sort1" column="SORT1"/>
- <result property="sort2" column="SORT2"/>
- <result property="relBasis" column="REL_BASIS"/>
- <result property="checkPoint" column="CHECK_POINT"/>
- <result property="pblmDesc" column="PBLM_DESC"/>
- <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="recPers" column="REC_PERS"/>
- <result property="note" column="NOTE"/>
- <result property="type" column="TYPE"/>
- <result property="objInspPblms" column="OBJ_INSP_PBLMS"/>
- <result property="attach" column="ATTACH"/>
- <result property="snClass" column="SN_CLASS"/>
- <result property="sheet" column="SHEET"/>
- <result property="filename" column="FILENAME"/>
- <result property="snNum" column="SN_NUM"/>
- <result property="guid" column="GUID"/>
- </resultMap>
-
- <sql id="table_columns">
- PGUID,
- SN,
- INSP_PBLMS_NAME,
- INSP_OBJ_TYPE,
- SORT1,
- SORT2,
- REL_BASIS,
- CHECK_POINT,
- PBLM_DESC,
- INSP_PBLM_CATE,
- DATA_STAT,
- COLL_TIME,
- REC_PERS,
- NOTE,
- TYPE,
- OBJ_INSP_PBLMS,
- ATTACH,
- SN_CLASS,
- SHEET,
- FILENAME,
- SN_NUM,
- GUID
- </sql>
- <sql id="entity_properties">
- #{pguid},
- #{sn},
- #{inspPblmsName},
- #{inspObjType},
- #{sort1},
- #{sort2},
- #{relBasis},
- #{checkPoint},
- #{pblmDesc},
- #{inspPblmCate},
- #{dataStat},
- #{collTime},
- #{recPers},
- #{note},
- #{type},
- #{objInspPblms},
- #{attach},
- #{snClass},
- #{sheet},
- #{filename},
- #{snNum},
- #{guid}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="sn != null and sn != ''">and SN = #{sn}</if>
- <if test="inspPblmsName != null and inspPblmsName != ''">and INSP_PBLMS_NAME = #{inspPblmsName}</if>
- <if test="inspObjType != null and inspObjType != ''">and INSP_OBJ_TYPE = #{inspObjType}</if>
- <if test="sort1 != null and sort1 != ''">and SORT1 = #{sort1}</if>
- <if test="sort2 != null and sort2 != ''">and SORT2 = #{sort2}</if>
- <if test="relBasis != null and relBasis != ''">and REL_BASIS = #{relBasis}</if>
- <if test="checkPoint != null and checkPoint != ''">and CHECK_POINT = #{checkPoint}</if>
- <if test="pblmDesc != null and pblmDesc != ''">and PBLM_DESC = #{pblmDesc}</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="type != null and type != ''">and TYPE = #{type}</if>
- <if test="objInspPblms != null and objInspPblms != ''">and OBJ_INSP_PBLMS = #{objInspPblms}</if>
- <if test="attach != null and attach != ''">and ATTACH = #{attach}</if>
- <if test="snClass != null and snClass != ''">and SN_CLASS = #{snClass}</if>
- <if test="sheet != null and sheet != ''">and SHEET = #{sheet}</if>
- <if test="filename != null and filename != ''">and FILENAME = #{filename}</if>
- <if test="snNum != null and snNum != ''">and SN_NUM = #{snNum}</if>
- <if test="guid != null and guid != ''">and GUID = #{guid}</if>
- </trim>
- </sql>
- <select id="get" resultMap="objInspPblmsRsvrResultMap" parameterType="String" >
- select <include refid="table_columns" /> from obj_insp_pblms where GUID = #{id}
- </select>
- <!--obj_insp_pblms_new-->
- <select id="getOldBz" resultMap="objInspPblmsRsvrResultMap" parameterType="String" >
- select <include refid="table_columns" /> from obj_insp_pblms_new where GUID = #{id}
- </select>
- <select id="getBy" resultMap="objInspPblmsRsvrResultMap">
- select <include refid="table_columns" /> from obj_insp_pblms <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="objInspPblmsRsvrResultMap">
- select <include refid="table_columns" /> from obj_insp_pblms
- </select>
- <select id="findList" resultMap="objInspPblmsRsvrResultMap">
- select <include refid="table_columns" /> from obj_insp_pblms <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from obj_insp_pblms <include refid="page_where" />
- </select>
- <select id="findRsvrDto" resultType="cn.com.goldenwater.dcproj.model.RsvrDto">
- select pid as id ,ad_code from gw_pnm
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.ObjInspPblmsRsvr">
- insert into obj_insp_pblms( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from obj_insp_pblms where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.ObjInspPblmsRsvr">
- delete from obj_insp_pblms <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update obj_insp_pblms set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.ObjInspPblmsRsvr">
- update obj_insp_pblms
- <trim prefix="set" suffixOverrides=",">
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="inspPblmsName != null and inspPblmsName != ''">INSP_PBLMS_NAME = #{inspPblmsName},</if>
- <if test="inspObjType != null and inspObjType != ''">INSP_OBJ_TYPE = #{inspObjType},</if>
- <if test="sort1 != null and sort1 != ''">SORT1 = #{sort1},</if>
- <if test="sort2 != null and sort2 != ''">SORT2 = #{sort2},</if>
- <if test="relBasis != null and relBasis != ''">REL_BASIS = #{relBasis},</if>
- <if test="checkPoint != null and checkPoint != ''">CHECK_POINT = #{checkPoint},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="objInspPblms != null and objInspPblms != ''">OBJ_INSP_PBLMS = #{objInspPblms},</if>
- <if test="attach != null and attach != ''">ATTACH = #{attach},</if>
- <if test="snClass != null and snClass != ''">SN_CLASS = #{snClass},</if>
- <if test="sheet != null and sheet != ''">SHEET = #{sheet},</if>
- <if test="filename != null and filename != ''">FILENAME = #{filename},</if>
- <if test="snNum != null and snNum != ''">SN_NUM = #{snNum},</if>
- <if test="guid != null and guid != ''">GUID = #{guid},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.ObjInspPblmsRsvr">
- update obj_insp_pblms
- <trim prefix="set" suffixOverrides=",">
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="inspPblmsName != null and inspPblmsName != ''">INSP_PBLMS_NAME = #{inspPblmsName},</if>
- <if test="inspObjType != null and inspObjType != ''">INSP_OBJ_TYPE = #{inspObjType},</if>
- <if test="sort1 != null and sort1 != ''">SORT1 = #{sort1},</if>
- <if test="sort2 != null and sort2 != ''">SORT2 = #{sort2},</if>
- <if test="relBasis != null and relBasis != ''">REL_BASIS = #{relBasis},</if>
- <if test="checkPoint != null and checkPoint != ''">CHECK_POINT = #{checkPoint},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="objInspPblms != null and objInspPblms != ''">OBJ_INSP_PBLMS = #{objInspPblms},</if>
- <if test="attach != null and attach != ''">ATTACH = #{attach},</if>
- <if test="snClass != null and snClass != ''">SN_CLASS = #{snClass},</if>
- <if test="sheet != null and sheet != ''">SHEET = #{sheet},</if>
- <if test="filename != null and filename != ''">FILENAME = #{filename},</if>
- <if test="snNum != null and snNum != ''">SN_NUM = #{snNum},</if>
- <if test="guid != null and guid != ''">GUID = #{guid},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|