|
@@ -19,18 +19,28 @@
|
|
|
<result column="STATEMENT_STATUS" jdbcType="DECIMAL" property="statementStatus" />
|
|
|
<result column="TOTAL_PREVIEW_TON" jdbcType="DECIMAL" property="totalPreviewTon" />
|
|
|
<result column="TOTAL_PREVIEW_FEE" jdbcType="DECIMAL" property="totalPreviewFee" />
|
|
|
+ <result column="UNIT_PRICE_ID" jdbcType="DECIMAL" property="unitPriceId" />
|
|
|
+ <result column="TOTAL_WATER_FEE" jdbcType="DECIMAL" property="totalWaterFee" />
|
|
|
+ <result column="TOTAL_LOAD_TON" jdbcType="DECIMAL" property="totalLoadTon" />
|
|
|
+ <result column="TOTAL_LOAD_PERCENT" jdbcType="DECIMAL" property="totalLoadPercent" />
|
|
|
+ <result column="TOTAL_BALANCE_TON" jdbcType="DECIMAL" property="totalBalanceTon" />
|
|
|
+ <result column="RESULT_OUT_PORT_TIME" jdbcType="VARCHAR" property="resultOutPortTime" />
|
|
|
+ <result column="BILL_NO" jdbcType="VARCHAR" property="billNo" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- STATEMENT_ID, STATEMENT_NO, STATEMENT_SHIPPER_ID, STATEMENT_TOTAL_AMOUNT, STATEMENT_DATE,
|
|
|
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- STATEMENT_TYPE, BATCH_ID, EAS_AMOUNT, TOTAL_WET_TON, STATEMENT_STATUS, TOTAL_PREVIEW_TON,
|
|
|
- TOTAL_PREVIEW_FEE
|
|
|
+ STATEMENT_ID, STATEMENT_NO, STATEMENT_SHIPPER_ID, STATEMENT_TOTAL_AMOUNT, STATEMENT_DATE,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ STATEMENT_TYPE, BATCH_ID, EAS_AMOUNT, TOTAL_WET_TON, STATEMENT_STATUS, TOTAL_PREVIEW_TON,
|
|
|
+ TOTAL_PREVIEW_FEE, UNIT_PRICE_ID, TOTAL_WATER_FEE, TOTAL_LOAD_TON, TOTAL_LOAD_PERCENT,
|
|
|
+ TOTAL_BALANCE_TON, RESULT_OUT_PORT_TIME, BILL_NO
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.STATEMENT_ID, t.STATEMENT_NO, t.STATEMENT_SHIPPER_ID, t.STATEMENT_TOTAL_AMOUNT,
|
|
|
- t.STATEMENT_DATE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
|
- t.INSERT_UPDATE_REMARK, t.STATEMENT_TYPE, t.BATCH_ID, t.EAS_AMOUNT, t.TOTAL_WET_TON,
|
|
|
- t.STATEMENT_STATUS, t.TOTAL_PREVIEW_TON, t.TOTAL_PREVIEW_FEE
|
|
|
+ t.STATEMENT_ID, t.STATEMENT_NO, t.STATEMENT_SHIPPER_ID, t.STATEMENT_TOTAL_AMOUNT,
|
|
|
+ t.STATEMENT_DATE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
|
+ t.INSERT_UPDATE_REMARK, t.STATEMENT_TYPE, t.BATCH_ID, t.EAS_AMOUNT, t.TOTAL_WET_TON,
|
|
|
+ t.STATEMENT_STATUS, t.TOTAL_PREVIEW_TON, t.TOTAL_PREVIEW_FEE, t.UNIT_PRICE_ID, t.TOTAL_WATER_FEE,
|
|
|
+ t.TOTAL_LOAD_TON, t.TOTAL_LOAD_PERCENT, t.TOTAL_BALANCE_TON, t.RESULT_OUT_PORT_TIME,
|
|
|
+ t.BILL_NO
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM BMSSHIP_STATEMENT
|
|
@@ -91,6 +101,27 @@
|
|
|
<if test="totalPreviewFee != null">
|
|
|
and TOTAL_PREVIEW_FEE = #{totalPreviewFee}
|
|
|
</if>
|
|
|
+ <if test="unitPriceId != null">
|
|
|
+ and UNIT_PRICE_ID = #{unitPriceId}
|
|
|
+ </if>
|
|
|
+ <if test="totalWaterFee != null">
|
|
|
+ and TOTAL_WATER_FEE = #{totalWaterFee}
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadTon != null">
|
|
|
+ and TOTAL_LOAD_TON = #{totalLoadTon}
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadPercent != null">
|
|
|
+ and TOTAL_LOAD_PERCENT = #{totalLoadPercent}
|
|
|
+ </if>
|
|
|
+ <if test="totalBalanceTon != null">
|
|
|
+ and TOTAL_BALANCE_TON = #{totalBalanceTon}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null and resultOutPortTime != ''">
|
|
|
+ and RESULT_OUT_PORT_TIME = #{resultOutPortTime}
|
|
|
+ </if>
|
|
|
+ <if test="billNo != null and billNo != ''">
|
|
|
+ and BILL_NO = #{billNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -146,6 +177,27 @@
|
|
|
<if test="totalPreviewFee != null">
|
|
|
and TOTAL_PREVIEW_FEE = #{totalPreviewFee}
|
|
|
</if>
|
|
|
+ <if test="unitPriceId != null">
|
|
|
+ and UNIT_PRICE_ID = #{unitPriceId}
|
|
|
+ </if>
|
|
|
+ <if test="totalWaterFee != null">
|
|
|
+ and TOTAL_WATER_FEE = #{totalWaterFee}
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadTon != null">
|
|
|
+ and TOTAL_LOAD_TON = #{totalLoadTon}
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadPercent != null">
|
|
|
+ and TOTAL_LOAD_PERCENT = #{totalLoadPercent}
|
|
|
+ </if>
|
|
|
+ <if test="totalBalanceTon != null">
|
|
|
+ and TOTAL_BALANCE_TON = #{totalBalanceTon}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null and resultOutPortTime != ''">
|
|
|
+ and RESULT_OUT_PORT_TIME LIKE '%${resultOutPortTime}%'
|
|
|
+ </if>
|
|
|
+ <if test="billNo != null and billNo != ''">
|
|
|
+ and BILL_NO LIKE '%${billNo}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -203,6 +255,27 @@
|
|
|
<if test="totalPreviewFee != null">
|
|
|
or TOTAL_PREVIEW_FEE = #{totalPreviewFee}
|
|
|
</if>
|
|
|
+ <if test="unitPriceId != null">
|
|
|
+ or UNIT_PRICE_ID = #{unitPriceId}
|
|
|
+ </if>
|
|
|
+ <if test="totalWaterFee != null">
|
|
|
+ or TOTAL_WATER_FEE = #{totalWaterFee}
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadTon != null">
|
|
|
+ or TOTAL_LOAD_TON = #{totalLoadTon}
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadPercent != null">
|
|
|
+ or TOTAL_LOAD_PERCENT = #{totalLoadPercent}
|
|
|
+ </if>
|
|
|
+ <if test="totalBalanceTon != null">
|
|
|
+ or TOTAL_BALANCE_TON = #{totalBalanceTon}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null and resultOutPortTime != ''">
|
|
|
+ or RESULT_OUT_PORT_TIME = #{resultOutPortTime}
|
|
|
+ </if>
|
|
|
+ <if test="billNo != null and billNo != ''">
|
|
|
+ or BILL_NO = #{billNo}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.BmsshipStatement">
|
|
|
insert into BMSSHIP_STATEMENT (STATEMENT_ID, STATEMENT_NO, STATEMENT_SHIPPER_ID,
|
|
@@ -210,15 +283,19 @@
|
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
|
BATCH_ID, EAS_AMOUNT, TOTAL_WET_TON,
|
|
|
- STATEMENT_STATUS, TOTAL_PREVIEW_TON, TOTAL_PREVIEW_FEE
|
|
|
- )
|
|
|
+ STATEMENT_STATUS, TOTAL_PREVIEW_TON, TOTAL_PREVIEW_FEE,
|
|
|
+ UNIT_PRICE_ID, TOTAL_WATER_FEE, TOTAL_LOAD_TON,
|
|
|
+ TOTAL_LOAD_PERCENT, TOTAL_BALANCE_TON, RESULT_OUT_PORT_TIME,
|
|
|
+ BILL_NO)
|
|
|
values (#{statementId,jdbcType=DECIMAL}, #{statementNo,jdbcType=VARCHAR}, #{statementShipperId,jdbcType=DECIMAL},
|
|
|
#{statementTotalAmount,jdbcType=DECIMAL}, #{statementDate,jdbcType=TIMESTAMP},
|
|
|
#{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{statementType,jdbcType=VARCHAR},
|
|
|
#{batchId,jdbcType=DECIMAL}, #{easAmount,jdbcType=DECIMAL}, #{totalWetTon,jdbcType=DECIMAL},
|
|
|
- #{statementStatus,jdbcType=DECIMAL}, #{totalPreviewTon,jdbcType=DECIMAL}, #{totalPreviewFee,jdbcType=DECIMAL}
|
|
|
- )
|
|
|
+ #{statementStatus,jdbcType=DECIMAL}, #{totalPreviewTon,jdbcType=DECIMAL}, #{totalPreviewFee,jdbcType=DECIMAL},
|
|
|
+ #{unitPriceId,jdbcType=DECIMAL}, #{totalWaterFee,jdbcType=DECIMAL}, #{totalLoadTon,jdbcType=DECIMAL},
|
|
|
+ #{totalLoadPercent,jdbcType=DECIMAL}, #{totalBalanceTon,jdbcType=DECIMAL}, #{resultOutPortTime,jdbcType=VARCHAR},
|
|
|
+ #{billNo,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmsshipStatement">
|
|
|
insert into BMSSHIP_STATEMENT
|
|
@@ -274,6 +351,27 @@
|
|
|
<if test="totalPreviewFee != null">
|
|
|
TOTAL_PREVIEW_FEE,
|
|
|
</if>
|
|
|
+ <if test="unitPriceId != null">
|
|
|
+ UNIT_PRICE_ID,
|
|
|
+ </if>
|
|
|
+ <if test="totalWaterFee != null">
|
|
|
+ TOTAL_WATER_FEE,
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadTon != null">
|
|
|
+ TOTAL_LOAD_TON,
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadPercent != null">
|
|
|
+ TOTAL_LOAD_PERCENT,
|
|
|
+ </if>
|
|
|
+ <if test="totalBalanceTon != null">
|
|
|
+ TOTAL_BALANCE_TON,
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ RESULT_OUT_PORT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="billNo != null">
|
|
|
+ BILL_NO,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="statementId != null">
|
|
@@ -327,6 +425,27 @@
|
|
|
<if test="totalPreviewFee != null">
|
|
|
#{totalPreviewFee,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="unitPriceId != null">
|
|
|
+ #{unitPriceId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalWaterFee != null">
|
|
|
+ #{totalWaterFee,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadTon != null">
|
|
|
+ #{totalLoadTon,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadPercent != null">
|
|
|
+ #{totalLoadPercent,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalBalanceTon != null">
|
|
|
+ #{totalBalanceTon,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ #{resultOutPortTime,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="billNo != null">
|
|
|
+ #{billNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmsshipStatement">
|
|
@@ -346,7 +465,14 @@
|
|
|
TOTAL_WET_TON = #{totalWetTon,jdbcType=DECIMAL},
|
|
|
STATEMENT_STATUS = #{statementStatus,jdbcType=DECIMAL},
|
|
|
TOTAL_PREVIEW_TON = #{totalPreviewTon,jdbcType=DECIMAL},
|
|
|
- TOTAL_PREVIEW_FEE = #{totalPreviewFee,jdbcType=DECIMAL}
|
|
|
+ TOTAL_PREVIEW_FEE = #{totalPreviewFee,jdbcType=DECIMAL},
|
|
|
+ UNIT_PRICE_ID = #{unitPriceId,jdbcType=DECIMAL},
|
|
|
+ TOTAL_WATER_FEE = #{totalWaterFee,jdbcType=DECIMAL},
|
|
|
+ TOTAL_LOAD_TON = #{totalLoadTon,jdbcType=DECIMAL},
|
|
|
+ TOTAL_LOAD_PERCENT = #{totalLoadPercent,jdbcType=DECIMAL},
|
|
|
+ TOTAL_BALANCE_TON = #{totalBalanceTon,jdbcType=DECIMAL},
|
|
|
+ RESULT_OUT_PORT_TIME = #{resultOutPortTime,jdbcType=VARCHAR},
|
|
|
+ BILL_NO = #{billNo,jdbcType=VARCHAR}
|
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmsshipStatement">
|
|
@@ -400,6 +526,27 @@
|
|
|
<if test="totalPreviewFee != null">
|
|
|
TOTAL_PREVIEW_FEE = #{totalPreviewFee,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="unitPriceId != null">
|
|
|
+ UNIT_PRICE_ID = #{unitPriceId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalWaterFee != null">
|
|
|
+ TOTAL_WATER_FEE = #{totalWaterFee,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadTon != null">
|
|
|
+ TOTAL_LOAD_TON = #{totalLoadTon,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalLoadPercent != null">
|
|
|
+ TOTAL_LOAD_PERCENT = #{totalLoadPercent,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalBalanceTon != null">
|
|
|
+ TOTAL_BALANCE_TON = #{totalBalanceTon,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ RESULT_OUT_PORT_TIME = #{resultOutPortTime,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="billNo != null">
|
|
|
+ BILL_NO = #{billNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -425,7 +572,10 @@
|
|
|
INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
|
BATCH_ID, EAS_AMOUNT, TOTAL_WET_TON,
|
|
|
STATEMENT_STATUS, TOTAL_PREVIEW_TON,
|
|
|
- TOTAL_PREVIEW_FEE)
|
|
|
+ TOTAL_PREVIEW_FEE, UNIT_PRICE_ID,
|
|
|
+ TOTAL_WATER_FEE, TOTAL_LOAD_TON,
|
|
|
+ TOTAL_LOAD_PERCENT, TOTAL_BALANCE_TON,
|
|
|
+ RESULT_OUT_PORT_TIME, BILL_NO)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.statementId,jdbcType=DECIMAL},
|
|
@@ -436,7 +586,10 @@
|
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.statementType,jdbcType=VARCHAR},
|
|
|
#{item.batchId,jdbcType=DECIMAL}, #{item.easAmount,jdbcType=DECIMAL}, #{item.totalWetTon,jdbcType=DECIMAL},
|
|
|
#{item.statementStatus,jdbcType=DECIMAL}, #{item.totalPreviewTon,jdbcType=DECIMAL},
|
|
|
- #{item.totalPreviewFee,jdbcType=DECIMAL} from dual
|
|
|
+ #{item.totalPreviewFee,jdbcType=DECIMAL}, #{item.unitPriceId,jdbcType=DECIMAL},
|
|
|
+ #{item.totalWaterFee,jdbcType=DECIMAL}, #{item.totalLoadTon,jdbcType=DECIMAL},
|
|
|
+ #{item.totalLoadPercent,jdbcType=DECIMAL}, #{item.totalBalanceTon,jdbcType=DECIMAL},
|
|
|
+ #{item.resultOutPortTime,jdbcType=VARCHAR}, #{item.billNo,jdbcType=VARCHAR} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -510,6 +663,34 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
when #{item.statementId,jdbcType=DECIMAL} then #{item.totalPreviewFee,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,UNIT_PRICE_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.unitPriceId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_WATER_FEE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.totalWaterFee,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_LOAD_TON=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.totalLoadTon,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_LOAD_PERCENT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.totalLoadPercent,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_BALANCE_TON=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.totalBalanceTon,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_OUT_PORT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.resultOutPortTime,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,BILL_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.billNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
where STATEMENT_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.statementId,jdbcType=DECIMAL}
|