Merge remote-tracking branch 'origin/master'
| | |
| | | byteArrayOutputStream.size(), 0, "-1"); |
| | | String fileUrl = fileInfo.getUrl(); |
| | | workbook.close(); |
| | | return fileUrl; |
| | | return "/file/" + fileUrl; |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "盘点单id", dataType = "Long", required = true, paramType = "query")}) |
| | | @GetMapping("/list/export") |
| | | public String export(Long id, HttpServletResponse response) throws Exception { |
| | | public ResponseValue<String> export(Long id, HttpServletResponse response) throws Exception { |
| | | |
| | | List<InventoryExcelTemplate> exportList = lWhFormInventoryService.getExportList(id); |
| | | if (CollectionUtils.isEmpty(exportList)) { |
| | |
| | | map.put("monitorName", monitorName); |
| | | map.put("name", operatorName); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, InventoryExcelTemplate.class, exportList, map); |
| | | return downLoadExcel("低值易耗品盘点表", response, workbook); |
| | | return ResponseValue.success(downLoadExcel("低值易耗品盘点表", response, workbook)); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiOperation(value = "出库单导出", notes = "出库单导出") |
| | | @ApiImplicitParam(name = "id", value = "出库单id", required = true, dataType = "Long", paramType = "query") |
| | | @GetMapping("/list/export") |
| | | public String export(Long id, HttpServletResponse response) throws Exception { |
| | | public ResponseValue<String> export(Long id, HttpServletResponse response) throws Exception { |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | throw new RuntimeException("登录用户信息不存在"); |
| | |
| | | map.put("totalAmount", totalAmount); |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, OutputExcelTemplate.class, exportList, map); |
| | | return downLoadExcel("出库单", response, workbook); |
| | | return ResponseValue.success(downLoadExcel("出库单", response, workbook)); |
| | | |
| | | } |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "采购单id", required = true, dataType = "Long", paramType = "query")}) |
| | | @GetMapping("/list/export") |
| | | public String export(Long id, HttpServletResponse response) throws Exception { |
| | | public ResponseValue<String> export(Long id, HttpServletResponse response) throws Exception { |
| | | TemplateExportParams params = new TemplateExportParams("import/采购入库单.xls"); |
| | | params.setHeadingStartRow(2); |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | |
| | | map.put("totalAmount", totalAmount); |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, ProcureExcelTemplate.class, exportList, map); |
| | | return downLoadExcel("采购入库单", response, workbook); |
| | | return ResponseValue.success(downLoadExcel("采购入库单", response, workbook)); |
| | | |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "导出报废单", notes = "导出报废单") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "报废单id", dataType = "Long", paramType = "query")}) |
| | | @GetMapping("/list/export") |
| | | public String export(Long id, HttpServletResponse response) throws Exception { |
| | | public ResponseValue<String> export(Long id, HttpServletResponse response) throws Exception { |
| | | if (id == null) { |
| | | throw new RuntimeException("报废单id为空"); |
| | | } |
| | |
| | | map.put("totalAmount", totalAmount); |
| | | |
| | | Workbook sheets = ExcelExportUtil.exportExcel(exportParams, ScrappedInfoExcelTemplate.class, export, map); |
| | | return downLoadExcel("报废登记单", response, sheets); |
| | | return ResponseValue.success(downLoadExcel("报废登记单", response, sheets)); |
| | | |
| | | } |
| | | |
| | |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "调拨单id", required = true, dataType = "Long"), |
| | | @ApiImplicitParam(name = "type", value = "导出类型 1 入库 2 出库", required = true, dataType = "Integer"),}) |
| | | @GetMapping("/list/export") |
| | | public String export(Long id, Integer type, HttpServletResponse response) throws Exception { |
| | | public ResponseValue<String> export(Long id, Integer type, HttpServletResponse response) throws Exception { |
| | | |
| | | TemplateExportParams params; |
| | | String fileName; |
| | |
| | | map.put("totalAmount", totalAmount); |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, TransferExcelTemplate.class, export, map); |
| | | return downLoadExcel(fileName, response, workbook); |
| | | return ResponseValue.success(downLoadExcel(fileName, response, workbook)); |
| | | |
| | | } |
| | | |