|
@@ -7,6 +7,7 @@
|
|
|
<resultMap type="ftmsorderbillscars" id="ftmsorderbillscarsResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="pId" column="p_id" />
|
|
|
+ <result property="srcMId" column="src_m_id" />
|
|
|
<result property="orgId" column="org_id" />
|
|
|
<result property="orderNo" column="order_no" />
|
|
|
<result property="cntrId" column="cntr_id" />
|
|
@@ -134,6 +135,22 @@
|
|
|
accchk_date_dr from F_TMSORDERBILLSCARS
|
|
|
</sql>
|
|
|
|
|
|
+ <sql id="selectftmsorderbillscarsTemporaryStorageVo">
|
|
|
+ select id, p_id, org_id, order_no, cntr_id, corp_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_cr,
|
|
|
+ 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,
|
|
|
+ m_bill_no, bill_kind, remarks, profit_bill, profit_car, inv_amt_cr, inv_amt_dr, inv_date_cr, inv_date_dr, accchk_amt_cr, accchk_amt_dr,
|
|
|
+ accchk_date_dr from F_TMSORDERBILLSCARS_MODIFY
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
|
|
|
<include refid="selectftmsorderbillscarsVo"/>
|
|
|
<where>
|
|
@@ -627,6 +644,11 @@
|
|
|
where p_id = #{pId}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectftmsorderbillscarsTemporaryStorageBySrcMId" parameterType="Long" resultMap="ftmsorderbillscarsResult">
|
|
|
+ <include refid="selectftmsorderbillscarsTemporaryStorageVo"/>
|
|
|
+ where src_m_id = #{srcMId}
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectStowageList" parameterType="ftmsorderbills" resultType="Map">
|
|
|
SELECT
|
|
|
#{id} id,
|
|
@@ -1159,6 +1181,236 @@
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
+ <insert id="insertftmsorderbillscarsTemporaryStorage" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into F_TMSORDERBILLSCARS_MODIFY
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pId != null">p_id,</if>
|
|
|
+ <if test="orgId != null">org_id,</if>
|
|
|
+ <if test="srcMId!= null">src_m_id,</if>
|
|
|
+ <if test="orderNo != null">order_no,</if>
|
|
|
+ <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="driverName != null">driver_name,</if>
|
|
|
+ <if test="driverTel != null">driver_tel,</if>
|
|
|
+ <if test="driverUserId != null">driver_user_id,</if>
|
|
|
+ <if test="planDate != null">plan_date,</if>
|
|
|
+ <if test="planRemarks != null">plan_remarks,</if>
|
|
|
+ <if test="acceptDate != null">accept_date,</if>
|
|
|
+ <if test="acceptRemarks != null">accept_remarks,</if>
|
|
|
+ <if test="loadDate != null">load_date,</if>
|
|
|
+ <if test="loadRemarks != null">load_remarks,</if>
|
|
|
+ <if test="mdLoadDate != null">md_load_date,</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>
|
|
|
+ <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="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
|
|
|
+ <if test="qtyDr != null">qty_dr,</if>
|
|
|
+ <if test="waybillRemarks != null">waybill_remarks,</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>
|
|
|
+ <if test="freightAmtCr != null">freight_amt_cr,</if>
|
|
|
+ <if test="feeitemDr != null">feeitem_dr,</if>
|
|
|
+ <if test="feeitemDrRemarks != null">feeitem_dr_remarks,</if>
|
|
|
+ <if test="feeitemCr != null">feeitem_cr,</if>
|
|
|
+ <if test="feeitemCrRemarks != null">feeitem_cr_remarks,</if>
|
|
|
+ <if test="amtDr != null">amt_dr,</if>
|
|
|
+ <if test="amtCr != null">amt_cr,</if>
|
|
|
+ <if test="dueDateDr != null">due_date_dr,</if>
|
|
|
+ <if test="dueDateCr != null">due_date_cr,</if>
|
|
|
+ <if test="odometerFrom != null">odometer_from,</if>
|
|
|
+ <if test="odometerEnd != null">odometer_end,</if>
|
|
|
+ <if test="milesEmpty != null">miles_empty,</if>
|
|
|
+ <if test="milesLoad != null">miles_load,</if>
|
|
|
+ <if test="miles != null">miles,</if>
|
|
|
+ <if test="driverbonus != null">driverbonus,</if>
|
|
|
+ <if test="costtoll != null">costtoll,</if>
|
|
|
+ <if test="costmaintain != null">costmaintain,</if>
|
|
|
+ <if test="costOth != null">cost_oth,</if>
|
|
|
+ <if test="costRemarks != null">cost_remarks,</if>
|
|
|
+ <if test="oilQtyper != null">oil_qtyper,</if>
|
|
|
+ <if test="oilQty1 != null">oil_qty1,</if>
|
|
|
+ <if test="oilPrice1 != null">oil_price1,</if>
|
|
|
+ <if test="oilAmt1 != null">oil_amt1,</if>
|
|
|
+ <if test="oilQty2 != null">oil_qty2,</if>
|
|
|
+ <if test="oilPrice2 != null">oil_price2,</if>
|
|
|
+ <if test="oilAmt2 != null">oil_amt2,</if>
|
|
|
+ <if test="oilQty != null">oil_qty,</if>
|
|
|
+ <if test="oilPrice != null">oil_price,</if>
|
|
|
+ <if test="oilAmt != null">oil_amt,</if>
|
|
|
+ <if test="oilQtyBlc != null">oil_qty_blc,</if>
|
|
|
+ <if test="oilAmtBlc != null">oil_amt_blc,</if>
|
|
|
+ <if test="profit != null">profit,</if>
|
|
|
+ <if test="invDrNeed != null">inv_dr_need,</if>
|
|
|
+ <if test="invDrStatus != null">inv_dr_status,</if>
|
|
|
+ <if test="invDrTaxrate != null">inv_dr_taxrate,</if>
|
|
|
+ <if test="invDrTaxamt != null">inv_dr_taxamt,</if>
|
|
|
+ <if test="invDrDate != null">inv_dr_date,</if>
|
|
|
+ <if test="invDrNo != null">inv_dr_no,</if>
|
|
|
+ <if test="accchkStaus != null">accchk_staus,</if>
|
|
|
+ <if test="billStatus != null">bill_status,</if>
|
|
|
+ <if test="orderStatus != null">order_status,</if>
|
|
|
+ <if test="costomAmt01 != null">costom_amt_01,</if>
|
|
|
+ <if test="costomAmt02 != null">costom_amt_02,</if>
|
|
|
+ <if test="stlAmtDr != null">stl_amt_dr,</if>
|
|
|
+ <if test="costomAmt03 != null">costom_amt_03,</if>
|
|
|
+ <if test="stlDateDr != null">stl_date_dr,</if>
|
|
|
+ <if test="costomAmt04 != null">costom_amt_04,</if>
|
|
|
+ <if test="stlAmtCr != null">stl_amt_cr,</if>
|
|
|
+ <if test="costomAmt05 != null">costom_amt_05,</if>
|
|
|
+ <if test="stlDateCr != null">stl_date_cr,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="costomAmt06 != null">costom_amt_06,</if>
|
|
|
+ <if test="costomStr01 != null">costom_str_01,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="costomStr02 != null">costom_str_02,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="remarks != null">remarks,</if>
|
|
|
+ <if test="accchkDateCr != null">accchk_date_cr,</if>
|
|
|
+ <if test="mBillNo != null">m_bill_no,</if>
|
|
|
+ <if test="billKind != null">bill_kind,</if>
|
|
|
+ <if test="profitBill != null">profit_bill,</if>
|
|
|
+ <if test="profitCar != null">profit_car,</if>
|
|
|
+ <if test="corpId != null">corp_id,</if>
|
|
|
+ <if test="invAmtCr != null">inv_amt_cr,</if>
|
|
|
+ <if test="invAmtDr != null">inv_amt_dr,</if>
|
|
|
+ <if test="invDateCr != null">inv_date_cr,</if>
|
|
|
+ <if test="invDateDr != null">inv_date_dr,</if>
|
|
|
+ <if test="accchkAmtCr != null">accchk_amt_cr,</if>
|
|
|
+ <if test="accchkAmtDr != null">accchk_amt_dr,</if>
|
|
|
+ <if test="accchkDateDr != null">accchk_date_dr,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pId != null">#{pId},</if>
|
|
|
+ <if test="orgId != null">#{orgId},</if>
|
|
|
+ <if test="srcMId!= null">#{srcMId},</if>
|
|
|
+ <if test="orderNo != null">#{orderNo},</if>
|
|
|
+ <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="driverName != null">#{driverName},</if>
|
|
|
+ <if test="driverTel != null">#{driverTel},</if>
|
|
|
+ <if test="driverUserId != null">#{driverUserId},</if>
|
|
|
+ <if test="planDate != null">#{planDate},</if>
|
|
|
+ <if test="planRemarks != null">#{planRemarks},</if>
|
|
|
+ <if test="acceptDate != null">#{acceptDate},</if>
|
|
|
+ <if test="acceptRemarks != null">#{acceptRemarks},</if>
|
|
|
+ <if test="loadDate != null">#{loadDate},</if>
|
|
|
+ <if test="loadRemarks != null">#{loadRemarks},</if>
|
|
|
+ <if test="mdLoadDate != null">#{mdLoadDate},</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>
|
|
|
+ <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="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
|
|
|
+ <if test="qtyDr != null">#{qtyDr},</if>
|
|
|
+ <if test="waybillRemarks != null">#{waybillRemarks},</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>
|
|
|
+ <if test="freightAmtCr != null">#{freightAmtCr},</if>
|
|
|
+ <if test="feeitemDr != null">#{feeitemDr},</if>
|
|
|
+ <if test="feeitemDrRemarks != null">#{feeitemDrRemarks},</if>
|
|
|
+ <if test="feeitemCr != null">#{feeitemCr},</if>
|
|
|
+ <if test="feeitemCrRemarks != null">#{feeitemCrRemarks},</if>
|
|
|
+ <if test="amtDr != null">#{amtDr},</if>
|
|
|
+ <if test="amtCr != null">#{amtCr},</if>
|
|
|
+ <if test="dueDateDr != null">#{dueDateDr},</if>
|
|
|
+ <if test="dueDateCr != null">#{dueDateCr},</if>
|
|
|
+ <if test="odometerFrom != null">#{odometerFrom},</if>
|
|
|
+ <if test="odometerEnd != null">#{odometerEnd},</if>
|
|
|
+ <if test="milesEmpty != null">#{milesEmpty},</if>
|
|
|
+ <if test="milesLoad != null">#{milesLoad},</if>
|
|
|
+ <if test="miles != null">#{miles},</if>
|
|
|
+ <if test="driverbonus != null">#{driverbonus},</if>
|
|
|
+ <if test="costtoll != null">#{costtoll},</if>
|
|
|
+ <if test="costmaintain != null">#{costmaintain},</if>
|
|
|
+ <if test="costOth != null">#{costOth},</if>
|
|
|
+ <if test="costRemarks != null">#{costRemarks},</if>
|
|
|
+ <if test="oilQtyper != null">#{oilQtyper},</if>
|
|
|
+ <if test="oilQty1 != null">#{oilQty1},</if>
|
|
|
+ <if test="oilPrice1 != null">#{oilPrice1},</if>
|
|
|
+ <if test="oilAmt1 != null">#{oilAmt1},</if>
|
|
|
+ <if test="oilQty2 != null">#{oilQty2},</if>
|
|
|
+ <if test="oilPrice2 != null">#{oilPrice2},</if>
|
|
|
+ <if test="oilAmt2 != null">#{oilAmt2},</if>
|
|
|
+ <if test="oilQty != null">#{oilQty},</if>
|
|
|
+ <if test="oilPrice != null">#{oilPrice},</if>
|
|
|
+ <if test="oilAmt != null">#{oilAmt},</if>
|
|
|
+ <if test="oilQtyBlc != null">#{oilQtyBlc},</if>
|
|
|
+ <if test="oilAmtBlc != null">#{oilAmtBlc},</if>
|
|
|
+ <if test="profit != null">#{profit},</if>
|
|
|
+ <if test="invDrNeed != null">#{invDrNeed},</if>
|
|
|
+ <if test="invDrStatus != null">#{invDrStatus},</if>
|
|
|
+ <if test="invDrTaxrate != null">#{invDrTaxrate},</if>
|
|
|
+ <if test="invDrTaxamt != null">#{invDrTaxamt},</if>
|
|
|
+ <if test="invDrDate != null">#{invDrDate},</if>
|
|
|
+ <if test="invDrNo != null">#{invDrNo},</if>
|
|
|
+ <if test="accchkStaus != null">#{accchkStaus},</if>
|
|
|
+ <if test="billStatus != null">#{billStatus},</if>
|
|
|
+ <if test="orderStatus != null">#{orderStatus},</if>
|
|
|
+ <if test="costomAmt01 != null">#{costomAmt01},</if>
|
|
|
+ <if test="costomAmt02 != null">#{costomAmt02},</if>
|
|
|
+ <if test="stlAmtDr != null">#{stlAmtDr},</if>
|
|
|
+ <if test="costomAmt03 != null">#{costomAmt03},</if>
|
|
|
+ <if test="stlDateDr != null">#{stlDateDr},</if>
|
|
|
+ <if test="costomAmt04 != null">#{costomAmt04},</if>
|
|
|
+ <if test="stlAmtCr != null">#{stlAmtCr},</if>
|
|
|
+ <if test="costomAmt05 != null">#{costomAmt05},</if>
|
|
|
+ <if test="stlDateCr != null">#{stlDateCr},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="costomAmt06 != null">#{costomAmt06},</if>
|
|
|
+ <if test="costomStr01 != null">#{costomStr01},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="costomStr02 != null">#{costomStr02},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remarks != null">#{remarks},</if>
|
|
|
+ <if test="accchkDateCr != null">#{accchkDateCr},</if>
|
|
|
+ <if test="mBillNo != null">#{mBillNo},</if>
|
|
|
+ <if test="billKind != null">#{billKind},</if>
|
|
|
+ <if test="profitBill != null">#{profitBill},</if>
|
|
|
+ <if test="profitCar != null">#{profitCar},</if>
|
|
|
+ <if test="corpId != null">#{corpId},</if>
|
|
|
+ <if test="invAmtCr != null">#{invAmtCr},</if>
|
|
|
+ <if test="invAmtDr != null">#{invAmtDr},</if>
|
|
|
+ <if test="invDateCr != null">#{invDateCr},</if>
|
|
|
+ <if test="invDateDr != null">#{invDateDr},</if>
|
|
|
+ <if test="accchkAmtCr != null">#{accchkAmtCr},</if>
|
|
|
+ <if test="accchkAmtDr != null">#{accchkAmtDr},</if>
|
|
|
+ <if test="accchkDateDr != null">#{accchkDateDr},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
<update id="updateftmsorderbillscars" parameterType="ftmsorderbillscars">
|
|
|
update F_TMSORDERBILLSCARS
|
|
|
<trim prefix="SET" suffixOverrides=",">
|