diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java index 7d9815104..e2be9678b 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java @@ -119,4 +119,16 @@ public class BasicdataFactoryCategoryController extends BladeController { } + @ResponseBody + @PostMapping("/exportList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "工厂物料列表导出", notes = "传入basicdataFactoryCategoryDTO") + public void exportList(@RequestBody BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO, HttpServletResponse response) { + String method = "############exportList: "; + log.info(method + "请求参数{}", basicdataFactoryCategoryDTO); + basicdataFactoryCategoryService.exportList(basicdataFactoryCategoryDTO,response); + } + + + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataFactoryCategoryExcel.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataFactoryCategoryExcel.java index 1c5fbc5de..73573ddb9 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataFactoryCategoryExcel.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataFactoryCategoryExcel.java @@ -17,6 +17,7 @@ package com.logpm.basicdata.excel; +import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; @@ -40,6 +41,7 @@ public class BasicdataFactoryCategoryExcel implements Serializable { private static final long serialVersionUID = 1L; + @ExcelIgnore private Long factoryCategoryId; @ColumnWidth(20) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java index 6b5ee7eb3..689bf8666 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java @@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.basicdata.dto.BasicdataFactoryCategoryDTO; import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import com.logpm.basicdata.excel.BasicdataFactoryCategoryExcel; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + @Mapper public interface BasicdataFactoryCategoryMapper extends BaseMapper { @@ -16,4 +19,6 @@ public interface BasicdataFactoryCategoryMapper extends BaseMapper exportList(@Param("param") BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO); + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml index e2c525c09..7ea640be3 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml @@ -71,4 +71,45 @@ + + diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java index fbe02a837..0d0c15a78 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java @@ -3,10 +3,11 @@ package com.logpm.basicdata.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.basicdata.dto.BasicdataFactoryCategoryDTO; import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; -import com.logpm.basicdata.entity.BasicdataFreightEntity; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; +import javax.servlet.http.HttpServletResponse; + public interface IBasicdataFactoryCategoryService extends BaseService { @@ -14,4 +15,5 @@ public interface IBasicdataFactoryCategoryService extends BaseService list = baseMapper.exportList(basicdataFactoryCategoryDTO); + + //导出ls + ExcelUtil.export(response, "工厂三方品类列表导出", "工厂三方品类列表导出", list, BasicdataFactoryCategoryExcel.class); + } + }