|
@@ -21,22 +21,22 @@
|
|
|
<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"/>
|
|
|
+ <result property="offData" column="off_data"/>
|
|
|
+ <result property="offRemarks" column="off_remarks"/>
|
|
|
<result property="mdLoadRemarks" column="md_load_remarks"/>
|
|
|
<result property="unLoadDate" column="un_load_date"/>
|
|
|
<result property="unLoadRemarks" column="un_load_remarks"/>
|
|
|
<result property="waybillDate" column="waybill_date"/>
|
|
|
- <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="cntrQty" column="cntr_qty"/>
|
|
|
<result property="gopodsLossQty" column="gopods_loss_qty"/>
|
|
|
+ <result property="cntrWeight" column="cntr_weight"/>
|
|
|
<result property="gopodsLossrate" column="gopods_lossrate"/>
|
|
|
+ <result property="waybillRemarks" column="waybill_remarks"/>
|
|
|
<result property="gopodsLossamtCr" column="gopods_lossamt_cr"/>
|
|
|
<result property="qtyDr" column="qty_dr"/>
|
|
|
<result property="gopodsLossamtDr" column="gopods_lossamt_dr"/>
|
|
@@ -86,20 +86,28 @@
|
|
|
<result property="billStatus" column="bill_status"/>
|
|
|
<result property="orderStatus" column="order_status"/>
|
|
|
<result property="accchkDate" column="accchk_date"/>
|
|
|
+ <result property="costomAmt01" column="costom_amt_01"/>
|
|
|
<result property="stlAmtDr" column="stl_amt_dr"/>
|
|
|
+ <result property="costomAmt02" column="costom_amt_02"/>
|
|
|
<result property="stlDateDr" column="stl_date_dr"/>
|
|
|
+ <result property="costomAmt03" column="costom_amt_03"/>
|
|
|
<result property="stlAmtCr" column="stl_amt_cr"/>
|
|
|
+ <result property="costomAmt04" column="costom_amt_04"/>
|
|
|
<result property="stlDateCr" column="stl_date_cr"/>
|
|
|
+ <result property="costomAmt05" column="costom_amt_05"/>
|
|
|
+ <result property="costomAmt06" column="costom_amt_06"/>
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="costomStr01" column="costom_str_01"/>
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
+ <result property="costomStr02" column="costom_str_02"/>
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
<result property="remarks" column="remarks"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectftmsorderbillscarsVo">
|
|
|
- select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_user_id, 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
|
|
|
+ select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_user_id, driver_tel, plan_date, plan_remarks, accept_date, accept_remarks, load_date, load_remarks, md_load_date, off_data, off_remarks, md_load_remarks, un_load_date, un_load_remarks, waybill_date, qty_load, qty_un_load, cntr_qty, gopods_loss_qty, cntr_weight, gopods_lossrate, waybill_remarks, 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, costom_amt_01, stl_amt_dr, costom_amt_02, stl_date_dr, costom_amt_03, stl_amt_cr, costom_amt_04, stl_date_cr, costom_amt_05, costom_amt_06, del_flag, costom_str_01, create_by, create_time, costom_str_02, update_by, update_time, remarks from F_TMSORDERBILLSCARS
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
|
|
@@ -113,29 +121,29 @@
|
|
|
<if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
|
|
|
<if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
|
|
|
<if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
|
|
|
- <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
|
|
|
<if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
|
|
|
+ <if test="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
|
|
|
<if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
|
|
|
<if test="planDate != null "> and plan_date = #{planDate}</if>
|
|
|
<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>
|
|
|
+ <if test="offData != null "> and off_data = #{offData}</if>
|
|
|
+ <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
|
|
|
<if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
|
|
|
<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="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
|
|
|
<if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
|
|
|
+ <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
|
|
|
<if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
|
|
|
+ <if test="waybillRemarks != null and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</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>
|
|
@@ -185,10 +193,18 @@
|
|
|
<if test="billStatus != null "> and bill_status = #{billStatus}</if>
|
|
|
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
|
|
|
<if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
|
|
|
+ <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
|
|
|
<if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
|
|
|
+ <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
|
|
|
<if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
|
|
|
+ <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
|
|
|
<if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
|
|
|
+ <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
|
|
|
<if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
|
|
|
+ <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
|
|
|
+ <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
|
|
|
+ <if test="costomStr01 != null and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
|
|
|
+ <if test="costomStr02 != null and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
|
|
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -204,29 +220,29 @@
|
|
|
<if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
|
|
|
<if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
|
|
|
<if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
|
|
|
- <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
|
|
|
<if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
|
|
|
+ <if test="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
|
|
|
<if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
|
|
|
<if test="planDate != null "> and plan_date = #{planDate}</if>
|
|
|
<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>
|
|
|
+ <if test="offData != null "> and off_data = #{offData}</if>
|
|
|
+ <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
|
|
|
<if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
|
|
|
<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="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
|
|
|
<if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
|
|
|
+ <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
|
|
|
<if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
|
|
|
+ <if test="waybillRemarks != null and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</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>
|
|
@@ -276,10 +292,18 @@
|
|
|
<if test="billStatus != null "> and bill_status = #{billStatus}</if>
|
|
|
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
|
|
|
<if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
|
|
|
+ <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
|
|
|
<if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
|
|
|
+ <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
|
|
|
<if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
|
|
|
+ <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
|
|
|
<if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
|
|
|
+ <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
|
|
|
<if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
|
|
|
+ <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
|
|
|
+ <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
|
|
|
+ <if test="costomStr01 != null and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
|
|
|
+ <if test="costomStr02 != null and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
|
|
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -295,29 +319,31 @@
|
|
|
<if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
|
|
|
<if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
|
|
|
<if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
|
|
|
- <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
|
|
|
<if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
|
|
|
+ <if test="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
|
|
|
<if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
|
|
|
<if test="planDate != null "> and plan_date = #{planDate}</if>
|
|
|
<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>
|
|
|
+ <if test="offData != null "> and off_data = #{offData}</if>
|
|
|
+ <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
|
|
|
<if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
|
|
|
<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="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
|
|
|
<if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
|
|
|
+ <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
|
|
|
<if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
|
|
|
- <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
|
|
|
+ <if test="waybillRemarks != null and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</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>
|
|
@@ -365,10 +391,18 @@
|
|
|
<if test="billStatus != null "> and bill_status = #{billStatus}</if>
|
|
|
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
|
|
|
<if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
|
|
|
+ <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
|
|
|
<if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
|
|
|
+ <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
|
|
|
<if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
|
|
|
+ <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
|
|
|
<if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
|
|
|
+ <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
|
|
|
<if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
|
|
|
+ <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
|
|
|
+ <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
|
|
|
+ <if test="costomStr01 != null and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
|
|
|
+ <if test="costomStr02 != null and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
|
|
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -380,6 +414,7 @@
|
|
|
c.mblno,
|
|
|
c.load_date loadDate,
|
|
|
c.carreg_no carregNo,
|
|
|
+ driver.name,
|
|
|
c.order_status orderStatus,
|
|
|
p.f_name corpId,
|
|
|
CASE
|
|
@@ -453,13 +488,15 @@
|
|
|
AND pod.dict_type = 'port_end'
|
|
|
LEFT JOIN sys_dict_data dic ON dic.dict_value = c.cntr_id
|
|
|
AND dic.dict_type = 'data_cntrId'
|
|
|
+ LEFT JOIN fleet_driver_msg driver ON driver.id = c.driver_user_id
|
|
|
<where>
|
|
|
- <if test="corpId != null"> and t.corp_id = #{corpId}</if>
|
|
|
- <if test="billType != null"> and t.bill_type = #{billType}</if>
|
|
|
- <if test="transType != null"> and t.trans_type = #{transType}</if>
|
|
|
- <if test="transProp != null"> and t.trans_prop = #{transProp}</if>
|
|
|
- <if test="goodsId != null"> and t.goods_id = #{goodsId}</if>
|
|
|
- <if test="orderStatus != null"> and c.order_status = #{orderStatus}</if>
|
|
|
+ <if test="corpId != null">and t.corp_id = #{corpId}</if>
|
|
|
+ <if test="billType != null">and t.bill_type = #{billType}</if>
|
|
|
+ <if test="transType != null">and t.trans_type = #{transType}</if>
|
|
|
+ <if test="transProp != null">and t.trans_prop = #{transProp}</if>
|
|
|
+ <if test="goodsId != null">and t.goods_id = #{goodsId}</if>
|
|
|
+ <if test="driverTel != null">and c.driver_tel = #{driverTel}</if>
|
|
|
+ <if test="orderStatus != null">and c.order_status = #{orderStatus}</if>
|
|
|
<if test='planDate != null and planDate[0] != null and planDate[0]!= ""'>
|
|
|
and c.plan_date >= #{planDate[0]}
|
|
|
</if>
|
|
@@ -472,13 +509,13 @@
|
|
|
<if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
|
|
|
and c.load_date <= #{cLoadDate[1]}
|
|
|
</if>
|
|
|
- <if test="mblno != null and mblno != ''"> and t.mblno like concat('%', #{mblno}, '%')</if>
|
|
|
- <if test="carregNo != null and carregNo != ''"> and c.carreg_no like concat('%', #{carregNo}, '%')</if>
|
|
|
- <if test="loadAddr != null and loadAddr != ''"> and t.load_addr like concat('%', #{loadAddr}, '%')</if>
|
|
|
- <if test="unLoadAddr != null and unLoadAddr != ''"> and t.un_load_addr like concat('%', #{unLoadAddr}, '%')</if>
|
|
|
- <if test="mdLoadAddr != null and mdLoadAddr != ''"> and t.md_load_addr like concat('%', #{mdLoadAddr}, '%')</if>
|
|
|
+ <if test="mblno != null and mblno != ''">and t.mblno like concat('%', #{mblno}, '%')</if>
|
|
|
+ <if test="carregNo != null and carregNo != ''">and c.carreg_no like concat('%', #{carregNo}, '%')</if>
|
|
|
+ <if test="loadAddr != null and loadAddr != ''">and t.load_addr like concat('%', #{loadAddr}, '%')</if>
|
|
|
+ <if test="unLoadAddr != null and unLoadAddr != ''">and t.un_load_addr like concat('%', #{unLoadAddr},'%')</if>
|
|
|
+ <if test="mdLoadAddr != null and mdLoadAddr != ''">and t.md_load_addr like concat('%', #{mdLoadAddr},'%')</if>
|
|
|
</where>
|
|
|
- ORDER BY c.id desc
|
|
|
+ ORDER BY c.id desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectftmsorderbillscarsById" parameterType="Long" resultMap="ftmsorderbillscarsResult">
|
|
@@ -509,7 +546,7 @@
|
|
|
t.corp_id AS fCorpId,
|
|
|
corp.f_name AS fCorpIds,
|
|
|
u.nick_name AS planUserId,
|
|
|
- driver.nick_name AS driverUserId,
|
|
|
+ driver.nick_name AS driverUserIds,
|
|
|
t.un_load_date AS tUnLoadDate,
|
|
|
t.un_load_addr AS unLoadAddr,
|
|
|
t.un_load_attn AS unLoadAttn,
|
|
@@ -547,6 +584,14 @@
|
|
|
c.odometer_end AS odometerEnd,
|
|
|
c.accept_date AS acceptDate,
|
|
|
c.accept_remarks AS acceptRemarks,
|
|
|
+ c.costom_amt_01 AS costomAmt01,
|
|
|
+ c.costom_amt_02 AS costomAmt02,
|
|
|
+ c.costom_amt_03 AS costomAmt03,
|
|
|
+ c.costom_amt_04 AS costomAmt04,
|
|
|
+ c.costom_amt_05 AS costomAmt05,
|
|
|
+ c.costom_amt_06 AS costomAmt06,
|
|
|
+ c.costom_str_01 AS costomStr01,
|
|
|
+ c.costom_str_02 AS costomStr02,
|
|
|
c.load_date AS loadDate,
|
|
|
c.load_remarks AS loadRemarks,
|
|
|
c.md_load_date AS mdLoadDate,
|
|
@@ -580,6 +625,39 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectHomeUpperRightMapList" resultType="Map">
|
|
|
+ SELECT
|
|
|
+ car.id,
|
|
|
+ car.mblno,
|
|
|
+ car.carreg_no carregNo,
|
|
|
+ car.order_status orderStatus,
|
|
|
+ t.f_name corpName
|
|
|
+ FROM
|
|
|
+ F_TMSORDERBILLSCARS car
|
|
|
+ LEFT JOIN F_TMSORDERBILLS bill ON bill.id = car.org_id
|
|
|
+ LEFT JOIN t_corps t ON t.f_id = bill.corp_id
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectHomeUpperLeftCntrs" parameterType="list" resultType="Map">
|
|
|
+ SELECT
|
|
|
+ IFNULL(SUM( cntr_qty ), 0) planQuantity, IFNULL(SUM( cntr_blc_qty ), 0) surplusQuantity
|
|
|
+ FROM
|
|
|
+ F_TMSORDERBILLSCNTRS
|
|
|
+ where
|
|
|
+ create_time >= #{currentDay[0]}
|
|
|
+ and create_time <= #{currentDay[1]}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectHomeUpperLeftCars" parameterType="list" resultType="int">
|
|
|
+ SELECT
|
|
|
+ COUNT( id )
|
|
|
+ FROM
|
|
|
+ F_TMSORDERBILLSCARS
|
|
|
+ where
|
|
|
+ create_time >= #{currentDay[0]}
|
|
|
+ and create_time <= #{currentDay[1]}
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertftmsorderbillscars" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into F_TMSORDERBILLSCARS
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -589,8 +667,8 @@
|
|
|
<if test="cntrId != null">cntr_id,</if>
|
|
|
<if test="cntrNo != null">cntr_no,</if>
|
|
|
<if test="carcorPid != null">carcor_pid,</if>
|
|
|
- <if test="carregNo != null">carreg_no,</if>
|
|
|
<if test="mblno != null">mblno,</if>
|
|
|
+ <if test="carregNo != null">carreg_no,</if>
|
|
|
<if test="driverName != null">driver_name,</if>
|
|
|
<if test="driverUserId != null">driver_user_id,</if>
|
|
|
<if test="driverTel != null">driver_tel,</if>
|
|
@@ -600,10 +678,10 @@
|
|
|
<if test="acceptRemarks != null">accept_remarks,</if>
|
|
|
<if test="loadDate != null">load_date,</if>
|
|
|
<if test="loadRemarks != null">load_remarks,</if>
|
|
|
- <if test="offData != null">off_data,</if>
|
|
|
<if test="mdLoadDate != null">md_load_date,</if>
|
|
|
- <if test="mdLoadRemarks != null">md_load_remarks,</if>
|
|
|
+ <if test="offData != null">off_data,</if>
|
|
|
<if test="offRemarks != null">off_remarks,</if>
|
|
|
+ <if test="mdLoadRemarks != null">md_load_remarks,</if>
|
|
|
<if test="unLoadDate != null">un_load_date,</if>
|
|
|
<if test="unLoadRemarks != null">un_load_remarks,</if>
|
|
|
<if test="waybillDate != null">waybill_date,</if>
|
|
@@ -613,11 +691,11 @@
|
|
|
<if test="gopodsLossQty != null">gopods_loss_qty,</if>
|
|
|
<if test="cntrWeight != null">cntr_weight,</if>
|
|
|
<if test="gopodsLossrate != null">gopods_lossrate,</if>
|
|
|
+ <if test="waybillRemarks != null">waybill_remarks,</if>
|
|
|
<if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
|
|
|
<if test="qtyDr != null">qty_dr,</if>
|
|
|
- <if test="waybillRemarks != null">waybill_remarks,</if>
|
|
|
- <if test="qtyCr != null">qty_cr,</if>
|
|
|
<if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
|
|
|
+ <if test="qtyCr != null">qty_cr,</if>
|
|
|
<if test="freightPriceDr != null">freight_price_dr,</if>
|
|
|
<if test="freightPriceCr != null">freight_price_cr,</if>
|
|
|
<if test="freightAmtDr != null">freight_amt_dr,</if>
|
|
@@ -663,13 +741,21 @@
|
|
|
<if test="billStatus != null">bill_status,</if>
|
|
|
<if test="orderStatus != null">order_status,</if>
|
|
|
<if test="accchkDate != null">accchk_date,</if>
|
|
|
+ <if test="costomAmt01 != null">costom_amt_01,</if>
|
|
|
<if test="stlAmtDr != null">stl_amt_dr,</if>
|
|
|
+ <if test="costomAmt02 != null">costom_amt_02,</if>
|
|
|
<if test="stlDateDr != null">stl_date_dr,</if>
|
|
|
+ <if test="costomAmt03 != null">costom_amt_03,</if>
|
|
|
<if test="stlAmtCr != null">stl_amt_cr,</if>
|
|
|
+ <if test="costomAmt04 != null">costom_amt_04,</if>
|
|
|
<if test="stlDateCr != null">stl_date_cr,</if>
|
|
|
+ <if test="costomAmt05 != null">costom_amt_05,</if>
|
|
|
+ <if test="costomAmt06 != null">costom_amt_06,</if>
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="costomStr01 != null">costom_str_01,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
+ <if test="costomStr02 != null">costom_str_02,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="remarks != null">remarks,</if>
|
|
@@ -681,8 +767,8 @@
|
|
|
<if test="cntrId != null">#{cntrId},</if>
|
|
|
<if test="cntrNo != null">#{cntrNo},</if>
|
|
|
<if test="carcorPid != null">#{carcorPid},</if>
|
|
|
- <if test="carregNo != null">#{carregNo},</if>
|
|
|
<if test="mblno != null">#{mblno},</if>
|
|
|
+ <if test="carregNo != null">#{carregNo},</if>
|
|
|
<if test="driverName != null">#{driverName},</if>
|
|
|
<if test="driverUserId != null">#{driverUserId},</if>
|
|
|
<if test="driverTel != null">#{driverTel},</if>
|
|
@@ -692,10 +778,10 @@
|
|
|
<if test="acceptRemarks != null">#{acceptRemarks},</if>
|
|
|
<if test="loadDate != null">#{loadDate},</if>
|
|
|
<if test="loadRemarks != null">#{loadRemarks},</if>
|
|
|
- <if test="offData != null">#{offData},</if>
|
|
|
<if test="mdLoadDate != null">#{mdLoadDate},</if>
|
|
|
- <if test="mdLoadRemarks != null">#{mdLoadRemarks},</if>
|
|
|
+ <if test="offData != null">#{offData},</if>
|
|
|
<if test="offRemarks != null">#{offRemarks},</if>
|
|
|
+ <if test="mdLoadRemarks != null">#{mdLoadRemarks},</if>
|
|
|
<if test="unLoadDate != null">#{unLoadDate},</if>
|
|
|
<if test="unLoadRemarks != null">#{unLoadRemarks},</if>
|
|
|
<if test="waybillDate != null">#{waybillDate},</if>
|
|
@@ -705,11 +791,11 @@
|
|
|
<if test="gopodsLossQty != null">#{gopodsLossQty},</if>
|
|
|
<if test="cntrWeight != null">#{cntrWeight},</if>
|
|
|
<if test="gopodsLossrate != null">#{gopodsLossrate},</if>
|
|
|
+ <if test="waybillRemarks != null">#{waybillRemarks},</if>
|
|
|
<if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
|
|
|
<if test="qtyDr != null">#{qtyDr},</if>
|
|
|
- <if test="waybillRemarks != null">#{waybillRemarks},</if>
|
|
|
- <if test="qtyCr != null">#{qtyCr},</if>
|
|
|
<if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
|
|
|
+ <if test="qtyCr != null">#{qtyCr},</if>
|
|
|
<if test="freightPriceDr != null">#{freightPriceDr},</if>
|
|
|
<if test="freightPriceCr != null">#{freightPriceCr},</if>
|
|
|
<if test="freightAmtDr != null">#{freightAmtDr},</if>
|
|
@@ -755,13 +841,21 @@
|
|
|
<if test="billStatus != null">#{billStatus},</if>
|
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
|
|
<if test="accchkDate != null">#{accchkDate},</if>
|
|
|
+ <if test="costomAmt01 != null">#{costomAmt01},</if>
|
|
|
<if test="stlAmtDr != null">#{stlAmtDr},</if>
|
|
|
+ <if test="costomAmt02 != null">#{costomAmt02},</if>
|
|
|
<if test="stlDateDr != null">#{stlDateDr},</if>
|
|
|
+ <if test="costomAmt03 != null">#{costomAmt03},</if>
|
|
|
<if test="stlAmtCr != null">#{stlAmtCr},</if>
|
|
|
+ <if test="costomAmt04 != null">#{costomAmt04},</if>
|
|
|
<if test="stlDateCr != null">#{stlDateCr},</if>
|
|
|
+ <if test="costomAmt05 != null">#{costomAmt05},</if>
|
|
|
+ <if test="costomAmt06 != null">#{costomAmt06},</if>
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="costomStr01 != null">#{costomStr01},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="costomStr02 != null">#{costomStr02},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remarks != null">#{remarks},</if>
|
|
@@ -777,8 +871,8 @@
|
|
|
<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="carregNo != null">carreg_no = #{carregNo},</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="driverUserId != null">driver_user_id = #{driverUserId},</if>
|
|
|
<if test="driverTel != null">driver_tel = #{driverTel},</if>
|
|
@@ -788,10 +882,10 @@
|
|
|
<if test="acceptRemarks != null">accept_remarks = #{acceptRemarks},</if>
|
|
|
<if test="loadDate != null">load_date = #{loadDate},</if>
|
|
|
<if test="loadRemarks != null">load_remarks = #{loadRemarks},</if>
|
|
|
- <if test="offData != null">off_data = #{offData},</if>
|
|
|
<if test="mdLoadDate != null">md_load_date = #{mdLoadDate},</if>
|
|
|
- <if test="mdLoadRemarks != null">md_load_remarks = #{mdLoadRemarks},</if>
|
|
|
+ <if test="offData != null">off_data = #{offData},</if>
|
|
|
<if test="offRemarks != null">off_remarks = #{offRemarks},</if>
|
|
|
+ <if test="mdLoadRemarks != null">md_load_remarks = #{mdLoadRemarks},</if>
|
|
|
<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>
|
|
@@ -801,11 +895,11 @@
|
|
|
<if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
|
|
|
<if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
|
|
|
<if test="gopodsLossrate != null">gopods_lossrate = #{gopodsLossrate},</if>
|
|
|
+ <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
|
|
|
<if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
|
|
|
<if test="qtyDr != null">qty_dr = #{qtyDr},</if>
|
|
|
- <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
|
|
|
- <if test="qtyCr != null">qty_cr = #{qtyCr},</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>
|
|
|
<if test="freightPriceCr != null">freight_price_cr = #{freightPriceCr},</if>
|
|
|
<if test="freightAmtDr != null">freight_amt_dr = #{freightAmtDr},</if>
|
|
@@ -851,13 +945,21 @@
|
|
|
<if test="billStatus != null">bill_status = #{billStatus},</if>
|
|
|
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
|
|
<if test="accchkDate != null">accchk_date = #{accchkDate},</if>
|
|
|
+ <if test="costomAmt01 != null">costom_amt_01 = #{costomAmt01},</if>
|
|
|
<if test="stlAmtDr != null">stl_amt_dr = #{stlAmtDr},</if>
|
|
|
+ <if test="costomAmt02 != null">costom_amt_02 = #{costomAmt02},</if>
|
|
|
<if test="stlDateDr != null">stl_date_dr = #{stlDateDr},</if>
|
|
|
+ <if test="costomAmt03 != null">costom_amt_03 = #{costomAmt03},</if>
|
|
|
<if test="stlAmtCr != null">stl_amt_cr = #{stlAmtCr},</if>
|
|
|
+ <if test="costomAmt04 != null">costom_amt_04 = #{costomAmt04},</if>
|
|
|
<if test="stlDateCr != null">stl_date_cr = #{stlDateCr},</if>
|
|
|
+ <if test="costomAmt05 != null">costom_amt_05 = #{costomAmt05},</if>
|
|
|
+ <if test="costomAmt06 != null">costom_amt_06 = #{costomAmt06},</if>
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="costomStr01 != null">costom_str_01 = #{costomStr01},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="costomStr02 != null">costom_str_02 = #{costomStr02},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
@@ -871,6 +973,15 @@
|
|
|
where org_id = #{orgId}
|
|
|
</update>
|
|
|
|
|
|
+ <update id="updateftmsorderbillscarsDriverNamePhone">
|
|
|
+ UPDATE F_TMSORDERBILLSCARS car
|
|
|
+ LEFT JOIN sys_user u ON u.user_id = car.driver_user_id
|
|
|
+ SET car.driver_name = u.nick_name,
|
|
|
+ car.driver_tel = u.phonenumber
|
|
|
+ WHERE
|
|
|
+ car.driver_user_id IS NOT NULL
|
|
|
+ </update>
|
|
|
+
|
|
|
<delete id="deleteftmsorderbillscarsById" parameterType="Long">
|
|
|
delete from F_TMSORDERBILLSCARS where id = #{id}
|
|
|
</delete>
|