wangzhuo 2 år sedan
förälder
incheckning
70f604fa54

+ 17 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TOtherFeesController.java

@@ -6,12 +6,16 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.OtherFinanceExcel;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 /**
  * 其他账务Controller
  */
@@ -40,6 +44,19 @@ public class TOtherFeesController extends BaseController {
     }
 
     /**
+     * 其他财务导出
+     */
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseBills tWarehouseBills){
+        tWarehouseBills.setfBilltype("QTZW");
+        tWarehouseBills.setfTypeid(1);
+        List<OtherFinanceExcel> list = itWarehouseBillsService.getOtherFinance(tWarehouseBills);
+        ExcelUtil<OtherFinanceExcel> util = new ExcelUtil<>(OtherFinanceExcel.class);
+        return util.exportExcel(list, "其他财务");
+    }
+
+
+    /**
      * 查看其他账务详情
      *
      * @param fId 其他账务id

+ 14 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TWareHouseFees.java

@@ -154,6 +154,20 @@ public class TWareHouseFees extends BaseEntity {
     @TableField(exist = false)
     private Long isReviewed;
 
+    /**
+     * 部门id
+     */
+    @TableField(exist = false)
+    private String fDeptId;
+
+    private void setfDeptId(String fDeptId) {
+        this.fDeptId = fDeptId;
+    }
+
+    private String getfDeptId() {
+        return fDeptId;
+    }
+
     public List<String> getfBstimeExamine() {
         return fBstimeExamine;
     }

+ 86 - 28
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java

