diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelNewVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelNewVo.java
index 7ce76920f5..edfadf4fcc 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelNewVo.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelNewVo.java
@@ -26,25 +26,24 @@
package com.yxt.anrui.scm.api.scmvehrebate;
import com.alibaba.excel.annotation.ExcelProperty;
-import com.yxt.common.core.utils.ExportEntityMap;
import lombok.Data;
@Data
public class ScmVehRebateExcelNewVo {
- @ExportEntityMap(CnName = "序号", EnName = "rankNo")
+ @ExcelProperty("序号")
private Integer rankNo;
- @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName")
+ @ExcelProperty("采购系统")
private String purchaseSystemName;
- @ExportEntityMap(CnName = "车架号", EnName = "vinNo")
+ @ExcelProperty("车架号")
private String vinNo;
- @ExportEntityMap(CnName = "车型", EnName = "vehModelName")
+ @ExcelProperty("车型")
private String vehModelName;
- @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate")
+ @ExcelProperty("所属年月")
private String palceGenDate;
- @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue")
+ @ExcelProperty("返利类型")
private String rebateTypeValue;
- @ExportEntityMap(CnName = "返利名称", EnName = "rebateName")
+ @ExcelProperty("返利名称")
private String rebateName;
@ExcelProperty({"返利金额", "预提"})
@@ -81,7 +80,7 @@ public class ScmVehRebateExcelNewVo {
@ExcelProperty({"状态", "二次核对"})
private String secondCheckState;
- @ExportEntityMap(CnName = "车辆入库价", EnName = "manufactorSettlementPrice")
+ @ExcelProperty("车辆入库价")
private String manufactorSettlementPrice;
@ExcelProperty({"其中", "运费"})
@@ -94,10 +93,10 @@ public class ScmVehRebateExcelNewVo {
@ExcelProperty({"返利计算", "标准"})
private String calculationStandard;
- @ExportEntityMap(CnName = "备注", EnName = "remarks")
+ @ExcelProperty("备注")
private String remarks;
- @ExportEntityMap(CnName = "品牌", EnName = "brandName")
+ @ExcelProperty("品牌")
private String brandName;
- @ExportEntityMap(CnName = "分公司", EnName = "createOrgName")
+ @ExcelProperty("分公司")
private String createOrgName;
}
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java
index d6eaa12af4..e3c5d0ee14 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java
@@ -25,7 +25,6 @@
*********************************************************/
package com.yxt.anrui.scm.api.scmvehrebate;
-
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
@@ -34,19 +33,6 @@ import lombok.Data;
import java.util.List;
-/**
- * Project: anrui-scm(单车返利)
- * File: ScmVehRebateQuery.java
- * Class: com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateQuery
- * Description: 单车返利表 查询条件.
- * Copyright: Copyright (c) 2011
- * Company: https://gitee.com/liuzp315
- * Makedate: 2022-08-24 09:01:54
- *
- * @author liupopo
- * @version 1.0
- * @since 1.0
- */
@Data
@ApiModel(value = "单车返利表 查询条件", description = "单车返利表 查询条件")
public class ScmVehRebateQuery implements Query {
diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java
index 53bb11f8c1..2f92a0f66a 100644
--- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java
+++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java
@@ -25,6 +25,7 @@
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehrebate;
+import com.alibaba.excel.EasyExcel;
import com.yxt.anrui.scm.api.scmvehrebate.*;
import com.yxt.common.base.utils.ExportExcelUtils;
import com.yxt.common.base.utils.StringUtils;
@@ -110,18 +111,14 @@ public class ScmVehRebateRest implements ScmVehRebateFeign {
@ApiOperation("导出")
@PostMapping("/excelListNew")
- public void excelListNew(ScmVehRebateQuery query) {
+ public void excelListNew(@RequestBody ScmVehRebateQuery query) throws IOException {
+ response.setContentType("application/vnd.ms-excel");
+ response.setHeader("Content-Disposition", "attachment;filename=rebate.xlsx");
//得到所有要导出的数据
List dataList = scmVehRebateService.excelListNew(query);
- //定义导出的excel名字
- String excelName = "单车返利管理";
- String fileNameURL = "";
- try {
- fileNameURL = URLEncoder.encode(excelName, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- }
- ExportExcelUtils.export(fileNameURL, dataList, ScmVehRebateExcelNewVo.class, response);
+ EasyExcel.write(response.getOutputStream(), ScmVehRebateExcelNewVo.class)
+ .sheet("单车返利管理")
+ .doWrite(dataList);
}
@ApiOperation("导出")