| | |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 采购台账Controller |
| | |
| | | /** |
| | | * 修改采购台账审批状态 |
| | | */ |
| | | @Log(title = "采购台账", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateApprovalStatus") |
| | | public AjaxResult addOrEditPurchase(@RequestBody PurchaseLedger purchaseLedger){ |
| | | return toAjax(purchaseLedgerService.updateById(purchaseLedger)); |
| | |
| | | public AjaxResult createPurchaseNo() { |
| | | return AjaxResult.success("生成成功",purchaseLedgerService.getPurchaseNo()); |
| | | } |
| | | |
| | | @Operation(summary = "获取采购单打印数据") |
| | | @GetMapping("/printData/{id}") |
| | | public AjaxResult printData(@PathVariable Long id) { |
| | | Map<String, Object> data = purchaseLedgerService.getPrintData(id); |
| | | if (data == null) { |
| | | return AjaxResult.error("采购单不存在"); |
| | | } |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |