| | |
| | | return exportExcel();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 对list数据源将其里面的数据导入到excel表单
|
| | | *
|
| | |
| | |
|
| | | /**
|
| | | * 获取下载路径
|
| | | * |
| | | *
|
| | | * @param filename 文件名称
|
| | | */
|
| | | public String getAbsoluteFile(String filename)
|
| | |
| | | */
|
| | | public static String getDownloadPath()
|
| | | {
|
| | | return getProfile() + "/download/";
|
| | | return getProfile() + "/prod/";
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | 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 |
| | |
| | | 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,"入库台账" , "入库台账"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Excel(name = "产品高度") |
| | | private String specificationModel; |
| | | // 单位 |
| | | @Excel(name = "单位") |
| | | // @Excel(name = "单位") |
| | | private String unit; |
| | | // 含税单价 |
| | | @Excel(name = "单价") |
| | | @Excel(name = "单价(元)/件") |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | // 含税总价 |
| | | // @Excel(name = "含税总价") |
| | |
| | | /** |
| | | * 美元每件 |
| | | */ |
| | | @Excel(name = "美元每件") |
| | | @Excel(name = "单价(美元)/件") |
| | | private BigDecimal dollarPrice; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "创建用户") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "登记日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime registerDate; |
| | | |
| | | /** |
| | | * 美元 |
| | | */ |
| | | private String dollar; |
| | | } |