|
@@ -14,6 +14,7 @@
|
|
|
<result property="fContacts" column="f_contacts" />
|
|
|
<result property="fTel" column="f_tel" />
|
|
|
<result property="fCorpid" column="f_corpid" />
|
|
|
+ <result property="fShipper" column="f_shipper" />
|
|
|
<result property="fTocorpid" column="f_tocorpid" />
|
|
|
<result property="fStltypeid" column="f_stltypeid" />
|
|
|
<result property="fBscorpno" column="f_bscorpno" />
|
|
@@ -134,7 +135,7 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTWarehousebillsVo">
|
|
|
- select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno,
|
|
|
+ select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_shipper, f_tocorpid, f_stltypeid, f_bscorpno,
|
|
|
f_warehouseid, f_storekeeper, f_chargedate, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight,
|
|
|
f_volumn, f_billingway, f_trademodeid, f_sbu, f_feetunit, f_mblno, f_emblno, f_marks, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid,
|
|
|
f_billtype, f_billstatus, f_items_status, del_flag, create_by, create_time, update_by, update_time, remark, f_billing_deadline, f_product_name, f_review_date,
|
|
@@ -167,6 +168,7 @@
|
|
|
<if test="fContacts != null and fContacts != ''">and f_contacts = #{fContacts}</if>
|
|
|
<if test="fTel != null and fTel != ''">and f_tel = #{fTel}</if>
|
|
|
<if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fTocorpid != null ">and f_tocorpid = #{fTocorpid}</if>
|
|
|
<if test="fChargedate != null ">and f_chargedate = #{fChargedate}</if>
|
|
|
<if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
|
|
@@ -219,6 +221,7 @@
|
|
|
bill.f_id AS fId,
|
|
|
corp.f_name AS fCorpid,
|
|
|
corpTo.f_name AS fTocorpid,
|
|
|
+ bill.f_shipper AS fShipper,
|
|
|
bill.f_mblno AS fMblno,
|
|
|
bill.f_emblno AS fEmblno,
|
|
|
corpSub.f_name AS fSbu,
|
|
@@ -360,6 +363,7 @@
|
|
|
<if test="fContacts != null and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
|
|
|
<if test="fTel != null and fTel != ''">and bill.f_tel = #{fTel}</if>
|
|
|
<if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and bill.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fBillingDeadline != null ">and bill.f_billing_deadline = #{fBillingDeadline}</if>
|
|
|
<if test="fTocorpid != null ">and bill.f_tocorpid = #{fTocorpid}</if>
|
|
|
<if test="fMarks != null and fMarks != ''">and bill.f_marks like concat('%', #{fMarks}, '%')</if>
|
|
@@ -426,6 +430,7 @@
|
|
|
bill.f_id AS fId,
|
|
|
corp.f_name AS fCorpid,
|
|
|
corpTo.f_name AS fTocorpid,
|
|
|
+ bill.f_shipper AS fShipper,
|
|
|
bill.f_mblno AS fMblno,
|
|
|
bill.f_emblno AS fEmblno,
|
|
|
corpSub.f_name AS fSbu,
|
|
@@ -540,6 +545,7 @@
|
|
|
<if test="fContacts != null and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
|
|
|
<if test="fTel != null and fTel != ''">and bill.f_tel = #{fTel}</if>
|
|
|
<if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and bill.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fBillingDeadline != null ">and bill.f_billing_deadline = #{fBillingDeadline}</if>
|
|
|
<if test='timeInterval2 != null and timeInterval2[0] != null and timeInterval2[0]!= ""'><!-- 仓储费增加计费截止日期区间查询 -->
|
|
|
and bill.f_billing_deadline >= #{timeInterval2[0]}
|
|
@@ -666,12 +672,14 @@
|
|
|
wi.f_grossweight AS fGrossweightC,
|
|
|
wf.f_billing_days AS fBillingDays,
|
|
|
wf.f_amount AS fAmount
|
|
|
- FROM t_warehousebills w
|
|
|
- LEFT JOIN t_warehousebillsfees wf ON w.f_id = wf.f_pid
|
|
|
+ FROM t_warehousebillsfees wf
|
|
|
LEFT JOIN t_warehousebillsitems wi ON wi.f_id = wf.src_id
|
|
|
- LEFT JOIN sys_dict_data dict ON wi.f_business_type = dict.dict_value
|
|
|
- WHERE w.f_id = #{fId}
|
|
|
- AND w.f_typeid IS NULL
|
|
|
+ LEFT JOIN t_warehousebills w ON w.f_id = wi.f_pid
|
|
|
+ LEFT JOIN sys_dict_data dict ON w.f_business_type = dict.dict_value
|
|
|
+ WHERE w.f_typeid IS NULL
|
|
|
+ <if test="fId != null and fId!= ''">
|
|
|
+ AND w.f_mblno = (select f_mblno from t_warehousebills where f_id = #{fId})
|
|
|
+ </if>
|
|
|
AND dict.status = '0'
|
|
|
<if test="billType != null and billType!= '' and billType== 'SJCK'">
|
|
|
AND wf.f_billtype = 'SJCK'
|
|
@@ -703,6 +711,7 @@
|
|
|
<select id="selectInventorySJRKList" parameterType="TWarehousebills" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
co.f_name AS fName,
|
|
|
+ leg.f_shipper AS fShipper,
|
|
|
it.f_bsdate AS fBsdate,
|
|
|
leg.f_mblno AS fMblno,
|
|
|
it.f_business_type AS fBusinessType,
|
|
@@ -745,6 +754,7 @@
|
|
|
<if test="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</if>
|
|
|
<if test="fNewTrademodeid != null ">and leg.f_new_trademodeid = #{fNewTrademodeid}</if>
|
|
|
<if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and leg.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fMblno != null ">and it.f_mblno like concat('%',#{fMblno},'%')</if>
|
|
|
<if test="fEmblno != null ">and it.f_emblno like concat('%',#{fEmblno},'%')</if>
|
|
|
<if test="fLocation != null and fLocation ==1 ">
|
|
@@ -766,6 +776,7 @@
|
|
|
<select id="selectInventorySJCKList" parameterType="TWarehousebills" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
co.f_name AS fName,
|
|
|
+ leg.f_shipper AS fShipper,
|
|
|
it.f_bsdate AS fBsdate,
|
|
|
leg.f_mblno AS fMblno,
|
|
|
it.f_business_type AS fBusinessType,
|
|
@@ -816,6 +827,7 @@
|
|
|
<if test="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</if>
|
|
|
<if test="fNewTrademodeid != null ">and leg.f_new_trademodeid = #{fNewTrademodeid}</if>
|
|
|
<if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and leg.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fMblno != null ">and it.f_mblno like concat('%',#{fMblno},'%')</if>
|
|
|
<if test="fEmblno != null ">and it.f_emblno like concat('%',#{fEmblno},'%')</if>
|
|
|
<if test="fLocation != null and fLocation ==1 ">
|
|
@@ -839,6 +851,7 @@
|
|
|
SELECT
|
|
|
( @ii := @ii + 1 ) AS fId,
|
|
|
co.f_name AS fCorpid,
|
|
|
+ leg.f_shipper AS fShipper,
|
|
|
it.f_bsdate AS fBsdate,
|
|
|
leg.f_mblno AS fMblno,
|
|
|
dict.dict_label AS fBusinessType,
|
|
@@ -875,6 +888,7 @@
|
|
|
<if test="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</if>
|
|
|
<if test="fNewTrademodeid != null ">and leg.f_new_trademodeid = #{fNewTrademodeid}</if>
|
|
|
<if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and leg.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fMblno != null ">and leg.f_mblno = #{fMblno}</if>
|
|
|
<if test="fEmblno != null ">and leg.f_emblno = #{fEmblno}</if>
|
|
|
<if test="fLocation != null and fLocation ==1 ">
|
|
@@ -913,6 +927,7 @@
|
|
|
<if test="fContacts != null">f_contacts,</if>
|
|
|
<if test="fTel != null">f_tel,</if>
|
|
|
<if test="fCorpid != null">f_corpid,</if>
|
|
|
+ <if test="fShipper != null">f_shipper,</if>
|
|
|
<if test="fTocorpid != null">f_tocorpid,</if>
|
|
|
<if test="fStltypeid != null">f_stltypeid,</if>
|
|
|
<if test="fBscorpno != null">f_bscorpno,</if>
|
|
@@ -1029,6 +1044,7 @@
|
|
|
<if test="fContacts != null">#{fContacts},</if>
|
|
|
<if test="fTel != null">#{fTel},</if>
|
|
|
<if test="fCorpid != null">#{fCorpid},</if>
|
|
|
+ <if test="fShipper != null">#{fShipper},</if>
|
|
|
<if test="fTocorpid != null">#{fTocorpid},</if>
|
|
|
<if test="fStltypeid != null">#{fStltypeid},</if>
|
|
|
<if test="fBscorpno != null">#{fBscorpno},</if>
|
|
@@ -1149,6 +1165,7 @@
|
|
|
<if test="fContacts != null">f_contacts = #{fContacts},</if>
|
|
|
<if test="fTel != null">f_tel = #{fTel},</if>
|
|
|
<if test="fCorpid != null">f_corpid = #{fCorpid},</if>
|
|
|
+ <if test="fShipper != null">f_shipper = #{fShipper},</if>
|
|
|
<if test="fTocorpid != null">f_tocorpid = #{fTocorpid},</if>
|
|
|
<if test="fStltypeid != null">f_stltypeid = #{fStltypeid},</if>
|
|
|
<if test="fBscorpno != null">f_bscorpno = #{fBscorpno},</if>
|
|
@@ -1270,6 +1287,7 @@
|
|
|
<if test="fContacts != null">f_contacts = #{fContacts},</if>
|
|
|
<if test="fTel != null">f_tel = #{fTel},</if>
|
|
|
<if test="fCorpid != null">f_corpid = #{fCorpid},</if>
|
|
|
+ <if test="fShipper != null">f_shipper = #{fShipper},</if>
|
|
|
<if test="fTocorpid != null">f_tocorpid = #{fTocorpid},</if>
|
|
|
<if test="fStltypeid != null">f_stltypeid = #{fStltypeid},</if>
|
|
|
<if test="fBscorpno != null and fBscorpno != ''">f_bscorpno = #{fBscorpno},</if>
|
|
@@ -1444,6 +1462,7 @@
|
|
|
t.f_id AS fId,
|
|
|
item.f_id AS fItemsId,
|
|
|
C.f_name AS fcorpid,
|
|
|
+ t.f_shipper AS fShipper,
|
|
|
t.f_mblno AS fMblno,
|
|
|
g.f_name AS fGoodsid,
|
|
|
dict.dict_label AS fBusinessType,
|
|
@@ -1557,6 +1576,7 @@
|
|
|
tw.f_contacts,
|
|
|
tw.f_tel,
|
|
|
tw.f_corpid,
|
|
|
+ tw.f_shipper,
|
|
|
tc.f_name corpName,
|
|
|
tw.f_tocorpid,
|
|
|
tw.f_stltypeid,
|
|
@@ -1680,6 +1700,7 @@
|
|
|
<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>
|
|
@@ -1774,6 +1795,7 @@
|
|
|
tw.f_id fId,
|
|
|
tw.f_billno fBillno,
|
|
|
tw.f_originalbillno fOriginalbillno,
|
|
|
+ tw.f_shipper fShipper,
|
|
|
tw.f_mblno fMblno,
|
|
|
sd.dict_label fServiceitems,
|
|
|
tw.f_consigneername fConsigneername,
|
|
@@ -1913,6 +1935,7 @@
|
|
|
<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>
|
|
@@ -2046,6 +2069,7 @@
|
|
|
tw.f_id fId,
|
|
|
tw.f_billno fBillno,
|
|
|
tw.f_originalbillno fOriginalbillno,
|
|
|
+ tw.f_shipper fShipper,
|
|
|
tw.f_mblno fMblno,
|
|
|
sd.dict_label fServiceitems,
|
|
|
tw.f_consigneername fConsigneername,
|
|
@@ -2183,6 +2207,7 @@
|
|
|
<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>
|
|
@@ -2314,6 +2339,7 @@
|
|
|
tw.f_bsdeptid,
|
|
|
tw.f_contacts,
|
|
|
tw.f_tel,
|
|
|
+ tw.f_shipper,
|
|
|
tw.f_corpid,
|
|
|
tc.f_name corpName,
|
|
|
tw.f_tocorpid,
|
|
@@ -2447,6 +2473,7 @@
|
|
|
w.f_id fId,
|
|
|
w.f_corpid fCorpid,
|
|
|
c.f_name corpName,
|
|
|
+ w.f_shipper fShipper,
|
|
|
w.f_bsdate fBsdate,
|
|
|
g.f_name goodsName,
|
|
|
w.f_mblno fMblno,
|
|
@@ -2529,6 +2556,7 @@
|
|
|
<if test="fItemsStatus == null and timeInterval == null and fMblno == null">
|
|
|
and IF( w.f_planqty IS NOT NULL, w.f_planqty != w.f_qty, w.f_id != '')
|
|
|
</if>
|
|
|
+ <if test="fShipper != null and fShipper != ''">and w.f_shipper like concat('%', #{fShipper}, '%')</if>
|
|
|
<if test="fMblno != null ">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
|
|
|
<if test="fItemsStatus != null ">and w.f_items_status = #{fItemsStatus}</if>
|
|
|
<if test="fBillstatus != null ">and w.f_billstatus = #{fBillstatus}</if>
|
|
@@ -2549,6 +2577,7 @@
|
|
|
SELECT
|
|
|
t.f_id fId,
|
|
|
t.f_pid fPid,
|
|
|
+ w.f_shipper fShipper,
|
|
|
c.f_name corpName,
|
|
|
t.f_bsdate fBsdate,
|
|
|
g.f_name goodsName,
|