Bladeren bron

仓库出库添加导出功能

wangzhuo 2 jaren geleden
bovenliggende
commit
6aeff017f6

+ 15 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/anpin/StockControl.java

@@ -16,6 +16,7 @@ import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBillOutboundExcel;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
@@ -67,19 +68,20 @@ public class StockControl extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TWarehouseBills tWarehousebills)
     {
-        List<TWarehouseBills> list = tWarehousebillsService.selectTWarehousebillsList(tWarehousebills);
-        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
-        String sheetName = null;
-        if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
-            sheetName = "采购申请";
-        }else if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
-            sheetName = "仓库入库";
-        }else if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
-            sheetName = "仓库出库";
-        }else if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
-            sheetName = "销售出库";
-        }
-        return util.exportExcel(list, "warehousebills");
+//        List<TWarehouseBills> list = tWarehousebillsService.selectTWarehousebillsList(tWarehousebills);
+        List<TWarehouseBillOutboundExcel> list = tWarehousebillsService.getTWarehouseBillOutboundExcel(tWarehousebills);
+        ExcelUtil<TWarehouseBillOutboundExcel> util = new ExcelUtil<TWarehouseBillOutboundExcel>(TWarehouseBillOutboundExcel.class);
+//        String sheetName = null;
+//        if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
+//            sheetName = "采购申请";
+//        }else if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
+//            sheetName = "仓库入库";
+//        }else if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
+//            sheetName = "仓库出库";
+//        }else if (StringUtils.isNotEmpty(tWarehousebills.getfBusinessType()) && tWarehousebills.getfBusinessType().equals("SQ")){
+//            sheetName = "销售出库";
+//        }
+        return util.exportExcel(list, "仓库出库");
     }
     /**
      * 导出仓库从(出入库)列表

+ 151 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBillOutboundExcel.java

@@ -0,0 +1,151 @@
+package com.ruoyi.warehouseBusiness.domain;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 详情主表对象 t_warehouse_details
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class TWarehouseBillOutboundExcel {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private Long fId;
+
+    /**
+     * 业务编号,格式RK+YYYY+YY+NNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始。
+     * RK CK DB HZ
+     */
+    @Excel(name = "系统编号")
+    private String fBillno;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "仓库")
+    private String fWarehouseName;
+
+    /** 调出项目名,*/
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商")
+    private String corpName;
+
+    /**
+     * 金额
+     */
+    @Excel(name = "金额")
+    private BigDecimal fMoney;
+
+    /**
+     * 查询时间区间
+     */
+    @Excel(name = "出库日期", dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fBsdate;
+
+
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人")
+    private String createBy;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remark;
+
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public String getfWarehouseName() {
+        return fWarehouseName;
+    }
+
+    public void setfWarehouseName(String fWarehouseName) {
+        this.fWarehouseName = fWarehouseName;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getCorpName() {
+        return corpName;
+    }
+
+    public void setCorpName(String corpName) {
+        this.corpName = corpName;
+    }
+
+    public BigDecimal getfMoney() {
+        return fMoney;
+    }
+
+    public void setfMoney(BigDecimal fMoney) {
+        this.fMoney = fMoney;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

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

@@ -11,6 +11,7 @@ import com.ruoyi.reportManagement.domain.SingleAnalysisFeesExcel;
 import com.ruoyi.reportManagement.domain.TWareHouseItemsExcel;
 import com.ruoyi.reportManagement.dto.TWarehousebill;
 import com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItems;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBillOutboundExcel;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import org.apache.ibatis.annotations.Param;
 
@@ -268,4 +269,6 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
      * @return
      */
     List<Map<String,Object>> statisticsNew (TWarehouseBills tWarehousebills);
+
+    List<TWarehouseBillOutboundExcel> getTWarehouseBillOutboundExcel(TWarehouseBills tWarehousebills);
 }

+ 3 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -4,10 +4,7 @@ import com.ruoyi.anpin.*;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.reportManagement.domain.TWareHouseItemsExcel;
-import com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItems;
-import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
-import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
-import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
+import com.ruoyi.warehouseBusiness.domain.*;
 import com.ruoyi.warehouseBusiness.excel.*;
 
 import java.util.Date;
@@ -564,4 +561,6 @@ public interface ITWarehouseBillsService {
      * @return
      */
     List<Map<String,Object>> statisticsNew (TWarehouseBills tWarehousebills);
+
+    List<TWarehouseBillOutboundExcel> getTWarehouseBillOutboundExcel(TWarehouseBills tWarehousebills);
 }

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

@@ -2312,6 +2312,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         return tWarehouseBillsMapper.statisticsNew(tWarehousebills);
     }
 
+    @Override
+    public List<TWarehouseBillOutboundExcel> getTWarehouseBillOutboundExcel(TWarehouseBills tWarehousebills) {
+
+//        return tWarehouseBillsMapper.selectAnPinList(tWarehousebills);
+        return tWarehouseBillsMapper.getTWarehouseBillOutboundExcel(tWarehousebills);
+    }
+
     /**
      * app仓储新行提交业务
      *

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

@@ -1762,7 +1762,7 @@
         tv.f_name vslName,
         ty.f_no voyNo,
         tw.f_corpid,
-        tp.f_name corpName,
+        tp.f_name projectName,
         tw.create_by createBy,
         tw.create_time createTime,
         tw.f_loadportid,
@@ -2352,7 +2352,7 @@
                tw.f_cntval,
                tw.f_date_changed,
                tw.f_market_number,
-               tw.f_money,
+               tw.f_money as fMoney,
                tw.f_take_orders,
                tw.f_reason
         FROM t_warehousebills tw
@@ -3491,4 +3491,262 @@
         f_billtype
         ) fail ON temp.billType = fail.billType
     </select>
+    <select id="getTWarehouseBillOutboundExcel"
+            resultType="com.ruoyi.warehouseBusiness.domain.TWarehouseBillOutboundExcel">
+        SELECT
+        DISTINCT
+        tw.f_id,
+        tw.f_billno as fBillno,
+        tw.f_customsdeclartion,
+        tw.f_originalbillno,
+        tw.f_deptid,
+        tw.f_bsdeptid,
+        tw.f_contacts,
+        tw.f_tel,
+        tw.f_corpid,
+        tc.f_name AS corpName,
+        tw.f_tocorpid,
+        tw.f_stltypeid,
+        tw.f_bscorpno,
+        tw.f_warehouseid as fWarehouseid,
+        tw.f_storekeeper,
+        tw.f_chargedate,
+        tw.f_bsdate as fBsdate,
+        tw.f_planqty,
+        tw.f_plangrossweight,
+        tw.f_plannetweight,
+        tw.f_planvolumn,
+        tw.f_qty,
+        tw.f_grossweight,
+        tw.f_netweight,
+        tw.f_volumn,
+        tw.f_billingway,
+        tw.f_trademodeid,
+        tw.f_sbu,
+        tw.f_feetunit,
+        tw.f_mblno,
+        tw.f_marks,
+        tw.f_vslvoy,
+        tw.f_eta,
+        tw.f_customno,
+        tw.f_ifweigh,
+        tw.f_ifpledge,
+        tw.f_ifdamage,
+        tw.f_bankcorpid,
+        tw.f_billtype,
+        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_items_status,
+        tw.del_flag,
+        tw.create_by as createBy,
+        tw.create_time,
+        tw.update_by,
+        tw.update_time,
+        tw.remark,
+        tw.f_billing_deadline,
+        tw.f_product_name,
+        tw.f_review_date,
+        tw.f_truckno,
+        tw.f_driver_name,
+        tw.f_driver_tel,
+        tw.f_driver_id_car,
+        tw.f_business_type,
+        tw.f_labour,
+        tw.f_fleet,
+        tw.f_inwarehouseid,
+        tw.f_bstime,
+        tw.f_cartype,
+        tw.f_goodsid,
+        tp.f_name AS projectName,
+        tw.f_new_trademodeid,
+        tw.f_loadportid,
+        tw.f_destportid,
+        tw.f_serviceitems,
+        tw.f_invoceobj,
+        tw.f_sign,
+        tw.f_detentioncargo,
+        tw.f_booksmarks,
+        tw.f_shippername,
+        tw.f_shipperattn,
+        tw.f_shippertel,
+        tw.f_consigneername,
+        tw.f_consigneeattn,
+        tw.f_consigneetel,
+        tw.f_insurance,
+        tw.f_insuranceamt,
+        tw.f_closedate,
+        tw.f_docmentdate,
+        tw.f_vslid,
+        tw.f_voyid,
+        tw.f_typeid,
+        tw.f_paymode,
+        tw.f_laneid,
+        tw.f_cntval,
+        tw.f_date_changed,
+        tw.f_market_number,
+        tw.f_money as fMoney,
+        tw.f_teachers_weight,
+        tw.f_students_weight,
+        th.f_name AS fWarehouseName,
+        tw.f_market_typid,
+        tw.f_purchase,
+        tr.f_name    AS fsbuName,
+        tw.f_create_log,
+        tw.f_print_log,
+        tw.f_print,
+        tw.f_take_orders,
+        tw.f_reason,
+        CASE
+
+        WHEN f_take_orders = '0' THEN
+        '待接单'
+        WHEN f_take_orders = '1' THEN
+        '已接单'
+        WHEN f_take_orders = '2' THEN
+        '拒绝'
+        END AS fTakeOrdersName
+        FROM
+        t_warehousebills tw
+        LEFT JOIN t_project tp
+        ON tw.f_goodsid = tp.f_id
+        LEFT JOIN t_corps tc
+        ON tw.f_corpid = tc.f_id
+        LEFT JOIN t_corps tr
+        ON tr.f_id = tw.f_sbu
+        LEFT JOIN t_warehouse th ON tw.f_warehouseid = th.f_id
+        LEFT JOIN t_warehousebillsfees tb ON tb.f_pid = tw.f_id
+        <where>
+            tw.del_flag = '0'
+            and tb.del_flag = '0'
+            <if test="fFeeid != null ">and tb.f_feeid = #{fFeeid}</if>
+            <if test="fBillno != null  and fBillno != ''">and tw.f_billno = #{fBillno}</if>
+            <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and tw.f_customsdeclartion =
+                #{fCustomsdeclartion}
+            </if>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and tw.f_originalbillno = #{fOriginalbillno}
+            </if>
+            <if test="fDeptid != null ">and tw.f_deptid = #{fDeptid}</if>
+            <if test="fBsdeptid != null ">and tw.f_bsdeptid = #{fBsdeptid}</if>
+            <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="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>
+            <if test="fWarehouseid != null ">and tw.f_warehouseid = #{fWarehouseid}</if>
+            <if test="fStorekeeper != null  and fStorekeeper != ''">and tw.f_storekeeper = #{fStorekeeper}</if>
+            <if test="fChargedate != null ">and tw.f_chargedate = #{fChargedate}</if>
+            <if test="fBsdate != null ">and tw.f_bsdate = #{fBsdate}</if>
+            <if test="fPlanqty != null ">and tw.f_planqty = #{fPlanqty}</if>
+            <if test="fPlangrossweight != null ">and tw.f_plangrossweight = #{fPlangrossweight}</if>
+            <if test="fPlannetweight != null ">and tw.f_plannetweight = #{fPlannetweight}</if>
+            <if test="fPlanvolumn != null ">and tw.f_planvolumn = #{fPlanvolumn}</if>
+            <if test="fQty != null ">and tw.f_qty = #{fQty}</if>
+            <if test="fGrossweight != null ">and tw.f_grossweight = #{fGrossweight}</if>
+            <if test="fNetweight != null ">and tw.f_netweight = #{fNetweight}</if>
+            <if test="fVolumn != null ">and tw.f_volumn = #{fVolumn}</if>
+            <if test="fBillingway != null ">and tw.f_billingway = #{fBillingway}</if>
+            <if test="fTrademodeid != null ">and tw.f_trademodeid = #{fTrademodeid}</if>
+            <if test="fSbu != null ">and tw.f_sbu = #{fSbu}</if>
+            <if test="fFeetunit != null  and fFeetunit != ''">and tw.f_feetunit = #{fFeetunit}</if>
+            <if test="fMblno != null  and fMblno != ''">and tw.f_mblno = #{fMblno}</if>
+            <if test="fMarks != null  and fMarks != ''">and tw.f_marks = #{fMarks}</if>
+            <if test="fVslvoy != null  and fVslvoy != ''">and tw.f_vslvoy = #{fVslvoy}</if>
+            <if test="fEta != null ">and tw.f_eta = #{fEta}</if>
+            <if test="fCustomno != null  and fCustomno != ''">and tw.f_customno = #{fCustomno}</if>
+            <if test="fIfweigh != null  and fIfweigh != ''">and tw.f_ifweigh = #{fIfweigh}</if>
+            <if test="fIfpledge != null  and fIfpledge != ''">and tw.f_ifpledge = #{fIfpledge}</if>
+            <if test="fIfdamage != null  and fIfdamage != ''">and tw.f_ifdamage = #{fIfdamage}</if>
+            <if test="fBankcorpid != null  and fBankcorpid != ''">and tw.f_bankcorpid = #{fBankcorpid}</if>
+            <if test="fBilltype != null  and fBilltype != ''">and tw.f_billtype = #{fBilltype}</if>
+            <if test="fBillstatus != null ">and tw.f_billstatus = #{fBillstatus}</if>
+            <if test="fBillstatus != null and fBillstatus == 7">and tw.f_billstatus != '6'</if>
+            <if test="fItemsStatus != null ">and tw.f_items_status = #{fItemsStatus}</if>
+            <if test="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
+            <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
+                #{fProductName},
+                '%')
+            </if>
+            <if test="fReviewDate != null ">and tw.f_review_date = #{fReviewDate}</if>
+            <if test="fTruckno != null  and fTruckno != ''">and tw.f_truckno = #{fTruckno}</if>
+            <if test="fDriverName != null  and fDriverName != ''">and tw.f_driver_name like concat('%', #{fDriverName},
+                '%')
+            </if>
+            <if test="fDriverTel != null  and fDriverTel != ''">and tw.f_driver_tel = #{fDriverTel}</if>
+            <if test="fDriverIdCar != null  and fDriverIdCar != ''">and tw.f_driver_id_car = #{fDriverIdCar}</if>
+            <if test="fBusinessType != null  and fBusinessType != ''">and tw.f_business_type = #{fBusinessType}</if>
+            <if test="fLabour != null ">and tw.f_labour = #{fLabour}</if>
+            <if test="fFleet != null ">and tw.f_fleet = #{fFleet}</if>
+            <if test="fInwarehouseid != null ">and tw.f_inwarehouseid = #{fInwarehouseid}</if>
+            <if test="fBstime != null ">and tw.f_bstime = #{fBstime}</if>
+            <if test="fCartype != null ">and tw.f_cartype = #{fCartype}</if>
+            <if test="fGoodsid != null ">and tw.f_goodsid = #{fGoodsid}</if>
+            <if test="fNewTrademodeid != null ">and tw.f_new_trademodeid = #{fNewTrademodeid}</if>
+            <if test="fLoadportid != null ">and tw.f_loadportid = #{fLoadportid}</if>
+            <if test="fDestportid != null ">and tw.f_destportid = #{fDestportid}</if>
+            <if test="fServiceitems != null  and fServiceitems != ''">and tw.f_serviceitems = #{fServiceitems}</if>
+            <if test="fInvoceobj != null  and fInvoceobj != ''">and tw.f_invoceobj = #{fInvoceobj}</if>
+            <if test="fSign != null ">and tw.f_sign = #{fSign}</if>
+            <if test="fDetentioncargo != null ">and tw.f_detentioncargo = #{fDetentioncargo}</if>
+            <if test="fBooksmarks != null  and fBooksmarks != ''">and tw.f_booksmarks = #{fBooksmarks}</if>
+            <if test="fShippername != null  and fShippername != ''">and tw.f_shippername like concat('%',
+                #{fShippername},
+                '%')
+            </if>
+            <if test="fShipperattn != null  and fShipperattn != ''">and tw.f_shipperattn = #{fShipperattn}</if>
+            <if test="fShippertel != null  and fShippertel != ''">and tw.f_shippertel = #{fShippertel}</if>
+            <if test="fConsigneername != null  and fConsigneername != ''">and tw.f_consigneername like concat('%',
+                #{fConsigneername}, '%')
+            </if>
+            <if test="fConsigneeattn != null  and fConsigneeattn != ''">and tw.f_consigneeattn = #{fConsigneeattn}</if>
+            <if test="fConsigneetel != null  and fConsigneetel != ''">and tw.f_consigneetel = #{fConsigneetel}</if>
+            <if test="fInsurance != null  and fInsurance != ''">and tw.f_insurance = #{fInsurance}</if>
+            <if test="fInsuranceamt != null ">and tw.f_insuranceamt = #{fInsuranceamt}</if>
+            <if test="fClosedate != null ">and tw.f_closedate = #{fClosedate}</if>
+            <if test="fDocmentdate != null ">and tw.f_docmentdate = #{fDocmentdate}</if>
+            <if test="fVslid != null ">and tw.f_vslid = #{fVslid}</if>
+            <if test="fVoyid != null ">and tw.f_voyid = #{fVoyid}</if>
+            <if test="fTypeid != null ">and tw.f_typeid = #{fTypeid}</if>
+            <if test="fPaymode != null ">and tw.f_paymode = #{fPaymode}</if>
+            <if test="fLaneid != null ">and tw.f_laneid = #{fLaneid}</if>
+            <if test="fCntval != null  and fCntval != ''">and tw.f_cntval = #{fCntval}</if>
+            <if test="createBy != null  and createBy != ''">and tw.create_by = #{createBy}</if>
+            <if test="remark != null  and remark != ''">and tw.remark = #{remark}</if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and tw.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and tw.create_time &lt;= #{cLoadDate[1]}
+            </if>
+            <if test='moneys != null and moneys[0] != null and moneys[0]!= ""'>
+                and tw.f_money &gt;= #{moneys[0]}
+            </if>
+            <if test='moneys != null and moneys[1] != null and moneys[1]!= ""'>
+                and tw.f_money &lt;= #{moneys[1]}
+            </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>
+            <if test="fTakeOrders != null "> and tw.f_take_orders = #{fTakeOrders}</if>
+            <if test="fReason != null  and fReason != ''"> and tw.f_reason = #{fReason}</if>
+        </where>
+        ORDER BY tw.f_bsdate DESC,tw.f_id DESC
+    </select>
 </mapper>