|
@@ -13,15 +13,19 @@
|
|
|
<result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
+ <result column="PORT_ID" jdbcType="DECIMAL" property="portId" />
|
|
|
+ <result column="SHIP_LENGTH" jdbcType="DECIMAL" property="shipLength" />
|
|
|
<result column="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
RESULT_ID, CONTRACT_NO, UNIT_PRICE, BATCH_ID, START_TIME, END_TIME, INSERT_USERNAME,
|
|
|
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, PORT_ID, SHIP_LENGTH,
|
|
|
+ DELETED
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.RESULT_ID, t.CONTRACT_NO, t.UNIT_PRICE, t.BATCH_ID, t.START_TIME, t.END_TIME, t.INSERT_USERNAME,
|
|
|
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
|
|
|
+ t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.PORT_ID,
|
|
|
+ t.SHIP_LENGTH, t.DELETED
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM BMSSHIP_CONTRACT_PRICE
|
|
@@ -64,6 +68,12 @@
|
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
</if>
|
|
|
+ <if test="portId != null">
|
|
|
+ and PORT_ID = #{portId}
|
|
|
+ </if>
|
|
|
+ <if test="shipLength != null">
|
|
|
+ and SHIP_LENGTH = #{shipLength}
|
|
|
+ </if>
|
|
|
<if test="deleted != null">
|
|
|
and DELETED = #{deleted}
|
|
|
</if>
|
|
@@ -104,6 +114,12 @@
|
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
</if>
|
|
|
+ <if test="portId != null">
|
|
|
+ and PORT_ID = #{portId}
|
|
|
+ </if>
|
|
|
+ <if test="shipLength != null">
|
|
|
+ and SHIP_LENGTH = #{shipLength}
|
|
|
+ </if>
|
|
|
<if test="deleted != null">
|
|
|
and DELETED = #{deleted}
|
|
|
</if>
|
|
@@ -146,6 +162,12 @@
|
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
</if>
|
|
|
+ <if test="portId != null">
|
|
|
+ or PORT_ID = #{portId}
|
|
|
+ </if>
|
|
|
+ <if test="shipLength != null">
|
|
|
+ or SHIP_LENGTH = #{shipLength}
|
|
|
+ </if>
|
|
|
<if test="deleted != null">
|
|
|
or DELETED = #{deleted}
|
|
|
</if>
|
|
@@ -154,13 +176,13 @@
|
|
|
insert into BMSSHIP_CONTRACT_PRICE (RESULT_ID, CONTRACT_NO, UNIT_PRICE,
|
|
|
BATCH_ID, START_TIME, END_TIME,
|
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
|
|
|
- )
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, PORT_ID,
|
|
|
+ SHIP_LENGTH, DELETED)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{contractNo,jdbcType=VARCHAR}, #{unitPrice,jdbcType=DECIMAL},
|
|
|
#{batchId,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
#{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}
|
|
|
- )
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{portId,jdbcType=DECIMAL},
|
|
|
+ #{shipLength,jdbcType=DECIMAL}, #{deleted,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmsshipContractPrice">
|
|
|
insert into BMSSHIP_CONTRACT_PRICE
|
|
@@ -198,6 +220,12 @@
|
|
|
<if test="insertUpdateRemark != null">
|
|
|
INSERT_UPDATE_REMARK,
|
|
|
</if>
|
|
|
+ <if test="portId != null">
|
|
|
+ PORT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="shipLength != null">
|
|
|
+ SHIP_LENGTH,
|
|
|
+ </if>
|
|
|
<if test="deleted != null">
|
|
|
DELETED,
|
|
|
</if>
|
|
@@ -236,6 +264,12 @@
|
|
|
<if test="insertUpdateRemark != null">
|
|
|
#{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="portId != null">
|
|
|
+ #{portId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="shipLength != null">
|
|
|
+ #{shipLength,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
<if test="deleted != null">
|
|
|
#{deleted,jdbcType=DECIMAL},
|
|
|
</if>
|
|
@@ -253,6 +287,8 @@
|
|
|
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ PORT_ID = #{portId,jdbcType=DECIMAL},
|
|
|
+ SHIP_LENGTH = #{shipLength,jdbcType=DECIMAL},
|
|
|
DELETED = #{deleted,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -289,6 +325,12 @@
|
|
|
<if test="insertUpdateRemark != null">
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="portId != null">
|
|
|
+ PORT_ID = #{portId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="shipLength != null">
|
|
|
+ SHIP_LENGTH = #{shipLength,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
<if test="deleted != null">
|
|
|
DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
</if>
|
|
@@ -314,7 +356,8 @@
|
|
|
START_TIME, END_TIME, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETED)
|
|
|
+ PORT_ID, SHIP_LENGTH, DELETED
|
|
|
+ )
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
@@ -322,7 +365,8 @@
|
|
|
#{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
#{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{item.deleted,jdbcType=DECIMAL} from dual
|
|
|
+ #{item.portId,jdbcType=DECIMAL}, #{item.shipLength,jdbcType=DECIMAL}, #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -372,6 +416,14 @@
|
|
|
<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>
|
|
|
+ ,PORT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SHIP_LENGTH=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.shipLength,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
,DELETED=
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
@@ -404,11 +456,14 @@
|
|
|
BCP.CONTRACT_NO "contractNo",
|
|
|
BCP.START_TIME "startTime",
|
|
|
BCP.END_TIME "endTime",
|
|
|
- BCP.UNIT_PRICE "unitPrice"
|
|
|
+ BCP.UNIT_PRICE "unitPrice",
|
|
|
+ RP.PORT_NAME "portName"
|
|
|
from BMSSHIP_CONTRACT_PRICE BCP
|
|
|
+ left join RMS_PORT RP
|
|
|
+ on BCP.PORT_ID=RP.PORT_ID
|
|
|
where BCP.DELETED=0
|
|
|
<if test="con!=null">
|
|
|
- AND instr(BCP.CONTRACT_NO,#{con}) > 0
|
|
|
+ AND instr(BCP.CONTRACT_NO,#{con}) > 0
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= BCP.END_TIME
|
|
@@ -420,9 +475,9 @@
|
|
|
BCP.START_TIME "startTime",
|
|
|
BCP.END_TIME "endTime",
|
|
|
BCP.UNIT_PRICE "unitPrice",
|
|
|
- BCP.RESULT_ID "resultId"
|
|
|
+ BCP.RESULT_ID "resultId",
|
|
|
+ BCP.PORT_ID "portID"
|
|
|
from BMSSHIP_CONTRACT_PRICE BCP
|
|
|
WHERE BCP.RESULT_ID =#{resultId}
|
|
|
</select>
|
|
|
-
|
|
|
</mapper>
|