| | |
| | | |
| | | if (ObjectUtils.isNotEmpty(salesLedgerDto.getStatus())) { |
| | | if (salesLedgerDto.getStatus()) { |
| | | // 清除所有“未开票金额”为 0 的记录 |
| | | iPage.getRecords().removeIf(salesLedger -> |
| | | Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00"))); |
| | | iPage.setTotal(iPage.getRecords().size()); |
| | | } |
| | | } |
| | |
| | | public R getSalesLedgerWithProductsLoss(Long salesLedgerId) { |
| | | return R.ok(salesLedgerService.getSalesLedgerWithProductsLoss(salesLedgerId)); |
| | | } |
| | | |
| | | @Operation(summary = "获取销售单打印数据") |
| | | @GetMapping("/printData/{id}") |
| | | public AjaxResult printData(@PathVariable Long id) { |
| | | Map<String, Object> data = salesLedgerService.getPrintData(id); |
| | | if (data == null) { |
| | | return AjaxResult.error("销售单不存在"); |
| | | } |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |