|
@@ -2071,5 +2071,157 @@
|
|
|
</where>
|
|
|
ORDER BY tw.f_id DESC
|
|
|
</select>
|
|
|
+ <select id="anPinExcePort" parameterType="TWarehousebillsfees"
|
|
|
+ resultType="com.ruoyi.anpin.AnPinExcePort">
|
|
|
+ select tw.f_id,
|
|
|
+ tw.f_pid,
|
|
|
+ tw.f_lineno,
|
|
|
+ tw.f_corpid,
|
|
|
+ tw.f_feeid,
|
|
|
+ tf.f_name AS feeName,
|
|
|
+ tf.f_currency AS fCurrencyName,
|
|
|
+ tw.f_feeUnitid,
|
|
|
+ sc.dict_label AS fFeeunitName,
|
|
|
+ tw.f_qty AS fQty,
|
|
|
+ tw.f_unitprice AS fUnitprice,
|
|
|
+ tw.f_amount AS fAmount,
|
|
|
+ tw.f_currency,
|
|
|
+ tw.f_exrate,
|
|
|
+ tw.f_taxrate,
|
|
|
+ tw.f_dc,
|
|
|
+ tw.f_billstatus,
|
|
|
+ CASE
|
|
|
+
|
|
|
+ WHEN tw.f_billstatus = '1' THEN
|
|
|
+ '保存'
|
|
|
+ WHEN tw.f_billstatus = '2' THEN
|
|
|
+ '暂存'
|
|
|
+ WHEN tw.f_billstatus = '3' THEN
|
|
|
+ '审批驳回'
|
|
|
+ WHEN tw.f_billstatus = '4' THEN
|
|
|
+ '提交审核'
|
|
|
+ WHEN tw.f_billstatus = '5' THEN
|
|
|
+ '审核中'
|
|
|
+ WHEN tw.f_billstatus = '6' THEN
|
|
|
+ '审核完成'
|
|
|
+ END AS fBillstatusName,
|
|
|
+ tw.f_review_date,
|
|
|
+ tw.f_statement_no,
|
|
|
+ tw.f_accamount,
|
|
|
+ tw.f_stlamount,
|
|
|
+ tw.f_accamount_date,
|
|
|
+ tw.f_invnos,
|
|
|
+ tw.f_invamount,
|
|
|
+ tw.f_stlamount_no,
|
|
|
+ tw.f_askamount,
|
|
|
+ tw.f_status,
|
|
|
+ tw.f_stlamount_date,
|
|
|
+ tw.del_flag,
|
|
|
+ tw.create_by,
|
|
|
+ tw.create_time,
|
|
|
+ tw.update_by,
|
|
|
+ tw.update_time,
|
|
|
+ tw.remark,
|
|
|
+ tw.src_id,
|
|
|
+ tw.src_bill_no,
|
|
|
+ tw.f_mblno,
|
|
|
+ tw.f_product_name,
|
|
|
+ tw.f_marks,
|
|
|
+ tw.f_chargedate,
|
|
|
+ tw.f_billing_deadline,
|
|
|
+ tw.f_inventory_days,
|
|
|
+ tw.f_amt,
|
|
|
+ tw.f_billing_days,
|
|
|
+ tw.f_billing_qty,
|
|
|
+ tw.f_billtype,
|
|
|
+ tw.f_billingway,
|
|
|
+ tw.f_bsdate,
|
|
|
+ tw.f_originalbilldate,
|
|
|
+ tw.f_stltypeid,
|
|
|
+ sd.dict_label AS fBillingwayName,
|
|
|
+ tw.f_business_type,
|
|
|
+ tw.f_src_type_id,
|
|
|
+ tw.f_warehouseid,
|
|
|
+ th.f_warehouse_information AS fWarehouseName,
|
|
|
+ tw.f_purchase,
|
|
|
+ tw.t_productdate,
|
|
|
+ tw.f_lotno,
|
|
|
+ tw.f_valid,
|
|
|
+ tw.f_units,
|
|
|
+ tw.f_store_env,
|
|
|
+ tw.f_isfilles,
|
|
|
+ si.dict_label AS fUnitsName,
|
|
|
+ st.dict_label AS fStoreEnvName,
|
|
|
+ sti.dict_label AS fIsfillesName,
|
|
|
+ tw.f_allot_warehouseid,
|
|
|
+ te.f_warehouse_information AS fAllotWarehouseName,
|
|
|
+ IFNULL(tl.f_grossweightblc,0) AS fGrossweightblc,
|
|
|
+ IFNULL(tl.f_volumnblc,0) AS fVolumnblc,
|
|
|
+ IFNULL(tl.f_netweightblc,0) AS fNetweightblc,
|
|
|
+ tc.f_name AS corpName
|
|
|
+ from t_warehousebillsfees tw
|
|
|
+ LEFT JOIN t_fees tf ON tw.f_feeid = tf.f_id
|
|
|
+ LEFT JOIN t_corps tc ON tw.f_corpid = tc.f_id
|
|
|
+ LEFT JOIN t_warehouse th ON tw.f_warehouseid = th.f_id
|
|
|
+ LEFT JOIN t_warehouse te ON tw.f_allot_warehouseid = te.f_id
|
|
|
+ LEFT JOIN sys_dict_data sc ON sc.dict_value = tw.f_feeUnitid AND sc.dict_type = 'data_unitfees'
|
|
|
+ LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_stltypeid AND sd.dict_type = 'f_paymode'
|
|
|
+ LEFT JOIN sys_dict_data si ON si.dict_value = tw.f_units AND si.dict_type = 'f_floatunit'
|
|
|
+ LEFT JOIN sys_dict_data st ON st.dict_value = tw.f_store_env AND st.dict_type = 'f_StorageEnvironment'
|
|
|
+ LEFT JOIN sys_dict_data sti ON sti.dict_value = tw.f_isfilles AND sti.dict_type = 'f_evidence'
|
|
|
+ LEFT JOIN t_warehousebills ti ON ti.f_id = tw.f_pid
|
|
|
+ LEFT JOIN t_whgenleg tl ON tl.f_corpid = tw.f_corpid AND tl.f_goodsid = tw.f_feeid
|
|
|
+ AND tl.f_billingway = tw.f_feeUnitid AND tl.f_warehouse_locationid = tw.f_warehouseid
|
|
|
+ <where>
|
|
|
+ tw.del_flag = '0'
|
|
|
+ <if test="fPid != null ">and tw.f_pid = #{fPid}</if>
|
|
|
+ <if test="fLineno != null ">and tw.f_lineno = #{fLineno}</if>
|
|
|
+ <if test="fCorpid != null ">and tw.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fFeeid != null ">and tw.f_feeid = #{fFeeid}</if>
|
|
|
+ <if test="fFeeunitid != null ">and tw.f_feeUnitid = #{fFeeunitid}</if>
|
|
|
+ <if test="fQty != null ">and tw.f_qty = #{fQty}</if>
|
|
|
+ <if test="fUnitprice != null ">and tw.f_unitprice = #{fUnitprice}</if>
|
|
|
+ <if test="fAmount != null ">and tw.f_amount = #{fAmount}</if>
|
|
|
+ <if test="fCurrency != null and fCurrency != ''">and tw.f_currency = #{fCurrency}</if>
|
|
|
+ <if test="fExrate != null ">and tw.f_exrate = #{fExrate}</if>
|
|
|
+ <if test="fTaxrate != null ">and tw.f_taxrate = #{fTaxrate}</if>
|
|
|
+ <if test="fDc != null and fDc != ''">and tw.f_dc = #{fDc}</if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus != ''">and tw.f_billstatus = #{fBillstatus}</if>
|
|
|
+ <if test="fReviewDate != null ">and tw.f_review_date = #{fReviewDate}</if>
|
|
|
+ <if test="fStatementNo != null and fStatementNo != ''">and tw.f_statement_no = #{fStatementNo}</if>
|
|
|
+ <if test="fAccamount != null ">and tw.f_accamount = #{fAccamount}</if>
|
|
|
+ <if test="fStlamount != null ">and tw.f_stlamount = #{fStlamount}</if>
|
|
|
+ <if test="fAccamountDate != null ">and tw.f_accamount_date = #{fAccamountDate}</if>
|
|
|
+ <if test="fInvnos != null and fInvnos != ''">and tw.f_invnos = #{fInvnos}</if>
|
|
|
+ <if test="fInvamount != null ">and tw.f_invamount = #{fInvamount}</if>
|
|
|
+ <if test="fStlamountNo != null and fStlamountNo != ''">and tw.f_stlamount_no = #{fStlamountNo}</if>
|
|
|
+ <if test="fAskamount != null ">and tw.f_askamount = #{fAskamount}</if>
|
|
|
+ <if test="fStatus != null and fStatus != ''">and tw.f_status = #{fStatus}</if>
|
|
|
+ <if test="delFlag != null">and tw.del_flag = #{delFlag}</if>
|
|
|
+ <if test="fStlamountDate != null ">and tw.f_stlamount_date = #{fStlamountDate}</if>
|
|
|
+ <if test="srcId != null ">and tw.src_id = #{srcId}</if>
|
|
|
+ <if test="srcBillNo != null and srcBillNo != ''">and tw.src_bill_no = #{srcBillNo}</if>
|
|
|
+ <if test="fMblno != null and fMblno != ''">and tw.f_mblno = #{fMblno}</if>
|
|
|
+ <if test="fProductName != null and fProductName != ''">and tw.f_product_name like concat('%',
|
|
|
+ #{fProductName},
|
|
|
+ '%')
|
|
|
+ </if>
|
|
|
+ <if test="fMarks != null and fMarks != ''">and tw.f_marks = #{fMarks}</if>
|
|
|
+ <if test="fChargedate != null ">and tw.f_chargedate = #{fChargedate}</if>
|
|
|
+ <if test="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
|
|
|
+ <if test="fInventoryDays != null ">and tw.f_inventory_days = #{fInventoryDays}</if>
|
|
|
+ <if test="fAmt != null ">and tw.f_amt = #{fAmt}</if>
|
|
|
+ <if test="fBillingDays != null ">and tw.f_billing_days = #{fBillingDays}</if>
|
|
|
+ <if test="fBillingQty != null ">and tw.f_billing_qty = #{fBillingQty}</if>
|
|
|
+ <if test="fBilltype != null and fBilltype != ''">and tw.f_billtype = #{fBilltype}</if>
|
|
|
+ <if test="fBillingway != null ">and tw.f_billingway = #{fBillingway}</if>
|
|
|
+ <if test="fBsdate != null ">and tw.f_bsdate = #{fBsdate}</if>
|
|
|
+ <if test="fOriginalbilldate != null ">and tw.f_originalbilldate = #{fOriginalbilldate}</if>
|
|
|
+ <if test="fStltypeid != null">and tw.f_stltypeid = #{fStltypeid},</if>
|
|
|
+ <if test="fSrcTypeId != null">and tw.f_src_type_id = #{fSrcTypeId},</if>
|
|
|
+ <if test="fWarehouseid != null ">and tw.f_warehouseid = #{fWarehouseid}</if>
|
|
|
+ <if test="fPurchase != null ">and tw.f_purchase = #{fPurchase}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|