فهرست منبع

[CODE]: 对账导出

maxianghua 4 سال پیش
والد
کامیت
7580bdac7a

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

@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TWareHouseFees;
+import com.ruoyi.finance.excel.Contrast;
 import com.ruoyi.finance.service.ITFeeService;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItem;
@@ -55,10 +56,11 @@ public class TContrastController extends BaseController {
     @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @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("DZ");
+        List<Contrast> list = tFeeService.contrastExport(tFee);
+        ExcelUtil<Contrast> util = new ExcelUtil<Contrast>(Contrast.class);
+        return util.exportExcel(list, "对账");
     }
 
     /**

+ 133 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/excel/Charge.java

@@ -0,0 +1,133 @@
+package com.ruoyi.finance.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class Charge {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 系统编号
+     */
+    @Excel(name = "系统编号")
+    private String fBillno;
+
+
+    /**
+     * 货权方
+     */
+    @Excel(name = "货权方")
+    private String fCtrlcorpid;
+
+    /**
+     * 结算单位
+     */
+    @Excel(name = "结算单位")
+    private String fCorpidName;
+
+    /**
+     * 入(出)库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fAccbilldate;
+
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String tMblno;
+
+
+    /**
+     * 金额
+     */
+    @Excel(name = "金额")
+    private Float fAmtdr;
+
+    /**
+     * 对账金额
+     */
+    @Excel(name = "对账金额")
+    private Float fAmtcr;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String fRemarks;
+
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public String getfCtrlcorpid() {
+        return fCtrlcorpid;
+    }
+
+    public void setfCtrlcorpid(String fCtrlcorpid) {
+        this.fCtrlcorpid = fCtrlcorpid;
+    }
+
+    public String getfCorpidName() {
+        return fCorpidName;
+    }
+
+    public void setfCorpidName(String fCorpidName) {
+        this.fCorpidName = fCorpidName;
+    }
+
+    public Date getfAccbilldate() {
+        return fAccbilldate;
+    }
+
+    public void setfAccbilldate(Date fAccbilldate) {
+        this.fAccbilldate = fAccbilldate;
+    }
+
+    public String gettMblno() {
+        return tMblno;
+    }
+
+    public void settMblno(String tMblno) {
+        this.tMblno = tMblno;
+    }
+
+    public Float getfAmtdr() {
+        return fAmtdr;
+    }
+
+    public void setfAmtdr(Float fAmtdr) {
+        this.fAmtdr = fAmtdr;
+    }
+
+    public Float getfAmtcr() {
+        return fAmtcr;
+    }
+
+    public void setfAmtcr(Float fAmtcr) {
+        this.fAmtcr = fAmtcr;
+    }
+
+    public String getfRemarks() {
+        return fRemarks;
+    }
+
+    public void setfRemarks(String fRemarks) {
+        this.fRemarks = fRemarks;
+    }
+}

+ 132 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/excel/Contrast.java

@@ -0,0 +1,132 @@
+package com.ruoyi.finance.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class Contrast {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 系统编号
+     */
+    @Excel(name = "系统编号")
+    private String fBillno;
+
+
+    /**
+     * 货权方
+     */
+    @Excel(name = "货权方")
+    private String fCtrlcorpid;
+
+    /**
+     * 结算单位
+     */
+    @Excel(name = "结算单位")
+    private String fCorpidName;
+
+    /**
+     * 入(出)库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fAccbilldate;
+
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String tMblno;
+
+
+    /**
+     * 金额
+     */
+    @Excel(name = "金额")
+    private Float fAmtdr;
+
+    /**
+     * 对账金额
+     */
+    @Excel(name = "对账金额")
+    private Float fAmtcr;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String fRemarks;
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public String getfCtrlcorpid() {
+        return fCtrlcorpid;
+    }
+
+    public void setfCtrlcorpid(String fCtrlcorpid) {
+        this.fCtrlcorpid = fCtrlcorpid;
+    }
+
+    public String getfCorpidName() {
+        return fCorpidName;
+    }
+
+    public void setfCorpidName(String fCorpidName) {
+        this.fCorpidName = fCorpidName;
+    }
+
+    public Date getfAccbilldate() {
+        return fAccbilldate;
+    }
+
+    public void setfAccbilldate(Date fAccbilldate) {
+        this.fAccbilldate = fAccbilldate;
+    }
+
+    public String gettMblno() {
+        return tMblno;
+    }
+
+    public void settMblno(String tMblno) {
+        this.tMblno = tMblno;
+    }
+
+    public Float getfAmtdr() {
+        return fAmtdr;
+    }
+
+    public void setfAmtdr(Float fAmtdr) {
+        this.fAmtdr = fAmtdr;
+    }
+
+    public Float getfAmtcr() {
+        return fAmtcr;
+    }
+
+    public void setfAmtcr(Float fAmtcr) {
+        this.fAmtcr = fAmtcr;
+    }
+
+    public String getfRemarks() {
+        return fRemarks;
+    }
+
+    public void setfRemarks(String fRemarks) {
+        this.fRemarks = fRemarks;
+    }
+}

