Browse Source

[CODE]: 财务收费、付费导出

maxianghua 4 years ago
parent
commit
b5395a2362

+ 6 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TChargeController.java

@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TWareHouseFees;
 import com.ruoyi.finance.domain.TWareHouseFees;
+import com.ruoyi.finance.excel.Charge;
 import com.ruoyi.finance.service.ITFeeService;
 import com.ruoyi.finance.service.ITFeeService;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.framework.web.service.TokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -54,10 +55,11 @@ public class TChargeController extends BaseController {
     @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
     @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
     @GetMapping("/export")
-    public AjaxResult export(TFee tFee) {
-        List<TFee> list = tFeeService.selectTFeeList(tFee);
-        ExcelUtil<TFee> util = new ExcelUtil<TFee>(TFee.class);
-        return util.exportExcel(list, "fee");
+    public AjaxResult export(TFee tFee) throws Exception {
+        tFee.setfBilltype("SF");
+        List<Charge> list = tFeeService.chargeExport(tFee);
+        ExcelUtil<Charge> util = new ExcelUtil<Charge>(Charge.class);
+        return util.exportExcel(list, "收费");
     }
     }
 
 
     /**
     /**

+ 6 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TPaymentController.java

@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TWareHouseFees;
 import com.ruoyi.finance.domain.TWareHouseFees;
+import com.ruoyi.finance.excel.Payment;
 import com.ruoyi.finance.service.ITFeeService;
 import com.ruoyi.finance.service.ITFeeService;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.framework.web.service.TokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -54,10 +55,11 @@ public class TPaymentController extends BaseController {
     @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
     @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
     @GetMapping("/export")
-    public AjaxResult export(TFee tFee) {
-        List<TFee> list = tFeeService.selectTFeeList(tFee);
-        ExcelUtil<TFee> util = new ExcelUtil<TFee>(TFee.class);
-        return util.exportExcel(list, "fee");
+    public AjaxResult export(TFee tFee) throws Exception {
+        tFee.setfBilltype("SF");
+        List<Payment> list = tFeeService.paymentExport(tFee);
+        ExcelUtil<Payment> util = new ExcelUtil<Payment>(Payment.class);
+        return util.exportExcel(list, "付费");
     }
     }
 
 
     /**
     /**

+ 98 - 10
ruoyi-warehouse/src/main/java/com/ruoyi/finance/excel/Charge.java

@@ -15,6 +15,13 @@ public class Charge {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     /**
     /**
+     * 结算单位
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+
+    /**
      * 系统编号
      * 系统编号
      */
      */
     @Excel(name = "系统编号")
     @Excel(name = "系统编号")
@@ -27,17 +34,19 @@ public class Charge {
     @Excel(name = "货权方")
     @Excel(name = "货权方")
     private String fCtrlcorpid;
     private String fCtrlcorpid;
 
 
+
     /**
     /**
-     * 结算单位
+     * 入(出)库日期
      */
      */
-    @Excel(name = "结算单位")
-    private String fCorpidName;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createTime;
 
 
     /**
     /**
      * 入(出)库日期
      * 入(出)库日期
      */
      */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "收费日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fAccbilldate;
     private Date fAccbilldate;
 
 
 
 
@@ -47,17 +56,43 @@ public class Charge {
     @Excel(name = "提单号")
     @Excel(name = "提单号")
     private String tMblno;
     private String tMblno;
 
 
+    /**
+     * 提单号
+     */
+    @Excel(name = "收费方式")
+    private String chargingMethod;
+
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "发票号")
+    private String invoiceNo;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "收款银行")
+    private String bank;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "水单号")
+    private String waterBillNo;
+
+
 
 
     /**
     /**
      * 金额
      * 金额
      */
      */
-    @Excel(name = "金额")
+    @Excel(name = "应收合计")
     private Float fAmtdr;
     private Float fAmtdr;
 
 
     /**
     /**
      * 对账金额
      * 对账金额
      */
      */
