ソースを参照

供应商的模板下载

buzhanyi 1 年間 前
コミット
784e1b5734

+ 9 - 9
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseSupplierController.java

@@ -161,21 +161,21 @@ public class BaseSupplierController extends BaseController {
     @GetMapping("/downloaExcel")
     public void downloadZip(HttpServletResponse response) {
         List<BaseSupplierVo> list = new ArrayList<BaseSupplierVo>();
-        //list.add(new BaseSupplierVo("张先生", "法务专家", "男",
-        //        "2023-07-06", "15152223667", "安全工程03",
-        //        "科室一", "高级职称", "天津市/河东区", "050050101"
-        //));
-        //list.add(new BaseSupplierVo("李先生", "经济专家", "女",
-        //        "2023-07-06", "14448485656", "测试工程07",
-        //        "科室二", "中级职称", "山西省/阳泉市/平定县", "41133535035"
-        //));
+        list.add(new BaseSupplierVo("河南移动", "张先生", "河南-张家口"
+                , "101019", "张老二", "1512626****",
+                "张**", "中国建设银行", "2525********", "是"
+        ));
+        list.add(new BaseSupplierVo("河北不动", "刘先生", "河北-林泉县",
+                "144030", "李老三", "1775959****",
+                "刘**", "中原银行", "3366*********", "否"
+        ));
         InputStream resourceAsStream = this.getClass().getResourceAsStream("/template/base_supplier.xlsx");
         OutputStream outputStream = null;
         try {
             response.setContentType("application/vnd.ms-excel");
             response.setCharacterEncoding("utf-8");
             // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
-            String fileName = URLEncoder.encode("专家信息(模板)", "UTF-8").replaceAll("\\+", "%20");
+            String fileName = URLEncoder.encode("供应商信息(模板)", "UTF-8").replaceAll("\\+", "%20");
             response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
             outputStream = response.getOutputStream();
             ExcelWriter excelWriter = EasyExcel.write(outputStream)

BIN
purchase-admin/src/main/resources/template/base_supplier.xlsx


+ 30 - 2
purchase-system/src/main/java/com/ozs/base/domain/vo/BaseSupplierVo.java

@@ -2,14 +2,13 @@ package com.ozs.base.domain.vo;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ozs.common.annotation.Excel;
-import com.ozs.common.vo.PageVo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
 
 @Data
-public class BaseSupplierVo extends PageVo {
+public class BaseSupplierVo {
 
     @Excel(name = "单位名称")
     @ApiModelProperty("供应商名称")
@@ -67,4 +66,33 @@ public class BaseSupplierVo extends PageVo {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "修改时间")
     private Date updateTime;
+
+    /**
+     * 当前记录起始索引
+     */
+    @ApiModelProperty("页数")
+    private Long pageNum;
+    /**
+     * 每页显示记录数
+     */
+    @ApiModelProperty("页大小")
+    private Long pageSize;
+
+    public BaseSupplierVo() {
+    }
+
+    public BaseSupplierVo(String supplierName, String supplierResponsiblePerson, String supplierAddress, String postalCode,
+                          String projectPerson, String telephone, String bankAccountName, String bankOfDeposit,
+                          String bankAccountNumber, String supplierAdvancePurchase) {
+        this.supplierName = supplierName;
+        this.supplierResponsiblePerson = supplierResponsiblePerson;
+        this.supplierAddress = supplierAddress;
+        this.postalCode = postalCode;
+        this.projectPerson = projectPerson;
+        this.telephone = telephone;
+        this.bankAccountName = bankAccountName;
+        this.bankOfDeposit = bankOfDeposit;
+        this.bankAccountNumber = bankAccountNumber;
+        this.supplierAdvancePurchase = supplierAdvancePurchase;
+    }
 }