+ 132 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/excel/Payment.java

@@ -0,0 +1,132 @@
+package com.ruoyi.finance.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class Payment {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 系统编号
+     */
+    @Excel(name = "系统编号")
+    private String fBillno;
+
+
+    /**
+     * 货权方
+     */
+    @Excel(name = "货权方")
+    private String fCtrlcorpid;
+
+    /**
+     * 结算单位
+     */
+    @Excel(name = "结算单位")
+    private String fCorpidName;
+
+    /**
+     * 入(出)库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fAccbilldate;
+
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String tMblno;
+
+
+    /**
+     * 金额
+     */
+    @Excel(name = "金额")
+    private Float fAmtdr;
+
+    /**
+     * 对账金额
+     */
+    @Excel(name = "对账金额")
+    private Float fAmtcr;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String fRemarks;
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public String getfCtrlcorpid() {
+        return fCtrlcorpid;
+    }
+
+    public void setfCtrlcorpid(String fCtrlcorpid) {
+        this.fCtrlcorpid = fCtrlcorpid;
+    }
+
+    public String getfCorpidName() {
+        return fCorpidName;
+    }
+
+    public void setfCorpidName(String fCorpidName) {
+        this.fCorpidName = fCorpidName;
+    }
+
+    public Date getfAccbilldate() {
+        return fAccbilldate;
+    }
+
+    public void setfAccbilldate(Date fAccbilldate) {
+        this.fAccbilldate = fAccbilldate;
+    }
+
+    public String gettMblno() {
+        return tMblno;
+    }
+
+    public void settMblno(String tMblno) {
+        this.tMblno = tMblno;
+    }
+
+    public Float getfAmtdr() {
+        return fAmtdr;
+    }
+
+    public void setfAmtdr(Float fAmtdr) {
+        this.fAmtdr = fAmtdr;
+    }
+
+    public Float getfAmtcr() {
+        return fAmtcr;
+    }
+
+    public void setfAmtcr(Float fAmtcr) {
+        this.fAmtcr = fAmtcr;
+    }
+
+    public String getfRemarks() {
+        return fRemarks;
+    }
+
+    public void setfRemarks(String fRemarks) {
+        this.fRemarks = fRemarks;
+    }
+}

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

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TWareHouseFees;
+import com.ruoyi.finance.excel.Contrast;
 import com.ruoyi.reportManagement.excel.Payable;
 import com.ruoyi.reportManagement.excel.Profit;
 import com.ruoyi.reportManagement.excel.Receivable;
@@ -119,4 +120,7 @@ public interface ITFeeService {
     public List<Payable> payableExport(TWareHouseFees tWareHouseFees) throws Exception;
 
     public List<Profit> profitExport(TWareHouseFees tWareHouseFees) throws Exception;
+
+    public List<Contrast> contrastExport(TFee tFee) throws Exception;
+
 }

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

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

+ 9 - 1
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -88,7 +88,15 @@
             f.f_amtdr AS fAmtdr,
             f.f_amtcr AS fAmtcr,
             f.f_billtype AS fBilltype,
-            f.f_billstatus AS fBillstatus,
+            CASE
+            WHEN  f.f_billstatus = '1' THEN '保存'
+            WHEN  f.f_billstatus = '2' THEN '暂存'
+            WHEN  f.f_billstatus = '3' THEN '审批驳回'
+            WHEN  f.f_billstatus = '4' THEN '提交审核'
+            WHEN  f.f_billstatus = '5' THEN '审核中'
+            WHEN  f.f_billstatus = '6' THEN '审核完成'
+            ENDjiahsng
+            AS fBillstatus,
             f.f_remarks AS fRemarks,
             f.create_by AS createBy
         FROM