|
@@ -2,37 +2,36 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.steerinfo.dil.mapper.AmstruckSporadicOrderMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmstruckSporadicOrder">
|
|
|
- <id column="SPORADIC_ORDER_ID" jdbcType="DECIMAL" property="sporadicOrderId"/>
|
|
|
- <result column="SEND_UNIT_ID" jdbcType="DECIMAL" property="sendUnitId"/>
|
|
|
- <result column="RECEIVE_UNIT_ID" jdbcType="DECIMAL" property="receiveUnitId"/>
|
|
|
- <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId"/>
|
|
|
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
|
|
|
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
|
|
|
- <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="DELETED" jdbcType="DECIMAL" property="deleted"/>
|
|
|
- <result column="ISSUE_STATUS" jdbcType="DECIMAL" property="issueStatus"/>
|
|
|
- <result column="SPORADIC_ORDER_NO" jdbcType="VARCHAR" property="sporadicOrderNo"/>
|
|
|
+ <id column="SPORADIC_ORDER_ID" jdbcType="DECIMAL" property="sporadicOrderId" />
|
|
|
+ <result column="SEND_UNIT_ID" jdbcType="DECIMAL" property="sendUnitId" />
|
|
|
+ <result column="RECEIVE_UNIT_ID" jdbcType="DECIMAL" property="receiveUnitId" />
|
|
|
+ <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
+ <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="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
+ <result column="ISSUE_STATUS" jdbcType="DECIMAL" property="issueStatus" />
|
|
|
+ <result column="SPORADIC_ORDER_NO" jdbcType="VARCHAR" property="sporadicOrderNo" />
|
|
|
+ <result column="SPORADIC_ORDER_TIMES" jdbcType="DECIMAL" property="sporadicOrderTimes" />
|
|
|
+ <result column="DISPATCH_STATUS" jdbcType="DECIMAL" property="dispatchStatus" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
SPORADIC_ORDER_ID, SEND_UNIT_ID, RECEIVE_UNIT_ID, CARRIER_ID, INSERT_USERNAME, INSERT_TIME,
|
|
|
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ISSUE_STATUS, SPORADIC_ORDER_NO
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ISSUE_STATUS, SPORADIC_ORDER_NO,
|
|
|
+ SPORADIC_ORDER_TIMES, DISPATCH_STATUS
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.SPORADIC_ORDER_ID, t.SEND_UNIT_ID, t.RECEIVE_UNIT_ID, t.CARRIER_ID, t.INSERT_USERNAME,
|
|
|
t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
- t.ISSUE_STATUS, t.SPORADIC_ORDER_NO
|
|
|
+ t.ISSUE_STATUS, t.SPORADIC_ORDER_NO, t.SPORADIC_ORDER_TIMES, t.DISPATCH_STATUS
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT
|
|
|
- <include refid="columns"/>
|
|
|
- FROM AMSTRUCK_SPORADIC_ORDER
|
|
|
+ SELECT <include refid="columns" /> FROM AMSTRUCK_SPORADIC_ORDER
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT
|
|
|
- <include refid="columns_alias"/>
|
|
|
- FROM AMSTRUCK_SPORADIC_ORDER t
|
|
|
+ SELECT <include refid="columns_alias" /> FROM AMSTRUCK_SPORADIC_ORDER t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
<where>
|
|
@@ -72,6 +71,12 @@
|
|
|
<if test="sporadicOrderNo != null and sporadicOrderNo != ''">
|
|
|
and SPORADIC_ORDER_NO = #{sporadicOrderNo}
|
|
|
</if>
|
|
|
+ <if test="sporadicOrderTimes != null">
|
|
|
+ and SPORADIC_ORDER_TIMES = #{sporadicOrderTimes}
|
|
|
+ </if>
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ and DISPATCH_STATUS = #{dispatchStatus}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -112,11 +117,16 @@
|
|
|
<if test="sporadicOrderNo != null and sporadicOrderNo != ''">
|
|
|
and SPORADIC_ORDER_NO LIKE '%${sporadicOrderNo}%'
|
|
|
</if>
|
|
|
+ <if test="sporadicOrderTimes != null">
|
|
|
+ and SPORADIC_ORDER_TIMES = #{sporadicOrderTimes}
|
|
|
+ </if>
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ and DISPATCH_STATUS = #{dispatchStatus}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
- delete
|
|
|
- from AMSTRUCK_SPORADIC_ORDER
|
|
|
+ delete from AMSTRUCK_SPORADIC_ORDER
|
|
|
where SPORADIC_ORDER_ID = #{sporadicOrderId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
@@ -155,17 +165,24 @@
|
|
|
<if test="sporadicOrderNo != null and sporadicOrderNo != ''">
|
|
|
or SPORADIC_ORDER_NO = #{sporadicOrderNo}
|
|
|
</if>
|
|
|
+ <if test="sporadicOrderTimes != null">
|
|
|
+ or SPORADIC_ORDER_TIMES = #{sporadicOrderTimes}
|
|
|
+ </if>
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ or DISPATCH_STATUS = #{dispatchStatus}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
|
|
|
insert into AMSTRUCK_SPORADIC_ORDER (SPORADIC_ORDER_ID, SEND_UNIT_ID, RECEIVE_UNIT_ID,
|
|
|
CARRIER_ID, INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETED, ISSUE_STATUS, SPORADIC_ORDER_NO)
|
|
|
+ DELETED, ISSUE_STATUS, SPORADIC_ORDER_NO,
|
|
|
+ SPORADIC_ORDER_TIMES, DISPATCH_STATUS)
|
|
|
values (#{sporadicOrderId,jdbcType=DECIMAL}, #{sendUnitId,jdbcType=DECIMAL}, #{receiveUnitId,jdbcType=DECIMAL},
|
|
|
#{carrierId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{deleted,jdbcType=DECIMAL}, #{issueStatus,jdbcType=DECIMAL}, #{sporadicOrderNo,jdbcType=VARCHAR})
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{deleted,jdbcType=DECIMAL}, #{issueStatus,jdbcType=DECIMAL}, #{sporadicOrderNo,jdbcType=VARCHAR},
|
|
|
+ #{sporadicOrderTimes,jdbcType=DECIMAL}, #{dispatchStatus,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
|
|
|
insert into AMSTRUCK_SPORADIC_ORDER
|
|
@@ -206,6 +223,12 @@
|
|
|
<if test="sporadicOrderNo != null">
|
|
|
SPORADIC_ORDER_NO,
|
|
|
</if>
|
|
|
+ <if test="sporadicOrderTimes != null">
|
|
|
+ SPORADIC_ORDER_TIMES,
|
|
|
+ </if>
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ DISPATCH_STATUS,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="sporadicOrderId != null">
|
|
@@ -244,21 +267,29 @@
|
|
|
<if test="sporadicOrderNo != null">
|
|
|
#{sporadicOrderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="sporadicOrderTimes != null">
|
|
|
+ #{sporadicOrderTimes,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ #{dispatchStatus,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
|
|
|
update AMSTRUCK_SPORADIC_ORDER
|
|
|
- set SEND_UNIT_ID = #{sendUnitId,jdbcType=DECIMAL},
|
|
|
- RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
|
|
|
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ set SEND_UNIT_ID = #{sendUnitId,jdbcType=DECIMAL},
|
|
|
+ RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
|
|
|
+ CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
- ISSUE_STATUS = #{issueStatus,jdbcType=DECIMAL},
|
|
|
- SPORADIC_ORDER_NO = #{sporadicOrderNo,jdbcType=VARCHAR}
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ ISSUE_STATUS = #{issueStatus,jdbcType=DECIMAL},
|
|
|
+ SPORADIC_ORDER_NO = #{sporadicOrderNo,jdbcType=VARCHAR},
|
|
|
+ SPORADIC_ORDER_TIMES = #{sporadicOrderTimes,jdbcType=DECIMAL},
|
|
|
+ DISPATCH_STATUS = #{dispatchStatus,jdbcType=DECIMAL}
|
|
|
where SPORADIC_ORDER_ID = #{sporadicOrderId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
|
|
@@ -297,20 +328,26 @@
|
|
|
<if test="sporadicOrderNo != null">
|
|
|
SPORADIC_ORDER_NO = #{sporadicOrderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="sporadicOrderTimes != null">
|
|
|
+ SPORADIC_ORDER_TIMES = #{sporadicOrderTimes,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ DISPATCH_STATUS = #{dispatchStatus,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where SPORADIC_ORDER_ID = #{sporadicOrderId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <include refid="select" />
|
|
|
where SPORADIC_ORDER_ID = #{sporadicOrderId,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 AMSTRUCK_SPORADIC_ORDER
|
|
@@ -319,7 +356,9 @@
|
|
|
INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETED,
|
|
|
- ISSUE_STATUS, SPORADIC_ORDER_NO)
|
|
|
+ ISSUE_STATUS, SPORADIC_ORDER_NO,
|
|
|
+ SPORADIC_ORDER_TIMES, DISPATCH_STATUS
|
|
|
+ )
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.sporadicOrderId,jdbcType=DECIMAL},
|
|
@@ -327,69 +366,79 @@
|
|
|
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
|
|
|
- #{item.issueStatus,jdbcType=DECIMAL}, #{item.sporadicOrderNo,jdbcType=VARCHAR} from dual
|
|
|
+ #{item.issueStatus,jdbcType=DECIMAL}, #{item.sporadicOrderNo,jdbcType=VARCHAR},
|
|
|
+ #{item.sporadicOrderTimes,jdbcType=DECIMAL}, #{item.dispatchStatus,jdbcType=DECIMAL}
|
|
|
+ from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
update AMSTRUCK_SPORADIC_ORDER
|
|
|
set
|
|
|
SPORADIC_ORDER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sporadicOrderId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,SEND_UNIT_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sendUnitId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RECEIVE_UNIT_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.receiveUnitId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,CARRIER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,INSERT_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,UPDATE_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,UPDATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_UPDATE_REMARK=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,DELETED=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,ISSUE_STATUS=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.issueStatus,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,SPORADIC_ORDER_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sporadicOrderNo,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
+ ,SPORADIC_ORDER_TIMES=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
+ when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sporadicOrderTimes,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DISPATCH_STATUS=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SPORADIC_ORDER_ID" separator=" ">
|
|
|
+ when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.dispatchStatus,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where SPORADIC_ORDER_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.sporadicOrderId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from AMSTRUCK_SPORADIC_ORDER
|
|
|
where SPORADIC_ORDER_ID in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
@@ -468,6 +517,72 @@
|
|
|
<include refid="orderBy"></include>
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <!-- 查询一车多趟零星物资 -->
|
|
|
+ <select id="getSporadicOrdersList1" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
+ select *
|
|
|
+ from(
|
|
|
+ SELECT
|
|
|
+ ASO.SPORADIC_ORDER_ID AS "sporadicOrderId",
|
|
|
+ ASO.SPORADIC_ORDER_NO AS "sporadicOrderNo",
|
|
|
+ RSU.SUPPLIER_NAME AS "supplierName",
|
|
|
+ RCO.CONSIGNEE_COMPANY_NAME AS "consigneeCompanyName",
|
|
|
+ RCA.CARRIER_NAME AS "carrierName",
|
|
|
+ ASO.INSERT_TIME AS "insertTime",
|
|
|
+ OO.ORDER_TYPE AS "type",
|
|
|
+ OO.ORDER_ID "orderId",
|
|
|
+ ASO.SPORADIC_ORDER_TIMES "sporadicOrderTimes"
|
|
|
+ FROM AMSTRUCK_SPORADIC_ORDER ASO
|
|
|
+ LEFT JOIN RMS_CONSIGNEE RCO
|
|
|
+ ON ASO.RECEIVE_UNIT_ID = RCO.CONSIGNEE_ID
|
|
|
+ LEFT JOIN RMS_SUPPLIER RSU
|
|
|
+ ON ASO.SEND_UNIT_ID = RSU.SUPPLIER_ID
|
|
|
+ LEFT JOIN RMS_CARRIER RCA
|
|
|
+ ON RCA.CARRIER_ID = ASO.CARRIER_ID
|
|
|
+ LEFT JOIN OMSTRUCK_ORDER OO
|
|
|
+ ON OO.ORDER_PLAN_ID = ASO.SPORADIC_ORDER_ID
|
|
|
+ WHERE OO.ORDER_TYPE in (15,16)
|
|
|
+ AND ASO.ISSUE_STATUS = #{issueStatus}
|
|
|
+ AND ASO.DELETED = 0
|
|
|
+ <if test="dispatchStatus != null">
|
|
|
+ AND ASO.DISPATCH_STATUS = #{dispatchStatus}
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ <where>
|
|
|
+ <if test="sporadicOrderNo != null">
|
|
|
+ and
|
|
|
+ <foreach collection="sporadicOrderNo" item="item" open="(" separator="or" close=")">
|
|
|
+ "sporadicOrderNo" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
|
|
|
+ "supplierName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeCompanyName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
|
|
|
+ "consigneeCompanyName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="carrierName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
|
|
|
+ "carrierName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and
|
|
|
+ <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
|
|
|
+ "insertTime" like to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 查询所有物资 -->
|
|
|
<select id="seeAllMaterials" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
SELECT *
|
|
@@ -515,5 +630,21 @@
|
|
|
FROM AMSTRUCK_SPORADIC_ORDER ASO
|
|
|
WHERE SPORADIC_ORDER_ID = #{sporadicOrderId}
|
|
|
</select>
|
|
|
+<!-- 根基运输订单id查找运输订单信息 -->
|
|
|
+ <select id="selectOrderInfo" parameterType="java.lang.Integer" resultType="java.util.Map">
|
|
|
+ select OO.ORDER_PLAN_ID "orderPlanId",
|
|
|
+ OO.ORDER_NUMBER "orderNumber",
|
|
|
+ OO.LINE_ID "lineId",
|
|
|
+ OO.ORDER_LINE_SEQUENCE "lineSqe",
|
|
|
+ OOM.MATERIAL_ID "materialId",
|
|
|
+ OOM.ORDER_MATERIAL_NUMBER "materialNumber",
|
|
|
+ OOM.ORDER_MATERIAL_WEIGHT "materialWeight",
|
|
|
+ OOM.MATERIAL_PRIORITY "materialPriority",
|
|
|
+ OO.ORDER_TYPE "orderType"
|
|
|
+ from OMSTRUCK_ORDER OO
|
|
|
+ left join OMSTRUCK_ORDER_MATERIAL OOM
|
|
|
+ on OO.ORDER_ID=OOM.ORDER_ID
|
|
|
+ where OO.ORDER_ID=#{orderId}
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|