Browse Source

增加一些接口字段,以及一些改动

nzf 3 years ago
parent
commit
e9e4460b16
18 changed files with 469 additions and 8 deletions
  1. 12 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseAnalysisController.java
  2. 2 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehousebillsfeesController.java
  3. 2 1
      ruoyi-admin/src/main/resources/application-druid.yml
  4. 15 0
      ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TFee.java
  5. 5 0
      ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/vo/FeeVO.java
  6. 53 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsfees.java
  7. 196 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/BillDetailsSubItem.java
  8. 14 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/QueryMenu.java
  9. 8 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsfeesMapper.java
  10. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsitemsNewMapper.java
  11. 8 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehousebillsfeesService.java
  12. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/TWarehousebillsitemsNewService.java
  13. 75 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehousebillsfeesServiceImpl.java
  14. 5 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehousebillsitemsNewServiceImpl.java
  15. 17 3
      ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml
  16. 4 0
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml
  17. 40 0
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml
  18. 9 3
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsNewMapper.xml

+ 12 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseAnalysisController.java

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.warehouse.warehouseBusiness;
 
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
@@ -18,6 +19,7 @@ import com.ruoyi.warehouseBusiness.service.TWarehousebillsitemsNewService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -69,4 +71,14 @@ public class TWarehouseAnalysisController extends BaseController {
         ExcelUtil<TWarehousebillsitemsNew> util = new ExcelUtil<>(TWarehousebillsitemsNew.class);
         return util.exportExcel(list,exportName);
     }
+
+    /**
+     * 获取入库仓库详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('Warehousing:analysis:query')")
+    @GetMapping(value = "/{fId}")
+    @RepeatSubmit
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(tWarehousebillsitemsNewService.selectWarehouseBillItemesById(fId));
+    }
 }

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

@@ -121,7 +121,8 @@ public class TWarehousebillsfeesController extends BaseController {
     @GetMapping("/queryMenuList")
     public TableDataInfo selectQueryMenuList(TWarehousebillsfees tWarehousebillsfees) {
         startPage();
-        return getDataTable(tWarehousebillsfeesService.selectQueryMenuList(tWarehousebillsfees));
+        List<QueryMenu> list = tWarehousebillsfeesService.selectQueryMenuList(tWarehousebillsfees);
+        return getDataTable(list);
     }
 
     /**

+ 2 - 1
ruoyi-admin/src/main/resources/application-druid.yml

@@ -6,7 +6,8 @@ spring:
     druid:
       # 主库数据源
       master:
-        url: jdbc:mysql://124.70.179.5:3306/LinuxServer?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        #url: jdbc:mysql://124.70.179.5:3306/LinuxServer?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        url: jdbc:mysql://124.70.179.5:3306/linshi?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
         username: root
         password: daasan7ujm^YHN
 

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TFee.java

@@ -144,6 +144,13 @@ public class TFee extends BaseEntity {
      */
     @Excel(name = "收费方式")
     private String chargingMethod;
+
+    /**
+     * 财务金额
+     */
+    @Excel(name = "财务金额")
+    private BigDecimal fTotalamount;
+
     /**
      * 发票号
      */
