|
@@ -30,13 +30,17 @@
|
|
|
<result column="DRIVER_TEL" jdbcType="VARCHAR" property="driverTel" />
|
|
|
<result column="OPTIONER_CODE" jdbcType="VARCHAR" property="optionerCode" />
|
|
|
<result column="CAN_WORK" jdbcType="DECIMAL" property="canWork" />
|
|
|
+ <result column="PRINTNUMBER" jdbcType="DECIMAL" property="printnumber" />
|
|
|
+ <result column="CAPACITYIDS" jdbcType="VARCHAR" property="capacityids" />
|
|
|
+ <result column="IS_ACCEPT" jdbcType="DECIMAL" property="isAccept" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
|
|
|
ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE,
|
|
|
ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID, DRIVER_CONFIRMATION,
|
|
|
- PRICE_ID, CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL, OPTIONER_CODE, CAN_WORK
|
|
|
+ PRICE_ID, CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL, OPTIONER_CODE, CAN_WORK,
|
|
|
+ PRINTNUMBER, CAPACITYIDS, IS_ACCEPT
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS,
|
|
@@ -44,7 +48,7 @@
|
|
|
t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME, t.UNLOAD_POINT_ID,
|
|
|
t.DRIVER_CONFIRMATION, t.PRICE_ID, t.CARRIER_ID, t.TRIP_ID, t.ORDER_PRINT_STATUS,
|
|
|
- t.DRIVER_TEL, t.OPTIONER_CODE, t.CAN_WORK
|
|
|
+ t.DRIVER_TEL, t.OPTIONER_CODE, t.CAN_WORK, t.PRINTNUMBER, t.CAPACITYIDS, t.IS_ACCEPT
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM OMSTRUCK_ORDER
|
|
@@ -138,6 +142,15 @@
|
|
|
<if test="canWork != null">
|
|
|
and CAN_WORK = #{canWork}
|
|
|
</if>
|
|
|
+ <if test="printnumber != null">
|
|
|
+ and PRINTNUMBER = #{printnumber}
|
|
|
+ </if>
|
|
|
+ <if test="capacityids != null and capacityids != ''">
|
|
|
+ and CAPACITYIDS = #{capacityids}
|
|
|
+ </if>
|
|
|
+ <if test="isAccept != null">
|
|
|
+ and IS_ACCEPT = #{isAccept}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -226,9 +239,18 @@
|
|
|
<if test="canWork != null">
|
|
|
and CAN_WORK = #{canWork}
|
|
|
</if>
|
|
|
+ <if test="printnumber != null">
|
|
|
+ and PRINTNUMBER = #{printnumber}
|
|
|
+ </if>
|
|
|
+ <if test="capacityids != null and capacityids != ''">
|
|
|
+ and CAPACITYIDS LIKE '%${capacityids}%'
|
|
|
+ </if>
|
|
|
+ <if test="isAccept != null">
|
|
|
+ and IS_ACCEPT = #{isAccept}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
delete from OMSTRUCK_ORDER
|
|
|
where ORDER_ID = #{orderId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
@@ -316,6 +338,15 @@
|
|
|
<if test="canWork != null">
|
|
|
or CAN_WORK = #{canWork}
|
|
|
</if>
|
|
|
+ <if test="printnumber != null">
|
|
|
+ or PRINTNUMBER = #{printnumber}
|
|
|
+ </if>
|
|
|
+ <if test="capacityids != null and capacityids != ''">
|
|
|
+ or CAPACITYIDS = #{capacityids}
|
|
|
+ </if>
|
|
|
+ <if test="isAccept != null">
|
|
|
+ or IS_ACCEPT = #{isAccept}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
|
|
|
insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
|
|
@@ -327,7 +358,8 @@
|
|
|
LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
|
|
|
DRIVER_CONFIRMATION, PRICE_ID, CARRIER_ID,
|
|
|
TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL,
|
|
|
- OPTIONER_CODE, CAN_WORK)
|
|
|
+ OPTIONER_CODE, CAN_WORK, PRINTNUMBER,
|
|
|
+ CAPACITYIDS, IS_ACCEPT)
|
|
|
values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
|
|
|
#{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
|
|
|
#{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
|
|
@@ -337,7 +369,8 @@
|
|
|
#{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{unloadPointId,jdbcType=DECIMAL},
|
|
|
#{driverConfirmation,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
|
|
|
#{tripId,jdbcType=VARCHAR}, #{orderPrintStatus,jdbcType=DECIMAL}, #{driverTel,jdbcType=VARCHAR},
|
|
|
- #{optionerCode,jdbcType=VARCHAR}, #{canWork,jdbcType=DECIMAL})
|
|
|
+ #{optionerCode,jdbcType=VARCHAR}, #{canWork,jdbcType=DECIMAL}, #{printnumber,jdbcType=DECIMAL},
|
|
|
+ #{capacityids,jdbcType=VARCHAR}, #{isAccept,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
|
|
|
insert into OMSTRUCK_ORDER
|
|
@@ -426,6 +459,15 @@
|
|
|
<if test="canWork != null">
|
|
|
CAN_WORK,
|
|
|
</if>
|
|
|
+ <if test="printnumber != null">
|
|
|
+ PRINTNUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="capacityids != null">
|
|
|
+ CAPACITYIDS,
|
|
|
+ </if>
|
|
|
+ <if test="isAccept != null">
|
|
|
+ IS_ACCEPT,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="orderId != null">
|
|
@@ -512,6 +554,15 @@
|
|
|
<if test="canWork != null">
|
|
|
#{canWork,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="printnumber != null">
|
|
|
+ #{printnumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="capacityids != null">
|
|
|
+ #{capacityids,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="isAccept != null">
|
|
|
+ #{isAccept,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
|
|
@@ -542,7 +593,10 @@
|
|
|
ORDER_PRINT_STATUS = #{orderPrintStatus,jdbcType=DECIMAL},
|
|
|
DRIVER_TEL = #{driverTel,jdbcType=VARCHAR},
|
|
|
OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
|
|
|
- CAN_WORK = #{canWork,jdbcType=DECIMAL}
|
|
|
+ CAN_WORK = #{canWork,jdbcType=DECIMAL},
|
|
|
+ PRINTNUMBER = #{printnumber,jdbcType=DECIMAL},
|
|
|
+ CAPACITYIDS = #{capacityids,jdbcType=VARCHAR},
|
|
|
+ IS_ACCEPT = #{isAccept,jdbcType=DECIMAL}
|
|
|
where ORDER_ID = #{orderId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
|
|
@@ -629,10 +683,19 @@
|
|
|
<if test="canWork != null">
|
|
|
CAN_WORK = #{canWork,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="printnumber != null">
|
|
|
+ PRINTNUMBER = #{printnumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="capacityids != null">
|
|
|
+ CAPACITYIDS = #{capacityids,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="isAccept != null">
|
|
|
+ IS_ACCEPT = #{isAccept,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where ORDER_ID = #{orderId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where ORDER_ID = #{orderId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -657,7 +720,8 @@
|
|
|
LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
|
|
|
DRIVER_CONFIRMATION, PRICE_ID,
|
|
|
CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS,
|
|
|
- DRIVER_TEL, OPTIONER_CODE, CAN_WORK
|
|
|
+ DRIVER_TEL, OPTIONER_CODE, CAN_WORK,
|
|
|
+ PRINTNUMBER, CAPACITYIDS, IS_ACCEPT
|
|
|
)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
@@ -672,7 +736,8 @@
|
|
|
#{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.unloadPointId,jdbcType=DECIMAL},
|
|
|
#{item.driverConfirmation,jdbcType=DECIMAL}, #{item.priceId,jdbcType=DECIMAL},
|
|
|
#{item.carrierId,jdbcType=DECIMAL}, #{item.tripId,jdbcType=VARCHAR}, #{item.orderPrintStatus,jdbcType=DECIMAL},
|
|
|
- #{item.driverTel,jdbcType=VARCHAR}, #{item.optionerCode,jdbcType=VARCHAR}, #{item.canWork,jdbcType=DECIMAL}
|
|
|
+ #{item.driverTel,jdbcType=VARCHAR}, #{item.optionerCode,jdbcType=VARCHAR}, #{item.canWork,jdbcType=DECIMAL},
|
|
|
+ #{item.printnumber,jdbcType=DECIMAL}, #{item.capacityids,jdbcType=VARCHAR}, #{item.isAccept,jdbcType=DECIMAL}
|
|
|
from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
@@ -791,6 +856,18 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
|
|
|
when #{item.orderId,jdbcType=DECIMAL} then #{item.canWork,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,PRINTNUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
|
|
|
+ when #{item.orderId,jdbcType=DECIMAL} then #{item.printnumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,CAPACITYIDS=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
|
|
|
+ when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityids,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,IS_ACCEPT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
|
|
|
+ when #{item.orderId,jdbcType=DECIMAL} then #{item.isAccept,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where ORDER_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.orderId,jdbcType=DECIMAL}
|
|
@@ -805,6 +882,10 @@
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
|
<select id="findCarNumberByOrderId" parameterType="DECIMAL" resultType="java.util.Map" >
|
|
|
SELECT DISTINCT RC.CAPACITY_NUMBER AS "carNum",
|
|
@@ -832,7 +913,12 @@
|
|
|
WHERE ASOM.SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId}
|
|
|
</select>
|
|
|
<select id="finCarAndCarrierAndEntries" resultType="java.util.Map" parameterType="decimal">
|
|
|
- SELECT DISTINCT RC.CAPACITY_NUMBER AS "carNum",
|
|
|
+ SELECT DISTINCT
|
|
|
+ (case when
|
|
|
+ RC.CAPACITY_NUMBER = '空白'
|
|
|
+ then ' '
|
|
|
+ else RC.CAPACITY_NUMBER
|
|
|
+ END) AS "carNum",
|
|
|
(case when ASO.SALE_ORDER_ISSELF_MENTION = '是'
|
|
|
then '自提'
|
|
|
else RCE.CARRIER_ABBREVIATION
|
|
@@ -906,4 +992,8 @@
|
|
|
LEFT JOIN OMSTRUCK_ORDER OO ON OO.ORDER_PLAN_ID = ASOM.SALE_ORDER_MATERIAL_ID
|
|
|
WHERE ASM.SALE_MATERIAL_ID = #{saleMaterialId}
|
|
|
</select>
|
|
|
+ <select id="selectOrderInfo" resultType="java.math.BigDecimal" >
|
|
|
+ SELECT DISTINCT OO.ORDER_ID FROM OMSTRUCK_ORDER OO
|
|
|
+ WHERE OO.ORDER_NUMBER = #{orderNumber}
|
|
|
+ </select>
|
|
|
</mapper>
|