| | |
| | | @Log(title = "下载开票申请", businessType = BusinessType.EXPORT) |
| | | @PutMapping("/downloadApplication") |
| | | public void downloadApplication(@RequestBody TOrderInvoiceQuery query) { |
| | | List<TOrderInvoiceVO> list = orderInvoiceService.export(query); |
| | | List<TOrderInvoiceVO> list = orderInvoiceService.pageList(query).getRecords(); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | try { |
| | | if (list.isEmpty()) { |
| | | response.sendError(HttpServletResponse.SC_NOT_FOUND, "暂无可下载的开票申请"); |
| | | return; |
| | | } |
| | | if (list.size() == 1) { |
| | | writeInvoiceWorkbook(response, list.get(0), buildInvoiceFileName(list.get(0))); |
| | | return; |