|
@@ -126,8 +126,7 @@
|
|
|
f_consigneeattn, f_consigneetel, f_insurance, f_insuranceamt, f_closedate, f_docmentdate, f_vslid, f_voyid, f_typeid, f_paymode, f_laneid, f_cntval,
|
|
|
free_container_date, f_business_attribution, f_supervision_unit, f_declaration_elements, f_part_number, f_ifinspection, f_value, f_weighing_date,
|
|
|
f_ifsampling, send_sample_date, f_ifweight_recovery, weight_recovery_date, warehouse_status, f_times ,f_date_changed, f_chargetype,f_weigh_weight,
|
|
|
- f_predict_branch,f_grade,f_delivery_details,f_salesman_id,f_itemstatus from t_warehousebills
|
|
|
- f_ifsampling, send_sample_date, f_ifweight_recovery, weight_recovery_date, warehouse_status, f_times ,f_date_changed, f_updete_status, f_submit_update, f_delete_status from t_warehousebills
|
|
|
+ f_predict_branch,f_grade,f_delivery_details,f_salesman_id,f_itemstatus,f_updete_status, f_submit_update, f_delete_status from t_warehousebills
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
|
|
@@ -1491,7 +1490,10 @@
|
|
|
tw.f_paymode,
|
|
|
sda.dict_label paymodeName,
|
|
|
tw.f_laneid,
|
|
|
- tr.f_name laneidName
|
|
|
+ tr.f_name laneidName,
|
|
|
+ tw.f_updete_status,
|
|
|
+ tw.f_submit_update,
|
|
|
+ tw.f_delete_status
|
|
|
FROM t_warehousebills tw
|
|
|
LEFT JOIN t_address address ON address.f_id = tw.f_loadportid
|
|
|
LEFT JOIN t_address ta ON ta.f_id = tw.f_loadportid
|
|
@@ -1513,6 +1515,7 @@
|
|
|
LEFT JOIN t_voyage ty ON ty.f_id = tw.f_voyid
|
|
|
<where>
|
|
|
tw.f_typeid = '1'
|
|
|
+ and tw.del_flag = '0'
|
|
|
<if test="fId != null">and tw.f_id = #{fId}</if>
|
|
|
<if test="fBillno != null and fBillno != ''">and tw.f_billno = #{fBillno}</if>
|
|
|
<if test="fCustomsdeclartion != null and fCustomsdeclartion != ''">and tw.f_customsdeclartion =#{fCustomsdeclartion}</if>
|
|
@@ -1621,41 +1624,65 @@
|
|
|
tc.f_no fNo,
|
|
|
tv.f_name vslName,
|
|
|
ty.f_no voyNo,
|
|
|
- tw.f_corpid,
|
|
|
+ tw.f_corpid fCorpid,
|
|
|
tp.f_name corpName,
|
|
|
tw.create_by createBy,
|
|
|
tw.create_time createTime,
|
|
|
- tw.f_loadportid,
|
|
|
+ tw.f_loadportid fLoadportid,
|
|
|
tre.f_name loadportName,
|
|
|
- tw.f_destportid,
|
|
|
+ tw.f_destportid fDestportid,
|
|
|
ts.f_name destportName,
|
|
|
tc.f_name goodsName,
|
|
|
CASE
|
|
|
|
|
|
- WHEN tw.f_billstatus = '1' THEN
|
|
|
+ WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'下单新建'
|
|
|
- WHEN tw.f_billstatus = '2' THEN
|
|
|
+ WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'下单暂存'
|
|
|
- WHEN tw.f_billstatus = '3' THEN
|
|
|
+ WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'下单驳回'
|
|
|
- WHEN tw.f_billstatus = '4' THEN
|
|
|
+ WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'下单提交'
|
|
|
- WHEN tw.f_billstatus = '5' THEN
|
|
|
+ WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'下单审批中'
|
|
|
- WHEN tw.f_billstatus = '6' THEN
|
|
|
+ WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'下单审批通过'
|
|
|
- WHEN tw.f_billstatus = '7' THEN
|
|
|
+ WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'配船暂存'
|
|
|
- WHEN tw.f_billstatus = '8' THEN
|
|
|
+ WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'配船驳回'
|
|
|
- WHEN tw.f_billstatus = '9' THEN
|
|
|
+ WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'配船提交'
|
|
|
- WHEN tw.f_billstatus = '10' THEN
|
|
|
+ WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'配船审批中'
|
|
|
- WHEN tw.f_billstatus = '11' THEN
|
|
|
+ WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'配船审批通过'
|
|
|
- WHEN tw.f_billstatus = '12' THEN
|
|
|
+ WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
'运单变更'
|
|
|
+ WHEN tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改驳回'
|
|
|
+ WHEN tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改提交'
|
|
|
+ WHEN tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改审批中'
|
|
|
+ WHEN tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改通过'
|
|
|
+ WHEN tw.f_submit_update = '3' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交驳回'
|
|
|
+ WHEN tw.f_submit_update = '4' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交审批'
|
|
|
+ WHEN tw.f_submit_update = '5' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交审批中'
|
|
|
+ WHEN tw.f_submit_update = '6' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交通过'
|
|
|
+ WHEN tw.f_delete_status = '3' THEN
|
|
|
+ '运单删除驳回'
|
|
|
+ WHEN tw.f_delete_status = '4' THEN
|
|
|
+ '运单删除提交'
|
|
|
+ WHEN tw.f_delete_status = '5' THEN
|
|
|
+ '运单删除审批中'
|
|
|
+ WHEN tw.f_delete_status = '6' THEN
|
|
|
+ '运单删除通过'
|
|
|
END AS fBillstatus,
|
|
|
CASE
|
|
|
WHEN tf.f_billstatus = '1' THEN
|
|
@@ -1670,7 +1697,10 @@
|
|
|
'审批中'
|
|
|
WHEN tf.f_billstatus = '6' THEN
|
|
|
'审批通过'
|
|
|
- END AS moneyStatus
|
|
|
+ END AS moneyStatus,
|
|
|
+ tw.f_updete_status fUpdeteStatus,
|
|
|
+ tw.f_submit_update fSubmitUpdate,
|
|
|
+ tw.f_delete_status fDeleteStatus
|
|
|
FROM
|
|
|
t_warehousebills tw
|
|
|
LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid
|
|
@@ -1696,7 +1726,239 @@
|
|
|
LEFT JOIN (SELECT f_pid,f_billstatus FROM t_warehousebillsfees GROUP BY f_pid,f_billstatus)tf ON tf.f_pid = tw.f_id
|
|
|
<where>
|
|
|
tw.f_typeid = '1'
|
|
|
- tw.del_flag = '0'
|
|
|
+ and tw.del_flag = '0'
|
|
|
+ <if test="fId != null">and tw.f_id = #{fId}</if>
|
|
|
+ <if test="fBillno != null and fBillno != ''">and tw.f_billno = #{fBillno}</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="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 = #{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 tw.f_billstatus = #{fBillstatus}</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="fVslid != null ">and tw.f_vslid = #{fVslid}</if>
|
|
|
+ <if test="fVoyid != null ">and tw.f_voyid = #{fVoyid}</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 tc.f_no like concat('%',
|
|
|
+ #{voyidName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null and createBy != ''">and tw.create_by = #{createBy}</if>
|
|
|
+ <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
|
|
|
+ and tw.f_bsdate >= #{cLoadDate[0]}
|
|
|
+ </if>
|
|
|
+ <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
|
|
|
+ and tw.f_bsdate <= #{cLoadDate[1]}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY tw.create_time DESC, tw.f_id DESC
|
|
|
+ </select>
|
|
|
+ <select id="ruoYiVersionOrderList1" parameterType="TWarehousebills" resultType="map">
|
|
|
+ SELECT
|
|
|
+ tw.f_id fId,
|
|
|
+ tw.f_billno fBillno,
|
|
|
+ tw.f_mblno fMblno,
|
|
|
+ sd.dict_label fServiceitems,
|
|
|
+ tw.f_consigneername fConsigneername,
|
|
|
+ ta.f_name fName,
|
|
|
+ tw.f_bsdate fBsdate,
|
|
|
+ tc.f_cntrcount fCntrcount,
|
|
|
+ tc.f_no fNo,
|
|
|
+ tv.f_name vslName,
|
|
|
+ ty.f_no voyNo,
|
|
|
+ tw.f_corpid fCorpid,
|
|
|
+ tp.f_name corpName,
|
|
|
+ tw.create_by createBy,
|
|
|
+ tw.create_time createTime,
|
|
|
+ tw.f_loadportid fLoadportid,
|
|
|
+ tre.f_name loadportName,
|
|
|
+ tw.f_destportid fDestportid,
|
|
|
+ ts.f_name destportName,
|
|
|
+ tc.f_name goodsName,
|
|
|
+ tw.f_billstatus fBillstatus,
|
|
|
+ CASE
|
|
|
+
|
|
|
+ WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '下单新建'
|
|
|
+ WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '下单暂存'
|
|
|
+ WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '下单驳回'
|
|
|
+ WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '下单提交'
|
|
|
+ WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '下单审批中'
|
|
|
+ WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '下单审批通过'
|
|
|
+ WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '配船暂存'
|
|
|
+ WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '配船驳回'
|
|
|
+ WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '配船提交'
|
|
|
+ WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '配船审批中'
|
|
|
+ WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '配船审批通过'
|
|
|
+ WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单变更'
|
|
|
+ WHEN tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改驳回'
|
|
|
+ WHEN tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改提交'
|
|
|
+ WHEN tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改审批中'
|
|
|
+ WHEN tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
|
|
|
+ '运单修改通过'
|
|
|
+ WHEN tw.f_submit_update = '3' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交驳回'
|
|
|
+ WHEN tw.f_submit_update = '4' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交审批'
|
|
|
+ WHEN tw.f_submit_update = '5' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交审批中'
|
|
|
+ WHEN tw.f_submit_update = '6' and tw.f_delete_status = '2' THEN
|
|
|
+ '修改提交通过'
|
|
|
+ WHEN tw.f_delete_status = '3' THEN
|
|
|
+ '运单删除驳回'
|
|
|
+ WHEN tw.f_delete_status = '4' THEN
|
|
|
+ '运单删除提交'
|
|
|
+ WHEN tw.f_delete_status = '5' THEN
|
|
|
+ '运单删除审批中'
|
|
|
+ WHEN tw.f_delete_status = '6' THEN
|
|
|
+ '运单删除通过'
|
|
|
+ END AS fBillstatusName,
|
|
|
+ CASE
|
|
|
+ WHEN tf.f_billstatus = '1' THEN
|
|
|
+ '新建'
|
|
|
+ WHEN tf.f_billstatus = '2' THEN
|
|
|
+ '暂存'
|
|
|
+ WHEN tf.f_billstatus = '3' THEN
|
|
|
+ '驳回'
|
|
|
+ WHEN tf.f_billstatus = '4' THEN
|
|
|
+ '提交'
|
|
|
+ WHEN tf.f_billstatus = '5' THEN
|
|
|
+ '审批中'
|
|
|
+ WHEN tf.f_billstatus = '6' THEN
|
|
|
+ '审批通过'
|
|
|
+ END AS moneyStatus,
|
|
|
+ tw.f_updete_status fUpdeteStatus,
|
|
|
+ tw.f_submit_update fSubmitUpdate,
|
|
|
+ tw.f_delete_status fDeleteStatus
|
|
|
+ FROM
|
|
|
+ t_warehousebills tw
|
|
|
+ LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid
|
|
|
+ LEFT JOIN t_address tre ON tre.f_id = tw.f_loadportid
|
|
|
+ LEFT JOIN t_address ts ON ts.f_id = tw.f_destportid
|
|
|
+ LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_serviceitems
|
|
|
+ AND sd.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
|
|
|
+ LEFT JOIN t_corps tp ON tw.f_corpid = tp.f_id
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ th.f_pid,
|
|
|
+ th.f_cntrcount,
|
|
|
+ tr.f_no,
|
|
|
+ th.f_cntrid,
|
|
|
+ tg.f_name
|
|
|
+ FROM
|
|
|
+ t_warehousebills_cntr th
|
|
|
+ LEFT JOIN t_cntr tr ON th.f_cntrid = tr.f_id
|
|
|
+ LEFT JOIN t_goods tg ON th.f_goodsid = tg.f_id
|
|
|
+ ) tc ON tc.f_pid = tw.f_id
|
|
|
+ LEFT JOIN (SELECT f_pid,f_billstatus FROM t_warehousebillsfees GROUP BY f_pid,f_billstatus)tf ON tf.f_pid = tw.f_id
|
|
|
+ <where>
|
|
|
+ tw.f_typeid = '1'
|
|
|
+ and tw.del_flag = '0'
|
|
|
<if test="fId != null">and tw.f_id = #{fId}</if>
|
|
|
<if test="fBillno != null and fBillno != ''">and tw.f_billno = #{fBillno}</if>
|
|
|
<if test="fCustomsdeclartion != null and fCustomsdeclartion != ''">and tw.f_customsdeclartion =
|
|
@@ -1908,7 +2170,10 @@
|
|
|
tw.f_paymode,
|
|
|
sda.dict_label paymodeName,
|
|
|
tw.f_laneid,
|
|
|
- tr.f_name laneidName
|
|
|
+ tr.f_name laneidName,
|
|
|
+ tw.f_updete_status,
|
|
|
+ tw.f_submit_update,
|
|
|
+ tw.f_delete_status
|
|
|
FROM t_warehousebills tw
|
|
|
LEFT JOIN t_address address ON address.f_id = tw.f_loadportid
|
|
|
LEFT JOIN t_address ta ON ta.f_id = tw.f_loadportid
|