123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- <?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.steerinfo.ems.tsubmitted.mapper.TSubmittedMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.ems.tsubmitted.model.TSubmitted">
- <id column="CONSTRUID" jdbcType="VARCHAR" property="construid" />
- <result column="DEVICENAME" jdbcType="VARCHAR" property="devicename" />
- <result column="EQUIPMENT" jdbcType="VARCHAR" property="equipment" />
- <result column="CONSTRUCTIONUNITS" jdbcType="VARCHAR" property="constructionunits" />
- <result column="CONSTRUPEOPLE" jdbcType="VARCHAR" property="construpeople" />
- <result column="CONSTRUDATE" jdbcType="VARCHAR" property="construdate" />
- <result column="CONSTRUCONTENT" jdbcType="VARCHAR" property="construcontent" />
- <result column="CONSTRUFILE" jdbcType="VARCHAR" property="construfile" />
- <result column="SIGNTIME" jdbcType="VARCHAR" property="signtime" />
- <result column="BZ" jdbcType="VARCHAR" property="bz" />
- <result column="IMAGEURL" jdbcType="VARCHAR" property="imageurl" />
- <result column="IMAGENAME" jdbcType="VARCHAR" property="imagename" />
- <result column="MAXID" jdbcType="DECIMAL" property="maxid" />
- <result column="DECLAREID" jdbcType="VARCHAR" property="declareid" />
- </resultMap>
- <sql id="columns">
- CONSTRUID, DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS, CONSTRUPEOPLE, CONSTRUDATE,
- CONSTRUCONTENT, CONSTRUFILE, SIGNTIME, BZ, IMAGEURL, IMAGENAME, MAXID, DECLAREID
- </sql>
- <sql id="columns_alias">
- t.CONSTRUID, t.DEVICENAME, t.EQUIPMENT, t.CONSTRUCTIONUNITS, t.CONSTRUPEOPLE, t.CONSTRUDATE,
- t.CONSTRUCONTENT, t.CONSTRUFILE, t.SIGNTIME, t.BZ, t.IMAGEURL, t.IMAGENAME, t.MAXID,
- t.DECLAREID
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM T_SUBMITTED
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM T_SUBMITTED t
- </sql>
- <sql id="where">
- <where>
- <if test="construid != null and construid != ''">
- and CONSTRUID = #{construid}
- </if>
- <if test="devicename != null and devicename != ''">
- and DEVICENAME = #{devicename}
- </if>
- <if test="equipment != null and equipment != ''">
- and EQUIPMENT = #{equipment}
- </if>
- <if test="constructionunits != null and constructionunits != ''">
- and CONSTRUCTIONUNITS = #{constructionunits}
- </if>
- <if test="construpeople != null and construpeople != ''">
- and CONSTRUPEOPLE = #{construpeople}
- </if>
- <if test="construdate != null and construdate != ''">
- and CONSTRUDATE = #{construdate}
- </if>
- <if test="construcontent != null and construcontent != ''">
- and CONSTRUCONTENT = #{construcontent}
- </if>
- <if test="construfile != null and construfile != ''">
- and CONSTRUFILE = #{construfile}
- </if>
- <if test="signtime != null and signtime != ''">
- and SIGNTIME = #{signtime}
- </if>
- <if test="bz != null and bz != ''">
- and BZ = #{bz}
- </if>
- <if test="imageurl != null and imageurl != ''">
- and IMAGEURL = #{imageurl}
- </if>
- <if test="imagename != null and imagename != ''">
- and IMAGENAME = #{imagename}
- </if>
- <if test="maxid != null">
- and MAXID = #{maxid}
- </if>
- <if test="declareid != null and declareid != ''">
- and DECLAREID = #{declareid}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="construid != null and construid != ''">
- and CONSTRUID LIKE '%${construid}%'
- </if>
- <if test="devicename != null and devicename != ''">
- and DEVICENAME LIKE '%${devicename}%'
- </if>
- <if test="equipment != null and equipment != ''">
- and EQUIPMENT LIKE '%${equipment}%'
- </if>
- <if test="constructionunits != null and constructionunits != ''">
- and CONSTRUCTIONUNITS LIKE '%${constructionunits}%'
- </if>
- <if test="construpeople != null and construpeople != ''">
- and CONSTRUPEOPLE LIKE '%${construpeople}%'
- </if>
- <if test="construdate != null and construdate != ''">
- and CONSTRUDATE LIKE '%${construdate}%'
- </if>
- <if test="construcontent != null and construcontent != ''">
- and CONSTRUCONTENT LIKE '%${construcontent}%'
- </if>
- <if test="construfile != null and construfile != ''">
- and CONSTRUFILE LIKE '%${construfile}%'
- </if>
- <if test="signtime != null and signtime != ''">
- and SIGNTIME LIKE '%${signtime}%'
- </if>
- <if test="bz != null and bz != ''">
- and BZ LIKE '%${bz}%'
- </if>
- <if test="imageurl != null and imageurl != ''">
- and IMAGEURL LIKE '%${imageurl}%'
- </if>
- <if test="imagename != null and imagename != ''">
- and IMAGENAME LIKE '%${imagename}%'
- </if>
- <if test="maxid != null">
- and MAXID = #{maxid}
- </if>
- <if test="declareid != null and declareid != ''">
- and DECLAREID LIKE '%${declareid}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from T_SUBMITTED
- where CONSTRUID = #{construid,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from T_SUBMITTED
- where 1!=1
- <if test="devicename != null and devicename != ''">
- or DEVICENAME = #{devicename}
- </if>
- <if test="equipment != null and equipment != ''">
- or EQUIPMENT = #{equipment}
- </if>
- <if test="constructionunits != null and constructionunits != ''">
- or CONSTRUCTIONUNITS = #{constructionunits}
- </if>
- <if test="construpeople != null and construpeople != ''">
- or CONSTRUPEOPLE = #{construpeople}
- </if>
- <if test="construdate != null and construdate != ''">
- or CONSTRUDATE = #{construdate}
- </if>
- <if test="construcontent != null and construcontent != ''">
- or CONSTRUCONTENT = #{construcontent}
- </if>
- <if test="construfile != null and construfile != ''">
- or CONSTRUFILE = #{construfile}
- </if>
- <if test="signtime != null and signtime != ''">
- or SIGNTIME = #{signtime}
- </if>
- <if test="bz != null and bz != ''">
- or BZ = #{bz}
- </if>
- <if test="imageurl != null and imageurl != ''">
- or IMAGEURL = #{imageurl}
- </if>
- <if test="imagename != null and imagename != ''">
- or IMAGENAME = #{imagename}
- </if>
- <if test="maxid != null">
- or MAXID = #{maxid}
- </if>
- <if test="declareid != null and declareid != ''">
- or DECLAREID = #{declareid}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
- insert into T_SUBMITTED (CONSTRUID, DEVICENAME, EQUIPMENT,
- CONSTRUCTIONUNITS, CONSTRUPEOPLE, CONSTRUDATE,
- CONSTRUCONTENT, CONSTRUFILE, SIGNTIME,
- BZ, IMAGEURL, IMAGENAME,
- MAXID, DECLAREID)
- values (#{construid,jdbcType=VARCHAR}, #{devicename,jdbcType=VARCHAR}, #{equipment,jdbcType=VARCHAR},
- #{constructionunits,jdbcType=VARCHAR}, #{construpeople,jdbcType=VARCHAR}, #{construdate,jdbcType=VARCHAR},
- #{construcontent,jdbcType=VARCHAR}, #{construfile,jdbcType=VARCHAR}, #{signtime,jdbcType=VARCHAR},
- #{bz,jdbcType=VARCHAR}, #{imageurl,jdbcType=VARCHAR}, #{imagename,jdbcType=VARCHAR},
- #{maxid,jdbcType=DECIMAL}, #{declareid,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
- insert into T_SUBMITTED
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="construid != null">
- CONSTRUID,
- </if>
- <if test="devicename != null">
- DEVICENAME,
- </if>
- <if test="equipment != null">
- EQUIPMENT,
- </if>
- <if test="constructionunits != null">
- CONSTRUCTIONUNITS,
- </if>
- <if test="construpeople != null">
- CONSTRUPEOPLE,
- </if>
- <if test="construdate != null">
- CONSTRUDATE,
- </if>
- <if test="construcontent != null">
- CONSTRUCONTENT,
- </if>
- <if test="construfile != null">
- CONSTRUFILE,
- </if>
- <if test="signtime != null">
- SIGNTIME,
- </if>
- <if test="bz != null">
- BZ,
- </if>
- <if test="imageurl != null">
- IMAGEURL,
- </if>
- <if test="imagename != null">
- IMAGENAME,
- </if>
- <if test="maxid != null">
- MAXID,
- </if>
- <if test="declareid != null">
- DECLAREID,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="construid != null">
- #{construid,jdbcType=VARCHAR},
- </if>
- <if test="devicename != null">
- #{devicename,jdbcType=VARCHAR},
- </if>
- <if test="equipment != null">
- #{equipment,jdbcType=VARCHAR},
- </if>
- <if test="constructionunits != null">
- #{constructionunits,jdbcType=VARCHAR},
- </if>
- <if test="construpeople != null">
- #{construpeople,jdbcType=VARCHAR},
- </if>
- <if test="construdate != null">
- #{construdate,jdbcType=VARCHAR},
- </if>
- <if test="construcontent != null">
- #{construcontent,jdbcType=VARCHAR},
- </if>
- <if test="construfile != null">
- #{construfile,jdbcType=VARCHAR},
- </if>
- <if test="signtime != null">
- #{signtime,jdbcType=VARCHAR},
- </if>
- <if test="bz != null">
- #{bz,jdbcType=VARCHAR},
- </if>
- <if test="imageurl != null">
- #{imageurl,jdbcType=VARCHAR},
- </if>
- <if test="imagename != null">
- #{imagename,jdbcType=VARCHAR},
- </if>
- <if test="maxid != null">
- #{maxid,jdbcType=DECIMAL},
- </if>
- <if test="declareid != null">
- #{declareid,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
- update T_SUBMITTED
- set DEVICENAME = #{devicename,jdbcType=VARCHAR},
- EQUIPMENT = #{equipment,jdbcType=VARCHAR},
- CONSTRUCTIONUNITS = #{constructionunits,jdbcType=VARCHAR},
- CONSTRUPEOPLE = #{construpeople,jdbcType=VARCHAR},
- CONSTRUDATE = #{construdate,jdbcType=VARCHAR},
- CONSTRUCONTENT = #{construcontent,jdbcType=VARCHAR},
- CONSTRUFILE = #{construfile,jdbcType=VARCHAR},
- SIGNTIME = #{signtime,jdbcType=VARCHAR},
- BZ = #{bz,jdbcType=VARCHAR},
- IMAGEURL = #{imageurl,jdbcType=VARCHAR},
- IMAGENAME = #{imagename,jdbcType=VARCHAR},
- MAXID = #{maxid,jdbcType=DECIMAL},
- DECLAREID = #{declareid,jdbcType=VARCHAR}
- where CONSTRUID = #{construid,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
- update T_SUBMITTED
- <set>
- <if test="devicename != null">
- DEVICENAME = #{devicename,jdbcType=VARCHAR},
- </if>
- <if test="equipment != null">
- EQUIPMENT = #{equipment,jdbcType=VARCHAR},
- </if>
- <if test="constructionunits != null">
- CONSTRUCTIONUNITS = #{constructionunits,jdbcType=VARCHAR},
- </if>
- <if test="construpeople != null">
- CONSTRUPEOPLE = #{construpeople,jdbcType=VARCHAR},
- </if>
- <if test="construdate != null">
- CONSTRUDATE = #{construdate,jdbcType=VARCHAR},
- </if>
- <if test="construcontent != null">
- CONSTRUCONTENT = #{construcontent,jdbcType=VARCHAR},
- </if>
- <if test="construfile != null">
- CONSTRUFILE = #{construfile,jdbcType=VARCHAR},
- </if>
- <if test="signtime != null">
- SIGNTIME = #{signtime,jdbcType=VARCHAR},
- </if>
- <if test="bz != null">
- BZ = #{bz,jdbcType=VARCHAR},
- </if>
- <if test="imageurl != null">
- IMAGEURL = #{imageurl,jdbcType=VARCHAR},
- </if>
- <if test="imagename != null">
- IMAGENAME = #{imagename,jdbcType=VARCHAR},
- </if>
- <if test="maxid != null">
- MAXID = #{maxid,jdbcType=DECIMAL},
- </if>
- <if test="declareid != null">
- DECLAREID = #{declareid,jdbcType=VARCHAR},
- </if>
- </set>
- where CONSTRUID = #{construid,jdbcType=VARCHAR}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- <include refid="select"/>
- where CONSTRUID = #{construid,jdbcType=VARCHAR}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="where"/>
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="whereLike"/>
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into T_SUBMITTED
- (CONSTRUID,
- DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS,
- CONSTRUPEOPLE, CONSTRUDATE, CONSTRUCONTENT,
- CONSTRUFILE, SIGNTIME, BZ,
- IMAGEURL, IMAGENAME, MAXID,
- DECLAREID)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.construid,jdbcType=VARCHAR},
- #{item.devicename,jdbcType=VARCHAR}, #{item.equipment,jdbcType=VARCHAR}, #{item.constructionunits,jdbcType=VARCHAR},
- #{item.construpeople,jdbcType=VARCHAR}, #{item.construdate,jdbcType=VARCHAR}, #{item.construcontent,jdbcType=VARCHAR},
- #{item.construfile,jdbcType=VARCHAR}, #{item.signtime,jdbcType=VARCHAR}, #{item.bz,jdbcType=VARCHAR},
- #{item.imageurl,jdbcType=VARCHAR}, #{item.imagename,jdbcType=VARCHAR}, #{item.maxid,jdbcType=DECIMAL},
- #{item.declareid,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update T_SUBMITTED
- set
- CONSTRUID=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.construid,jdbcType=VARCHAR}
- </foreach>
- ,DEVICENAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.devicename,jdbcType=VARCHAR}
- </foreach>
- ,EQUIPMENT=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.equipment,jdbcType=VARCHAR}
- </foreach>
- ,CONSTRUCTIONUNITS=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.constructionunits,jdbcType=VARCHAR}
- </foreach>
- ,CONSTRUPEOPLE=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.construpeople,jdbcType=VARCHAR}
- </foreach>
- ,CONSTRUDATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.construdate,jdbcType=VARCHAR}
- </foreach>
- ,CONSTRUCONTENT=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.construcontent,jdbcType=VARCHAR}
- </foreach>
- ,CONSTRUFILE=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.construfile,jdbcType=VARCHAR}
- </foreach>
- ,SIGNTIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.signtime,jdbcType=VARCHAR}
- </foreach>
- ,BZ=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
- </foreach>
- ,IMAGEURL=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.imageurl,jdbcType=VARCHAR}
- </foreach>
- ,IMAGENAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.imagename,jdbcType=VARCHAR}
- </foreach>
- ,MAXID=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.maxid,jdbcType=DECIMAL}
- </foreach>
- ,DECLAREID=
- <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
- when #{item.construid,jdbcType=VARCHAR} then #{item.declareid,jdbcType=VARCHAR}
- </foreach>
- where CONSTRUID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.construid,jdbcType=VARCHAR}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from T_SUBMITTED
- where CONSTRUID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="selectMaxId" resultType="java.lang.Integer" >
- SELECT MAX(MAXID) FROM T_SUBMITTED where SIGNTIME LIKE '%${signtime}%'
- </select>
- </mapper>
|