123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517 |
- <?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.BmstruckDetailsOrderMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.BmstruckDetailsOrder">
- <id column="DETAILS_ID" jdbcType="DECIMAL" property="detailsId"/>
- <result column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId"/>
- <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId"/>
- <result column="DETAILS_NO" jdbcType="VARCHAR" property="detailsNo"/>
- <result column="DETAILS_TIME" jdbcType="TIMESTAMP" property="detailsTime"/>
- <result column="PRICE_ID" jdbcType="DECIMAL" property="priceId"/>
- <result column="DETAILS_AMOUNT" jdbcType="DECIMAL" property="detailsAmount"/>
- <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="WETHER_TO_STATEMENT" jdbcType="DECIMAL" property="wetherToStatement"/>
- </resultMap>
- <sql id="columns">
- DETAILS_ID, PURCHASE_ORDER_ID, ORDER_ID, DETAILS_NO, DETAILS_TIME, PRICE_ID, DETAILS_AMOUNT,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- WETHER_TO_STATEMENT
- </sql>
- <sql id="columns_alias">
- t.DETAILS_ID, t.PURCHASE_ORDER_ID, t.ORDER_ID, t.DETAILS_NO, t.DETAILS_TIME, t.PRICE_ID,
- t.DETAILS_AMOUNT, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
- t.INSERT_UPDATE_REMARK, t.WETHER_TO_STATEMENT
- </sql>
- <sql id="select">
- SELECT
- <include refid="columns"/>
- FROM BMSTRUCK_DETAILS_ORDER
- </sql>
- <sql id="select_alias">
- SELECT
- <include refid="columns_alias"/>
- FROM BMSTRUCK_DETAILS_ORDER t
- </sql>
- <sql id="where">
- <where>
- <if test="detailsId != null">
- and DETAILS_ID = #{detailsId}
- </if>
- <if test="purchaseOrderId != null">
- and PURCHASE_ORDER_ID = #{purchaseOrderId}
- </if>
- <if test="orderId != null">
- and ORDER_ID = #{orderId}
- </if>
- <if test="detailsNo != null and detailsNo != ''">
- and DETAILS_NO = #{detailsNo}
- </if>
- <if test="detailsTime != null">
- and TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = #{detailsTime}
- </if>
- <if test="priceId != null">
- and PRICE_ID = #{priceId}
- </if>
- <if test="detailsAmount != null">
- and DETAILS_AMOUNT = #{detailsAmount}
- </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="wetherToStatement != null">
- and WETHER_TO_STATEMENT = #{wetherToStatement}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="detailsId != null">
- and DETAILS_ID = #{detailsId}
- </if>
- <if test="purchaseOrderId != null">
- and PURCHASE_ORDER_ID = #{purchaseOrderId}
- </if>
- <if test="orderId != null">
- and ORDER_ID = #{orderId}
- </if>
- <if test="detailsNo != null and detailsNo != ''">
- and DETAILS_NO LIKE '%${detailsNo}%'
- </if>
- <if test="detailsTime != null">
- and TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = #{detailsTime}
- </if>
- <if test="priceId != null">
- and PRICE_ID = #{priceId}
- </if>
- <if test="detailsAmount != null">
- and DETAILS_AMOUNT = #{detailsAmount}
- </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="wetherToStatement != null">
- and WETHER_TO_STATEMENT = #{wetherToStatement}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete
- from BMSTRUCK_DETAILS_ORDER
- where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from BMSTRUCK_DETAILS_ORDER
- where 1!=1
- <if test="purchaseOrderId != null">
- or PURCHASE_ORDER_ID = #{purchaseOrderId}
- </if>
- <if test="orderId != null">
- or ORDER_ID = #{orderId}
- </if>
- <if test="detailsNo != null and detailsNo != ''">
- or DETAILS_NO = #{detailsNo}
- </if>
- <if test="detailsTime != null">
- or TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = '#{detailsTime}'
- </if>
- <if test="priceId != null">
- or PRICE_ID = #{priceId}
- </if>
- <if test="detailsAmount != null">
- or DETAILS_AMOUNT = #{detailsAmount}
- </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="wetherToStatement != null">
- or WETHER_TO_STATEMENT = #{wetherToStatement}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.BmstruckDetailsOrder">
- insert into BMSTRUCK_DETAILS_ORDER (DETAILS_ID, PURCHASE_ORDER_ID, ORDER_ID,
- DETAILS_NO, DETAILS_TIME, PRICE_ID,
- DETAILS_AMOUNT, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- WETHER_TO_STATEMENT)
- values (#{detailsId,jdbcType=DECIMAL}, #{purchaseOrderId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL},
- #{detailsNo,jdbcType=VARCHAR}, #{detailsTime,jdbcType=TIMESTAMP}, #{priceId,jdbcType=DECIMAL},
- #{detailsAmount,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
- #{insertUpdateRemark,jdbcType=VARCHAR},
- #{wetherToStatement,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmstruckDetailsOrder">
- insert into BMSTRUCK_DETAILS_ORDER
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="detailsId != null">
- DETAILS_ID,
- </if>
- <if test="purchaseOrderId != null">
- PURCHASE_ORDER_ID,
- </if>
- <if test="orderId != null">
- ORDER_ID,
- </if>
- <if test="detailsNo != null">
- DETAILS_NO,
- </if>
- <if test="detailsTime != null">
- DETAILS_TIME,
- </if>
- <if test="priceId != null">
- PRICE_ID,
- </if>
- <if test="detailsAmount != null">
- DETAILS_AMOUNT,
- </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="wetherToStatement != null">
- WETHER_TO_STATEMENT,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="detailsId != null">
- #{detailsId,jdbcType=DECIMAL},
- </if>
- <if test="purchaseOrderId != null">
- #{purchaseOrderId,jdbcType=DECIMAL},
- </if>
- <if test="orderId != null">
- #{orderId,jdbcType=DECIMAL},
- </if>
- <if test="detailsNo != null">
- #{detailsNo,jdbcType=VARCHAR},
- </if>
- <if test="detailsTime != null">
- #{detailsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="priceId != null">
- #{priceId,jdbcType=DECIMAL},
- </if>
- <if test="detailsAmount != null">
- #{detailsAmount,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="wetherToStatement != null">
- #{wetherToStatement,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmstruckDetailsOrder">
- update BMSTRUCK_DETAILS_ORDER
- set PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
- ORDER_ID = #{orderId,jdbcType=DECIMAL},
- DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
- DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
- PRICE_ID = #{priceId,jdbcType=DECIMAL},
- DETAILS_AMOUNT = #{detailsAmount,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},
- WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL}
- where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmstruckDetailsOrder">
- update BMSTRUCK_DETAILS_ORDER
- <set>
- <if test="purchaseOrderId != null">
- PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
- </if>
- <if test="orderId != null">
- ORDER_ID = #{orderId,jdbcType=DECIMAL},
- </if>
- <if test="detailsNo != null">
- DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
- </if>
- <if test="detailsTime != null">
- DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="priceId != null">
- PRICE_ID = #{priceId,jdbcType=DECIMAL},
- </if>
- <if test="detailsAmount != null">
- DETAILS_AMOUNT = #{detailsAmount,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="wetherToStatement != null">
- WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
- </if>
- </set>
- where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where DETAILS_ID = #{detailsId,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 BMSTRUCK_DETAILS_ORDER
- (DETAILS_ID,
- PURCHASE_ORDER_ID, ORDER_ID, DETAILS_NO,
- DETAILS_TIME, PRICE_ID, DETAILS_AMOUNT,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, WETHER_TO_STATEMENT
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.detailsId,jdbcType=DECIMAL},
- #{item.purchaseOrderId,jdbcType=DECIMAL}, #{item.orderId,jdbcType=DECIMAL}, #{item.detailsNo,jdbcType=VARCHAR},
- #{item.detailsTime,jdbcType=TIMESTAMP}, #{item.priceId,jdbcType=DECIMAL},
- #{item.detailsAmount,jdbcType=DECIMAL},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.wetherToStatement,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update BMSTRUCK_DETAILS_ORDER
- set
- DETAILS_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsId,jdbcType=DECIMAL}
- </foreach>
- ,PURCHASE_ORDER_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
- </foreach>
- ,DETAILS_NO=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsNo,jdbcType=VARCHAR}
- </foreach>
- ,DETAILS_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsTime,jdbcType=TIMESTAMP}
- </foreach>
- ,PRICE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
- </foreach>
- ,DETAILS_AMOUNT=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsAmount,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,WETHER_TO_STATEMENT=
- <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.wetherToStatement,jdbcType=DECIMAL}
- </foreach>
- where DETAILS_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.detailsId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from BMSTRUCK_DETAILS_ORDER
- where DETAILS_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 查询销售计费详单 -->
- <select id="getSaleDetailsOrder" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT DISTINCT BDO.DETAILS_NO AS "detailsNo",
- BDO.DETAILS_TIME AS "detailsTime",
- RCA.CAPACITY_NUMBER AS "capacityNumber",
- RS.SHIPPER_NAME AS "startPlace",
- RCO.CONSIGNEE_COMPANY_NAME AS "endPlace",
- ASP.PLAN_MATERIAL_NUMBER AS "materialNumber",
- BDO.DETAILS_AMOUNT AS "detailsAmount",
- RC.CARRIER_NAME AS "carrierName",
- RM.MATERIAL_NAME AS "materialName",
- RM.MATERIAL_CODE AS "materialCode"
- FROM BMSTRUCK_DETAILS_STATEMENT BDS
- LEFT JOIN BMSTRUCK_DETAILS_ORDER BDO
- ON BDO.DETAILS_ID = BDS.DETAILS_ID
- LEFT JOIN OMSTRUCK_ORDER OO
- ON BDO.ORDER_ID = OO.ORDER_ID
- LEFT JOIN RMS_DRIVER_CAPACITY RDC
- ON RDC.DRIVER_CAPACITY_ID = OO.DRIVER_CAPACITY_ID
- LEFT JOIN RMS_CAPACITY RCA
- ON RCA.CAPACITY_ID = RDC.CAPACITY_ID
- 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 RCO
- ON RCO.CONSIGNEE_ID = ASO.RECEIVE_ID
- LEFT JOIN AMS_SALE_PLAN ASP
- ON ASP.PLAN_ID = ASO.PLAN_ID
- LEFT JOIN AMS_DISPATCH_SALE_ORDER ADSO
- ON ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN RMS_CARRIER RC
- ON RC.CARRIER_ID = ADSO.CARRIER_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = ASP.MATERIAL_ID
- WHERE BDS.STATEMENT_ID = #{statementId}
- </select>
- <!-- 查询采购计费详单 -->
- <select id="getPurchaseDetailsOrder" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT BDO.DETAILS_NO AS "detailsNo",
- BDO.DETAILS_TIME AS "detailsTime",
- RCP.CAPACITY_NUMBER AS "capacityNumber",
- APO.PUCHASE_ORDER_MATERIAL_NUMBER AS "materialNumber",
- BDO.DETAILS_AMOUNT AS "detailsAmount",
- RCR.CARRIER_NAME AS "carrierName",
- RM.MATERIAL_CODE AS "materialCode",
- RM.MATERIAL_NAME AS "materialName"
- FROM BMSTRUCK_DETAILS_ORDER BDO
- LEFT JOIN OMSTRUCK_ORDER OO
- ON OO.ORDER_ID = BDO.ORDER_ID
- LEFT JOIN RMS_DRIVER_CAPACITY RDC
- ON RDC.DRIVER_CAPACITY_ID = OO.DRIVER_CAPACITY_ID
- LEFT JOIN RMS_CAPACITY RCP
- ON RCP.CAPACITY_ID = RDC.CAPACITY_ID
- LEFT JOIN AMS_PURCHASE_ORDER APO
- ON BDO.PURCHASE_ORDER_ID = APO.PURCHASE_ORDER_ID
- LEFT JOIN AMSTRUCK_PURPLAN AP
- ON AP.BATCH_ID = APO.BATCH_ID
- LEFT JOIN RMS_CARRIER RCR
- ON RCR.CARRIER_ID = AP.CARRIER_ID
- LEFT JOIN DIL_BATCH DB
- ON DB.BATCH_ID = AP.BATCH_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = DB.MATERIAL_ID
- WHERE BDO.DETAILS_ID = #{detailsId}
- </select>
- <!-- 查询采购汽运账单所需信息 -->
- <select id="getStatementMessage" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT RS.SHIPPER_NAME AS "consigneeCompanyName",
- RCR.CARRIER_NAME AS "collectionName",
- RS.SHIPPER_NAME AS "statementPaymentUnit",
- RSU.SUPPLIER_DUTY_PARAGRAPH AS "statementSendUnit"
- FROM BMSTRUCK_DETAILS_ORDER BDO
- LEFT JOIN AMS_PURCHASE_ORDER APO
- ON APO.PURCHASE_ORDER_ID = BDO.PURCHASE_ORDER_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = APO.RECEIVE_UNIT_ID
- LEFT JOIN AMSTRUCK_PURPLAN AP
- ON AP.BATCH_ID = APO.BATCH_ID
- LEFT JOIN RMS_CARRIER RCR
- ON RCR.CARRIER_ID = AP.CARRIER_ID
- LEFT JOIN RMS_SUPPLIER RSU
- ON RSU.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
- </select>
- </mapper>
|