Parcourir la source

修改 导出的excel添加一列出入库类型

lichao il y a 3 ans
Parent
commit
34278ad69f

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/reportManagement/TWarehousebillsitemsSummaryController.java

@@ -65,6 +65,9 @@ public class TWarehousebillsitemsSummaryController extends BaseController {
 
     /**
      * 导出库存总账列表
+     *
+     * 2022/6/21
+     * 修改 导出的excel添加一列出入库类型
      */
     @Log(title = "出入库统计", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")

+ 12 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWareHouseItemsExcel.java

@@ -29,6 +29,10 @@ public class TWareHouseItemsExcel {
     @Excel(name = "提单号")
     private String fMblno;
 
+    /** 出入库类型 */
+    @Excel(name = "出入库类型")
+    private String fBilltype;
+
     /** 业务类型(存汉字的,用来选择 产地 规格 品牌) */
     @Excel(name = "货物属性")
     private String fBusinessType;
@@ -144,6 +148,14 @@ public class TWareHouseItemsExcel {
         this.fMblno = fMblno;
     }
 
+    public String getfBilltype() {
+        return fBilltype;
+    }
+
+    public void setfBilltype(String fBilltype) {
+        this.fBilltype = fBilltype;
+    }
+
     public String getfBusinessType() {
         return fBusinessType;
     }

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

@@ -982,6 +982,17 @@
         leg.f_shipper AS fShipper,
         it.f_bsdate AS fBsdate,
         leg.f_mblno AS fMblno,
+        CASE
+        leg.f_billtype
+        WHEN 'SJRK' THEN
+        '入库'
+        WHEN 'SJCK' THEN
+        '出库'
+        WHEN 'CKDB' THEN
+        '调拨'
+        WHEN 'HQZY' THEN
+        '货权转移'
+        END AS fBilltype ,
         dict.dict_label AS fBusinessType,
         it.f_marks AS fMarks,
         go.f_name AS fGoodsid,