|
@@ -5,13 +5,14 @@
|
|
|
<id column="TIMES_ID" jdbcType="DECIMAL" property="timesId" />
|
|
|
<result column="TIMES_VALUE" jdbcType="TIMESTAMP" property="timesValue" />
|
|
|
<result column="TIMES_TYPE" jdbcType="DECIMAL" property="timesType" />
|
|
|
- <result column="TIMES_REMARK" jdbcType="DECIMAL" property="timesRemark" />
|
|
|
+ <result column="TIMES_REMARK" jdbcType="VARCHAR" property="timesRemark" />
|
|
|
+ <result column="TIMES_CAPACITY_NUMBER" jdbcType="VARCHAR" property="timesCapacityNumber" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- TIMES_ID, TIMES_VALUE, TIMES_TYPE, TIMES_REMARK
|
|
|
+ TIMES_ID, TIMES_VALUE, TIMES_TYPE, TIMES_REMARK, TIMES_CAPACITY_NUMBER
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.TIMES_ID, t.TIMES_VALUE, t.TIMES_TYPE, t.TIMES_REMARK
|
|
|
+ t.TIMES_ID, t.TIMES_VALUE, t.TIMES_TYPE, t.TIMES_REMARK, t.TIMES_CAPACITY_NUMBER
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns"/> FROM DIL_CAPACITY_TIMES
|
|
@@ -20,7 +21,7 @@
|
|
|
SELECT <include refid="columns_alias"/> FROM DIL_CAPACITY_TIMES t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="timesId != null">
|
|
|
and TIMES_ID = #{timesId}
|
|
|
</if>
|
|
@@ -30,13 +31,16 @@
|
|
|
<if test="timesType != null">
|
|
|
and TIMES_TYPE = #{timesType}
|
|
|
</if>
|
|
|
- <if test="timesRemark != null">
|
|
|
+ <if test="timesRemark != null and timesRemark != ''">
|
|
|
and TIMES_REMARK = #{timesRemark}
|
|
|
</if>
|
|
|
+ <if test="timesCapacityNumber != null and timesCapacityNumber != ''">
|
|
|
+ and TIMES_CAPACITY_NUMBER = #{timesCapacityNumber}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="timesId != null">
|
|
|
and TIMES_ID = #{timesId}
|
|
|
</if>
|
|
@@ -46,8 +50,11 @@
|
|
|
<if test="timesType != null">
|
|
|
and TIMES_TYPE = #{timesType}
|
|
|
</if>
|
|
|
- <if test="timesRemark != null">
|
|
|
- and TIMES_REMARK = #{timesRemark}
|
|
|
+ <if test="timesRemark != null and timesRemark != ''">
|
|
|
+ and TIMES_REMARK LIKE '%${timesRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="timesCapacityNumber != null and timesCapacityNumber != ''">
|
|
|
+ and TIMES_CAPACITY_NUMBER LIKE '%${timesCapacityNumber}%'
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
@@ -57,22 +64,25 @@
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from DIL_CAPACITY_TIMES
|
|
|
- where 1!=1
|
|
|
- <if test="timesValue != null">
|
|
|
- or TO_CHAR(TIMES_VALUE,'yyyy-MM-dd') = '#{timesValue}'
|
|
|
- </if>
|
|
|
- <if test="timesType != null">
|
|
|
- or TIMES_TYPE = #{timesType}
|
|
|
- </if>
|
|
|
- <if test="timesRemark != null">
|
|
|
- or TIMES_REMARK = #{timesRemark}
|
|
|
- </if>
|
|
|
+ where 1!=1
|
|
|
+ <if test="timesValue != null">
|
|
|
+ or TO_CHAR(TIMES_VALUE,'yyyy-MM-dd') = '#{timesValue}'
|
|
|
+ </if>
|
|
|
+ <if test="timesType != null">
|
|
|
+ or TIMES_TYPE = #{timesType}
|
|
|
+ </if>
|
|
|
+ <if test="timesRemark != null and timesRemark != ''">
|
|
|
+ or TIMES_REMARK = #{timesRemark}
|
|
|
+ </if>
|
|
|
+ <if test="timesCapacityNumber != null and timesCapacityNumber != ''">
|
|
|
+ or TIMES_CAPACITY_NUMBER = #{timesCapacityNumber}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
- insert into DIL_CAPACITY_TIMES (TIMES_ID, TIMES_VALUE, TIMES_TYPE,
|
|
|
- TIMES_REMARK)
|
|
|
- values (#{timesId,jdbcType=DECIMAL}, #{timesValue,jdbcType=TIMESTAMP}, #{timesType,jdbcType=DECIMAL},
|
|
|
- #{timesRemark,jdbcType=DECIMAL})
|
|
|
+ insert into DIL_CAPACITY_TIMES (TIMES_ID, TIMES_VALUE, TIMES_TYPE,
|
|
|
+ TIMES_REMARK, TIMES_CAPACITY_NUMBER)
|
|
|
+ values (#{timesId,jdbcType=DECIMAL}, #{timesValue,jdbcType=TIMESTAMP}, #{timesType,jdbcType=DECIMAL},
|
|
|
+ #{timesRemark,jdbcType=VARCHAR}, #{timesCapacityNumber,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
insert into DIL_CAPACITY_TIMES
|
|
@@ -89,6 +99,9 @@
|
|
|
<if test="timesRemark != null">
|
|
|
TIMES_REMARK,
|
|
|
</if>
|
|
|
+ <if test="timesCapacityNumber != null">
|
|
|
+ TIMES_CAPACITY_NUMBER,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="timesId != null">
|
|
@@ -101,15 +114,19 @@
|
|
|
#{timesType,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="timesRemark != null">
|
|
|
- #{timesRemark,jdbcType=DECIMAL},
|
|
|
+ #{timesRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="timesCapacityNumber != null">
|
|
|
+ #{timesCapacityNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
|
update DIL_CAPACITY_TIMES
|
|
|
set TIMES_VALUE = #{timesValue,jdbcType=TIMESTAMP},
|
|
|
- TIMES_TYPE = #{timesType,jdbcType=DECIMAL},
|
|
|
- TIMES_REMARK = #{timesRemark,jdbcType=DECIMAL}
|
|
|
+ TIMES_TYPE = #{timesType,jdbcType=DECIMAL},
|
|
|
+ TIMES_REMARK = #{timesRemark,jdbcType=VARCHAR},
|
|
|
+ TIMES_CAPACITY_NUMBER = #{timesCapacityNumber,jdbcType=VARCHAR}
|
|
|
where TIMES_ID = #{timesId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilCapacityTimes">
|
|
@@ -122,7 +139,10 @@
|
|
|
TIMES_TYPE = #{timesType,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="timesRemark != null">
|
|
|
- TIMES_REMARK = #{timesRemark,jdbcType=DECIMAL},
|
|
|
+ TIMES_REMARK = #{timesRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="timesCapacityNumber != null">
|
|
|
+ TIMES_CAPACITY_NUMBER = #{timesCapacityNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where TIMES_ID = #{timesId,jdbcType=DECIMAL}
|
|
@@ -140,49 +160,53 @@
|
|
|
<include refid="whereLike"/>
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
- insert into DIL_CAPACITY_TIMES
|
|
|
- (TIMES_ID,
|
|
|
- TIMES_VALUE, TIMES_TYPE, TIMES_REMARK
|
|
|
- )
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.timesId,jdbcType=DECIMAL},
|
|
|
- #{item.timesValue,jdbcType=TIMESTAMP}, #{item.timesType,jdbcType=DECIMAL}, #{item.timesRemark,jdbcType=DECIMAL}
|
|
|
- from dual
|
|
|
- </foreach> )
|
|
|
+ insert into DIL_CAPACITY_TIMES
|
|
|
+ (TIMES_ID,
|
|
|
+ TIMES_VALUE, TIMES_TYPE, TIMES_REMARK,
|
|
|
+ TIMES_CAPACITY_NUMBER)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.timesId,jdbcType=DECIMAL},
|
|
|
+ #{item.timesValue,jdbcType=TIMESTAMP}, #{item.timesType,jdbcType=DECIMAL}, #{item.timesRemark,jdbcType=VARCHAR},
|
|
|
+ #{item.timesCapacityNumber,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update DIL_CAPACITY_TIMES
|
|
|
- set
|
|
|
- TIMES_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
- when #{item.timesId,jdbcType=DECIMAL} then #{item.timesId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,TIMES_VALUE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
- when #{item.timesId,jdbcType=DECIMAL} then #{item.timesValue,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,TIMES_TYPE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
- when #{item.timesId,jdbcType=DECIMAL} then #{item.timesType,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,TIMES_REMARK=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
- when #{item.timesId,jdbcType=DECIMAL} then #{item.timesRemark,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- where TIMES_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
- #{item.timesId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
+ update DIL_CAPACITY_TIMES
|
|
|
+ set
|
|
|
+ TIMES_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_VALUE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesValue,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_TYPE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesType,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,TIMES_CAPACITY_NUMBER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case TIMES_ID" close="end">
|
|
|
+ when #{item.timesId,jdbcType=DECIMAL} then #{item.timesCapacityNumber,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where TIMES_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.timesId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from DIL_CAPACITY_TIMES
|
|
|
- where TIMES_ID in
|
|
|
+ where TIMES_ID in
|
|
|
<foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
+
|
|
|
</mapper>
|