|
@@ -2247,7 +2247,7 @@
|
|
|
#{voyidName}, '%')
|
|
|
</if>
|
|
|
<if test="boxNumber != null and boxNumber != ''">and tc.f_no like concat('%',
|
|
|
- #{voyidName}, '%')
|
|
|
+ #{boxNumber}, '%')
|
|
|
</if>
|
|
|
<if test="createBy != null and createBy != ''">and tw.create_by = #{createBy}</if>
|
|
|
<if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
|
|
@@ -3000,6 +3000,8 @@
|
|
|
LEFT JOIN t_goods tg ON tg.f_id = tcr.f_goodsid
|
|
|
LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_serviceitems AND sd.dict_type = 'f_serviceitems'
|
|
|
LEFT JOIN sys_dict_data tk ON tk.dict_value = tw.f_serviceitems_new AND tk.dict_type = 'f_serviceitems'
|
|
|
+ LEFT JOIN t_vessel tv ON tw.f_vslid = tv.f_id
|
|
|
+ LEFT JOIN t_voyage ty ON tw.f_voyid = ty.f_id
|
|
|
<where>
|
|
|
tw.f_typeid = '1'
|
|
|
and tw.del_flag = '0'
|
|
@@ -3021,6 +3023,138 @@
|
|
|
</if>
|
|
|
<if test="fCargoPlanning != null "> and tw.f_cargo_planning = #{fCargoPlanning}</if>
|
|
|
<if test="fArrivalStatus != null "> and tw.f_arrival_status = #{fArrivalStatus}</if>
|
|
|
+ <if test="fId != null">and tw.f_id = #{fId}</if>
|
|
|
+ <if test="fCaregoStatus != null and fCaregoStatus != ''">and tw.f_carego_status = #{fCaregoStatus}</if>
|
|
|
+ <if test="fCntrno != null and fCntrno != ''">and twc.f_cntrno like concat('%', #{fCntrno}, '%')</if>
|
|
|
+ <if test="fCustomsdeclartion != null and fCustomsdeclartion != ''">and tw.f_customsdeclartion =
|
|
|
+ #{fCustomsdeclartion}
|
|
|
+ </if>
|
|
|
+ <if test="fOriginalbillno != null and fOriginalbillno != ''">and tw.f_originalbillno = #{fOriginalbillno}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="fDeptid != null ">and tw.f_deptid = #{fDeptid}</if>
|
|
|
+ <if test="fBsdeptid != null ">and tw.f_bsdeptid = #{fBsdeptid}</if>
|
|
|
+ <if test="fContacts != null and fContacts != ''">and tw.f_contacts = #{fContacts}</if>
|
|
|
+ <if test="fTel != null and fTel != ''">and tw.f_tel = #{fTel}</if>
|
|
|
+ <if test="fCorpid != null ">and tw.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and tw.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
+ <if test="fTocorpid != null ">and tw.f_tocorpid = #{fTocorpid}</if>
|
|
|
+ <if test="fStltypeid != null ">and tw.f_stltypeid = #{fStltypeid}</if>
|
|
|
+ <if test="fBscorpno != null and fBscorpno != ''">and tw.f_bscorpno = #{fBscorpno}</if>
|
|
|
+ <if test="fWarehouseid != null ">and tw.f_warehouseid = #{fWarehouseid}</if>
|
|
|
+ <if test="fStorekeeper != null and fStorekeeper != ''">and tw.f_storekeeper = #{fStorekeeper}</if>
|
|
|
+ <if test="fChargedate != null ">and tw.f_chargedate = #{fChargedate}</if>
|
|
|
+ <if test="fBsdate != null ">and tw.f_bsdate = #{fBsdate}</if>
|
|
|
+ <if test="fPlanqty != null ">and tw.f_planqty = #{fPlanqty}</if>
|
|
|
+ <if test="fPlangrossweight != null ">and tw.f_plangrossweight = #{fPlangrossweight}</if>
|
|
|
+ <if test="fPlannetweight != null ">and tw.f_plannetweight = #{fPlannetweight}</if>
|
|
|
+ <if test="fPlanvolumn != null ">and tw.f_planvolumn = #{fPlanvolumn}</if>
|
|
|
+ <if test="fQty != null ">and tw.f_qty = #{fQty}</if>
|
|
|
+ <if test="fGrossweight != null ">and tw.f_grossweight = #{fGrossweight}</if>
|
|
|
+ <if test="fNetweight != null ">and tw.f_netweight = #{fNetweight}</if>
|
|
|
+ <if test="fVolumn != null ">and tw.f_volumn = #{fVolumn}</if>
|
|
|
+ <if test="fBillingway != null ">and tw.f_billingway = #{fBillingway}</if>
|
|
|
+ <if test="fTrademodeid != null ">and tw.f_trademodeid = #{fTrademodeid}</if>
|
|
|
+ <if test="fSbu != null ">and tw.f_sbu = #{fSbu}</if>
|
|
|
+ <if test="fFeetunit != null and fFeetunit != ''">and tw.f_feetunit = #{fFeetunit}</if>
|
|
|
+ <if test="fMblno != null and fMblno != ''">and tw.f_mblno like concat('%',
|
|
|
+ #{fMblno}, '%')</if>
|
|
|
+ <if test="fMarks != null and fMarks != ''">and tw.f_marks = #{fMarks}</if>
|
|
|
+ <if test="fVslvoy != null and fVslvoy != ''">and tw.f_vslvoy = #{fVslvoy}</if>
|
|
|
+ <if test="fEta != null ">and tw.f_eta = #{fEta}</if>
|
|
|
+ <if test="fCustomno != null and fCustomno != ''">and tw.f_customno = #{fCustomno}</if>
|
|
|
+ <if test="fIfweigh != null and fIfweigh != ''">and tw.f_ifweigh = #{fIfweigh}</if>
|
|
|
+ <if test="fIfpledge != null and fIfpledge != ''">and tw.f_ifpledge = #{fIfpledge}</if>
|
|
|
+ <if test="fIfdamage != null and fIfdamage != ''">and tw.f_ifdamage = #{fIfdamage}</if>
|
|
|
+ <if test="fBankcorpid != null and fBankcorpid != ''">and tw.f_bankcorpid = #{fBankcorpid}</if>
|
|
|
+ <if test="fBilltype != null and fBilltype != ''">and tw.f_billtype = #{fBilltype}</if>
|
|
|
+ <if test="fBillstatus != null and (fBillstatus == 4 or fBillstatus == 6 or fBillstatus == 9 or fBillstatus == 11)">
|
|
|
+ and tw.f_billstatus = #{fBillstatus}
|
|
|
+ and tw.f_updete_status = 2
|
|
|
+ and tw.f_submit_update = 2
|
|
|
+ and tw.f_delete_status = 2
|
|
|
+ </if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus == 10">
|
|
|
+ and tw.f_billstatus in ('3','8')
|
|
|
+ and tw.f_updete_status in ('2','3')
|
|
|
+ and tw.f_submit_update in ('2','3')
|
|
|
+ and tw.f_delete_status in ('2','3')
|
|
|
+ </if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus == 12">
|
|
|
+ AND (tw.f_updete_status != 2
|
|
|
+ OR tw.f_submit_update != 2
|
|
|
+ OR tw.f_delete_status != 2 )
|
|
|
+ </if>
|
|
|
+ <if test="fItemsStatus != null ">and tw.f_items_status = #{fItemsStatus}</if>
|
|
|
+ <if test="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
|
|
|
+ <if test="fProductName != null and fProductName != ''">and tw.f_product_name like concat('%',
|
|
|
+ #{fProductName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="fReviewDate != null ">and tw.f_review_date = #{fReviewDate}</if>
|
|
|
+ <if test="fTruckno != null and fTruckno != ''">and tw.f_truckno = #{fTruckno}</if>
|
|
|
+ <if test="fDriverName != null and fDriverName != ''">and tw.f_driver_name like concat('%', #{fDriverName},
|
|
|
+ '%')
|
|
|
+ </if>
|
|
|
+ <if test="fDriverTel != null and fDriverTel != ''">and tw.f_driver_tel = #{fDriverTel}</if>
|
|
|
+ <if test="fDriverIdCar != null and fDriverIdCar != ''">and tw.f_driver_id_car = #{fDriverIdCar}</if>
|
|
|
+ <if test="fBusinessType != null and fBusinessType != ''">and tw.f_business_type = #{fBusinessType}</if>
|
|
|
+ <if test="fLabour != null ">and tw.f_labour = #{fLabour}</if>
|
|
|
+ <if test="fFleet != null ">and tw.f_fleet = #{fFleet}</if>
|
|
|
+ <if test="fInwarehouseid != null ">and tw.f_inwarehouseid = #{fInwarehouseid}</if>
|
|
|
+ <if test="fBstime != null ">and tw.f_bstime = #{fBstime}</if>
|
|
|
+ <if test="fCartype != null ">and tw.f_cartype = #{fCartype}</if>
|
|
|
+ <if test="fGoodsid != null ">and tw.f_goodsid = #{fGoodsid}</if>
|
|
|
+ <if test="fNewTrademodeid != null ">and tw.f_new_trademodeid = #{fNewTrademodeid}</if>
|
|
|
+ <if test="fLoadportid != null ">and tw.f_loadportid = #{fLoadportid}</if>
|
|
|
+ <if test="fDestportid != null ">and tw.f_destportid = #{fDestportid}</if>
|
|
|
+ <if test="fServiceitems != null and fServiceitems != ''">and tw.f_serviceitems = #{fServiceitems}</if>
|
|
|
+ <if test="fInvoceobj != null and fInvoceobj != ''">and tw.f_invoceobj = #{fInvoceobj}</if>
|
|
|
+ <if test="fSign != null ">and tw.f_sign = #{fSign}</if>
|
|
|
+ <if test="fDetentioncargo != null ">and tw.f_detentioncargo = #{fDetentioncargo}</if>
|
|
|
+ <if test="fBooksmarks != null and fBooksmarks != ''">and tw.f_booksmarks = #{fBooksmarks}</if>
|
|
|
+ <if test="fShippername != null and fShippername != ''">and tw.f_shippername like concat('%',
|
|
|
+ #{fShippername}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="fShipperattn != null and fShipperattn != ''">and tw.f_shipperattn = #{fShipperattn}</if>
|
|
|
+ <if test="fShippertel != null and fShippertel != ''">and tw.f_shippertel = #{fShippertel}</if>
|
|
|
+ <if test="fConsigneername != null and fConsigneername != ''">and tw.f_consigneername like concat('%',
|
|
|
+ #{fConsigneername}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="fConsigneeattn != null and fConsigneeattn != ''">and tw.f_consigneeattn = #{fConsigneeattn}</if>
|
|
|
+ <if test="fConsigneetel != null and fConsigneetel != ''">and tw.f_consigneetel = #{fConsigneetel}</if>
|
|
|
+ <if test="fInsurance != null and fInsurance != ''">and tw.f_insurance = #{fInsurance}</if>
|
|
|
+ <if test="fInsuranceamt != null ">and tw.f_insuranceamt = #{fInsuranceamt}</if>
|
|
|
+ <if test="fClosedate != null ">and tw.f_closedate = #{fClosedate}</if>
|
|
|
+ <if test="fDocmentdate != null ">and tw.f_docmentdate = #{fDocmentdate}</if>
|
|
|
+ <if test="fTypeid != null ">and tw.f_typeid = #{fTypeid}</if>
|
|
|
+ <if test="fPaymode != null">and tw.f_paymode = #{fPaymode},</if>
|
|
|
+ <if test="fLaneid != null">and tw.f_laneid = #{fLaneid},</if>
|
|
|
+ <if test='startTime != null'>
|
|
|
+ and tw.create_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test='endTime != null'>
|
|
|
+ and tw.create_time <= #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="fCntrid != null ">and tc.f_cntrid = #{fCntrid}</if>
|
|
|
+ <if test="fCntrcount != null ">and tc.f_cntrcount = #{fCntrcount}</if>
|
|
|
+ <if test="vslidName != null and vslidName != ''">and tv.f_name like concat('%',
|
|
|
+ #{vslidName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="voyidName != null and voyidName != ''">and ty.f_no like concat('%',
|
|
|
+ #{voyidName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="boxNumber != null and boxNumber != ''">and twc.f_cntrno like concat('%',
|
|
|
+ #{boxNumber}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null and createBy != ''">and tw.create_by = #{createBy}</if>
|
|
|
+ <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
|
|
|
+ and ty.f_ATD >= #{timeInterval[0]}
|
|
|
+ </if>
|
|
|
+ <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
|
|
|
+ and ty.f_ATD <= #{timeInterval[1]}
|
|
|
+ </if>
|
|
|
+ <if test="fShipTwo != null "> and tw.f_ship_two = #{fShipTwo}</if>
|
|
|
+ <if test="fVoyTwo != null "> and tw.f_voy_two = #{fVoyTwo}</if>
|
|
|
</where>
|
|
|
ORDER BY tw.f_mblno,twc.f_cntrno
|
|
|
)a,
|