|
@@ -23,18 +23,21 @@
|
|
<result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
|
|
<result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
|
|
<result column="PHOTO" jdbcType="VARCHAR" property="photo" />
|
|
<result column="PHOTO" jdbcType="VARCHAR" property="photo" />
|
|
<result column="STATEMENT_TIME" jdbcType="TIMESTAMP" property="statementTime" />
|
|
<result column="STATEMENT_TIME" jdbcType="TIMESTAMP" property="statementTime" />
|
|
|
|
+ <result column="STATEMENT_END_TIME" jdbcType="TIMESTAMP" property="statementEndTime" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="columns">
|
|
<sql id="columns">
|
|
- STATEMENT_ID, STATEMENT_NUMBER, COST_ID, STATEMENT_PAYMENT_UNIT, STATEMENT_EXCLUD_TAX,
|
|
|
|
- STATEMENT_INCLUD_TAX, STATEMENT_REMARK, STATEMENT_SETTLEMENT_STATUS, INSERT_USERNAME,
|
|
|
|
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
|
|
- EAS_AMOUNT, SUM_AMOUNT, CAR_NUM, CONSIGNEE_ID, CARRIER_ID, PHOTO, STATEMENT_TIME
|
|
|
|
|
|
+ STATEMENT_ID, STATEMENT_NUMBER, COST_ID, STATEMENT_PAYMENT_UNIT, STATEMENT_EXCLUD_TAX,
|
|
|
|
+ STATEMENT_INCLUD_TAX, STATEMENT_REMARK, STATEMENT_SETTLEMENT_STATUS, INSERT_USERNAME,
|
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
|
|
+ EAS_AMOUNT, SUM_AMOUNT, CAR_NUM, CONSIGNEE_ID, CARRIER_ID, PHOTO, STATEMENT_TIME,
|
|
|
|
+ STATEMENT_END_TIME
|
|
</sql>
|
|
</sql>
|
|
<sql id="columns_alias">
|
|
<sql id="columns_alias">
|
|
- t.STATEMENT_ID, t.STATEMENT_NUMBER, t.COST_ID, t.STATEMENT_PAYMENT_UNIT, t.STATEMENT_EXCLUD_TAX,
|
|
|
|
- t.STATEMENT_INCLUD_TAX, t.STATEMENT_REMARK, t.STATEMENT_SETTLEMENT_STATUS, t.INSERT_USERNAME,
|
|
|
|
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATEMENT_TYPE,
|
|
|
|
- t.EAS_AMOUNT, t.SUM_AMOUNT, t.CAR_NUM, t.CONSIGNEE_ID, t.CARRIER_ID, t.PHOTO, t.STATEMENT_TIME
|
|
|
|
|
|
+ t.STATEMENT_ID, t.STATEMENT_NUMBER, t.COST_ID, t.STATEMENT_PAYMENT_UNIT, t.STATEMENT_EXCLUD_TAX,
|
|
|
|
+ t.STATEMENT_INCLUD_TAX, t.STATEMENT_REMARK, t.STATEMENT_SETTLEMENT_STATUS, t.INSERT_USERNAME,
|
|
|
|
+ t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATEMENT_TYPE,
|
|
|
|
+ t.EAS_AMOUNT, t.SUM_AMOUNT, t.CAR_NUM, t.CONSIGNEE_ID, t.CARRIER_ID, t.PHOTO, t.STATEMENT_TIME,
|
|
|
|
+ t.STATEMENT_END_TIME
|
|
</sql>
|
|
</sql>
|
|
<sql id="select">
|
|
<sql id="select">
|
|
SELECT <include refid="columns" /> FROM BMSTRUCK_STATEMENT
|
|
SELECT <include refid="columns" /> FROM BMSTRUCK_STATEMENT
|
|
@@ -107,6 +110,9 @@
|
|
<if test="statementTime != null">
|
|
<if test="statementTime != null">
|
|
and TO_CHAR(STATEMENT_TIME,'yyyy-MM-dd') = #{statementTime}
|
|
and TO_CHAR(STATEMENT_TIME,'yyyy-MM-dd') = #{statementTime}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="statementEndTime != null">
|
|
|
|
+ and TO_CHAR(STATEMENT_END_TIME,'yyyy-MM-dd') = #{statementEndTime}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<sql id="whereLike">
|
|
<sql id="whereLike">
|
|
@@ -174,9 +180,12 @@
|
|
<if test="statementTime != null">
|
|
<if test="statementTime != null">
|
|
and TO_CHAR(STATEMENT_TIME,'yyyy-MM-dd') = #{statementTime}
|
|
and TO_CHAR(STATEMENT_TIME,'yyyy-MM-dd') = #{statementTime}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="statementEndTime != null">
|
|
|
|
+ and TO_CHAR(STATEMENT_END_TIME,'yyyy-MM-dd') = #{statementEndTime}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
delete from BMSTRUCK_STATEMENT
|
|
delete from BMSTRUCK_STATEMENT
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
</delete>
|
|
</delete>
|
|
@@ -243,6 +252,9 @@
|
|
<if test="statementTime != null">
|
|
<if test="statementTime != null">
|
|
or TO_CHAR(STATEMENT_TIME,'yyyy-MM-dd') = '#{statementTime}'
|
|
or TO_CHAR(STATEMENT_TIME,'yyyy-MM-dd') = '#{statementTime}'
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="statementEndTime != null">
|
|
|
|
+ or TO_CHAR(STATEMENT_END_TIME,'yyyy-MM-dd') = '#{statementEndTime}'
|
|
|
|
+ </if>
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
insert into BMSTRUCK_STATEMENT (STATEMENT_ID, STATEMENT_NUMBER, COST_ID,
|
|
insert into BMSTRUCK_STATEMENT (STATEMENT_ID, STATEMENT_NUMBER, COST_ID,
|
|
@@ -252,7 +264,7 @@
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
EAS_AMOUNT, SUM_AMOUNT, CAR_NUM,
|
|
EAS_AMOUNT, SUM_AMOUNT, CAR_NUM,
|
|
CONSIGNEE_ID, CARRIER_ID, PHOTO,
|
|
CONSIGNEE_ID, CARRIER_ID, PHOTO,
|
|
- STATEMENT_TIME)
|
|
|
|
|
|
+ STATEMENT_TIME, STATEMENT_END_TIME)
|
|
values (#{statementId,jdbcType=DECIMAL}, #{statementNumber,jdbcType=VARCHAR}, #{costId,jdbcType=DECIMAL},
|
|
values (#{statementId,jdbcType=DECIMAL}, #{statementNumber,jdbcType=VARCHAR}, #{costId,jdbcType=DECIMAL},
|
|
#{statementPaymentUnit,jdbcType=VARCHAR}, #{statementExcludTax,jdbcType=DECIMAL},
|
|
#{statementPaymentUnit,jdbcType=VARCHAR}, #{statementExcludTax,jdbcType=DECIMAL},
|
|
#{statementIncludTax,jdbcType=DECIMAL}, #{statementRemark,jdbcType=VARCHAR}, #{statementSettlementStatus,jdbcType=VARCHAR},
|
|
#{statementIncludTax,jdbcType=DECIMAL}, #{statementRemark,jdbcType=VARCHAR}, #{statementSettlementStatus,jdbcType=VARCHAR},
|
|
@@ -260,7 +272,7 @@
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{statementType,jdbcType=DECIMAL},
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{statementType,jdbcType=DECIMAL},
|
|
#{easAmount,jdbcType=DECIMAL}, #{sumAmount,jdbcType=DECIMAL}, #{carNum,jdbcType=DECIMAL},
|
|
#{easAmount,jdbcType=DECIMAL}, #{sumAmount,jdbcType=DECIMAL}, #{carNum,jdbcType=DECIMAL},
|
|
#{consigneeId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL}, #{photo,jdbcType=VARCHAR},
|
|
#{consigneeId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL}, #{photo,jdbcType=VARCHAR},
|
|
- #{statementTime,jdbcType=TIMESTAMP})
|
|
|
|
|
|
+ #{statementTime,jdbcType=TIMESTAMP}, #{statementEndTime,jdbcType=TIMESTAMP})
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
insert into BMSTRUCK_STATEMENT
|
|
insert into BMSTRUCK_STATEMENT
|
|
@@ -328,6 +340,9 @@
|
|
<if test="statementTime != null">
|
|
<if test="statementTime != null">
|
|
STATEMENT_TIME,
|
|
STATEMENT_TIME,
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="statementEndTime != null">
|
|
|
|
+ STATEMENT_END_TIME,
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="statementId != null">
|
|
<if test="statementId != null">
|
|
@@ -393,6 +408,9 @@
|
|
<if test="statementTime != null">
|
|
<if test="statementTime != null">
|
|
#{statementTime,jdbcType=TIMESTAMP},
|
|
#{statementTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="statementEndTime != null">
|
|
|
|
+ #{statementEndTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
@@ -416,7 +434,8 @@
|
|
CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
|
|
CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
|
|
CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
PHOTO = #{photo,jdbcType=VARCHAR},
|
|
PHOTO = #{photo,jdbcType=VARCHAR},
|
|
- STATEMENT_TIME = #{statementTime,jdbcType=TIMESTAMP}
|
|
|
|
|
|
+ STATEMENT_TIME = #{statementTime,jdbcType=TIMESTAMP},
|
|
|
|
+ STATEMENT_END_TIME = #{statementEndTime,jdbcType=TIMESTAMP}
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmstruckStatement">
|
|
@@ -482,10 +501,13 @@
|
|
<if test="statementTime != null">
|
|
<if test="statementTime != null">
|
|
STATEMENT_TIME = #{statementTime,jdbcType=TIMESTAMP},
|
|
STATEMENT_TIME = #{statementTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="statementEndTime != null">
|
|
|
|
+ STATEMENT_END_TIME = #{statementEndTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
<include refid="select" />
|
|
<include refid="select" />
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
where STATEMENT_ID = #{statementId,jdbcType=DECIMAL}
|
|
</select>
|
|
</select>
|
|
@@ -508,7 +530,8 @@
|
|
INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
INSERT_UPDATE_REMARK, STATEMENT_TYPE,
|
|
EAS_AMOUNT, SUM_AMOUNT, CAR_NUM,
|
|
EAS_AMOUNT, SUM_AMOUNT, CAR_NUM,
|
|
CONSIGNEE_ID, CARRIER_ID, PHOTO,
|
|
CONSIGNEE_ID, CARRIER_ID, PHOTO,
|
|
- STATEMENT_TIME)
|
|
|
|
|
|
+ STATEMENT_TIME, STATEMENT_END_TIME
|
|
|
|
+ )
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
select
|
|
select
|
|
#{item.statementId,jdbcType=DECIMAL},
|
|
#{item.statementId,jdbcType=DECIMAL},
|
|
@@ -520,7 +543,8 @@
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.statementType,jdbcType=DECIMAL},
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.statementType,jdbcType=DECIMAL},
|
|
#{item.easAmount,jdbcType=DECIMAL}, #{item.sumAmount,jdbcType=DECIMAL}, #{item.carNum,jdbcType=DECIMAL},
|
|
#{item.easAmount,jdbcType=DECIMAL}, #{item.sumAmount,jdbcType=DECIMAL}, #{item.carNum,jdbcType=DECIMAL},
|
|
#{item.consigneeId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{item.photo,jdbcType=VARCHAR},
|
|
#{item.consigneeId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{item.photo,jdbcType=VARCHAR},
|
|
- #{item.statementTime,jdbcType=TIMESTAMP} from dual
|
|
|
|
|
|
+ #{item.statementTime,jdbcType=TIMESTAMP}, #{item.statementEndTime,jdbcType=TIMESTAMP}
|
|
|
|
+ from dual
|
|
</foreach> )
|
|
</foreach> )
|
|
</insert>
|
|
</insert>
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -610,6 +634,10 @@
|
|
<foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
<foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
when #{item.statementId,jdbcType=DECIMAL} then #{item.statementTime,jdbcType=TIMESTAMP}
|
|
when #{item.statementId,jdbcType=DECIMAL} then #{item.statementTime,jdbcType=TIMESTAMP}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ ,STATEMENT_END_TIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case STATEMENT_ID" separator=" ">
|
|
|
|
+ when #{item.statementId,jdbcType=DECIMAL} then #{item.statementEndTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
where STATEMENT_ID in
|
|
where STATEMENT_ID in
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
#{item.statementId,jdbcType=DECIMAL}
|
|
#{item.statementId,jdbcType=DECIMAL}
|
|
@@ -637,7 +665,7 @@
|
|
BS.CAR_NUM "carNum",
|
|
BS.CAR_NUM "carNum",
|
|
RC.CONSIGNEE_COMPANY_NAME "consigneeName",
|
|
RC.CONSIGNEE_COMPANY_NAME "consigneeName",
|
|
RCA.CARRIER_NAME "carrierName",
|
|
RCA.CARRIER_NAME "carrierName",
|
|
- BS.STATEMENT_TIME "insertTime",
|
|
|
|
|
|
+ BS.STATEMENT_TIME || '--' || BS.STATEMENT_END_TIME "insertTime",
|
|
BS.CONSIGNEE_ID "consigneeId",
|
|
BS.CONSIGNEE_ID "consigneeId",
|
|
BS .CARRIER_ID "carrierId"
|
|
BS .CARRIER_ID "carrierId"
|
|
FROM BMSTRUCK_STATEMENT BS
|
|
FROM BMSTRUCK_STATEMENT BS
|
|
@@ -653,7 +681,7 @@
|
|
</if>
|
|
</if>
|
|
<if test="startDate != null">
|
|
<if test="startDate != null">
|
|
and to_date(#{startDate}, 'yyyy-mm-dd') <= to_date(to_char(BS.STATEMENT_TIME,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
and to_date(#{startDate}, 'yyyy-mm-dd') <= to_date(to_char(BS.STATEMENT_TIME,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
- and to_date(#{endDate}, 'yyyy-mm-dd') >= to_date(to_char(BS.STATEMENT_TIME,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
|
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd') >= to_date(to_char(BS.STATEMENT_END_TIME,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
)
|
|
)
|