| | |
| | | |
| | | @ApiModelProperty("导出回款登记") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, @RequestParam("ids") String idsStr) { |
| | | if (idsStr == null || idsStr.trim().isEmpty()) { |
| | | throw new RuntimeException("请选择要导出的记录"); |
| | | public void export(HttpServletResponse response, String ids) { |
| | | if (ids == null || ids.isEmpty()) { |
| | | receiptPaymentService.exportPaymentList(response, null); |
| | | } else { |
| | | ArrayList<Long> idList = (ArrayList<Long>) Arrays.stream(ids.split(",")) |
| | | .map(s -> s.replaceAll("[\\[\\]]", "").trim()) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | receiptPaymentService.exportPaymentList(response, idList); |
| | | } |
| | | |
| | | ArrayList<Long> ids = (ArrayList<Long>) Arrays.stream(idsStr.split(",")) |
| | | .map(s -> s.replaceAll("[\\[\\]]", "").trim()) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | |
| | | |
| | | receiptPaymentService.exportPaymentList(response, ids); |
| | | } |
| | | |
| | | |