@@ -12,6 +12,7 @@ import com.ruoyi.shipping.domain.TWarehousebillsCntritems;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -581,6 +582,12 @@ public class TWarehouseBills extends BaseEntity {
     @Excel(name = "订单修改提交审批状态")
     private Long fSubmitUpdate;
 
+    /**
+     * 备注
+     */
+    @TableField(exist = false)
+    private String remark;
+
     /** 订单删除审批状态 */
     @Excel(name = "订单删除审批状态")
     private Long fDeleteStatus;
@@ -636,6 +643,28 @@ public class TWarehouseBills extends BaseEntity {
      */
     private String fServiceitemsNew;
 
+    /**
+     * 摘要
+     */
+    @Excel
+    private String documentSummary;
+
+    /**
+     * 票据类型
+     */
+    @Excel
+    private String financialBillType;
+
+    @Override
+    public String getRemark() {
+        return remark;
+    }
+
+    @Override
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
     public String getfServiceitemsNew() {
         return fServiceitemsNew;
     }
@@ -705,6 +734,22 @@ public class TWarehouseBills extends BaseEntity {
      */
     private String isPledge;
 
+    public String getFinancialBillType() {
+        return financialBillType;
+    }
+
+    public void setFinancialBillType(String financialBillType) {
+        this.financialBillType = financialBillType;
+    }
+
+    public String getDocumentSummary(){
+        return documentSummary;
+    }
+
+    public void setDocumentSummary(String documentSummary){
+        this.documentSummary = documentSummary;
+    }
+
     public String getIsPledge() {
         return isPledge;
     }
@@ -2128,7 +2173,7 @@ public class TWarehouseBills extends BaseEntity {
                 ", fContacts='" + fContacts + '\'' +
                 ", fTel='" + fTel + '\'' +
                 ", fCorpid=" + fCorpid +
-                ", fShipper=" + fShipper +
+                ", fShipper='" + fShipper + '\'' +
                 ", fTocorpid=" + fTocorpid +
                 ", fStltypeid=" + fStltypeid +
                 ", fBscorpno='" + fBscorpno + '\'' +
@@ -2150,10 +2195,12 @@ public class TWarehouseBills extends BaseEntity {
                 ", fProductName='" + fProductName + '\'' +
                 ", fMblno='" + fMblno + '\'' +
                 ", fEmblno='" + fEmblno + '\'' +
+                ", fCompany=" + fCompany +
                 ", fVslvoy='" + fVslvoy + '\'' +
                 ", fMarks='" + fMarks + '\'' +
                 ", fEta=" + fEta +
                 ", fCustomno='" + fCustomno + '\'' +
+                ", fEmsSeqNo='" + fEmsSeqNo + '\'' +
                 ", fIfweigh='" + fIfweigh + '\'' +
                 ", fIfpledge='" + fIfpledge + '\'' +
                 ", fIfdamage='" + fIfdamage + '\'' +
@@ -2200,7 +2247,7 @@ public class TWarehouseBills extends BaseEntity {
                 ", freeContainerDate=" + freeContainerDate +
                 ", fBusinessAttribution=" + fBusinessAttribution +
                 ", fSupervisionUnit=" + fSupervisionUnit +
-                ", fDeclarationElements=" + fDeclarationElements +
+                ", fDeclarationElements='" + fDeclarationElements + '\'' +
                 ", fPartNumber='" + fPartNumber + '\'' +
                 ", fIfinspection=" + fIfinspection +
                 ", fValue=" + fValue +
@@ -2211,6 +2258,26 @@ public class TWarehouseBills extends BaseEntity {
                 ", weightRecoveryDate=" + weightRecoveryDate +
                 ", warehouseStatus=" + warehouseStatus +
                 ", fTimes=" + fTimes +
+                ", fUpdeteStatus=" + fUpdeteStatus +
+                ", fSubmitUpdate=" + fSubmitUpdate +
+                ", remark='" + remark + '\'' +
+                ", fDeleteStatus=" + fDeleteStatus +
+                ", fRemarksFees='" + fRemarksFees + '\'' +
+                ", fCargoPlanning=" + fCargoPlanning +
+                ", fArrivalStatus=" + fArrivalStatus +
+                ", fChargetype='" + fChargetype + '\'' +
+                ", fWeighWeight=" + fWeighWeight +
+                ", fPredictBranch=" + fPredictBranch +
+                ", fGrade='" + fGrade + '\'' +
+                ", fDeliveryDetails='" + fDeliveryDetails + '\'' +
+                ", fSalesmanId=" + fSalesmanId +
+                ", fItemstatus=" + fItemstatus +
+                ", fFeeStatus=" + fFeeStatus +
+                ", fCntrno='" + fCntrno + '\'' +
+                ", fDismountStatus=" + fDismountStatus +
+                ", fServiceitemsNew='" + fServiceitemsNew + '\'' +
+                ", documentSummary='" + documentSummary + '\'' +
+                ", financialBillType='" + financialBillType + '\'' +
                 ", fDateChanged='" + fDateChanged + '\'' +
                 ", loadportidName='" + loadportidName + '\'' +
                 ", destportidName='" + destportidName + '\'' +
@@ -2223,6 +2290,12 @@ public class TWarehouseBills extends BaseEntity {
                 ", voyidName='" + voyidName + '\'' +
                 ", paymodeName='" + paymodeName + '\'' +
                 ", laneidName='" + laneidName + '\'' +
+                ", billList=" + billList +
+                ", fShipTwo=" + fShipTwo +
+                ", fVoyTwo=" + fVoyTwo +
+                ", fShipTwoName='" + fShipTwoName + '\'' +
+                ", fVoyTwoName='" + fVoyTwoName + '\'' +
+                ", isPledge='" + isPledge + '\'' +
                 ", tWarehousebillsCntrList=" + tWarehousebillsCntrList +
                 ", tWarehousebillsCntritemsList=" + tWarehousebillsCntritemsList +
                 ", tVoyageL=" + tVoyageL +
@@ -2234,42 +2307,27 @@ public class TWarehouseBills extends BaseEntity {
                 ", corpName='" + corpName + '\'' +
                 ", cLoadDate=" + cLoadDate +
                 ", freeContainerList=" + freeContainerList +
+                ", itemBsDateList=" + itemBsDateList +
                 ", tWarehousebillsfeesDr=" + tWarehousebillsfeesDr +
                 ", warehousebillsfeesCr=" + warehousebillsfeesCr +
                 ", moneyStatus=" + moneyStatus +
+                ", orderId=" + Arrays.toString(orderId) +
+                ", fReceivable=" + fReceivable +
+                ", fRecycle=" + fRecycle +
+                ", fDue=" + fDue +
+                ", fPay=" + fPay +
+                ", fCaregoStatus='" + fCaregoStatus + '\'' +
+                ", orderList=" + orderList +
                 ", timeInterval=" + timeInterval +
+                ", external='" + external + '\'' +
                 ", timeInterval2=" + timeInterval2 +
                 ", fGoodsid=" + fGoodsid +
                 ", delFlag='" + delFlag + '\'' +
                 ", fLocation=" + fLocation +
                 ", fNewTrademodeid=" + fNewTrademodeid +
-                ", fWeighWeight=" + fWeighWeight +
-                ", fPredictBranch='" + fPredictBranch + '\'' +
-                ", fGrade=" + fGrade +
-                ", fDeliveryDetails=" + fDeliveryDetails +
-                ", fSalesmanId=" + fSalesmanId +
-                ", fItemstatus=" + fItemstatus +
-                ", fUpdeteStatus='" + fUpdeteStatus + '\'' +
-                ", fSubmitUpdate=" + fSubmitUpdate +
-                ", fDeleteStatus=" + fDeleteStatus +
-                ", fRemarksFees=" + fRemarksFees +
-                ", fCargoPlanning=" + fCargoPlanning +
-                ", fArrivalStatus=" + fArrivalStatus +
-                ", fDismountStatus=" + fDismountStatus +
-                ", billList=" + billList +
-                ", fServiceitemsNew=" + fServiceitemsNew +
-                ", fReceivable=" + fReceivable +
-                ", fRecycle=" + fRecycle +
-                ", fDue=" + fDue +
-                ", fPay=" + fPay +
-                ", fCaregoStatus=" + fCaregoStatus +
-                ", fShipTwo=" + fShipTwo +
-                ", fShipTwoName=" + fShipTwoName +
-                ", fVoyTwo=" + fVoyTwo +
-                ", fVoyTwoName=" + fVoyTwoName +
-                ", pickUpPerson=" + pickUpPerson +
+                ", pickUpPerson='" + pickUpPerson + '\'' +
                 ", pickUpTime=" + pickUpTime +
-                ", facilityPerson=" + facilityPerson +
+                ", facilityPerson='" + facilityPerson + '\'' +
                 ", facilityTime=" + facilityTime +
                 '}';
     }

+ 173 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/OtherFinanceExcel.java

@@ -0,0 +1,173 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 其他财务导出
+ */
+public class OtherFinanceExcel implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBsdate;
+
+    /**
+     * 摘要
+     */
+    @Excel(name = "摘要")
+    private String documentSummary;
+
+    /**
+     * 票据类型
+     */
+    @Excel(name = "票据类型")
+    private String financialBillType;
+
+    /**
+     * 收入金额
+     */
+    @Excel(name = "收入金额")
+    private BigDecimal amountD;
+
+    /**
+     * 收入类型
+     */
+    @Excel(name = "收入类型")
+    private String feesNameD;
+
+    /**
+     * 收入方式
+     */
+    @Excel(name = "收入方式")
+    private String remarkD;
+
+    /**
+     * 支出金额
+     */
+    @Excel(name = "支出金额")
+    private BigDecimal amountC;
+
+    /**
+     * 费用分类
+     */
+    @Excel(name = "费用分类")
+    private String feesNameC;
+
+    /**
+     * 支付方式
+     */
+    @Excel(name = "支付方式")
+    private String remarkC;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remark;
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public String getDocumentSummary() {
+        return documentSummary;
+    }
+
+    public void setDocumentSummary(String documentSummary) {
+        this.documentSummary = documentSummary;
+    }
+
+    public String getFinancialBillType() {
+        return financialBillType;
+    }
+
+    public void setFinancialBillType(String financialBillType) {
+        this.financialBillType = financialBillType;
+    }
+
+    public BigDecimal getAmountD() {
+        return amountD;
+    }
+
+    public void setAmountD(BigDecimal amountD) {
+        this.amountD = amountD;
+    }
+
+    public String getFeesNameD() {
+        return feesNameD;
+    }
+
+    public void setFeesNameD(String feesNameD) {
+        this.feesNameD = feesNameD;
+    }
+
+    public String getRemarkD() {
+        return remarkD;
+    }
+
+    public void setRemarkD(String remarkD) {
+        this.remarkD = remarkD;
+    }
+
+    public BigDecimal getAmountC() {
+        return amountC;
+    }
+
+    public void setAmountC(BigDecimal amountC) {
+        this.amountC = amountC;
+    }
+
+    public String getFeesNameC() {
+        return feesNameC;
+    }
+
+    public void setFeesNameC(String feesNameC) {
+        this.feesNameC = feesNameC;
+    }
+
+    public String getRemarkC() {
+        return remarkC;
+    }
+
+    public void setRemarkC(String remarkC) {
+        this.remarkC = remarkC;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "OtherFinanceExcel{" +
+                "fBsdate=" + fBsdate +
+                ", documentSummary='" + documentSummary + '\'' +
+                ", financialBillType='" + financialBillType + '\'' +
+                ", amountD=" + amountD +
+                ", feesNameD='" + feesNameD + '\'' +
+                ", remarkD='" + remarkD + '\'' +
+                ", amountC=" + amountC +
+                ", feesNameC='" + feesNameC + '\'' +
+                ", remarkC='" + remarkC + '\'' +
+                ", remark='" + remark + '\'' +
+                '}';
+    }
+}

+ 9 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseBillsMapper.java

@@ -14,6 +14,7 @@ import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.domain.dto.WarehousebillsDTO;
 import com.ruoyi.warehouseBusiness.domain.vo.WarehouseBillsVO;
 import com.ruoyi.warehouseBusiness.excel.CorpAnalysis;
+import com.ruoyi.warehouseBusiness.excel.OtherFinanceExcel;
 import com.ruoyi.warehouseBusiness.excel.StorageDetail;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -39,6 +40,14 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
     public TWarehouseBills selectTWarehousebillsById(Long fId);
 
     /**
+     * 其余财务导出查询
+     *
+     * @param tWarehouseBills
+     * @return
+     */
+    public List<OtherFinanceExcel> getOtherFinance(TWarehouseBills tWarehouseBills);
+
+    /**
      * 查询对仓库物详情的列表
      *
      * @param tWarehousebills 详情主表

+ 8 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -534,6 +534,14 @@ public interface ITWarehouseBillsService {
     public AjaxResult selectOtherFees(Long fId);
 
     /**
+     * 其他财物导出
+     *
+     * @param tWarehouseBills
+     * @return
+     */
+    public List<OtherFinanceExcel> getOtherFinance(TWarehouseBills tWarehouseBills);
+
+    /**
      * 其他账务保存、提交接口
      *
      * @param tWarehouseBills 主表业务

+ 10 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -2287,6 +2287,16 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     }
 
     /**
+     * 其他财物导出
+     *
+     * @param tWarehouseBills
+     * @return
+     */
+    public List<OtherFinanceExcel> getOtherFinance(TWarehouseBills tWarehouseBills){
+        return tWarehouseBillsMapper.getOtherFinance(tWarehouseBills);
+    }
+
+    /**
      * 其他账务保存、提交接口
      *
      * @param tWarehouseBills 主表业务

+ 2 - 0
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -1955,6 +1955,7 @@
         <where>
             <if test="fCorpid != null and fCorpid != ''">and t.f_corpid = #{fCorpid}</if>
             <if test="fToCorpid != null and fToCorpid != ''">and w.f_corpid = #{fToCorpid}</if>
+            <if test="fDeptId != null and fDeptId != ''">and t.f_bsdeptid = #{fDeptId}</if>
             <if test="fSalesmanId != null and fSalesmanId != ''">and t.f_salesman_id = #{fSalesmanId}</if>
             <if test="fMblno != null  and fMblno != ''">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
             <if test="fMarks != null and fMarks != ''">and w.f_marks like concat('%', #{fMarks}, '%')</if>
@@ -2014,6 +2015,7 @@
         <where>
             <if test="fCorpid != null and fCorpid != ''">and t.f_corpid = #{fCorpid}</if>
             <if test="fToCorpid != null and fToCorpid != ''">and w.f_corpid = #{fToCorpid}</if>
+            <if test="fDeptId != null and fDeptId != ''">and t.f_bsdeptid = #{fDeptId}</if>
             <if test="fSalesmanId != null and fSalesmanId != ''">and t.f_salesman_id = #{fSalesmanId}</if>
             <if test="fMblno != null  and fMblno != ''">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
             <if test="fMarks != null and fMarks != ''">and w.f_marks like concat('%', #{fMarks}, '%')</if>

+ 68 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -136,6 +136,8 @@
         <result property="facilityPerson"    column="facility_person"    />
         <result property="facilityTime"    column="facility_time"    />
         <result property="isPledge"    column="is_pledge"    />
+        <result property="documentSummary" column="document_summary"    />
+        <result property="financialBillType" column="financial_bill_type"   />
     </resultMap>
 
     <resultMap type="WarehouseBillsVO" id="WarehousebillsVOResult">
@@ -160,7 +162,8 @@
         free_container_date, f_business_attribution, f_fee_status, 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,f_updete_status, f_submit_update, f_delete_status,f_remarks_fees,f_cargo_planning,
-        f_arrival_status,f_dismount_status,f_serviceitems_new,f_receivable,f_recycle,f_due,f_pay,f_carego_status, f_ship_two, f_voy_two, pick_up_person, pick_up_time, facility_person, facility_time,is_pledge from t_warehousebills
+        f_arrival_status,f_dismount_status,f_serviceitems_new,f_receivable,f_recycle,f_due,f_pay,f_carego_status, f_ship_two, f_voy_two, pick_up_person, pick_up_time, facility_person, facility_time,is_pledge,
+        document_summary,financial_bill_type from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -358,7 +361,9 @@
             twfD.f_invamount AS fApplyMoney,
             twfD.f_invnos AS invoiceNo,
             twfD.f_invoicing_date AS fAccbilldate,
-            bill.is_pledge AS isPledge
+            bill.is_pledge AS isPledge,
+            bill.document_summary AS documentSummary,
+            bill.financial_bill_type AS financialBillType
         FROM
             t_warehousebills bill
             LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
@@ -496,6 +501,13 @@
             <if test="fVslid != null ">and bill.f_vslid = #{fVslid}</if>
             <if test="fVoyid != null ">and bill.f_voyid = #{fVoyid}</if>
             <if test="isPledge != null and isPledge != ''">and bill.is_pledge = #{isPledge}</if>
+            <if test="remark != null  and remark != ''">and bill.remark like concat('%', #{remark}, '%')</if>
+            <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
+                and bill.f_bsdate &gt;= #{timeInterval[0]}
+            </if>
+            <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
+                and bill.f_bsdate &lt;= #{timeInterval[1]}
+            </if>
         </where>
         ${params.dataScope}
         ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
@@ -686,6 +698,54 @@
         ORDER BY f_bsdate desc
     </select>
 
+    <select id="getOtherFinance" resultType="com.ruoyi.warehouseBusiness.excel.OtherFinanceExcel">
+        select
+            tw.f_bsdate AS fBsdate,
+            tw.document_summary as documentSummary,
+            tw.financial_bill_type as financialBillType,
+            d.damount as amountD,
+            d.tfdname as feesNameD,
+            d.dremark as remarkD,
+            c.camount as amountC,
+            c.tfcname as feesNameC,
+            c.cremark as remarkC,
+            tw.remark as remark
+        from t_warehousebills tw
+                 LEFT JOIN (
+            SELECT
+                twfd.f_pid,
+                ROUND( IFNULL( SUM( twfd.f_amount ), '' )) AS damount,
+                tf.f_name as tfdname,
+                twfd.remark as dremark
+            FROM t_warehousebills tw
+                     left join t_warehousebillsfees twfd on twfd.f_pid = tw.f_id and twfd.f_dc = "D"
+                     left join t_fees tf on tf.f_id = twfd.f_feeid
+            GROUP BY
+                twfd.f_pid
+        ) d ON d.f_pid = tw.f_id
+                 LEFT JOIN (
+            SELECT
+                twfc.f_pid,
+                ROUND( IFNULL( SUM( twfc.f_amount ), '' )) AS camount,
+                tf.f_name as tfcname,
+                twfc.remark as cremark
+            FROM t_warehousebills tw
+                     left join t_warehousebillsfees twfc on twfc.f_pid = tw.f_id and twfc.f_dc = "C"
+                     left join t_fees tf on tf.f_id = twfc.f_feeid
+            GROUP BY
+                twfc.f_pid
+        ) c ON c.f_pid = tw.f_id
+        WHERE 
+            tw.f_billtype = 'QTZW'
+        <if test="remark != null  and remark != ''">and tw.remark like concat('%', #{remark}, '%')</if>
+        <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
+            and tw.f_bsdate &gt;= #{timeInterval[0]}
+        </if>
+        <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
+            and tw.f_bsdate &lt;= #{timeInterval[1]}
+        </if>
+    </select>
+
     <select id="selectTWarehousebillsItemsList"
             resultType="com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItems">
         SELECT
@@ -1208,6 +1268,8 @@
             <if test="facilityPerson != null">facility_person,</if>
             <if test="facilityTime != null">facility_time,</if>
             <if test="isPledge != null and isPledge != ''">is_pledge,</if>
+            <if test="documentSummary != null and documentSummary != ''">document_summary,</if>
+            <if test="financialBillType != null and financialBillType != ''">financial_bill_type,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fBillno != null">#{fBillno},</if>
@@ -1340,6 +1402,8 @@
             <if test="facilityPerson != null">#{facilityPerson},</if>
             <if test="facilityTime != null">#{facilityTime},</if>
             <if test="isPledge != null and isPledge != ''">#{isPledge},</if>
+            <if test="documentSummary != null and documentSummary != ''">#{documentSummary},</if>
+            <if test="financialBillType != null and financialBillType != ''">#{financialBillType},</if>
         </trim>
     </insert>
 
@@ -1476,6 +1540,8 @@
             <if test="facilityPerson != null">facility_person = #{facilityPerson},</if>
             <if test="facilityTime != null">facility_time = #{facilityTime},</if>
             <if test="isPledge != null and isPledge != ''">is_pledge = #{isPledge},</if>
+            <if test="documentSummary != null and documentSummary != ''">document_summary = #{documentSummary},</if>
+            <if test="financialBillType != null and financialBillType != ''">financial_bill_type = #{financialBillType},</if>
         </trim>
         where f_id = #{fId}
     </update>