@@ -256,6 +263,14 @@ public class TFee extends BaseEntity {
      */
     private  String srcBillNo;
 
+    public BigDecimal getfTotalamount() {
+        return fTotalamount;
+    }
+
+    public void setfTotalamount(BigDecimal fTotalamount) {
+        this.fTotalamount = fTotalamount;
+    }
+
     public Long getfAccountId() {
         return fAccountId;
     }

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/vo/FeeVO.java

@@ -54,4 +54,9 @@ public class FeeVO extends TFee {
 
     private String reviewDate;
 
+    // 对账金额
+    private BigDecimal fAccamount;
+
+    // 开票金额
+    private BigDecimal fInvamount;
 }

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

@@ -48,6 +48,20 @@ public class TWarehousebillsfees extends BaseEntity {
     private Long fCorpid;
 
     /**
+     * 发货方
+     */
+    @Excel(name = "发货方")
+    private String fShipper;
+
+    public String getfShipper() {
+        return fShipper;
+    }
+
+    public void setfShipper(String fShipper) {
+        this.fShipper = fShipper;
+    }
+
+    /**
      * 费用名称,存储id 显示名称,t_fees 中的no或 name,模糊查找选择后,存储f_id,显示name
      */
     @Excel(name = "费用名称,存储id 显示名称,t_fees 中的no或 name,模糊查找选择后,存储f_id,显示name")
@@ -127,6 +141,19 @@ public class TWarehousebillsfees extends BaseEntity {
     private String fStatementNo;
 
     /**
+     * 对账状态:1.已对账,2.未对账
+     */
+    private int feesStatus;
+
+    public int getFeesStatus() {
+        return feesStatus;
+    }
+
+    public void setFeesStatus(int feesStatus) {
+        this.feesStatus = feesStatus;
+    }
+
+    /**
      * 结算金额
      */
     @Excel(name = "结算金额")
@@ -139,6 +166,19 @@ public class TWarehousebillsfees extends BaseEntity {
     private String fInvnos;
 
     /**
+     * 发票状态:1.已开票,2.未开票
+     */
+    private int fInvnosStatus;
+
+    public int getfInvnosStatus() {
+        return fInvnosStatus;
+    }
+
+    public void setfInvnosStatus(int fInvnosStatus) {
+        this.fInvnosStatus = fInvnosStatus;
+    }
+
+    /**
      * 对账日期
      */
     @JsonFormat(pattern = "yyyy-MM-dd")
@@ -158,6 +198,19 @@ public class TWarehousebillsfees extends BaseEntity {
     private String fStlamountNo;
 
     /**
+     * 结算状态:1.已结算,2.未结算
+     */
+    private int fStalmountStatus;
+
+    public int getfStalmountStatus() {
+        return fStalmountStatus;
+    }
+
+    public void setfStalmountStatus(int fStalmountStatus) {
+        this.fStalmountStatus = fStalmountStatus;
+    }
+
+    /**
      * 申请金额
      */
     @Excel(name = "申请金额")

+ 196 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/BillDetailsSubItem.java

@@ -0,0 +1,196 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 账单明细分项实体
+ */
+public class BillDetailsSubItem {
+    // 业务类型
+    private String fBusinesstype;
+
+    // 作业类型
+    private String twlfBusinesstype;
+
+    // 提单号
+    private String fStatementno;
+
+    // 货名
+    private String tgfName;
+
+    // 客户
+    private String tcfName;
+
+    // 件数
+    private BigDecimal fQty;
+
+    // 重量
+    private BigDecimal fNetweight;
+
+    // 体积
+    private BigDecimal fVolumn;
+
+    // 入库时间
+    private Date fOriginalbilldate;
+
+    // 出库时间
+    private Date fBsdate;
+
+    // 计费天数
+    private int fBillingdays;
+
+    // 金额
+    private BigDecimal fAmount;
+
+    // 计划员
+    private String createBy;
+
+    // 计费时间
+    private Date fChargedate;
+
+    // 结费时间
+    private Date fStlamountdate;
+
+    // 仓库
+    private int fWarehouseId;
+
+    // 备注
+    private String remark;
+
+    public String getfBusinesstype() {
+        return fBusinesstype;
+    }
+
+    public void setfBusinesstype(String fBusinesstype) {
+        this.fBusinesstype = fBusinesstype;
+    }
+
+    public String getTwlfBusinesstype() {
+        return twlfBusinesstype;
+    }
+
+    public void setTwlfBusinesstype(String twlfBusinesstype) {
+        this.twlfBusinesstype = twlfBusinesstype;
+    }
+
+    public String getfStatementno() {
+        return fStatementno;
+    }
+
+    public void setfStatementno(String fStatementno) {
+        this.fStatementno = fStatementno;
+    }
+
+    public String getTgfName() {
+        return tgfName;
+    }
+
+    public void setTgfName(String tgfName) {
+        this.tgfName = tgfName;
+    }
+
+    public String getTcfName() {
+        return tcfName;
+    }
+
+    public void setTcfName(String tcfName) {
+        this.tcfName = tcfName;
+    }
+
+    public BigDecimal getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(BigDecimal fQty) {
+        this.fQty = fQty;
+    }
+
+    public BigDecimal getfNetweight() {
+        return fNetweight;
+    }
+
+    public void setfNetweight(BigDecimal fNetweight) {
+        this.fNetweight = fNetweight;
+    }
+
+    public BigDecimal getfVolumn() {
+        return fVolumn;
+    }
+
+    public void setfVolumn(BigDecimal fVolumn) {
+        this.fVolumn = fVolumn;
+    }
+
+    public Date getfOriginalbilldate() {
+        return fOriginalbilldate;
+    }
+
+    public void setfOriginalbilldate(Date fOriginalbilldate) {
+        this.fOriginalbilldate = fOriginalbilldate;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public int getfBillingdays() {
+        return fBillingdays;
+    }
+
+    public void setfBillingdays(int fBillingdays) {
+        this.fBillingdays = fBillingdays;
+    }
+
+    public BigDecimal getfAmount() {
+        return fAmount;
+    }
+
+    public void setfAmount(BigDecimal fAmount) {
+        this.fAmount = fAmount;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getfChargedate() {
+        return fChargedate;
+    }
+
+    public void setfChargedate(Date fChargedate) {
+        this.fChargedate = fChargedate;
+    }
+
+    public Date getfStlamountdate() {
+        return fStlamountdate;
+    }
+
+    public void setfStlamountdate(Date fStlamountdate) {
+        this.fStlamountdate = fStlamountdate;
+    }
+
+    public int getfWarehouseId() {
+        return fWarehouseId;
+    }
+
+    public void setfWarehouseId(int fWarehouseId) {
+        this.fWarehouseId = fWarehouseId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

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

@@ -150,6 +150,20 @@ public class QueryMenu {
     @Excel(name = "备注")
     private String remark;
 
+    /**
+     * 发货方
+     */
+    @Excel(name = "发货方")
+    private String fShipper;
+
+    public String getfShipper() {
+        return fShipper;
+    }
+
+    public void setfShipper(String fShipper) {
+        this.fShipper = fShipper;
+    }
+
     public String getCorpName() {
         return corpName;
     }

+ 8 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsfeesMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.finance.excel.FleetExcel;
 import com.ruoyi.shipping.domain.TAccount;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
+import com.ruoyi.warehouseBusiness.excel.BillDetailsSubItem;
 import com.ruoyi.warehouseBusiness.excel.QueryMenu;
 import org.apache.ibatis.annotations.Param;
 
@@ -158,4 +159,11 @@ public interface TWarehousebillsfeesMapper extends BaseMapper<TWarehousebillsfee
      * @return
      */
     public List<QueryMenu> selectQueryMenuList(TWarehousebillsfees tWarehousebillsfees);
+
+    /**
+     * 查询账单明细导出分项所需数据
+     * @param billDetailsSubItem
+     * @return
+     */
+    List<BillDetailsSubItem> selectBillDetailsSubItem(BillDetailsSubItem billDetailsSubItem);
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsitemsNewMapper.java

@@ -7,4 +7,6 @@ import java.util.Map;
 
 public interface TWarehousebillsitemsNewMapper {
     public List<TWarehousebillsitemsNew> selectWarehouseBillItemsList(TWarehousebillsitemsNew tWarehousebillsitemsNew);
+
+    TWarehousebillsitemsNew selectWarehouseBillItemesById(Long fId);
 }

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

@@ -1,8 +1,10 @@
 package com.ruoyi.warehouseBusiness.service;
 
 
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.finance.excel.FleetExcel;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
+import com.ruoyi.warehouseBusiness.excel.BillDetailsSubItem;
 import com.ruoyi.warehouseBusiness.excel.QueryMenu;
 
 import java.util.List;
@@ -89,4 +91,10 @@ public interface ITWarehousebillsfeesService {
      */
     public List<QueryMenu> selectQueryMenuList(TWarehousebillsfees tWarehousebillsfees);
 
+    /**
+     * 导出账单明细分项数据
+     * @param billDetailsSubItem
+     * @return
+     */
+    AjaxResult exportBillSubItemDetails(BillDetailsSubItem billDetailsSubItem);
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/TWarehousebillsitemsNewService.java

@@ -6,4 +6,6 @@ import java.util.List;
 
 public interface TWarehousebillsitemsNewService {
     List<TWarehousebillsitemsNew> selectWarehouseBillItemsList(TWarehousebillsitemsNew tWarehousebillsitemsNew);
+
+    TWarehousebillsitemsNew selectWarehouseBillItemesById(Long fId);
 }

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

@@ -1,20 +1,28 @@
 package com.ruoyi.warehouseBusiness.service.impl;
 
 
+import com.ruoyi.basicData.mapper.TFeesMapper;
+import com.ruoyi.common.core.domain.AjaxResult;
 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.BillDetailsSubItem;
 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.apache.poi.hssf.usermodel.*;
+import org.apache.poi.ss.usermodel.BorderStyle;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.VerticalAlignment;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -29,6 +37,9 @@ public class TWarehousebillsfeesServiceImpl implements ITWarehousebillsfeesServi
     @Autowired
     private TWarehousebillsfeesMapper tWarehousebillsfeesMapper;
 
+    @Autowired
+    private TFeesMapper tFeesMapper;
+
     /**
      * 查询仓库费用明细
      *
@@ -191,4 +202,68 @@ public class TWarehousebillsfeesServiceImpl implements ITWarehousebillsfeesServi
         return tWarehousebillsfeesMapper.selectQueryMenuList(tWarehousebillsfees);
     }
 
+    @Override
+    public AjaxResult exportBillSubItemDetails(BillDetailsSubItem billDetailsSubItem) {
+        // 创建 workbook,对应一个 excel 文件
+        HSSFWorkbook wb = new HSSFWorkbook();
+        // 在 workbook 中添加一个sheet,对应 excel 文档中的 sheet
+        HSSFSheet sheet = wb.createSheet("分项明细");
+        // 获取 cell 样式
+        HSSFCellStyle cellStyle = getCellStyle(wb);
+        // 创建标题,合并标题单元格
+        // 行号
+        int ruwNum = 0;
+        // 第一行
+        HSSFRow first = sheet.createRow(ruwNum++);
+        String[] left = {"序号","业务类型","作业类型","提单号","货名","客户","件数","重量","体积","入库时间","计算天数","货物堆存费"};
+        List<String> middle = tFeesMapper.selectTFeesNameList();
+        String[] right = {"金额","计划员","计费时间","结费时间","仓库","备注"};
+
+        List<String> all = new ArrayList<>();
+        Collections.addAll(all,left);
+        all.addAll(middle);
+        Collections.addAll(all,right);
+
+        int size = all.size();
+        for (int i = 0;i < size;i++){
+            HSSFCell tempCell = first.createCell(i);
+            if (i>11 && i<size-6){
+                tempCell.setCellValue(all.get(i) + "单价");
+            } else {
+                tempCell.setCellValue(all.get(i));
+            }
+            tempCell.setCellStyle(cellStyle);
+        }
+
+        // 根据客户名称,发货方查询清单数据
+        List<BillDetailsSubItem> list = tWarehousebillsfeesMapper.selectBillDetailsSubItem(billDetailsSubItem);
+        if (list.size() < 1) {
+            return AjaxResult.error("无数据,导出Excel失败");
+        }
+
+        for (BillDetailsSubItem billDetailsSubItem1 : list) {
+
+        }
+        return null;
+    }
+
+    // 获取 excel 表格的 cell 相关样式
+    public HSSFCellStyle getCellStyle(HSSFWorkbook wb){
+        HSSFCellStyle cellStyle = wb.createCellStyle();
+        // 水平居中
+        cellStyle.setAlignment(HorizontalAlignment.CENTER);
+        // 垂直居中
+        cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        // 上边框
+        cellStyle.setBorderTop(BorderStyle.THIN);
+        // 下边框
+        cellStyle.setBorderBottom(BorderStyle.THIN);
+        // 左边框
+        cellStyle.setBorderLeft(BorderStyle.THIN);
+        // 右边框
+        cellStyle.setBorderRight(BorderStyle.THIN);
+        // 返回
+        return cellStyle;
+    }
+
 }

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehousebillsitemsNewServiceImpl.java

@@ -17,4 +17,9 @@ public class TWarehousebillsitemsNewServiceImpl implements TWarehousebillsitemsN
     public List<TWarehousebillsitemsNew> selectWarehouseBillItemsList(TWarehousebillsitemsNew tWarehousebillsitemsNew) {
         return tWarehousebillsitemsNewMapper.selectWarehouseBillItemsList(tWarehousebillsitemsNew);
     }
+
+    @Override
+    public TWarehousebillsitemsNew selectWarehouseBillItemesById(Long fId) {
+        return tWarehousebillsitemsNewMapper.selectWarehouseBillItemesById(fId);
+    }
 }

+ 17 - 3
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -28,6 +28,7 @@
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="chargingMethod" column="charging_method"/>
+        <result property="fTotalamount" column="f_totalamount"/>
         <result property="invoiceNo" column="invoice_no"/>
         <result property="bank" column="bank"/>
         <result property="waterBillNo" column="water_bill_no"/>
@@ -73,6 +74,7 @@
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="chargingMethod" column="charging_method"/>
+        <result property="fTotalamount" column="f_totalamount"/>
         <result property="invoiceNo" column="invoice_no"/>
         <result property="bank" column="bank"/>
         <result property="waterBillNo" column="water_bill_no"/>
@@ -103,6 +105,8 @@
         <result property="fMarks" column="f_marks"/>
         <result property="fProductName" column="f_product_name"/>
         <result property="fReviewDate" column="f_review_date"/>
+        <result property="fAccamount" column="f_accamount"/>
+        <result property="fInvamount" column="f_invamount"/>
     </resultMap>
 
     <sql id="selectTFeeVo">
@@ -129,6 +133,7 @@
                update_by,
                update_time,
                charging_method,
+               f_totalamount,
                invoice_no,
                bank,
                water_bill_no,
@@ -184,6 +189,7 @@
             ware.update_by,
             ware.update_time,
             pro.dict_label AS charging_method,
+            ware.f_totalamount AS f_totalamount,
             ware.invoice_no,
             ware.bank,
             ware.water_bill_no,
@@ -194,7 +200,7 @@
             left join sys_dept d on ware.f_deptid = d.dept_id
             LEFT JOIN sys_dict_data pro ON pro.dict_value = ware.charging_method and pro.dict_type = 'data_settlement_type'
         <where>
-            <if test="fBillno != null  and fBillno != ''">and ware.f_billno = #{fBillno}</if>
+            <if test="fBillno != null  and fBillno != ''">and ware.f_billno like concat('%', #{ 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>
@@ -223,6 +229,7 @@
                 and ware.f_amtdr &lt;= #{amount[1]}
             </if>
             <if test="chargingMethod != null ">and ware.charging_method = #{chargingMethod}</if>
+            <if test="fTotalamount != null ">and ware.f_totalamount = #{fTotalamount}</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>
@@ -310,6 +317,7 @@
                 and f.create_time &lt;= #{applyTime[1]}
             </if>
             <if test="chargingMethod != null ">and f.charging_method = #{chargingMethod}</if>
+            <if test="fTotalamount != null ">and f.f_totalamount = #{fTotalamount}</if>
             <if test="invoiceNo != null ">and f.invoice_no = #{invoiceNo}</if>
             <if test="bank != null ">and f.bank = #{bank}</if>
             <if test="waterBillNo != null ">and f.water_bill_no = #{waterBillNo}</if>
@@ -415,6 +423,7 @@
                 and f.create_time &lt;= #{applyTime[1]}
             </if>
             <if test="chargingMethod != null ">and f.charging_method = #{chargingMethod}</if>
+            <if test="fTotalamount != null ">and f.f_totalamount = #{fTotalamount}</if>
             <if test="invoiceNo != null ">and f.invoice_no like concat('%', #{invoiceNo}, '%')</if>
             <if test="bank != null ">and f.bank like concat('%', #{bank}, '%')</if>
             <if test="waterBillNo != null ">and f.water_bill_no like concat('%', #{waterBillNo}, '%')</if>
@@ -458,6 +467,7 @@
                f.update_time,
                tn.f_taxrate AS fTaxrate,
                f.charging_method,
+               f.f_totalamount,
                f.invoice_no,
                f.bank,
                f.water_bill_no
@@ -490,6 +500,7 @@
         f.update_time AS updateTime,
         tn.f_taxrate AS fTaxrate,
         f.charging_method AS chargingMethod,
+        f.f_totalamount AS fTotalamount,
         f.invoice_no AS invoiceNo,
         f.bank AS bank,
         f.water_bill_no AS waterBillNo,
@@ -558,6 +569,7 @@
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="chargingMethod != null">charging_method,</if>
+            <if test="fTotalamount != null">f_totalamount,</if>
             <if test="invoiceNo != null">invoice_no,</if>
             <if test="bank != null">bank,</if>
             <if test="waterBillNo != null">water_bill_no,</if>
@@ -602,6 +614,7 @@
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="chargingMethod != null">#{chargingMethod},</if>
+            <if test="fTotalamount != null">#{fTotalamount},</if>
             <if test="invoiceNo != null">#{invoiceNo},</if>
             <if test="bank != null">#{bank},</if>
             <if test="waterBillNo != null">#{waterBillNo},</if>
@@ -649,6 +662,7 @@
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="chargingMethod != null">charging_method = #{chargingMethod},</if>
+            <if test="fTotalamount != null">f_totalamount = #{fTotalamount},</if>
             <if test="invoiceNo != null">invoice_no = #{invoiceNo},</if>
             <if test="bank != null">bank = #{bank},</if>
             <if test="waterBillNo != null">water_bill_no = #{waterBillNo},</if>
@@ -2748,7 +2762,7 @@
     <select id="selectFinancialLedgerList" resultMap="feeVOResult">
         SELECT
             c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus, DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,
-            SUM( w.f_amount ) AS f_amount, SUM( w.f_stlamount ) AS f_stlamount,
+            SUM( w.f_amount ) AS f_amount, SUM( w.f_stlamount ) AS f_stlamount,SUM( w.f_accamount ) AS f_accamount,SUM( w.f_invamount ) AS f_invamount,
             ifnull( SUM( w.f_amount ), 0 ) - ifnull( SUM( w.f_stlamount ), 0 ) AS nnfinished
         FROM
             t_warehousebills t
@@ -2789,7 +2803,7 @@
     <select id="selectFinancialLedgerDetails" resultMap="feeVOResult">
         SELECT t.f_id AS f_srcpid, c.f_name AS f_fees_name, w.f_mblno AS f_mblno,
             w.f_product_name, w.f_marks, t.f_billtype,
-            w.f_review_date,
+            w.f_review_date,w.f_accamount,w.f_invamount,
             IF ( w.f_feeid = #{feesId}, w.f_amount, 0.00 ) storage_fee,
             IF ( w.f_feeid != #{feesId}, w.f_amount, 0.00 ) other_fee,
             w.f_amount, w.f_stlamount AS fStlamount,

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -258,6 +258,7 @@
             bill.f_product_name AS fProductName,
             bill.f_billing_deadline AS fBillingDeadline,
             bill.free_container_date AS freeContainerDate,
+            bill.warehouse_status AS warehouseStatus,
             CASE
             WHEN bill.f_fee_status = '0'THEN ''
             WHEN bill.f_fee_status = '1'THEN '暂存'
@@ -430,6 +431,7 @@
             <if test="fItemsStatus != null  and fItemsStatus != ''">and bill.f_items_status = #{fItemsStatus}</if>
             <if test="createBy != null and createBy != ''">and bill.create_by = #{createBy}</if>
             <if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if>
+            <if test="warehouseStatus != null and warehouseStatus != ''">and bill.warehouse_status = #{warehouseStatus}</if>
         </where>
         ${params.dataScope}
         ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
@@ -470,6 +472,7 @@
             bill.f_product_name AS fProductName,
             bill.f_billing_deadline AS fBillingDeadline,
             bill.free_container_date AS freeContainerDate,
+            bill.warehouse_status AS warehouseStatus,
             CASE
             WHEN bill.f_fee_status = '0'THEN ''
             WHEN bill.f_fee_status = '1'THEN '暂存'
@@ -601,6 +604,7 @@
             <if test="fItemsStatus != null  and fItemsStatus != ''">and bill.f_items_status = #{fItemsStatus}</if>
             <if test="createBy != null and createBy != ''">and bill.create_by = #{createBy}</if>
             <if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if>
+            <if test="warehouseStatus != null and warehouseStatus != ''">and bill.warehouse_status = #{warehouseStatus}</if>
         </where>
         ${params.dataScope}
         ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus

+ 40 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -9,6 +9,7 @@
         <result property="fPid" column="f_pid"/>
         <result property="fLineno" column="f_lineno"/>
         <result property="fCorpid" column="f_corpid"/>
+        <result property="fShipper" column="f_shipper"/>
         <result property="fFeeid" column="f_feeid"/>
         <result property="fFeeunitid" column="f_feeUnitid"/>
         <result property="fWarehouseid" column="f_warehouseid"/>
@@ -868,6 +869,8 @@
             te.f_name AS feeName,
             tf.f_dc AS fDc,
             tf.f_amount AS fAmount,
+            tf.f_stlamount_no AS fStlamountNo,
+            tw.f_shipper AS fShipper,
             tf.f_stlamount AS fStlamount,
             tf.f_stlamount_date AS fStlamountDate,
             tf.f_invamount AS fInvamount,
@@ -893,11 +896,19 @@
         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
+        LEFT JOIN t_warehousebills tw on tf.f_pid = tw.f_id
         <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 like concat('%', #{fMblno}, '%')</if>
+            <if test="fStalmountStatus == 1">and tf.f_stlamount_no is not null and tf.f_stlamount!=0</if>
+            <if test="fStalmountStatus == 2">and tf.f_stlamount_no is null</if>
+            <if test="feesStatus == 1">and tf.f_statement_no is not null and tf.f_accamount &gt;= 0 and tf.f_accamount != 0</if>
+            <if test="feesStatus == 2">and tf.f_statement_no is null</if>
+            <if test="fInvnosStatus == 1">and tf.f_invnos is not null and tf.f_invamount != 0</if>
+            <if test="fInvnosStatus == 2">and tf.f_invnos is null</if>
             <if test="fCorpid != null  and fCorpid != ''">and tf.f_corpid = #{fCorpid}</if>
+            <if test="fShipper != null  and fShipper != ''">and tw.f_shipper like concat('%',#{fShipper},'%')</if>
             <if test="fStltypeid != null">and tf.f_stltypeid = #{fStltypeid}</if>
             <if test='fFeeids != null'>
                 and tf.f_feeid in
@@ -920,4 +931,33 @@
         </where>
         ORDER BY tf.f_bsdate desc
     </select>
+
+    <select id="selectBillDetailsSubItem" resultType="com.ruoyi.warehouseBusiness.excel.BillDetailsSubItem">
+        select
+            tw.f_business_type as fBusinesstype,
+            twl.f_business_type as twlfBusinesstype,
+            tw.f_statement_no as fStatementno,
+            tg.f_name as tgfName,
+            tc.f_name as tcfName,
+            tw.f_qty as fQty,
+            twb.f_netweight as fNetweight,
+            twb.f_volumn as fVolumn,
+            twb.f_originalbilldate as fOriginalbilldate,
+            twb.f_bsdate as fBsdate,
+            twb.f_billing_days as fBillingdays,
+            tw.f_amount as fAmount,
+            twb.create_by as createBy,
+            twb.f_chargedate as fChargedate,
+            tw.f_stlamount_date as fStlamountdate,
+            tw.f_warehouseid as fWarehouseId,
+            twb.remark as remark
+        from t_warehousebillsfees tw
+                 LEFT JOIN t_warehousebillsitems twb on twb.f_pid = tw.f_id
+                 LEFT JOIN t_warehousebillsfees_logger twl on twl.f_pid = tw.f_id
+                 LEFT JOIN t_goods tg on twb.f_goodsid = tg.f_id
+                 LEFT JOIN t_corps tc on tw.f_corpid = tc.f_id
+        <where>
+            <if test="fCorpid != null  and fCorpid != ''">and tw.f_corpid = #{fCorpid}</if>
+        </where>
+    </select>
 </mapper>

+ 9 - 3
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsNewMapper.xml

@@ -27,7 +27,7 @@
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsNewVo">
-        select a.f_id,
+        select b.f_id as f_id,
                a.f_billtype,
                a.is_calculate_storage_fees,
                b.f_corpid,
@@ -59,13 +59,14 @@
             <if test="fCorpid != null">and b.f_corpid = #{fCorpid}</if>
             <if test="fCName != null">and f_c_name = #{fCName}</if>
             <if test="fName != null">and t.f_name, = #{fName}</if>
-            <if test="fMblno != null ">and a.f_mblno = #{fMblno}</if>
+            <if test="fMblno != null ">and a.f_mblno like concat('%',#{fMblno},'%')</if>
             <if test="fQty != null ">and a.f_qty = #{fQty}</if>
             <if test="fGrossweight != null ">and b.f_grossweight = #{fGrossweight}</if>
             <if test="fWarehouseInformation != null ">and a.f_warehouse_information like concat('%',#{fWarehouseInformation},'%')</if>
             <if test="fWarehouseid != null ">and b.f_warehouseid=#{fWarehouseid}</if>
             and f_originalbilldate!='null'
-            <if test="fBsdate != null ">and b.f_bsdate = #{fBsdate}</if>
+            /*&lt; 小于符号转义字符,直接输入小于符号会报错*/
+            <if test="fBsdate != null ">and b.f_bsdate &lt; #{fBsdate}</if>
             <if test="fStorekeeper != null ">and b.f_storekeeper = #{fStorekeeper}</if>
             <if test="fStorageFeeDeadline != null ">and a.f_storage_fee_deadline = #{fStorageFeeDeadline}</if>
             <if test="createBy != null ">and a.create_by = #{createBy}</if>
@@ -75,4 +76,9 @@
         </where>
         order by a.create_time desc
     </select>
+
+    <select id="selectWarehouseBillItemesById" parameterType="Long" resultMap="TWarehousebillsitemsNewResult">
+        <include refid="selectTWarehousebillsitemsNewVo"/>
+        where f_id = #{fId}
+    </select>
 </mapper>