|
@@ -20,6 +20,8 @@
|
|
|
<result property="planRemarks" column="plan_remarks"/>
|
|
|
<result property="acceptDate" column="accept_date"/>
|
|
|
<result property="acceptRemarks" column="accept_remarks"/>
|
|
|
+ <result property="offData" column="off_data"/>
|
|
|
+ <result property="offRemarks" column="off_remarks"/>
|
|
|
<result property="loadDate" column="load_date"/>
|
|
|
<result property="loadRemarks" column="load_remarks"/>
|
|
|
<result property="mdLoadDate" column="md_load_date"/>
|
|
@@ -27,13 +29,15 @@
|
|
|
<result property="unLoadDate" column="un_load_date"/>
|
|
|
<result property="unLoadRemarks" column="un_load_remarks"/>
|
|
|
<result property="waybillDate" column="waybill_date"/>
|
|
|
- <result property="cntrQty" column="cntr_qty"/>
|
|
|
+ <result property="waybillRemarks" column="waybill_remarks"/>
|
|
|
<result property="qtyLoad" column="qty_load"/>
|
|
|
+ <result property="cntrQty" column="cntr_qty"/>
|
|
|
<result property="qtyUnLoad" column="qty_un_load"/>
|
|
|
+ <result property="cntrWeight" column="cntr_weight"/>
|
|
|
<result property="gopodsLossQty" column="gopods_loss_qty"/>
|
|
|
<result property="gopodsLossrate" column="gopods_lossrate"/>
|
|
|
- <result property="qtyDr" column="qty_dr"/>
|
|
|
<result property="gopodsLossamtCr" column="gopods_lossamt_cr"/>
|
|
|
+ <result property="qtyDr" column="qty_dr"/>
|
|
|
<result property="gopodsLossamtDr" column="gopods_lossamt_dr"/>
|
|
|
<result property="qtyCr" column="qty_cr"/>
|
|
|
<result property="freightPriceDr" column="freight_price_dr"/>
|
|
@@ -94,16 +98,7 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectftmsorderbillscarsVo">
|
|
|
- select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, carreg_no, mblno, driver_name, driver_tel, plan_date,
|
|
|
- plan_remarks, accept_date, accept_remarks, load_date, load_remarks, md_load_date, md_load_remarks, un_load_date,
|
|
|
- un_load_remarks, waybill_date, cntr_qty, qty_load, qty_un_load, gopods_loss_qty, gopods_lossrate, qty_dr, gopods_lossamt_cr,
|
|
|
- gopods_lossamt_dr, qty_cr, freight_price_dr, freight_price_cr, freight_amt_dr, freight_amt_cr, feeitem_dr,
|
|
|
- feeitem_dr_remarks, feeitem_cr, feeitem_cr_remarks, amt_dr, amt_cr, due_date_dr, due_date_cr, odometer_from,
|
|
|
- odometer_end, miles_empty, miles_load, miles, driverbonus, costtoll, costmaintain, cost_oth, cost_remarks,
|
|
|
- oil_qtyper, oil_qty1, oil_price1, oil_amt1, oil_qty2, oil_price2, oil_amt2, oil_qty, oil_price, oil_amt,
|
|
|
- oil_qty_blc, oil_amt_blc, profit, inv_dr_need, inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no,
|
|
|
- accchk_staus, bill_status, order_status, accchk_date, stl_amt_dr, stl_date_dr, stl_amt_cr, stl_date_cr, del_flag, create_by,
|
|
|
- create_time, update_by, update_time, remarks from F_TMSORDERBILLSCARS
|
|
|
+ select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_tel, plan_date, plan_remarks, accept_date, off_data, off_remarks, accept_remarks, load_date, load_remarks, md_load_date, md_load_remarks, un_load_date, un_load_remarks, waybill_date, waybill_remarks, qty_load, cntr_qty, qty_un_load, cntr_weight, gopods_loss_qty, gopods_lossrate, gopods_lossamt_cr, qty_dr, gopods_lossamt_dr, qty_cr, freight_price_dr, freight_price_cr, freight_amt_dr, freight_amt_cr, feeitem_dr, feeitem_dr_remarks, feeitem_cr, feeitem_cr_remarks, amt_dr, amt_cr, due_date_dr, due_date_cr, odometer_from, odometer_end, miles_empty, miles_load, miles, driverbonus, costtoll, costmaintain, cost_oth, cost_remarks, oil_qtyper, oil_qty1, oil_price1, oil_amt1, oil_qty2, oil_price2, oil_amt2, oil_qty, oil_price, oil_amt, oil_qty_blc, oil_amt_blc, profit, inv_dr_need, inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no, accchk_staus, bill_status, order_status, accchk_date, stl_amt_dr, stl_date_dr, stl_amt_cr, stl_date_cr, del_flag, create_by, create_time, update_by, update_time, remarks from F_TMSORDERBILLSCARS
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
|
|
@@ -123,6 +118,8 @@
|
|
|
<if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
|
|
|
<if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
|
|
|
<if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
|
|
|
+ <if test="offData != null "> and off_data = #{offData}</if>
|
|
|
+ <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
|
|
|
<if test="loadDate != null "> and load_date = #{loadDate}</if>
|
|
|
<if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
|
|
|
<if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
|
|
@@ -130,12 +127,15 @@
|
|
|
<if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
|
|
|
<if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
|
|
|
<if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
|
|
|
+ <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
|
|
|
<if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
|
|
|
+ <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
|
|
|
<if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
|
|
|
+ <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
|
|
|
<if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
|
|
|
<if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
|
|
|
- <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
|
|
|
<if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
|
|
|
+ <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
|
|
|
<if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
|
|
|
<if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
|
|
|
<if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
|
|
@@ -208,6 +208,8 @@
|
|
|
<if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
|
|
|
<if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
|
|
|
<if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
|
|
|
+ <if test="offData != null "> and off_data = #{offData}</if>
|
|
|
+ <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
|
|
|
<if test="loadDate != null "> and load_date = #{loadDate}</if>
|
|
|
<if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
|
|
|
<if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
|
|
@@ -215,12 +217,15 @@
|
|
|
<if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
|
|
|
<if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
|
|
|
<if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
|
|
|
+ <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
|
|
|
<if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
|
|
|
+ <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
|
|
|
<if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
|
|
|
+ <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
|
|
|
<if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
|
|
|
<if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
|
|
|
- <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
|
|
|
<if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
|
|
|
+ <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
|
|
|
<if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
|
|
|
<if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
|
|
|
<if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
|
|
@@ -293,6 +298,8 @@
|
|
|
<if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
|
|
|
<if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
|
|
|
<if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
|
|
|
+ <if test="offData != null "> and off_data = #{offData}</if>
|
|
|
+ <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
|
|
|
<if test="loadDate != null "> and load_date = #{loadDate}</if>
|
|
|
<if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
|
|
|
<if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
|
|
@@ -300,6 +307,7 @@
|
|
|
<if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
|
|
|
<if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
|
|
|
<if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
|
|
|
+ <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
|
|
|
<if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
|
|
|
<if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
|
|
|
<if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
|
|
@@ -366,6 +374,7 @@
|
|
|
c.id,
|
|
|
c.order_no orderNo,
|
|
|
c.mblno,
|
|
|
+ c.load_date loadDate,
|
|
|
c.carreg_no carregNo,
|
|
|
c.order_status orderStatus,
|
|
|
p.f_name corpId,
|
|
@@ -380,7 +389,7 @@
|
|
|
t.pol_id polId,
|
|
|
t.pod_id podId,
|
|
|
t.load_addr loadAddr,
|
|
|
- t.load_date loadDate,
|
|
|
+ t.load_date tLoadDate,
|
|
|
t.load_attn loadAttn,
|
|
|
t.load_attntel loadAttntel,
|
|
|
t.md_load_addr mdLoadAddr,
|
|
@@ -392,10 +401,12 @@
|
|
|
t.un_load_attn unLoadAttn,
|
|
|
t.un_load_attn_tel unLoadAttnTel,
|
|
|
c.accept_date acceptDate,
|
|
|
+ c.off_data offData,
|
|
|
c.load_date cLoadDate,
|
|
|
c.md_load_date cMdLoadDate,
|
|
|
c.un_load_date cUnLoadDate,
|
|
|
- c.waybill_date waybillDate
|
|
|
+ c.waybill_date waybillDate,
|
|
|
+ c.waybill_remarks waybillRemarks
|
|
|
FROM
|
|
|
F_TMSORDERBILLSCARS c
|
|
|
LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
|
|
@@ -447,11 +458,59 @@
|
|
|
org_id = #{id}
|
|
|
AND order_status >= 30
|
|
|
</select>
|
|
|
+ <select id="selectTmsorderbillsCarsByDriver" parameterType="Long" resultType="Map">
|
|
|
+ SELECT
|
|
|
+ c.id,
|
|
|
+ c.p_id AS pId,
|
|
|
+ c.org_id AS orgId,
|
|
|
+ t.corp_id AS fCorpId,
|
|
|
+ corp.f_name AS fCorpIds,
|
|
|
+ t.un_load_addr AS unLoadAddr,
|
|
|
+ t.bill_type AS billType,
|
|
|
+ t.trans_type AS transType,
|
|
|
+ t.trans_prop AS transProp,
|
|
|
+ t.load_addr AS tLoadAddr,
|
|
|
+ t.load_date AS tLoadDate,
|
|
|
+ t.load_attn AS loadAttn,
|
|
|
+ t.load_attntel AS loadAttntel,
|
|
|
+ c.carreg_no AS carregNo,
|
|
|
+ c.mblno,
|
|
|
+ g.f_name AS goodsId,
|
|
|
+ c.cntr_qty AS cntrQty,
|
|
|
+ c.cntr_weight AS cntrWeight,
|
|
|
+ t.ysl,
|
|
|
+ t.voy,
|
|
|
+ t.pol_id AS polId,
|
|
|
+ t.pod_id AS podId,
|
|
|
+ c.cntr_id AS cntrId,
|
|
|
+ c.carreg_no AS carregNo,
|
|
|
+ c.carcor_pid AS carcorPid,
|
|
|
+ c.driver_tel AS driverTel,
|
|
|
+ c.driver_name AS driverName,
|
|
|
+ c.odometer_from AS odometerFrom,
|
|
|
+ c.odometer_end AS odometerEnd,
|
|
|
+ c.accept_date AS acceptDate,
|
|
|
+ c.accept_remarks AS acceptRemarks,
|
|
|
+ c.load_date AS loadDate,
|
|
|
+ c.load_remarks AS loadRemarks,
|
|
|
+ c.md_load_date AS mdLoadDate,
|
|
|
+ c.md_load_remarks AS mdLoadRemarks,
|
|
|
+ c.un_load_date AS unLoadDate,
|
|
|
+ c.un_load_remarks AS unLoadRemarks,
|
|
|
+ c.waybill_date AS waybillDate,
|
|
|
+ c.waybill_remarks AS waybillRemarks
|
|
|
+ FROM
|
|
|
+ F_TMSORDERBILLSCARS c
|
|
|
+ LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
|
|
|
+ LEFT JOIN t_corps corp ON corp.f_id = t.corp_id
|
|
|
+ LEFT JOIN t_goods g ON g.f_id = t.goods_id
|
|
|
+ where
|
|
|
+ c.id = #{id}
|
|
|
+ </select>
|
|
|
|
|
|
<insert id="insertftmsorderbillscars" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into F_TMSORDERBILLSCARS
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">id,</if>
|
|
|
<if test="pId != null">p_id,</if>
|
|
|
<if test="orgId != null">org_id,</if>
|
|
|
<if test="orderNo != null">order_no,</if>
|
|
@@ -466,6 +525,8 @@
|
|
|
<if test="planRemarks != null">plan_remarks,</if>
|
|
|
<if test="acceptDate != null">accept_date,</if>
|
|
|
<if test="acceptRemarks != null">accept_remarks,</if>
|
|
|
+ <if test="offData != null">off_data,</if>
|
|
|
+ <if test="offRemarks != null">off_remarks,</if>
|
|
|
<if test="loadDate != null">load_date,</if>
|
|
|
<if test="loadRemarks != null">load_remarks,</if>
|
|
|
<if test="mdLoadDate != null">md_load_date,</if>
|
|
@@ -473,12 +534,15 @@
|
|
|
<if test="unLoadDate != null">un_load_date,</if>
|
|
|
<if test="unLoadRemarks != null">un_load_remarks,</if>
|
|
|
<if test="waybillDate != null">waybill_date,</if>
|
|
|
+ <if test="waybillRemarks != null">waybill_remarks,</if>
|
|
|
<if test="qtyLoad != null">qty_load,</if>
|
|
|
+ <if test="cntrQty != null">cntr_qty,</if>
|
|
|
<if test="qtyUnLoad != null">qty_un_load,</if>
|
|
|
+ <if test="cntrWeight != null">cntr_weight,</if>
|
|
|
<if test="gopodsLossQty != null">gopods_loss_qty,</if>
|
|
|
<if test="gopodsLossrate != null">gopods_lossrate,</if>
|
|
|
- <if test="qtyDr != null">qty_dr,</if>
|
|
|
<if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
|
|
|
+ <if test="qtyDr != null">qty_dr,</if>
|
|
|
<if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
|
|
|
<if test="qtyCr != null">qty_cr,</if>
|
|
|
<if test="freightPriceDr != null">freight_price_dr,</if>
|
|
@@ -538,7 +602,6 @@
|
|
|
<if test="remarks != null">remarks,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">#{id},</if>
|
|
|
<if test="pId != null">#{pId},</if>
|
|
|
<if test="orgId != null">#{orgId},</if>
|
|
|
<if test="orderNo != null">#{orderNo},</if>
|
|
@@ -560,12 +623,15 @@
|
|
|
<if test="unLoadDate != null">#{unLoadDate},</if>
|
|
|
<if test="unLoadRemarks != null">#{unLoadRemarks},</if>
|
|
|
<if test="waybillDate != null">#{waybillDate},</if>
|
|
|
+ <if test="waybillRemarks != null">#{waybillRemarks},</if>
|
|
|
<if test="qtyLoad != null">#{qtyLoad},</if>
|
|
|
+ <if test="cntrQty != null">#{cntrQty},</if>
|
|
|
<if test="qtyUnLoad != null">#{qtyUnLoad},</if>
|
|
|
+ <if test="cntrWeight != null">#{cntrWeight},</if>
|
|
|
<if test="gopodsLossQty != null">#{gopodsLossQty},</if>
|
|
|
<if test="gopodsLossrate != null">#{gopodsLossrate},</if>
|
|
|
- <if test="qtyDr != null">#{qtyDr},</if>
|
|
|
<if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
|
|
|
+ <if test="qtyDr != null">#{qtyDr},</if>
|
|
|
<if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
|
|
|
<if test="qtyCr != null">#{qtyCr},</if>
|
|
|
<if test="freightPriceDr != null">#{freightPriceDr},</if>
|
|
@@ -635,7 +701,7 @@
|
|
|
<if test="cntrId != null">cntr_id = #{cntrId},</if>
|
|
|
<if test="cntrNo != null">cntr_no = #{cntrNo},</if>
|
|
|
<if test="carcorPid != null">carcor_pid = #{carcorPid},</if>
|
|
|
- <if test="mblno != null">carreg_no = #{mblno},</if>
|
|
|
+ <if test="mblno != null">mblno = #{mblno},</if>
|
|
|
<if test="carregNo != null">carreg_no = #{carregNo},</if>
|
|
|
<if test="driverName != null">driver_name = #{driverName},</if>
|
|
|
<if test="driverTel != null">driver_tel = #{driverTel},</if>
|
|
@@ -643,6 +709,8 @@
|
|
|
<if test="planRemarks != null">plan_remarks = #{planRemarks},</if>
|
|
|
<if test="acceptDate != null">accept_date = #{acceptDate},</if>
|
|
|
<if test="acceptRemarks != null">accept_remarks = #{acceptRemarks},</if>
|
|
|
+ <if test="offData != null">off_data = #{offData},</if>
|
|
|
+ <if test="offRemarks != null">off_remarks = #{offRemarks},</if>
|
|
|
<if test="loadDate != null">load_date = #{loadDate},</if>
|
|
|
<if test="loadRemarks != null">load_remarks = #{loadRemarks},</if>
|
|
|
<if test="mdLoadDate != null">md_load_date = #{mdLoadDate},</if>
|
|
@@ -650,12 +718,15 @@
|
|
|
<if test="unLoadDate != null">un_load_date = #{unLoadDate},</if>
|
|
|
<if test="unLoadRemarks != null">un_load_remarks = #{unLoadRemarks},</if>
|
|
|
<if test="waybillDate != null">waybill_date = #{waybillDate},</if>
|
|
|
+ <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
|
|
|
<if test="qtyLoad != null">qty_load = #{qtyLoad},</if>
|
|
|
+ <if test="cntrQty != null">cntr_qty = #{cntrQty},</if>
|
|
|
<if test="qtyUnLoad != null">qty_un_load = #{qtyUnLoad},</if>
|
|
|
+ <if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
|
|
|
<if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
|
|
|
<if test="gopodsLossrate != null">gopods_lossrate = #{gopodsLossrate},</if>
|
|
|
- <if test="qtyDr != null">qty_dr = #{qtyDr},</if>
|
|
|
<if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
|
|
|
+ <if test="qtyDr != null">qty_dr = #{qtyDr},</if>
|
|
|
<if test="gopodsLossamtDr != null">gopods_lossamt_dr = #{gopodsLossamtDr},</if>
|
|
|
<if test="qtyCr != null">qty_cr = #{qtyCr},</if>
|
|
|
<if test="freightPriceDr != null">freight_price_dr = #{freightPriceDr},</if>
|