| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<CustomStorage> customStorages = customStorageMapper.selectList(null); |
| | | public void exportTwo(HttpServletResponse response,@RequestBody List<CustomStorage> customStorage) { |
| | | if(CollectionUtils.isEmpty(customStorage)){ |
| | | customStorage = customStorageMapper.selectList(null); |
| | | } |
| | | for (CustomStorage storage : customStorage) { |
| | | // nginx 前端访问图片 |
| | | storage.setUrl("http://114.132.189.42:9044"+storage.getUrl()); |
| | | } |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | util.exportExcel(response, customStorages, "入库台账"); |
| | | util.exportExcel(response, customStorage, "入库台账"); |
| | | } |
| | | |
| | | /** |
| | | * 入库,出库管理自定义导出,保存文件到本地返回路径 |
| | | * @param customStorage |
| | | */ |
| | | @PostMapping("/exportTwoSave") |
| | | public AjaxResult exportTwoSave(@RequestBody List<CustomStorage> customStorage) { |
| | | if(CollectionUtils.isEmpty(customStorage)){ |
| | | customStorage = customStorageMapper.selectList(null); |
| | | } |
| | | for (CustomStorage storage : customStorage) { |
| | | // nginx 前端访问图片 |
| | | storage.setUrl("http://114.132.189.42:9044" + storage.getUrl()); |
| | | } |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | |
| | | return util.exportExcel(customStorage,"入库台账" , "入库台账"); |
| | | } |
| | | |
| | | |