| | |
| | | package com.ruoyi.purchase.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.service.IPurchaseLedgerService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出来票登记列表 |
| | | */ |
| | | @Log(title = "导出来票登记列表", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response, PurchaseLedger purchaseLedger) { |
| | | Page page = new Page(); |
| | | page.setCurrent(-1); |
| | | page.setSize(-1); |
| | | IPage<PurchaseLedgerDto> purchaseLedgerDtoIPage = purchaseLedgerService.selectPurchaseLedgerListPage(page, new PurchaseLedgerDto()); |
| | | ExcelUtil<PurchaseLedgerDto> util = new ExcelUtil<PurchaseLedgerDto>(PurchaseLedgerDto.class); |
| | | util.exportExcel(response, purchaseLedgerDtoIPage.getRecords(), "导出来票登记列表"); |
| | | } |
| | | |
| | | /** |
| | | * 新增修改采购台账 |
| | | */ |
| | | @Log(title = "采购台账", businessType = BusinessType.INSERT) |
| | |
| | | return salesLedgerService.getSalesNo(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据销售合同查询产品信息 |
| | | */ |
| | | @GetMapping("/getProductBySalesNo") |
| | | public AjaxResult getProductBySalesNo(Long id) { |
| | | return AjaxResult.success(purchaseLedgerService.getProductBySalesNo(id)); |
| | | } |
| | | |
| | | /** |
| | | * 查询采购合同号 |
| | | */ |
| | |
| | | public AjaxResult getInfo(PurchaseLedgerDto purchaseLedgerDto) { |
| | | return AjaxResult.success(purchaseLedgerService.getInfo(purchaseLedgerDto)); |
| | | } |
| | | |
| | | /** |
| | | * 查询采购台账列表 |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult listPage(Page page, PurchaseLedgerDto purchaseLedger) { |
| | | return AjaxResult.success(purchaseLedgerService.selectPurchaseLedgerListPage(page ,purchaseLedger)); |
| | | } |
| | | |
| | | @ApiOperation("生成采购序列号") |
| | | @GetMapping("/createPurchaseNo") |
| | | @Log(title = "生成采购序列号", businessType = BusinessType.OTHER) |
| | | public AjaxResult createPurchaseNo() { |
| | | return AjaxResult.success("生成成功",purchaseLedgerService.getPurchaseNo()); |
| | | } |
| | | } |