123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.steerinfo.dil.mapper.OmstrainOrderMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstrainOrder">
- <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
- <result column="ORDER_NO" jdbcType="VARCHAR" property="orderNo" />
- <result column="ORDER_WAGON_NO" jdbcType="VARCHAR" property="orderWagonNo" />
- <result column="ORDER_WAGON_WEIGHT" jdbcType="DECIMAL" property="orderWagonWeight" />
- <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="ENSTATION_TIME" jdbcType="TIMESTAMP" property="enstationTime" />
- <result column="OUTSTATION_TIME" jdbcType="TIMESTAMP" property="outstationTime" />
- <result column="BILLING_WEIGHT" jdbcType="DECIMAL" property="billingWeight" />
- <result column="IS_ACCEPT" jdbcType="DECIMAL" property="isAccept" />
- <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
- <result column="STRAWMATS" jdbcType="DECIMAL" property="strawmats" />
- </resultMap>
- <sql id="columns">
- ORDER_ID, ORDER_NO, ORDER_WAGON_NO, ORDER_WAGON_WEIGHT, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, ENSTATION_TIME, OUTSTATION_TIME,
- BILLING_WEIGHT, "IS_ACCEPT", WAREHOUSE_ID, STRAWMATS
- </sql>
- <sql id="columns_alias">
- t.ORDER_ID, t.ORDER_NO, t.ORDER_WAGON_NO, t.ORDER_WAGON_WEIGHT, t.INSERT_USERNAME,
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.ENSTATION_TIME,
- t.OUTSTATION_TIME, t.BILLING_WEIGHT, t."IS_ACCEPT", t.WAREHOUSE_ID, t.STRAWMATS
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM OMSTRAIN_ORDER
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM OMSTRAIN_ORDER t
- </sql>
- <sql id="where">
- <where>
- <if test="orderId != null">
- and ORDER_ID = #{orderId}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and ORDER_NO = #{orderNo}
- </if>
- <if test="orderWagonNo != null and orderWagonNo != ''">
- and ORDER_WAGON_NO = #{orderWagonNo}
- </if>
- <if test="orderWagonWeight != null">
- and ORDER_WAGON_WEIGHT = #{orderWagonWeight}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="enstationTime != null">
- and TO_CHAR(ENSTATION_TIME,'yyyy-MM-dd') = #{enstationTime}
- </if>
- <if test="outstationTime != null">
- and TO_CHAR(OUTSTATION_TIME,'yyyy-MM-dd') = #{outstationTime}
- </if>
- <if test="billingWeight != null">
- and BILLING_WEIGHT = #{billingWeight}
- </if>
- <if test="isAccept != null">
- and IS_ACCEPT = #{isAccept}
- </if>
- <if test="warehouseId != null">
- and WAREHOUSE_ID = #{warehouseId}
- </if>
- <if test="strawmats != null">
- and STRAWMATS = #{strawmats}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="orderId != null">
- and ORDER_ID = #{orderId}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and ORDER_NO LIKE '%${orderNo}%'
- </if>
- <if test="orderWagonNo != null and orderWagonNo != ''">
- and ORDER_WAGON_NO LIKE '%${orderWagonNo}%'
- </if>
- <if test="orderWagonWeight != null">
- and ORDER_WAGON_WEIGHT = #{orderWagonWeight}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- <if test="enstationTime != null">
- and TO_CHAR(ENSTATION_TIME,'yyyy-MM-dd') = #{enstationTime}
- </if>
- <if test="outstationTime != null">
- and TO_CHAR(OUTSTATION_TIME,'yyyy-MM-dd') = #{outstationTime}
- </if>
- <if test="billingWeight != null">
- and BILLING_WEIGHT = #{billingWeight}
- </if>
- <if test="isAccept != null">
- and IS_ACCEPT = #{isAccept}
- </if>
- <if test="warehouseId != null">
- and WAREHOUSE_ID = #{warehouseId}
- </if>
- <if test="strawmats != null">
- and STRAWMATS = #{strawmats}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
- delete from OMSTRAIN_ORDER
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from OMSTRAIN_ORDER
- where 1!=1
- <if test="orderNo != null and orderNo != ''">
- or ORDER_NO = #{orderNo}
- </if>
- <if test="orderWagonNo != null and orderWagonNo != ''">
- or ORDER_WAGON_NO = #{orderWagonNo}
- </if>
- <if test="orderWagonWeight != null">
- or ORDER_WAGON_WEIGHT = #{orderWagonWeight}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="enstationTime != null">
- or TO_CHAR(ENSTATION_TIME,'yyyy-MM-dd') = '#{enstationTime}'
- </if>
- <if test="outstationTime != null">
- or TO_CHAR(OUTSTATION_TIME,'yyyy-MM-dd') = '#{outstationTime}'
- </if>
- <if test="billingWeight != null">
- or BILLING_WEIGHT = #{billingWeight}
- </if>
- <if test="isAccept != null">
- or IS_ACCEPT = #{isAccept}
- </if>
- <if test="warehouseId != null">
- or WAREHOUSE_ID = #{warehouseId}
- </if>
- <if test="strawmats != null">
- or STRAWMATS = #{strawmats}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.OmstrainOrder">
- insert into OMSTRAIN_ORDER (ORDER_ID, ORDER_NO, ORDER_WAGON_NO,
- ORDER_WAGON_WEIGHT, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- ENSTATION_TIME, OUTSTATION_TIME, BILLING_WEIGHT,
- "IS_ACCEPT", WAREHOUSE_ID, STRAWMATS
- )
- values (#{orderId,jdbcType=DECIMAL}, #{orderNo,jdbcType=VARCHAR}, #{orderWagonNo,jdbcType=VARCHAR},
- #{orderWagonWeight,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{enstationTime,jdbcType=TIMESTAMP}, #{outstationTime,jdbcType=TIMESTAMP}, #{billingWeight,jdbcType=DECIMAL},
- #{isAccept,jdbcType=DECIMAL}, #{warehouseId,jdbcType=DECIMAL}, #{strawmats,jdbcType=DECIMAL}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstrainOrder">
- insert into OMSTRAIN_ORDER
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderId != null">
- ORDER_ID,
- </if>
- <if test="orderNo != null">
- ORDER_NO,
- </if>
- <if test="orderWagonNo != null">
- ORDER_WAGON_NO,
- </if>
- <if test="orderWagonWeight != null">
- ORDER_WAGON_WEIGHT,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="enstationTime != null">
- ENSTATION_TIME,
- </if>
- <if test="outstationTime != null">
- OUTSTATION_TIME,
- </if>
- <if test="billingWeight != null">
- BILLING_WEIGHT,
- </if>
- <if test="isAccept != null">
- "IS_ACCEPT",
- </if>
- <if test="warehouseId != null">
- WAREHOUSE_ID,
- </if>
- <if test="strawmats != null">
- STRAWMATS,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderId != null">
- #{orderId,jdbcType=DECIMAL},
- </if>
- <if test="orderNo != null">
- #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="orderWagonNo != null">
- #{orderWagonNo,jdbcType=VARCHAR},
- </if>
- <if test="orderWagonWeight != null">
- #{orderWagonWeight,jdbcType=DECIMAL},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="enstationTime != null">
- #{enstationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="outstationTime != null">
- #{outstationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="billingWeight != null">
- #{billingWeight,jdbcType=DECIMAL},
- </if>
- <if test="isAccept != null">
- #{isAccept,jdbcType=DECIMAL},
- </if>
- <if test="warehouseId != null">
- #{warehouseId,jdbcType=DECIMAL},
- </if>
- <if test="strawmats != null">
- #{strawmats,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstrainOrder">
- update OMSTRAIN_ORDER
- set ORDER_NO = #{orderNo,jdbcType=VARCHAR},
- ORDER_WAGON_NO = #{orderWagonNo,jdbcType=VARCHAR},
- ORDER_WAGON_WEIGHT = #{orderWagonWeight,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},
- ENSTATION_TIME = #{enstationTime,jdbcType=TIMESTAMP},
- OUTSTATION_TIME = #{outstationTime,jdbcType=TIMESTAMP},
- BILLING_WEIGHT = #{billingWeight,jdbcType=DECIMAL},
- "IS_ACCEPT" = #{isAccept,jdbcType=DECIMAL},
- WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
- STRAWMATS = #{strawmats,jdbcType=DECIMAL}
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstrainOrder">
- update OMSTRAIN_ORDER
- <set>
- <if test="orderNo != null">
- ORDER_NO = #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="orderWagonNo != null">
- ORDER_WAGON_NO = #{orderWagonNo,jdbcType=VARCHAR},
- </if>
- <if test="orderWagonWeight != null">
- ORDER_WAGON_WEIGHT = #{orderWagonWeight,jdbcType=DECIMAL},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="enstationTime != null">
- ENSTATION_TIME = #{enstationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="outstationTime != null">
- OUTSTATION_TIME = #{outstationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="billingWeight != null">
- BILLING_WEIGHT = #{billingWeight,jdbcType=DECIMAL},
- </if>
- <if test="isAccept != null">
- "IS_ACCEPT" = #{isAccept,jdbcType=DECIMAL},
- </if>
- <if test="warehouseId != null">
- WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
- </if>
- <if test="strawmats != null">
- STRAWMATS = #{strawmats,jdbcType=DECIMAL},
- </if>
- </set>
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
- <include refid="select" />
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="where" />
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="whereLike" />
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into OMSTRAIN_ORDER
- (ORDER_ID,
- ORDER_NO, ORDER_WAGON_NO, ORDER_WAGON_WEIGHT,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, ENSTATION_TIME,
- OUTSTATION_TIME, BILLING_WEIGHT,
- "IS_ACCEPT", WAREHOUSE_ID, STRAWMATS
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.orderId,jdbcType=DECIMAL},
- #{item.orderNo,jdbcType=VARCHAR}, #{item.orderWagonNo,jdbcType=VARCHAR}, #{item.orderWagonWeight,jdbcType=DECIMAL},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.enstationTime,jdbcType=TIMESTAMP},
- #{item.outstationTime,jdbcType=TIMESTAMP}, #{item.billingWeight,jdbcType=DECIMAL},
- #{item.isAccept,jdbcType=DECIMAL}, #{item.warehouseId,jdbcType=DECIMAL}, #{item.strawmats,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update OMSTRAIN_ORDER
- set
- ORDER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNo,jdbcType=VARCHAR}
- </foreach>
- ,ORDER_WAGON_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderWagonNo,jdbcType=VARCHAR}
- </foreach>
- ,ORDER_WAGON_WEIGHT=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderWagonWeight,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,ENSTATION_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.enstationTime,jdbcType=TIMESTAMP}
- </foreach>
- ,OUTSTATION_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.outstationTime,jdbcType=TIMESTAMP}
- </foreach>
- ,BILLING_WEIGHT=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.billingWeight,jdbcType=DECIMAL}
- </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>
- ,WAREHOUSE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
- </foreach>
- ,STRAWMATS=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.strawmats,jdbcType=DECIMAL}
- </foreach>
- where ORDER_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.orderId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from OMSTRAIN_ORDER
- where ORDER_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="getOrderTrainMes" resultType="java.util.Map" parameterType="java.lang.Integer">
- SELECT
- OO.ORDER_ID "orderId",
- OO.ORDER_TYPE "orderType",
- OO.ORDER_LINE_SEQUENCE "orderLineSequence",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RS.SHIPPER_NAME "shipperName",
- ASOM.SALE_ORDER_CONSIGNEE_TEL "consigneeTel",
- ASOM.SALE_DATE_OF_RECEIPT "saleDateOfReceipt",
- RC2.CONSIGNEE_COMPANY_NAME "consigneeCompanyNames",
- CONCAT(CONCAT( CONCAT( CONCAT( RDA.ADDRESS_PROVINCE, RDA.ADDRESS_DISTRICT ), RDA.ADDRESS_TOWN ),RDA.ADDRESS_DELIVERY_ADDRESS ),RRP.ADDRESS_DELIVERY_ADDRESS) "receiveAddressName",
- TTR.RESULT_TOTAL_ID "resultTotalId",
- OO.CAN_WORK "canWork",
- OO.ORDER_STATUS "orderStatus",
- OTO.ORDER_ID "trainOrderId",
- OTO.ORDER_WAGON_NO "wagonNo",
- rpg.INSERT_UPDATE_REMARK "stackName",
- to_char(OTO.ENSTATION_TIME,'yyyy-mm-dd') "enStationTime",
- to_char(OTO.OUTSTATION_TIME,'yyyy-mm-dd') "outStationTime",
- RW.WAREHOUSE_NAME "sendStation",
- RW.WAREHOUSE_ID "sendStationId"
- FROM
- OMSTRUCK_ORDER OO
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = ASO.SHIPPER_ID
- LEFT JOIN RMS_CONSIGNEE RC2 ON ASO.RECEIVE_ID = RC2.CONSIGNEE_ID
- LEFT JOIN RMS_CAPACITY RC ON RC.CAPACITY_ID = OO.CAPACITY_ID
- LEFT JOIN RMS_RECEIVE_PLACE RRP ON RRP.PLACE_ID = ASOM.SALE_SHIPPING_ADDRESS_ID
- LEFT JOIN RMS_RECEIVE_ADDRESS RDA ON RDA.ADDRESS_ID = RRP.ADDRESS_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON OO.ORDER_ID = TTR.ORDER_ID
- LEFT JOIN TMSTT_ORDER TTO ON TTO.TRUCK_ORDER_ID = OO.ORDER_ID
- LEFT JOIN OMSTRAIN_ORDER OTO ON OTO.ORDER_ID = TTO.TRAIN_ORDER_ID
- LEFT JOIN RMS_PWAREHOUSE_GRID RPG ON RPG.STACKING_ID = OO.ORDER_ID
- LEFT JOIN RMS_WAREHOUSE RW ON RW.WAREHOUSE_ID = RPG.WAREHOUSE_ID
- WHERE
- OO.ORDER_ID = #{orderId}
- </select>
- <!-- 根据运输订单id查找调入仓库 -->
- <select id="getInwardWarehouse" resultType="java.lang.String" parameterType="java.math.BigDecimal">
- SELECT
- distinct RISW.INWARD_WAREHOUSE_NAME "inwardWarehouseName"
- FROM
- OMSTRUCK_ORDER OO
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
- left join AMS_SALE_MATERIAL ASM ON ASO.SALE_ORDER_ID = ASM.SALE_ORDER_ID
- LEFT JOIN RMS_INWARD_STEEL_WAREHOUSE RISW ON ASM.TRANSFER_IN_OF_WAREHOUSE = RISW.INWARD_WAREHOUSE_CODE
- WHERE
- OO.ORDER_ID = #{orderId}
- </select>
- <!-- 根据运输订单id查找调出仓库 -->
- <select id="getOutOfWarehouse" resultType="java.lang.String" parameterType="java.math.BigDecimal">
- SELECT
- distinct ASM.TRANSFER_OUT_OF_WAREHOUSE "outOfWarehouse"
- FROM
- OMSTRUCK_ORDER OO
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
- left join AMS_SALE_MATERIAL ASM ON ASO.SALE_ORDER_ID = ASM.SALE_ORDER_ID
- WHERE
- OO.ORDER_ID = #{orderId}
- FETCH NEXT 1 ROWS ONLY
- </select>
- <select id="getMaterialList" resultType="java.util.Map" parameterType="java.util.Map">
- SELECT RM.MATERIAL_ID "materialId",
- RM.MATERIAL_NAME||'-'||RM.MATERIAL_SPECIFICATION||'('||RM.MATERIAL_SPECIFICATION||')'||'-'||OOM.ORDER_MATERIAL_NUMBER||'件' "materialName"
- FROM OMSTRUCK_ORDER_MATERIAL OOM
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = OOM.MATERIAL_ID
- WHERE OOM.ORDER_ID = #{orderId}
- </select>
- <select id="getLuhaoNum" resultType="java.util.Map" parameterType="decimal">
- SELECT
- RMS.MATERIAL_FURNACE_NUMBER "materialFurnaceNumber",
- COUNT( WOSR.RESULT_ID ) "materialNum"
- FROM
- WMSP_OUTBOUND_RESULT WOR
- LEFT JOIN WMSP_OUTBOUND_RESULT_MATERIAL WORM ON WORM.OUTBOUND_RESULT_ID = WOR.RESULT_ID
- LEFT JOIN WMSP_OUTBOUND_SCAN_RESULT WOSR ON WORM.RESULT_MATERIAL_ID = WOSR.RESULT_MATERIAL_ID
- LEFT JOIN WMSP_INBOUND_RESULT WIR ON WOSR.INBOUND_RESULT_ID = WIR.INBOUND_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS ON WIR.MATERIAL_ID = RMS.MATERIAL_STEEL_ID
- WHERE WOR.BILL_LADING_ID = #{orderId}
- AND WORM.MATERIAL_ID = #{materialId}
- GROUP BY
- RMS.MATERIAL_FURNACE_NUMBER
- </select>
- <select id="getWagonShippingDetails" resultType="java.util.Map" parameterType="java.util.Map">
- SELECT * FROM (SELECT DISTINCT OO.ORDER_ID "orderId",
- ASO.SALE_ORDER_ID "saleOrderId",
- ASO.SALE_NUMBER "saleOrderNo",
- ASM.SALE_MATERIAL_ID "saleMaterialId",
- ASM.MATERIAL_NUMBER "materialNum",
- ASM.MATERIAL_WEIGHT "theoryWeight",
- ASM.EAS_PRIMARY_ID "closeEntryId",
- RC.CONSIGNEE_COMPANY_NAME "consigneeName",
- RC.CONSIGNEE_ID "consigneeId",
- RS.SHIPPER_NAME "shipperName",
- RM.MATERIAL_ID "materialId",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "materialSpa",
- OTO.ORDER_NO "orderNum",
- TWR.RESULT_NET_WEIGHT "materialWeight",
- to_char(OTO.OUTSTATION_TIME,'yyyy-mm-dd') "OutStation",
- to_char(TUR.RESULT_END_TIME,'yyyy-mm-dd') "EnStation",
- to_char(ASO.INSERT_TIME,'yyyy-mm-dd') "orderTime",
- OTO.ORDER_WAGON_NO "wagonNo",
- OTO.ORDER_WAGON_WEIGHT "wagonWeight",
- OTO.BILLING_WEIGHT "wagonBillWeight",
- RAR1.ARRIVAL_NAME "arrivalStation",
- RAR.ARRIVAL_NAME "sendStation",
- ASO.SALE_REMARK "orderType",
- OTO.ORDER_ID "trainOrderId",
- RPG.GRID_ID "gridId",
- RPG.INSERT_UPDATE_REMARK "stackName",
- decode(wgm.DELETED,0,'入库',1,'出库','未入库') "wgmDelete",
- R_CAPACITY.CAPACITY_NUMBER "capacityNum",
- (CASE WHEN
- RW.WAREHOUSE_NAME IS NOT NULL
- THEN RW.WAREHOUSE_NAME
- WHEN RC.CONSIGNEE_COMPANY_NAME != '成都积微物联电子商务有限公司'
- THEN RAR1.DAYPLAN_DEDICATED_LINE
- ELSE RAR1.UPDATE_USERNAME
- END)
- "unloadPoint",
- RAR1.RAILWAY_BUREAU "railwayBureau",
- OTO.STRAWMATS "strawMats",
- OO.ORDER_NUMBER "number",
- OTO.WAREHOUSE_ID "unloadPointId",
- decode(OTO."IS_ACCEPT",0,'未收货',1,'已收货') "isAccept",
- OTO.is_accept_time "isAcceptTime",
- RP.PERSONNEL_NAME "inboundPersonnelName",
- RPG.INSERT_TIME "inboundTime",
- RPG.UPDATE_TIME "outboundTime",
- RP2.PERSONNEL_NAME "outboundPersonnelName",
- TWR.INSERT_UPDATE_REMARK "weightNo",
- TLFR.RESULT_OUT_GATE_TIME "outGateTime"
- FROM AMS_SALE_ORDER ASO
- LEFT JOIN RMS_CONSIGNEE RC ON RC.CONSIGNEE_ID = ASO.RECEIVE_ID
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = ASO.SHIPPER_ID
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_ID = ASO.SALE_ORDER_ID
- LEFT JOIN AMS_DISPATCH_SALE_ORDER ADSO
- ON ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
- ON ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN AMS_SALE_MATERIAL ASM ON ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = ASM.MATERIAL_ID
- LEFT JOIN TMSTRAIN_PLEASE_APPROVE_RESULT TPAR ON TPAR.RAIL_PLAN_ID = ASM.SALE_MATERIAL_ID
- LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAR ON RAR.ARRIVAL_ID = TPAR.SEND_STATION_ID
- LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAR1 ON RAR1.ARRIVAL_ID = TPAR.TO_THE_STATION_ID
- LEFT JOIN OMSTRUCK_ORDER OO ON OO.ORDER_PLAN_ID = ASOM.SALE_ORDER_MATERIAL_ID AND OO.ORDER_STATUS=2
- LEFT JOIN RMS_CAPACITY R_CAPACITY ON R_CAPACITY.CAPACITY_ID = OO.CAPACITY_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- AND TWR.MATERIAL_ID = RM.MATERIAL_ID
- AND TWR.SALE_MATERIAL_ID = ASM.SALE_MATERIAL_ID
- LEFT JOIN TMSTRUCK_UNLOAD_RESULT TUR ON TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- AND TUR.MATERIAL_ID = RM.MATERIAL_ID
- LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN TMSTT_ORDER TTO ON TTO.TRUCK_ORDER_ID = OO.ORDER_ID
- LEFT JOIN OMSTRAIN_ORDER OTO ON OTO.ORDER_ID = TTO.TRAIN_ORDER_ID
- LEFT JOIN RMS_PWAREHOUSE_GRID RPG ON RPG.STACKING_ID = OO.ORDER_ID
- LEFT JOIN RMS_PERSONNEL RP ON RP.PERSONNEL_SSO_ID = RPG.INSERT_USERNAME
- LEFT JOIN RMS_PERSONNEL RP2 ON RP2.PERSONNEL_SSO_ID = RPG.UPDATE_USERNAME
- LEFT JOIN WMSP_GRID_MATERIAL WGM ON WGM.GRID_ID = RPG.GRID_ID
- and wgm.MATERIAL_ID = rm.MATERIAL_ID
- LEFT JOIN RMS_WAREHOUSE RW ON RW.WAREHOUSE_ID = OTO.WAREHOUSE_ID
- WHERE ASO.SALE_TYPE = 4
- AND OO.ORDER_STATUS IN (2,5)
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = ASO.INSERT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= ASO.INSERT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= ASO.INSERT_TIME
- </if>
- <if test="wagonNo != null">
- and OTO.ORDER_WAGON_NO like #{wagonNo}
- </if>
- <if test="consigneeName != null">
- and RC.CONSIGNEE_COMPANY_NAME like #{consigneeName}
- </if>
- <if test="toTheStation != null">
- and RAR1.ARRIVAL_NAME like #{toTheStation}
- </if>
- <if test="sendStation != null">
- and RAR.ARRIVAL_NAME like #{sendStation}
- </if>
- <if test="materialSpa != null">
- and RAR.ARRIVAL_NAME like '%${materialSpa}'
- </if>
- <if test="materialName != null">
- and RAR.ARRIVAL_NAME like '%${materialName}'
- </if>
- Order By "OutStation" desc,OTO.ORDER_WAGON_NO
- )
- </select>
- <select id="getTrainOrderIds" resultType="java.math.BigDecimal" parameterType="decimal">
- SELECT OO.ORDER_ID FROM TMSTT_ORDER TTO
- LEFT JOIN OMSTRAIN_ORDER OO
- ON OO.ORDER_ID = TTO.TRAIN_ORDER_ID
- WHERE TTO.TRUCK_ORDER_ID = #{orderId}
- </select>
- </mapper>
|