|
@@ -13,20 +13,22 @@
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
<result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
|
|
|
+ <result column="WORK_TIME" jdbcType="TIMESTAMP" property="workTime" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
RESULT_ID, RESULT_NUMBER, HARBOR_ID, RESULT_TONNAGE, RESULT_CLEARING, INSERT_USERNAME,
|
|
|
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, BATCH_ID
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, BATCH_ID, WORK_TIME
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.RESULT_ID, t.RESULT_NUMBER, t.HARBOR_ID, t.RESULT_TONNAGE, t.RESULT_CLEARING, t.INSERT_USERNAME,
|
|
|
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.BATCH_ID
|
|
|
+ t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.BATCH_ID,
|
|
|
+ t.WORK_TIME
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM WMSH_OUTBOUND_RESULT
|
|
|
+ SELECT <include refid="columns" /> FROM WMSH_OUTBOUND_RESULT
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias"/> FROM WMSH_OUTBOUND_RESULT t
|
|
|
+ SELECT <include refid="columns_alias" /> FROM WMSH_OUTBOUND_RESULT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
<where>
|
|
@@ -63,6 +65,9 @@
|
|
|
<if test="batchId != null">
|
|
|
and BATCH_ID = #{batchId}
|
|
|
</if>
|
|
|
+ <if test="workTime != null">
|
|
|
+ and TO_CHAR(WORK_TIME,'yyyy-MM-dd') = #{workTime}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -100,6 +105,9 @@
|
|
|
<if test="batchId != null">
|
|
|
and BATCH_ID = #{batchId}
|
|
|
</if>
|
|
|
+ <if test="workTime != null">
|
|
|
+ and TO_CHAR(WORK_TIME,'yyyy-MM-dd') = #{workTime}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -139,16 +147,21 @@
|
|
|
<if test="batchId != null">
|
|
|
or BATCH_ID = #{batchId}
|
|
|
</if>
|
|
|
+ <if test="workTime != null">
|
|
|
+ or TO_CHAR(WORK_TIME,'yyyy-MM-dd') = '#{workTime}'
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
|
|
|
insert into WMSH_OUTBOUND_RESULT (RESULT_ID, RESULT_NUMBER, HARBOR_ID,
|
|
|
RESULT_TONNAGE, RESULT_CLEARING, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
- INSERT_UPDATE_REMARK, BATCH_ID)
|
|
|
+ INSERT_UPDATE_REMARK, BATCH_ID, WORK_TIME
|
|
|
+ )
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{harborId,jdbcType=DECIMAL},
|
|
|
#{resultTonnage,jdbcType=DECIMAL}, #{resultClearing,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
|
|
|
#{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{insertUpdateRemark,jdbcType=VARCHAR}, #{batchId,jdbcType=DECIMAL})
|
|
|
+ #{insertUpdateRemark,jdbcType=VARCHAR}, #{batchId,jdbcType=DECIMAL}, #{workTime,jdbcType=TIMESTAMP}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
|
|
|
insert into WMSH_OUTBOUND_RESULT
|
|
@@ -186,6 +199,9 @@
|
|
|
<if test="batchId != null">
|
|
|
BATCH_ID,
|
|
|
</if>
|
|
|
+ <if test="workTime != null">
|
|
|
+ WORK_TIME,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -221,6 +237,9 @@
|
|
|
<if test="batchId != null">
|
|
|
#{batchId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="workTime != null">
|
|
|
+ #{workTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
|
|
@@ -234,7 +253,8 @@
|
|
|
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- BATCH_ID = #{batchId,jdbcType=DECIMAL}
|
|
|
+ BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ WORK_TIME = #{workTime,jdbcType=TIMESTAMP}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
|
|
@@ -270,20 +290,23 @@
|
|
|
<if test="batchId != null">
|
|
|
BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="workTime != null">
|
|
|
+ WORK_TIME = #{workTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <include refid="select" />
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
|
<select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="where"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="whereLike"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="whereLike" />
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
insert into WMSH_OUTBOUND_RESULT
|
|
@@ -292,7 +315,7 @@
|
|
|
RESULT_CLEARING, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- BATCH_ID)
|
|
|
+ BATCH_ID, WORK_TIME)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
@@ -300,69 +323,76 @@
|
|
|
#{item.resultClearing,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
#{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{item.batchId,jdbcType=DECIMAL} from dual
|
|
|
+ #{item.batchId,jdbcType=DECIMAL}, #{item.workTime,jdbcType=TIMESTAMP} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
update WMSH_OUTBOUND_RESULT
|
|
|
set
|
|
|
RESULT_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_NUMBER=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,HARBOR_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.harborId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_TONNAGE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTonnage,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_CLEARING=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClearing,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,UPDATE_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,UPDATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_UPDATE_REMARK=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BATCH_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,WORK_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.workTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from WMSH_OUTBOUND_RESULT
|
|
|
where RESULT_ID in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
<!-- 排序 -->
|
|
|
<sql id="orderBy">
|