-    @Excel(name = "对账金额")
+    @Excel(name = "实收合计")
     private Float fAmtcr;
     private Float fAmtcr;
 
 
     /**
     /**
@@ -66,6 +101,35 @@ public class Charge {
     @Excel(name = "备注")
     @Excel(name = "备注")
     private String fRemarks;
     private String fRemarks;
 
 
+    /**
+     * 状态
+     */
+    @Excel(name = "状态")
+    private String fBillstatus;
+
+    public String getChargingMethod() {
+        return chargingMethod;
+    }
+
+    public void setChargingMethod(String chargingMethod) {
+        this.chargingMethod = chargingMethod;
+    }
+
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
 
 
     public String getfBillno() {
     public String getfBillno() {
         return fBillno;
         return fBillno;
@@ -83,12 +147,12 @@ public class Charge {
         this.fCtrlcorpid = fCtrlcorpid;
         this.fCtrlcorpid = fCtrlcorpid;
     }
     }
 
 
-    public String getfCorpidName() {
-        return fCorpidName;
+    public Date getCreateTime() {
+        return createTime;
     }
     }
 
 
-    public void setfCorpidName(String fCorpidName) {
-        this.fCorpidName = fCorpidName;
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
     }
     }
 
 
     public Date getfAccbilldate() {
     public Date getfAccbilldate() {
@@ -107,6 +171,30 @@ public class Charge {
         this.tMblno = tMblno;
         this.tMblno = tMblno;
     }
     }
 
 
+    public String getInvoiceNo() {
+        return invoiceNo;
+    }
+
+    public void setInvoiceNo(String invoiceNo) {
+        this.invoiceNo = invoiceNo;
+    }
+
+    public String getBank() {
+        return bank;
+    }
+
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+    public String getWaterBillNo() {
+        return waterBillNo;
+    }
+
+    public void setWaterBillNo(String waterBillNo) {
+        this.waterBillNo = waterBillNo;
+    }
+
     public Float getfAmtdr() {
     public Float getfAmtdr() {
         return fAmtdr;
         return fAmtdr;
     }
     }

+ 99 - 10
ruoyi-warehouse/src/main/java/com/ruoyi/finance/excel/Payment.java

@@ -15,6 +15,13 @@ public class Payment {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     /**
     /**
+     * 结算单位
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+
+    /**
      * 系统编号
      * 系统编号
      */
      */
     @Excel(name = "系统编号")
     @Excel(name = "系统编号")
@@ -27,17 +34,19 @@ public class Payment {
     @Excel(name = "货权方")
     @Excel(name = "货权方")
     private String fCtrlcorpid;
     private String fCtrlcorpid;
 
 
+
     /**
     /**
-     * 结算单位
+     * 入(出)库日期
      */
      */
-    @Excel(name = "结算单位")
-    private String fCorpidName;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createTime;
 
 
     /**
     /**
      * 入(出)库日期
      * 入(出)库日期
      */
      */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "收费日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fAccbilldate;
     private Date fAccbilldate;
 
 
 
 
@@ -47,17 +56,43 @@ public class Payment {
     @Excel(name = "提单号")
     @Excel(name = "提单号")
     private String tMblno;
     private String tMblno;
 
 
+    /**
+     * 提单号
+     */
+    @Excel(name = "收费方式")
+    private String chargingMethod;
+
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "发票号")
+    private String invoiceNo;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "收款银行")
+    private String bank;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "水单号")
+    private String waterBillNo;
+
+
 
 
     /**
     /**
      * 金额
      * 金额
      */
      */
-    @Excel(name = "金额")
+    @Excel(name = "应付合计")
     private Float fAmtdr;
     private Float fAmtdr;
 
 
     /**
     /**
      * 对账金额
      * 对账金额
      */
      */
-    @Excel(name = "对账金额")
+    @Excel(name = "实付合计")
     private Float fAmtcr;
     private Float fAmtcr;
 
 
     /**
     /**
@@ -66,6 +101,36 @@ public class Payment {
     @Excel(name = "备注")
     @Excel(name = "备注")
     private String fRemarks;
     private String fRemarks;
 
 
+    /**
+     * 状态
+     */
+    @Excel(name = "状态")
+    private String fBillstatus;
+
+    public String getChargingMethod() {
+        return chargingMethod;
+    }
+
+    public void setChargingMethod(String chargingMethod) {
+        this.chargingMethod = chargingMethod;
+    }
+
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
     public String getfBillno() {
     public String getfBillno() {
         return fBillno;
         return fBillno;
     }
     }
@@ -82,12 +147,12 @@ public class Payment {
         this.fCtrlcorpid = fCtrlcorpid;
         this.fCtrlcorpid = fCtrlcorpid;
     }
     }
 
 
-    public String getfCorpidName() {
-        return fCorpidName;
+    public Date getCreateTime() {
+        return createTime;
     }
     }
 
 
