|
@@ -39,6 +39,13 @@
|
|
|
<result property="fApplyMoney" column="f_apply_money"/>
|
|
|
<result property="fAccountId" column="f_account_id"/>
|
|
|
<result property="fMake" column="f_make"/>
|
|
|
+ <result property="fVslid" column="f_vslid" />
|
|
|
+ <result property="fVoyid" column="f_voyid" />
|
|
|
+ <result property="fLoadportid" column="f_loadportid" />
|
|
|
+ <result property="fDestportid" column="f_destportid" />
|
|
|
+ <result property="fDc" column="f_dc" />
|
|
|
+ <result property="fBankNumber" column="f_bank_number" />
|
|
|
+ <result property="fReconciliation" column="f_reconciliation" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTFeeVo">
|
|
@@ -75,7 +82,14 @@
|
|
|
f_send_Time,
|
|
|
f_apply_money,
|
|
|
f_account_id,
|
|
|
- f_make
|
|
|
+ f_make,
|
|
|
+ f_vslid,
|
|
|
+ f_voyid,
|
|
|
+ f_loadportid,
|
|
|
+ f_destportid,
|
|
|
+ f_dc,
|
|
|
+ f_bank_number,
|
|
|
+ f_reconciliation
|
|
|
from t_fee
|
|
|
</sql>
|
|
|
|
|
@@ -247,6 +261,118 @@
|
|
|
ORDER BY f.f_id desc
|
|
|
${params.dataScope}
|
|
|
</select>
|
|
|
+ <!--凯和查询财务信息-->
|
|
|
+ <select id="selectFinancialTFeeList" parameterType="TFee" resultType="com.ruoyi.finance.shipping.FinancialTFee">
|
|
|
+ SELECT
|
|
|
+ f.f_id AS fId,
|
|
|
+ f.f_billno AS fBillno,
|
|
|
+ f.f_ctrlcorpid AS fCtrlcorpid,
|
|
|
+ pro.dict_label AS chargingMethod,
|
|
|
+ f.invoice_no AS invoiceNo,
|
|
|
+ f.bank AS fBank,
|
|
|
+ f.water_bill_no AS waterBillNo,
|
|
|
+ f.f_corpid AS fCorpid,
|
|
|
+ c.f_name AS fCorpidName,
|
|
|
+ f.f_accbilldate AS fAccbilldate,
|
|
|
+ f.t_mblno AS tMblno,
|
|
|
+ f.f_amtdr AS fAmtdr,
|
|
|
+ f.f_amtcr AS fAmtcr,
|
|
|
+ f.f_billtype AS fBilltype,
|
|
|
+ f.f_system_type AS fSystemType,
|
|
|
+ f.f_billstatus AS fBillstatus,
|
|
|
+ CASE
|
|
|
+ WHEN f.f_billstatus = '1' THEN '新建'
|
|
|
+ WHEN f.f_billstatus = '2' THEN '暂存'
|
|
|
+ WHEN f.f_billstatus = '3' THEN '审批驳回'
|
|
|
+ WHEN f.f_billstatus = '4' THEN '提交审核'
|
|
|
+ WHEN f.f_billstatus = '5' THEN '审核中'
|
|
|
+ WHEN f.f_billstatus = '6' THEN '审核完成'
|
|
|
+ END
|
|
|
+ AS fBillstatusName,
|
|
|
+ f.f_remarks AS fRemarks,
|
|
|
+ f.create_by AS createBy,
|
|
|
+ tp.f_name AS createName,
|
|
|
+ f.create_time AS createTime,
|
|
|
+ f.update_by AS updateBy,
|
|
|
+ f.update_time AS updateTime,
|
|
|
+ tv.f_name AS vessel,
|
|
|
+ ty.f_no AS voyage,
|
|
|
+ tre.f_name AS loadportName,
|
|
|
+ ts.f_name AS destportName,
|
|
|
+ f.f_bank_number AS fBankNumber,
|
|
|
+ f.bank AS bank,
|
|
|
+ CASE
|
|
|
+
|
|
|
+ WHEN f.f_dc = 'D' THEN
|
|
|
+ '收'
|
|
|
+ WHEN f.f_dc = 'C' THEN
|
|
|
+ '付'
|
|
|
+ END AS fSrcdcName
|
|
|
+ FROM
|
|
|
+ t_fee AS f
|
|
|
+ LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id
|
|
|
+ left join sys_user u on f.create_by = u.user_name
|
|
|
+ left join sys_dept d on f.f_deptid = d.dept_id
|
|
|
+ LEFT JOIN t_customer_contact tc ON tc.f_tel = u.phonenumber
|
|
|
+ LEFT JOIN t_corps tp ON tp.f_id = tc.f_pid
|
|
|
+ LEFT JOIN sys_dict_data pro ON pro.dict_value = f.charging_method and pro.dict_type = 'data_settlement_type'
|
|
|
+ LEFT JOIN t_vessel tv ON f.f_vslid = tv.f_id
|
|
|
+ LEFT JOIN t_voyage ty ON f.f_voyid = ty.f_id
|
|
|
+ LEFT JOIN t_address tre ON tre.f_id = f.f_loadportid
|
|
|
+ LEFT JOIN t_address ts ON ts.f_id = f.f_destportid
|
|
|
+ <where>
|
|
|
+ <if test="fId != null ">and f.f_id = #{fId}</if>
|
|
|
+ <if test="fBillno != null and fBillno != ''">and f.f_billno like concat('%', #{fBillno}, '%')</if>
|
|
|
+ <if test="fCtrlcorpid != null and fCtrlcorpid != ''">and f.f_ctrlcorpid = #{fCtrlcorpid}</if>
|
|
|
+ <if test="fCorpid != null ">and f.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="tMblno != null and tMblno != ''">and f.t_mblno like concat('%', #{tMblno}, '%')</if>
|
|
|
+ <if test="fAmtdr != null ">and f.f_amtdr = #{fAmtdr}</if>
|
|
|
+ <if test="fAmtcr != null ">and f.f_amtcr = #{fAmtcr}</if>
|
|
|
+ <if test="fBilltype != null and fBilltype != ''">and f.f_billtype = #{fBilltype}</if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus != ''">and f.f_billstatus = #{fBillstatus}</if>
|
|
|
+ <if test="fRemarks != null and fRemarks != ''">and ware.f_remarks like concat('%', #{fRemarks}, '%') </if>
|
|
|
+ <if test="fAccbilldate != null ">and f.f_accbilldate = #{fAccbilldate}</if>
|
|
|
+ <if test="fDeptid != null ">and f.f_deptid = #{fDeptid}</if>
|
|
|
+ <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
|
|
|
+ and f.f_accbilldate >= #{timeInterval[0]}
|
|
|
+ </if>
|
|
|
+ <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
|
|
|
+ and f.f_accbilldate <= #{timeInterval[1]}
|
|
|
+ </if>
|
|
|
+ <if test='money != null and money[0] != null and money[0]!= ""'>
|
|
|
+ and f.f_amtdr >= #{money[0]}
|
|
|
+ </if>
|
|
|
+ <if test='money != null and money[1] != null and money[1]!= ""'>
|
|
|
+ and f.f_amtdr <= #{money[1]}
|
|
|
+ </if>
|
|
|
+ <if test='amount != null and amount[0] != null and amount[0]!= ""'>
|
|
|
+ and f.f_amtdr >= #{amount[0]}
|
|
|
+ </if>
|
|
|
+ <if test='amount != null and amount[1] != null and amount[1]!= ""'>
|
|
|
+ and f.f_amtdr <= #{amount[1]}
|
|
|
+ </if>
|
|
|
+ <if test='applyTime != null and applyTime[0] != null and applyTime[0]!= ""'>
|
|
|
+ and f.create_time >= #{applyTime[0]}
|
|
|
+ </if>
|
|
|
+ <if test='applyTime != null and applyTime[1] != null and applyTime[1]!= ""'>
|
|
|
+ and f.create_time <= #{applyTime[1]}
|
|
|
+ </if>
|
|
|
+ <if test="chargingMethod != null ">and f.charging_method = #{chargingMethod}</if>
|
|
|
+ <if test="invoiceNo != null ">and f.invoice_no like concat('%', #{invoiceNo}, '%') </if>
|
|
|
+ <if test="bank != null ">and f.bank like concat('%', #{bank}, '%')</if>
|
|
|
+ <if test="waterBillNo != null ">and f.water_bill_no like concat('%', #{waterBillNo}, '%') </if>
|
|
|
+ <if test="fSystemType != null and fSystemType != ''">and f.f_system_type = #{fSystemType}</if>
|
|
|
+ <if test="createBy != null and createBy != ''">and f.create_by = #{createBy}</if>
|
|
|
+ <if test="fVslid != null "> and f.f_vslid = #{fVslid}</if>
|
|
|
+ <if test="fVoyid != null "> and f.f_voyid = #{fVoyid}</if>
|
|
|
+ <if test="fLoadportid != null "> and f.f_loadportid = #{fLoadportid}</if>
|
|
|
+ <if test="fDestportid != null "> and f.f_destportid = #{fDestportid}</if>
|
|
|
+ <if test="fDc != null and fDc != ''"> and f.f_dc = #{fDc}</if>
|
|
|
+ <if test="fBankNumber != null and fBankNumber != ''"> and f.f_bank_number like concat('%', #{fBankNumber}, '%')</if>
|
|
|
+ <if test="fReconciliation != null "> and f.f_reconciliation = #{fReconciliation}</if>
|
|
|
+ </where>
|
|
|
+ ORDER BY f.f_id desc
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectTFeeById" parameterType="Long" resultMap="TFeeResult">
|
|
|
<include refid="selectTFeeVo"/>
|
|
@@ -384,6 +510,13 @@
|
|
|
<if test="fApplyMoney != null">f_apply_money,</if>
|
|
|
<if test="fAccountId != null">f_account_id,</if>
|
|
|
<if test="fMake != null">f_make,</if>
|
|
|
+ <if test="fVslid != null">f_vslid,</if>
|
|
|
+ <if test="fVoyid != null">f_voyid,</if>
|
|
|
+ <if test="fLoadportid != null">f_loadportid,</if>
|
|
|
+ <if test="fDestportid != null">f_destportid,</if>
|
|
|
+ <if test="fDc != null">f_dc,</if>
|
|
|
+ <if test="fBankNumber != null">f_bank_number,</if>
|
|
|
+ <if test="fReconciliation != null">f_reconciliation,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fId != null">#{fId},</if>
|
|
@@ -420,6 +553,13 @@
|
|
|
<if test="fApplyMoney != null">#{fApplyMoney},</if>
|
|
|
<if test="fAccountId != null">#{fAccountId},</if>
|
|
|
<if test="fMake != null">#{fMake},</if>
|
|
|
+ <if test="fVslid != null">#{fVslid},</if>
|
|
|
+ <if test="fVoyid != null">#{fVoyid},</if>
|
|
|
+ <if test="fLoadportid != null">#{fLoadportid},</if>
|
|
|
+ <if test="fDestportid != null">#{fDestportid},</if>
|
|
|
+ <if test="fDc != null">#{fDc},</if>
|
|
|
+ <if test="fBankNumber != null">#{fBankNumber},</if>
|
|
|
+ <if test="fReconciliation != null">#{fReconciliation},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -459,6 +599,13 @@
|
|
|
<if test="fApplyMoney != null">f_apply_money = #{fApplyMoney},</if>
|
|
|
<if test="fAccountId != null">f_account_id = #{fAccountId},</if>
|
|
|
<if test="fMake != null">f_make = #{fMake},</if>
|
|
|
+ <if test="fVslid != null">f_vslid = #{fVslid},</if>
|
|
|
+ <if test="fVoyid != null">f_voyid = #{fVoyid},</if>
|
|
|
+ <if test="fLoadportid != null">f_loadportid = #{fLoadportid},</if>
|
|
|
+ <if test="fDestportid != null">f_destportid = #{fDestportid},</if>
|
|
|
+ <if test="fDc != null">f_dc = #{fDc},</if>
|
|
|
+ <if test="fBankNumber != null">f_bank_number = #{fBankNumber},</if>
|
|
|
+ <if test="fReconciliation != null">f_reconciliation = #{fReconciliation},</if>
|
|
|
</trim>
|
|
|
where f_id = #{fId}
|
|
|
</update>
|
|
@@ -1814,5 +1961,228 @@
|
|
|
<include refid="selectTFeeVo"/>
|
|
|
where f_no = #{code} and del_flag = 0
|
|
|
</select>
|
|
|
+ <!--凯和检索费用信息-->
|
|
|
+ <select id="FinancialFeesList" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ w.f_id AS fSrcid,
|
|
|
+ t.f_id AS fSrcpid,
|
|
|
+ w.f_corpid AS fCorpid,
|
|
|
+ w.fName AS fName,
|
|
|
+ w.f_mblno AS fMblno,
|
|
|
+ w.f_bsdate AS fBsdate,
|
|
|
+ t.f_billtype AS fBilltype,
|
|
|
+ t.f_review_date AS fReviewDate,
|
|
|
+ w.f_feeid AS fFeeid,
|
|
|
+ w.src_bill_no AS srcBillNo,
|
|
|
+ w.f_marks AS fMarks,
|
|
|
+ f.f_name AS fFeeName,
|
|
|
+ w.f_dc AS fSrcdc,
|
|
|
+ w.f_qty AS fQty,
|
|
|
+ w.f_unitprice AS fUnitPrice,
|
|
|
+ w.f_amount AS fAmount,
|
|
|
+ w.f_feeUnitid AS fFeeUnitId,
|
|
|
+ pr.dict_label AS fFeeUnitName,
|
|
|
+ t.f_vslid AS fVslid,
|
|
|
+ t.f_voyid AS fVoyid,
|
|
|
+ tv.f_name AS fvslName,
|
|
|
+ ty.f_no AS fvoyName,
|
|
|
+ tre.f_name AS fLoadPortName,
|
|
|
+ ts.f_name As fDestPortName,
|
|
|
+ w.f_billstatus AS fBillStatus,
|
|
|
+ t.f_loadportid AS fLoadportid,
|
|
|
+ t.f_destportid AS fDestportid,
|
|
|
+ tn.f_name AS cntrName,
|
|
|
+ ti.f_cntrcount AS fCntrCount,
|
|
|
+ <if test='map.tWareHouseFees.fBilltype != null and map.tWareHouseFees.fBilltype != "" and map.tWareHouseFees.fBilltype == "KHDZ" '>
|
|
|
+ ifnull( w.f_amount, 0 ) - ifnull( w.f_accamount, 0 ) AS fAmtdr,
|
|
|
+ ifnull( w.f_amount, 0 ) - ifnull( w.f_accamount, 0 ) AS fAmt,
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fBilltype != null and map.tWareHouseFees.fBilltype != "" and map.tWareHouseFees.fBilltype == "KHSF" '>
|
|
|
+ ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS fAmtdr,
|
|
|
+ ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS fAmt,
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fBilltype != null and map.tWareHouseFees.fBilltype != "" and map.tWareHouseFees.fBilltype == "KHFF" '>
|
|
|
+ ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS fAmtdr,
|
|
|
+ ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS fAmt,
|
|
|
+ </if>
|
|
|
+ CASE
|
|
|
+ WHEN w.f_dc = 'D' THEN '收'
|
|
|
+ WHEN w.f_dc = 'C' THEN '付'
|
|
|
+ END AS fSrcdcName,
|
|
|
+ CASE
|
|
|
+ WHEN w.f_billstatus = '1' THEN '新建'
|
|
|
+ WHEN w.f_billstatus = '2' THEN '暂存'
|
|
|
+ WHEN w.f_billstatus = '3' THEN '驳回'
|
|
|
+ WHEN w.f_billstatus = '4' THEN '提交'
|
|
|
+ WHEN w.f_billstatus = '5' THEN '审批中'
|
|
|
+ WHEN w.f_billstatus = '6' THEN '通过'
|
|
|
+ END AS fBillStatusName
|
|
|
+ FROM
|
|
|
+ t_warehousebills t
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ f.f_id AS f_id,
|
|
|
+ f.f_pid AS f_pid,
|
|
|
+ f.f_lineno AS f_lineno,
|
|
|
+ f.f_corpid,
|
|
|
+ f.f_feeid,
|
|
|
+ f.f_feeUnitid,
|
|
|
+ f.f_qty,
|
|
|
+ f.f_unitprice,
|
|
|
+ f.f_amount,
|
|
|
+ f.f_currency,
|
|
|
+ f.f_exrate,
|
|
|
+ f.f_taxrate,
|
|
|
+ f.f_dc,
|
|
|
+ f.f_billstatus,
|
|
|
+ f.f_statement_no,
|
|
|
+ f.f_accamount,
|
|
|
+ f.f_accamount_date,
|
|
|
+ f.f_stlamount_no,
|
|
|
+ f.f_stlamount,
|
|
|
+ f.f_stlamount_date,
|
|
|
+ f.f_invnos,
|
|
|
+ f.f_invamount,
|
|
|
+ f.f_askamount,
|
|
|
+ f.f_chargedate,
|
|
|
+ f.f_status,
|
|
|
+ f.remark,
|
|
|
+ f.f_mblno,
|
|
|
+ f.f_product_name,
|
|
|
+ f.src_bill_no,
|
|
|
+ f.f_billing_days,
|
|
|
+ f.f_inventory_days,
|
|
|
+ f.f_marks,
|
|
|
+ f.f_billing_deadline,
|
|
|
+ f.f_originalbilldate,
|
|
|
+ f.f_billtype,
|
|
|
+ f.f_business_type,
|
|
|
+ f.f_bsdate,
|
|
|
+ c.f_id AS fId,
|
|
|
+ c.f_name AS fName
|
|
|
+ FROM
|
|
|
+ t_warehousebillsfees AS f
|
|
|
+ LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id
|
|
|
+ ) w ON w.f_pid = t.f_id
|
|
|
+ LEFT JOIN t_fees f ON w.f_feeid = f.f_id
|
|
|
+ LEFT JOIN sys_dict_data pr ON pr.dict_value = w.f_feeUnitid
|
|
|
+ AND pr.dict_type = 'data_unitfees'
|
|
|
+ LEFT JOIN t_vessel tv ON t.f_vslid = tv.f_id
|
|
|
+ LEFT JOIN t_voyage ty ON t.f_voyid = ty.f_id
|
|
|
+ LEFT JOIN t_address tre ON tre.f_id = t.f_loadportid
|
|
|
+ LEFT JOIN t_address ts ON ts.f_id = t.f_destportid
|
|
|
+ LEFT JOIN t_warehousebills_cntr ti ON ti.f_pid = t.f_id
|
|
|
+ LEFT JOIN t_cntr tn ON tn.f_id = ti.f_cntrid
|
|
|
+ <where>
|
|
|
+ t.f_typeid = 1
|
|
|
+ and w.f_billstatus = 6
|
|
|
+ <if test="map.tWareHouseFees.fCorpid != null and map.tWareHouseFees.fCorpid != ''">and w.f_corpid =
|
|
|
+ #{map.tWareHouseFees.fCorpid}
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
|
+ and w.f_accamount_date IS NOT NULL
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "0" '>
|
|
|
+ and w.f_accamount_date IS NULL
|
|
|
+ </if>
|
|
|
+ <if test="map.tWareHouseFees.fMblno != null and map.tWareHouseFees.fMblno != ''">and w.f_mblno like
|
|
|
+ concat('%', #{map.tWareHouseFees.fMblno}, '%')
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fDc != null and map.tWareHouseFees.fDc != ""'>
|
|
|
+ and w.f_dc = #{map.tWareHouseFees.fDc}
|
|
|
+ </if>
|
|
|
+ <if test="map.tWareHouseFees.fBillstatus != null">and w.f_billstatus = #{map.tWareHouseFees.fBillstatus}
|
|
|
+ </if>
|
|
|
+ <if test="map.tWareHouseFees.fVslid != null">and t.f_vslid = #{map.tWareHouseFees.fVslid}</if>
|
|
|
+ <if test="map.tWareHouseFees.fVoyid != null">and t.f_voyid = #{map.tWareHouseFees.fVoyid}</if>
|
|
|
+ <if test="map.tWareHouseFees.fLoadportid != null ">and t.f_loadportid = #{map.tWareHouseFees.fLoadportid}
|
|
|
+ </if>
|
|
|
+ <if test="map.tWareHouseFees.fDestportid != null ">and t.f_destportid = #{map.tWareHouseFees.fDestportid}
|
|
|
+ </if>
|
|
|
+ <if test="map.tWareHouseFees.fFromDate != null ">and t.f_bsdate >= #{map.tWareHouseFees.fFromDate}</if>
|
|
|
+ <if test="map.tWareHouseFees.fToDate != null ">and t.f_bsdate <= #{map.tWareHouseFees.fToDate}</if>
|
|
|
+ <if test='map.tWareHouseFees.fBilltype != null and map.tWareHouseFees.fBilltype != "" and map.tWareHouseFees.fBilltype == "KHDZ" '>
|
|
|
+ and ifnull(w.f_amount, 0) - ifnull(w.f_accamount, 0) > 0
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fBilltype != null and map.tWareHouseFees.fBilltype != "" and map.tWareHouseFees.fBilltype == "KHSF" '>
|
|
|
+ and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) > 0
|
|
|
+ </if>
|
|
|
+ <if test='map.tWareHouseFees.fBilltype != null and map.tWareHouseFees.fBilltype != "" and map.tWareHouseFees.fBilltype == "KHFF" '>
|
|
|
+ and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) > 0
|
|
|
+ </if>
|
|
|
+
|
|
|
+ GROUP BY w.f_id
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <!--凯和查询财务主表数据-->
|
|
|
+ <select id="selectFinancialTFeeId" parameterType="TFee" resultType="com.ruoyi.finance.shipping.FinancialTFee">
|
|
|
+ SELECT
|
|
|
+ f.f_id AS fId,
|
|
|
+ f.f_billno AS srcBillNo,
|
|
|
+ f.f_ctrlcorpid AS fCtrlcorpid,
|
|
|
+ pro.dict_label AS chargingMethod,
|
|
|
+ f.invoice_no AS invoiceNo,
|
|
|
+ f.bank AS fBank,
|
|
|
+ f.water_bill_no AS waterBillNo,
|
|
|
+ f.f_corpid AS fCorpid,
|
|
|
+ c.f_name AS fCorpidName,
|
|
|
+ f.f_accbilldate AS fAccbilldate,
|
|
|
+ f.t_mblno AS tMblno,
|
|
|
+ f.f_amtdr AS fAmtdr,
|
|
|
+ f.f_amtcr AS fAmtcr,
|
|
|
+ f.f_billtype AS fBilltype,
|
|
|
+ f.f_system_type AS fSystemType,
|
|
|
+ f.f_billstatus AS fBillstatus,
|
|
|
+ CASE
|
|
|
+ WHEN f.f_billstatus = '1' THEN '新建'
|
|
|
+ WHEN f.f_billstatus = '2' THEN '暂存'
|
|
|
+ WHEN f.f_billstatus = '3' THEN '审批驳回'
|
|
|
+ WHEN f.f_billstatus = '4' THEN '提交审核'
|
|
|
+ WHEN f.f_billstatus = '5' THEN '审核中'
|
|
|
+ WHEN f.f_billstatus = '6' THEN '审核完成'
|
|
|
+ END
|
|
|
+ AS fBillstatusName,
|
|
|
+ f.f_remarks AS fRemarks,
|
|
|
+ f.create_by AS createBy,
|
|
|
+ tp.f_name AS createName,
|
|
|
+ f.create_time AS createTime,
|
|
|
+ f.update_by AS updateBy,
|
|
|
+ f.update_time AS updateTime,
|
|
|
+ tv.f_name AS vessel,
|
|
|
+ ty.f_no AS voyage,
|
|
|
+ tre.f_name AS loadportName,
|
|
|
+ ts.f_name AS destportName,
|
|
|
+ f.f_bank_number AS fBankNumber,
|
|
|
+ f.f_loadportid AS fLoadportid,
|
|
|
+ f.f_destportid AS fDestportid,
|
|
|
+ f.f_vslid AS fVslid,
|
|
|
+ f.f_voyid AS fVoyid,
|
|
|
+ f.f_from_date AS fFromDate,
|
|
|
+ f.f_to_date AS fToDate,
|
|
|
+ f.f_dc As fDc,
|
|
|
+ f.f_reconciliation AS fReconciliation,
|
|
|
+ f.bank AS bank,
|
|
|
+ CASE
|
|
|
+
|
|
|
+ WHEN f.f_dc = 'D' THEN
|
|
|
+ '收'
|
|
|
+ WHEN f.f_dc = 'C' THEN
|
|
|
+ '付'
|
|
|
+ END AS fSrcdcName
|
|
|
+ FROM
|
|
|
+ t_fee AS f
|
|
|
+ LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id
|
|
|
+ left join sys_user u on f.create_by = u.user_name
|
|
|
+ left join sys_dept d on f.f_deptid = d.dept_id
|
|
|
+ LEFT JOIN t_customer_contact tc ON tc.f_tel = u.phonenumber
|
|
|
+ LEFT JOIN t_corps tp ON tp.f_id = tc.f_pid
|
|
|
+ LEFT JOIN sys_dict_data pro ON pro.dict_value = f.charging_method and pro.dict_type = 'data_settlement_type'
|
|
|
+ LEFT JOIN t_vessel tv ON f.f_vslid = tv.f_id
|
|
|
+ LEFT JOIN t_voyage ty ON f.f_voyid = ty.f_id
|
|
|
+ LEFT JOIN t_address tre ON tre.f_id = f.f_loadportid
|
|
|
+ LEFT JOIN t_address ts ON ts.f_id = f.f_destportid
|
|
|
+ where
|
|
|
+ f.f_id = #{fId}
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|