瀏覽代碼

查询菜单完善获取列表接口、新增导出接口

Sun 3 年之前
父節點
當前提交
f4987012f3

+ 14 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehousebillsfeesController.java

@@ -12,6 +12,7 @@ import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.finance.excel.FleetExcel;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
+import com.ruoyi.warehouseBusiness.excel.QueryMenu;
 import com.ruoyi.warehouseBusiness.service.ITWarehousebillsfeesService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -118,9 +119,20 @@ public class TWarehousebillsfeesController extends BaseController {
      * 获取查询菜单数据
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebillsfees:query')")
-    @PostMapping("/queryMenuList")
-    public TableDataInfo selectQueryMenuList(@RequestBody TWarehousebillsfees tWarehousebillsfees) {
+    @GetMapping("/queryMenuList")
+    public TableDataInfo selectQueryMenuList(TWarehousebillsfees tWarehousebillsfees) {
         startPage();
         return getDataTable(tWarehousebillsfeesService.selectQueryMenuList(tWarehousebillsfees));
     }
+
+    /**
+     * 导出查询菜单列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebillsfees:export')")
+    @GetMapping("/queryMenuExport")
+    public AjaxResult queryMenuExport(TWarehousebillsfees tWarehousebillsfees) throws Exception {
+        List<QueryMenu> list = tWarehousebillsfeesService.queryMenuExport(tWarehousebillsfees);
+        ExcelUtil<QueryMenu> util = new ExcelUtil<>(QueryMenu.class);
+        return util.exportExcel(list, "查询菜单列表");
+    }
 }

+ 14 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsfees.java

@@ -305,6 +305,19 @@ public class TWarehousebillsfees extends BaseEntity {
     }
 
     /**
+     * 查询审核日期时间区间
+     */
+    private List<String> fReviewDateList;
+
+    public List<String> getfReviewDateList() {
+        return fReviewDateList;
+    }
+
+    public void setfReviewDateList(List<String> fReviewDateList) {
+        this.fReviewDateList = fReviewDateList;
+    }
+
+    /**
      * 是否可修改 0 手动录入
      */
     private Long fSrcTypeId;
@@ -794,6 +807,7 @@ public class TWarehousebillsfees extends BaseEntity {
                 ", fStltypeid=" + fStltypeid +
                 ", fBusinessType='" + fBusinessType + '\'' +
                 ", fBsdateList=" + fBsdateList +
+                ", fReviewDateList=" + fReviewDateList +
                 ", fSrcTypeId=" + fSrcTypeId +
                 ", corpName='" + corpName + '\'' +
                 ", feeName='" + feeName + '\'' +

+ 337 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/QueryMenu.java

@@ -0,0 +1,337 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 查询菜单导出
+ *
+ * @author shz
+ * @date 2021-12-17
+ */
+public class QueryMenu {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 客户姓名
+     */
+    @Excel(name = "客户姓名")
+    private String corpName;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String fMblno;
+
+    /**
+     * 业务日期
+     */
+    @Excel(name = "业务日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBsdate;
+
+    /**
+     * 审核日期
+     */
+    @Excel(name = "审核日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fReviewDate;
+
+    /**
+     * 费用名称
+     */
+    @Excel(name = "费用名称")
+    private String feeName;
+
+    /**
+     * 费用状态
+     */
+    @Excel(name = "费用状态")
+    private String fBillstatusName;
+
+    /**
+     * 收、付,D:收 C:付
+     */
+    @Excel(name = "收/付", readConverterExp = "D=收,C=付")
+    private String fDc;
+
+    /**
+     * 金额
+     */
+    @Excel(name = "金额")
+    private Float fAmount;
+
+    /**
+     * 结算金额
+     */
+    @Excel(name = "结算金额")
+    private Float fStlamount;
+
+    /**
+     * 结算日期
+     */
+    @Excel(name = "结算日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fStlamountDate;
+
+    /**
+     * 开票金额
+     */
+    @Excel(name = "开票金额")
+    private Float fInvamount;
+
+    /**
+     * 发票号
+     */
+    @Excel(name = "发票号")
+    private String fInvnos;
+
+    /**
+     * 对账金额
+     */
+    @Excel(name = "对账金额")
+    private Float fAccamount;
+
+    /**
+     * 对账日期
+     */
+    @Excel(name = "对账日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fAccamountDate;
+
+    /**
+     * 对账单号
+     */
+    @Excel(name = "对账单号")
+    private String fStatementNo;
+
+    /**
+     * 计价单位
+     */
+    @Excel(name = "计价单位", readConverterExp = "1=件数,2=毛重,3=净重,4=尺码,5=固定,6=其他,7=箱量")
+    private Long fFeeunitid;
+
+    /**
+     * 数量
+     */
+    @Excel(name = "数量")
+    private Float fQty;
+
+    /**
+     * 单价
+     */
+    @Excel(name = "单价")
+    private Float fUnitprice;
+
+    /**
+     * 业务类型
+     */
+    @Excel(name = "业务类型", readConverterExp = "SJRK=入库,SJCK=实际出库,CKDB=调拨,HQZY=货权转移,CDZZ=场地直装")
+    private String fBilltype;
+
+    /**
+     * 货物名称
+     */
+    @Excel(name = "货物名称")
+    private String fProductName;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remark;
+
+
+    public String getCorpName() {
+        return corpName;
+    }
+
+    public void setCorpName(String corpName) {
+        this.corpName = corpName;
+    }
+
+    public String getfMblno() {
+        return fMblno;
+    }
+
+    public void setfMblno(String fMblno) {
+        this.fMblno = fMblno;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public Date getfReviewDate() {
+        return fReviewDate;
+    }
+
+    public void setfReviewDate(Date fReviewDate) {
+        this.fReviewDate = fReviewDate;
+    }
+
+    public String getFeeName() {
+        return feeName;
+    }
+
+    public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+
+    public String getfBillstatusName() {
+        return fBillstatusName;
+    }
+
+    public void setfBillstatusName(String fBillstatusName) {
+        this.fBillstatusName = fBillstatusName;
+    }
+
+    public String getfDc() {
+        return fDc;
+    }
+
+    public void setfDc(String fDc) {
+        this.fDc = fDc;
+    }
+
+    public Float getfAmount() {
+        return fAmount;
+    }
+
+    public void setfAmount(Float fAmount) {
+        this.fAmount = fAmount;
+    }
+
+    public Float getfStlamount() {
+        return fStlamount;
+    }
+
+    public void setfStlamount(Float fStlamount) {
+        this.fStlamount = fStlamount;
+    }
+
+    public Date getfStlamountDate() {
+        return fStlamountDate;
+    }
+
+    public void setfStlamountDate(Date fStlamountDate) {
+        this.fStlamountDate = fStlamountDate;
+    }
+
+    public Float getfInvamount() {
+        return fInvamount;
+    }
+
+    public void setfInvamount(Float fInvamount) {
+        this.fInvamount = fInvamount;
+    }
+
+    public String getfInvnos() {
+        return fInvnos;
+    }
+
+    public void setfInvnos(String fInvnos) {
+        this.fInvnos = fInvnos;
+    }
+
+    public Float getfAccamount() {
+        return fAccamount;
+    }
+
+    public void setfAccamount(Float fAccamount) {
+        this.fAccamount = fAccamount;
+    }
+
+    public Date getfAccamountDate() {
+        return fAccamountDate;
+    }
+
+    public void setfAccamountDate(Date fAccamountDate) {
+        this.fAccamountDate = fAccamountDate;
+    }
+
+    public String getfStatementNo() {
+        return fStatementNo;
+    }
+
+    public void setfStatementNo(String fStatementNo) {
+        this.fStatementNo = fStatementNo;
+    }
+
+    public Long getfFeeunitid() {
+        return fFeeunitid;
+    }
+
+    public void setfFeeunitid(Long fFeeunitid) {
+        this.fFeeunitid = fFeeunitid;
+    }
+
+    public Float getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(Float fQty) {
+        this.fQty = fQty;
+    }
+
+    public Float getfUnitprice() {
+        return fUnitprice;
+    }
+
+    public void setfUnitprice(Float fUnitprice) {
+        this.fUnitprice = fUnitprice;
+    }
+
+    public String getfBilltype() {
+        return fBilltype;
+    }
+
+    public void setfBilltype(String fBilltype) {
+        this.fBilltype = fBilltype;
+    }
+
+    public String getfProductName() {
+        return fProductName;
+    }
+
+    public void setfProductName(String fProductName) {
+        this.fProductName = fProductName;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QueryMenu{" +
+                "corpName='" + corpName + '\'' +
+                ", fMblno='" + fMblno + '\'' +
+                ", fBsdate=" + fBsdate +
+                ", fReviewDate=" + fReviewDate +
+                ", feeName='" + feeName + '\'' +
+                ", fBillstatusName='" + fBillstatusName + '\'' +
+                ", fDc='" + fDc + '\'' +
+                ", fAmount=" + fAmount +
+                ", fStlamount=" + fStlamount +
+                ", fStlamountDate=" + fStlamountDate +
+                ", fInvamount=" + fInvamount +
+                ", fInvnos='" + fInvnos + '\'' +
+                ", fAccamount=" + fAccamount +
+                ", fAccamountDate=" + fAccamountDate +
+                ", fStatementNo='" + fStatementNo + '\'' +
+                ", fFeeunitid=" + fFeeunitid +
+                ", fQty=" + fQty +
+                ", fUnitprice=" + fUnitprice +
+                ", fBilltype='" + fBilltype + '\'' +
+                ", fProductName='" + fProductName + '\'' +
+                ", remark='" + remark + '\'' +
+                '}';
+    }
+}

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

@@ -3,6 +3,7 @@ package com.ruoyi.warehouseBusiness.service;
 
 import com.ruoyi.finance.excel.FleetExcel;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
+import com.ruoyi.warehouseBusiness.excel.QueryMenu;
 
 import java.util.List;
 import java.util.Map;
@@ -87,4 +88,11 @@ public interface ITWarehousebillsfeesService {
      * @return
      */
     public List<Map<String, Object>> selectQueryMenuList(TWarehousebillsfees tWarehousebillsfees);
+
+    /**
+     *  获取查询菜单导出数据
+     * @param tWarehousebillsfees
+     * @return
+     */
+    public List<QueryMenu> queryMenuExport(TWarehousebillsfees tWarehousebillsfees) throws Exception;
 }

+ 9 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehousebillsfeesServiceImpl.java

@@ -5,6 +5,9 @@ import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.finance.excel.FleetExcel;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
+import com.ruoyi.warehouseBusiness.excel.InStock;
+import com.ruoyi.warehouseBusiness.excel.ListMapToBeanUtils;
+import com.ruoyi.warehouseBusiness.excel.QueryMenu;
 import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsfeesMapper;
 import com.ruoyi.warehouseBusiness.service.ITWarehousebillsfeesService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -187,4 +190,10 @@ public class TWarehousebillsfeesServiceImpl implements ITWarehousebillsfeesServi
     public List<Map<String, Object>> selectQueryMenuList(TWarehousebillsfees tWarehousebillsfees) {
         return tWarehousebillsfeesMapper.selectQueryMenuList(tWarehousebillsfees);
     }
+
+    @Override
+    public List<QueryMenu> queryMenuExport(TWarehousebillsfees tWarehousebillsfees) throws Exception {
+        List<Map<String, Object>> list = tWarehousebillsfeesMapper.selectQueryMenuList(tWarehousebillsfees);
+        return ListMapToBeanUtils.castMapToBean(list, QueryMenu.class);
+    }
 }

+ 28 - 8
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -855,8 +855,8 @@
         tf.f_bsdate AS fBsdate,
         tf.f_review_date AS fReviewDate,
         tf.f_feeid AS fFeeid,
-        te.f_no AS feesNo,
-        te.f_name AS feesName,
+        te.f_no AS feeNo,
+        te.f_name AS feeName,
         tf.f_dc AS fDc,
         tf.f_amount AS fAmount,
         tf.f_stlamount AS fStlamount,
@@ -869,19 +869,39 @@
         tf.f_feeUnitid AS fFeeUnitid,
         tf.f_qty AS fQty,
         tf.f_unitprice AS fUnitprice,
-        tf.f_business_type AS fBusinessType,
+        tf.f_billtype AS fBilltype,
         tf.f_product_name AS fProductName,
         tf.remark AS remark,
-        tf.price_date_remarks AS priceDateRemarks
+        tf.price_date_remarks AS priceDateRemarks,
+        CASE
+        WHEN tf.f_billstatus = '1' THEN '录入'
+        WHEN tf.f_billstatus = '2' THEN '暂存'
+        WHEN tf.f_billstatus = '3' THEN '审批驳回'
+        WHEN tf.f_billstatus = '4' THEN '提交审核'
+        WHEN tf.f_billstatus = '5' THEN '审核中'
+        WHEN tf.f_billstatus = '6' THEN '审核通过'
+        END AS fBillstatusName
         FROM t_warehousebillsfees tf
         LEFT JOIN t_corps tc ON tc.f_id = tf.f_corpid
         LEFT JOIN t_fees te ON te.f_id = tf.f_feeid
         <where>
+            <if test="fBillstatus != null  and fBillstatus != ''">and tf.f_billstatus = #{fBillstatus}</if>
             <if test="fDc != null  and fDc != ''">and tf.f_dc = #{fDc}</if>
-            <if test="fMblno != null  and fMblno != ''">and tf.f_mblno = #{fMblno}</if>
-            <if test="corpName != null  and corpName != ''">and tc.f_name like concat('%', #{corpName},'%')</if>
-            <if test="fReviewDate != null  and fReviewDate != ''">and tf.f_review_date = #{fReviewDate}</if>
-            <if test="fBsdate != null  and fBsdate != ''">and tf.f_bsdate = #{fBsdate}</if>
+            <if test="fMblno != null  and fMblno != ''">and tf.f_mblno like concat('%', #{fMblno}, '%')</if>
+            <if test="fCorpid != null  and fCorpid != ''">and tf.f_corpid = #{fCorpid}</if>
+            <if test='fReviewDateList != null and fReviewDateList[0] != null and fReviewDateList[0]!= ""'>
+                and tf.f_review_date &gt;= #{fReviewDateList[0]}
+            </if>
+            <if test='fReviewDateList != null and fReviewDateList[1] != null and fReviewDateList[1]!= ""'>
+                and tf.f_review_date &lt;= #{fReviewDateList[1]}
+            </if>
+            <if test='fBsdateList != null and fBsdateList[0] != null and fBsdateList[0]!= ""'>
+                and tf.f_bsdate &gt;= #{fBsdateList[0]}
+            </if>
+            <if test='fBsdateList != null and fBsdateList[1] != null and fBsdateList[1]!= ""'>
+                and tf.f_bsdate &lt;= #{fBsdateList[1]}
+            </if>
         </where>
+        ORDER BY tf.f_bsdate desc
     </select>
 </mapper>