|
@@ -46,32 +46,32 @@
|
|
|
left join sys_user u on ware.create_by = u.user_name
|
|
|
left join sys_dept d on ware.f_deptid = d.dept_id
|
|
|
<where>
|
|
|
- <if test="fBillno != null and fBillno != ''">and f_billno = #{fBillno}</if>
|
|
|
- <if test="fCtrlcorpid != null ">and f_ctrlcorpid = #{fCtrlcorpid}</if>
|
|
|
- <if test="fActId != null ">and f_act_id = #{fActId}</if>
|
|
|
- <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
|
|
|
- <if test="fTransActId != null ">and f_trans_act_id = #{fTransActId}</if>
|
|
|
+ <if test="fBillno != null and fBillno != ''">and ware.f_billno = #{fBillno}</if>
|
|
|
+ <if test="fCtrlcorpid != null ">and ware.f_ctrlcorpid = #{fCtrlcorpid}</if>
|
|
|
+ <if test="fActId != null ">and ware.f_act_id = #{fActId}</if>
|
|
|
+ <if test="fCorpid != null ">and ware.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fTransActId != null ">and ware.f_trans_act_id = #{fTransActId}</if>
|
|
|
<if test="tMblno != null and tMblno != ''">and t_mblno = #{tMblno}</if>
|
|
|
- <if test="fAmtdr != null ">and f_amtdr = #{fAmtdr}</if>
|
|
|
- <if test="fAmtcr != null ">and f_amtcr = #{fAmtcr}</if>
|
|
|
- <if test="fBilltype != null and fBilltype != ''">and f_billtype = #{fBilltype}</if>
|
|
|
- <if test="fBillstatus != null and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
|
|
|
- <if test="fRemarks != null and fRemarks != ''">and f_remarks = #{fRemarks}</if>
|
|
|
- <if test="fFromDate != null ">and f_from_date = #{fFromDate}</if>
|
|
|
- <if test="fAccbilldate != null ">and f_accbilldate = #{fAccbilldate}</if>
|
|
|
- <if test="fToDate != null ">and f_to_date = #{fToDate}</if>
|
|
|
- <if test="fRefNo != null and fRefNo != ''">and f_ref_no = #{fRefNo}</if>
|
|
|
- <if test="fDeptid != null ">and f_deptid = #{fDeptid}</if>
|
|
|
+ <if test="fAmtdr != null ">and ware.f_amtdr = #{fAmtdr}</if>
|
|
|
+ <if test="fAmtcr != null ">and ware.f_amtcr = #{fAmtcr}</if>
|
|
|
+ <if test="fBilltype != null and fBilltype != ''">and ware.f_billtype = #{fBilltype}</if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus != ''">and ware.f_billstatus = #{fBillstatus}</if>
|
|
|
+ <if test="fRemarks != null and fRemarks != ''">and ware.f_remarks = #{fRemarks}</if>
|
|
|
+ <if test="fFromDate != null ">and ware.f_from_date = #{fFromDate}</if>
|
|
|
+ <if test="fAccbilldate != null ">and ware.f_accbilldate = #{fAccbilldate}</if>
|
|
|
+ <if test="fToDate != null ">and ware.f_to_date = #{fToDate}</if>
|
|
|
+ <if test="fRefNo != null and fRefNo != ''">and ware.f_ref_no = #{fRefNo}</if>
|
|
|
+ <if test="fDeptid != null ">and ware.f_deptid = #{fDeptid}</if>
|
|
|
<if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
|
|
|
- and f_accbilldate >= #{timeInterval[0]}
|
|
|
+ and ware.f_accbilldate >= #{timeInterval[0]}
|
|
|
</if>
|
|
|
<if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
|
|
|
- and f_accbilldate <= #{timeInterval[1]}
|
|
|
+ and ware.f_accbilldate <= #{timeInterval[1]}
|
|
|
</if>
|
|
|
- <if test="chargingMethod != null ">and charging_method = #{chargingMethod}</if>
|
|
|
- <if test="invoiceNo != null ">and invoice_no = #{invoiceNo}</if>
|
|
|
- <if test="bank != null ">and bank = #{bank}</if>
|
|
|
- <if test="waterBillNo != null ">and water_bill_no = #{waterBillNo}</if>
|
|
|
+ <if test="chargingMethod != null ">and ware.charging_method = #{chargingMethod}</if>
|
|
|
+ <if test="invoiceNo != null ">and ware.invoice_no = #{invoiceNo}</if>
|
|
|
+ <if test="bank != null ">and ware.bank = #{bank}</if>
|
|
|
+ <if test="waterBillNo != null ">and ware.water_bill_no = #{waterBillNo}</if>
|
|
|
</where>
|
|
|
${params.dataScope}
|
|
|
</select>
|
|
@@ -654,33 +654,46 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTWarehousebillsItemsList"
|
|
|
- resultType="com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItem">
|
|
|
+ resultType="com.ruoyi.warehouseBusiness.excel.TWareHouseExcelItem">
|
|
|
SELECT
|
|
|
( @ii := @ii + 1 ) AS fId,
|
|
|
- wi.src_bill_no AS fMblno,
|
|
|
+ wi.f_mblno AS fMblno,
|
|
|
+ wi.f_bsdate AS fBsdate,
|
|
|
+ f.f_name AS fFeeid,
|
|
|
+ CASE
|
|
|
+ WHEN w.f_srcdc = 'D' THEN
|
|
|
+ '收'
|
|
|
+ WHEN w.f_srcdc = 'C' THEN
|
|
|
+ '付'
|
|
|
+ END AS fSrcdc,
|
|
|
+ w.f_amtdr AS fAmtdr,
|
|
|
+ dict.dict_label AS fFeeunitid,
|
|
|
+ wi.f_qty AS fBillingQty,
|
|
|
+ wi.f_unitprice AS fUnitprice,
|
|
|
+ w.f_amt AS fAmt,
|
|
|
+ wi.f_business_type AS fBusinessType,
|
|
|
CASE
|
|
|
wi.f_billtype
|
|
|
- WHEN 'SJRK' THEN
|
|
|
+ WHEN 'SJRK' THEN
|
|
|
'入库'
|
|
|
- WHEN 'SJCK' THEN
|
|
|
+ WHEN 'SJCK' THEN
|
|
|
'出库'
|
|
|
- WHEN 'HQZY' THEN
|
|
|
+ WHEN 'HQZY' THEN
|
|
|
'货转'
|
|
|
- WHEN 'CKDB' THEN
|
|
|
+ WHEN 'CKDB' THEN
|
|
|
'调拨'
|
|
|
+ WHEN 'HWTG' THEN
|
|
|
+ '货物通关'
|
|
|
WHEN 'KCZZ' THEN
|
|
|
'库存总账'
|
|
|
END AS fBilltype,
|
|
|
wi.f_product_name AS fGoodsid,
|
|
|
wi.f_marks AS fMarks,
|
|
|
- dict.dict_label AS fFeeunitid,
|
|
|
- wi.f_qty AS fBillingQty,
|
|
|
- wi.f_unitprice AS fUnitprice,
|
|
|
- wi.f_bsdate AS fBsdate,
|
|
|
+ wi.f_chargedate AS fChargedate,
|
|
|
+ wi.f_billing_deadline AS fBillingDeadline,
|
|
|
wi.f_inventory_days AS fInventoryDays,
|
|
|
wi.f_billing_days AS fBillingDays,
|
|
|
- f.f_name AS fFeeid,
|
|
|
- w.f_amt AS fAmt2
|
|
|
+ w.f_remarks AS fRemarks
|
|
|
FROM
|
|
|
t_fee_do w
|
|
|
LEFT JOIN t_warehousebillsfees wi ON w.f_srcid = wi.f_id
|
|
@@ -754,4 +767,117 @@
|
|
|
w.f_mblno
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <select id="selectFeeList" resultType="java.util.Map">
|
|
|
+ select
|
|
|
+ ware.create_by AS createBy,
|
|
|
+ ware.f_billno AS fBillno,
|
|
|
+ ware.f_ctrlcorpid AS fCtrlcorpid,
|
|
|
+ ware.create_time AS createTime,
|
|
|
+ ware.f_accbilldate AS fAccbilldate,
|
|
|
+ ware.t_mblno AS tMblno,
|
|
|
+ dict.dict_label AS chargingMethod,
|
|
|
+ ware.invoice_no AS invoiceNo,
|
|
|
+ ware.bank AS bank,
|
|
|
+ ware.water_bill_no AS waterBillNo,
|
|
|
+ ware.f_amtdr AS fAmtdr,
|
|
|
+ ware.f_amtcr AS fAmtcr,
|
|
|
+ ware.f_remarks AS fRemarks,
|
|
|
+ CASE
|
|
|
+ WHEN ware.f_billstatus = '1' THEN '保存'
|
|
|
+ WHEN ware.f_billstatus = '2' THEN '暂存'
|
|
|
+ WHEN ware.f_billstatus = '3' THEN '审批驳回'
|
|
|
+ WHEN ware.f_billstatus = '4' THEN '提交审核'
|
|
|
+ WHEN ware.f_billstatus = '5' THEN '审核中'
|
|
|
+ WHEN ware.f_billstatus = '6' THEN '审核完成'
|
|
|
+ END
|
|
|
+ AS fBillstatus
|
|
|
+ from
|
|
|
+ t_fee ware
|
|
|
+ left join sys_user u on ware.create_by = u.user_name
|
|
|
+ left join sys_dept d on ware.f_deptid = d.dept_id
|
|
|
+ LEFT JOIN sys_dict_data dict ON dict.dict_value = ware.charging_method
|
|
|
+ <where>
|
|
|
+ dict.status = '0'
|
|
|
+ AND dict.dict_type = 'data_settlement_type'
|
|
|
+ <if test="fBillno != null and fBillno != ''">and ware.f_billno = #{fBillno}</if>
|
|
|
+ <if test="fCtrlcorpid != null ">and ware.f_ctrlcorpid = #{fCtrlcorpid}</if>
|
|
|
+ <if test="fActId != null ">and ware.f_act_id = #{fActId}</if>
|
|
|
+ <if test="fCorpid != null ">and ware.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fTransActId != null ">and ware.f_trans_act_id = #{fTransActId}</if>
|
|
|
+ <if test="tMblno != null and tMblno != ''">and ware.t_mblno = #{tMblno}</if>
|
|
|
+ <if test="fAmtdr != null ">and ware.f_amtdr = #{fAmtdr}</if>
|
|
|
+ <if test="fAmtcr != null ">and ware.f_amtcr = #{fAmtcr}</if>
|
|
|
+ <if test="fBilltype != null and fBilltype != ''">and ware.f_billtype = #{fBilltype}</if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus != ''">and ware.f_billstatus = #{fBillstatus}</if>
|
|
|
+ <if test="fRemarks != null and fRemarks != ''">and ware.f_remarks = #{fRemarks}</if>
|
|
|
+ <if test="fFromDate != null ">and ware.f_from_date = #{fFromDate}</if>
|
|
|
+ <if test="fAccbilldate != null ">and ware.f_accbilldate = #{fAccbilldate}</if>
|
|
|
+ <if test="fToDate != null ">and ware.f_to_date = #{fToDate}</if>
|
|
|
+ <if test="fRefNo != null and fRefNo != ''">and ware.f_ref_no = #{fRefNo}</if>
|
|
|
+ <if test="fDeptid != null ">and ware.f_deptid = #{fDeptid}</if>
|
|
|
+ <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
|
|
|
+ and ware.f_accbilldate >= #{timeInterval[0]}
|
|
|
+ </if>
|
|
|
+ <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
|
|
|
+ and ware.f_accbilldate <= #{timeInterval[1]}
|
|
|
+ </if>
|
|
|
+ <if test="chargingMethod != null ">and ware.charging_method = #{chargingMethod}</if>
|
|
|
+ <if test="invoiceNo != null ">and ware.invoice_no = #{invoiceNo}</if>
|
|
|
+ <if test="bank != null ">and ware.bank = #{bank}</if>
|
|
|
+ <if test="waterBillNo != null ">and ware.water_bill_no = #{waterBillNo}</if>
|
|
|
+ </where>
|
|
|
+ ${params.dataScope}
|
|
|
+ </select>
|
|
|
+ <select id="selectDetailedList" resultType="com.ruoyi.finance.excel.Detailed">
|
|
|
+ SELECT
|
|
|
+ ( @ii := @ii + 1 ) AS fId,
|
|
|
+ wi.f_mblno AS fMblno,
|
|
|
+ wi.f_bsdate AS fBsdate,
|
|
|
+ t.f_bscorpno AS fBscorpno,
|
|
|
+ f.f_name AS fFeeid,
|
|
|
+ CASE
|
|
|
+ WHEN w.f_srcdc = 'D' THEN
|
|
|
+ '收'
|
|
|
+ WHEN w.f_srcdc = 'C' THEN
|
|
|
+ '付'
|
|
|
+ END AS fSrcdc,
|
|
|
+ w.f_amtdr AS fAmtdr,
|
|
|
+ dict.dict_label AS fFeeunitid,
|
|
|
+ wi.f_qty AS fBillingQty,
|
|
|
+ wi.f_unitprice AS fUnitprice,
|
|
|
+ w.f_amt AS fAmt,
|
|
|
+ wi.f_business_type AS fBusinessType,
|
|
|
+ CASE
|
|
|
+ wi.f_billtype
|
|
|
+ WHEN 'SJRK' THEN
|
|
|
+ '入库'
|
|
|
+ WHEN 'SJCK' THEN
|
|
|
+ '出库'
|
|
|
+ WHEN 'HQZY' THEN
|
|
|
+ '货转'
|
|
|
+ WHEN 'CKDB' THEN
|
|
|
+ '调拨'
|
|
|
+ WHEN 'HWTG' THEN
|
|
|
+ '货物通关'
|
|
|
+ WHEN 'KCZZ' THEN
|
|
|
+ '库存总账'
|
|
|
+ END AS fBilltype,
|
|
|
+ wi.f_product_name AS fGoodsid,
|
|
|
+ wi.f_marks AS fMarks,
|
|
|
+ w.f_remarks AS fRemarks
|
|
|
+ FROM
|
|
|
+ t_fee_do w
|
|
|
+ LEFT JOIN t_warehousebillsfees wi ON w.f_srcid = wi.f_id
|
|
|
+ LEFT JOIN t_warehousebills t ON wi.f_pid = t.f_id
|
|
|
+ LEFT JOIN t_fees f ON wi.f_feeid = f.f_id
|
|
|
+ LEFT JOIN sys_dict_data dict ON dict.dict_value = wi.f_feeUnitid
|
|
|
+ ,(
|
|
|
+ SELECT
|
|
|
+ @ii := 0
|
|
|
+ ) AS ii
|
|
|
+ WHERE
|
|
|
+ dict.status = '0'
|
|
|
+ AND dict.dict_type = 'data_unitfees'
|
|
|
+ AND w.f_pid = #{fId}
|
|
|
+ </select>
|
|
|
</mapper>
|