-    public void setfCorpidName(String fCorpidName) {
-        this.fCorpidName = fCorpidName;
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
     }
     }
 
 
     public Date getfAccbilldate() {
     public Date getfAccbilldate() {
@@ -106,6 +171,30 @@ public class Payment {
         this.tMblno = tMblno;
         this.tMblno = tMblno;
     }
     }
 
 
+    public String getInvoiceNo() {
+        return invoiceNo;
+    }
+
+    public void setInvoiceNo(String invoiceNo) {
+        this.invoiceNo = invoiceNo;
+    }
+
+    public String getBank() {
+        return bank;
+    }
+
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+    public String getWaterBillNo() {
+        return waterBillNo;
+    }
+
+    public void setWaterBillNo(String waterBillNo) {
+        this.waterBillNo = waterBillNo;
+    }
+
     public Float getfAmtdr() {
     public Float getfAmtdr() {
         return fAmtdr;
         return fAmtdr;
     }
     }

+ 3 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/mapper/TFeeMapper.java

@@ -83,4 +83,7 @@ public interface TFeeMapper {
      * @return 详情主表集合
      * @return 详情主表集合
      */
      */
     public List<TWareHouseExcelItem> selectTWarehousebillsItemsList(@Param("fId") Long fid);
     public List<TWareHouseExcelItem> selectTWarehousebillsItemsList(@Param("fId") Long fid);
+
+    public List<Map<String, Object>> selectFeeList(TFee tFee);
+
 }
 }

+ 6 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/ITFeeService.java

@@ -4,7 +4,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TWareHouseFees;
 import com.ruoyi.finance.domain.TWareHouseFees;
+import com.ruoyi.finance.excel.Charge;
 import com.ruoyi.finance.excel.Contrast;
 import com.ruoyi.finance.excel.Contrast;
+import com.ruoyi.finance.excel.Payment;
 import com.ruoyi.reportManagement.excel.Payable;
 import com.ruoyi.reportManagement.excel.Payable;
 import com.ruoyi.reportManagement.excel.Profit;
 import com.ruoyi.reportManagement.excel.Profit;
 import com.ruoyi.reportManagement.excel.Receivable;
 import com.ruoyi.reportManagement.excel.Receivable;
@@ -123,4 +125,8 @@ public interface ITFeeService {
 
 
     public List<Contrast> contrastExport(TFee tFee) throws Exception;
     public List<Contrast> contrastExport(TFee tFee) throws Exception;
 
 
+    public List<Payment> paymentExport(TFee tFee) throws Exception;
+
+    public List<Charge> chargeExport(TFee tFee) throws Exception;
+
 }
 }

+ 16 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -16,7 +16,9 @@ import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TFeeDo;
 import com.ruoyi.finance.domain.TFeeDo;
 import com.ruoyi.finance.domain.TWareHouseFees;
 import com.ruoyi.finance.domain.TWareHouseFees;
+import com.ruoyi.finance.excel.Charge;
 import com.ruoyi.finance.excel.Contrast;
 import com.ruoyi.finance.excel.Contrast;
+import com.ruoyi.finance.excel.Payment;
 import com.ruoyi.finance.mapper.TFeeDoMapper;
 import com.ruoyi.finance.mapper.TFeeDoMapper;
 import com.ruoyi.finance.mapper.TFeeMapper;
 import com.ruoyi.finance.mapper.TFeeMapper;
 import com.ruoyi.finance.service.ITFeeService;
 import com.ruoyi.finance.service.ITFeeService;
@@ -594,6 +596,20 @@ public class TFeeServiceImpl implements ITFeeService {
         return list1;
         return list1;
     }
     }
 
 
+    @Override
+    public List<Payment> paymentExport(TFee tFee) throws Exception {
+        List<Map<String, Object>> list = tFeeMapper.selectFeeList(tFee);
+        List<Payment> list1 = ListMapToBeanUtils.castMapToBean(list,Payment.class);
+        return list1;
+    }
+
+    @Override
+    public List<Charge> chargeExport(TFee tFee) throws Exception {
+        List<Map<String, Object>> list = tFeeMapper.selectFeeList(tFee);
+        List<Charge> list1 = ListMapToBeanUtils.castMapToBean(list,Charge.class);
+        return list1;
+    }
+
     /**
     /**
      *  更新费用明细
      *  更新费用明细
      * @param fid
      * @param fid

+ 82 - 21
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -46,32 +46,32 @@
             left join sys_user u on ware.create_by = u.user_name
             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_dept d on ware.f_deptid = d.dept_id
         <where>
         <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="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]!= ""'>
             <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
-                and f_accbilldate &gt;= #{timeInterval[0]}
+                and ware.f_accbilldate &gt;= #{timeInterval[0]}
             </if>
             </if>
             <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
             <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
-                and f_accbilldate &lt;= #{timeInterval[1]}
+                and ware.f_accbilldate &lt;= #{timeInterval[1]}
             </if>
             </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>
         </where>
         ${params.dataScope}
         ${params.dataScope}
     </select>
     </select>
@@ -754,4 +754,65 @@
             w.f_mblno
             w.f_mblno
         </where>
         </where>
     </select>
     </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 &gt;= #{timeInterval[0]}
+            </if>
+            <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
+                and ware.f_accbilldate &lt;= #{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>
 </mapper>
 </mapper>