| | |
| | | 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.*; |
| | | |
| | |
| | | return salesLedgerService.getSalesNo(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据销售合同查询产品信息 |
| | | */ |
| | | @GetMapping("/getProductBySalesNo") |
| | | public AjaxResult getProductBySalesNo(Long id) { |
| | | return AjaxResult.success(purchaseLedgerService.getProductBySalesNo(id)); |
| | | } |
| | | |
| | | /** |
| | | * 查询采购合同号 |
| | | */ |
| | |
| | | * 根据id查询采购合同号 |
| | | */ |
| | | @GetMapping("/getPurchaseNoById") |
| | | public PurchaseLedgerDto getPurchaseNoById(Long id) { |
| | | return purchaseLedgerService.getPurchaseNoById(id); |
| | | public AjaxResult getPurchaseNoById(Long id) { |
| | | return AjaxResult.success(purchaseLedgerService.getPurchaseNoById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 根据采购合同号查询产品 |
| | | */ |
| | | @GetMapping("/getInfo") |
| | | public PurchaseLedgerDto getInfo(PurchaseLedgerDto purchaseLedgerDto) { |
| | | return purchaseLedgerService.getInfo(purchaseLedgerDto); |
| | | public AjaxResult getInfo(PurchaseLedgerDto purchaseLedgerDto) { |
| | | return AjaxResult.success(purchaseLedgerService.getInfo(purchaseLedgerDto)); |
| | | } |
| | | |
| | | /** |
| | | * 查询采购台账列表 |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public IPage<PurchaseLedger> listPage(Page page, PurchaseLedger purchaseLedger) { |
| | | return purchaseLedgerService.selectPurchaseLedgerListPage(page ,purchaseLedger); |
| | | } |
| | | |
| | | @ApiOperation("生成采购序列号") |
| | | @GetMapping("/createPurchaseNo") |
| | | @Log(title = "生成采购序列号", businessType = BusinessType.OTHER) |
| | | public String createPurchaseNo() { |
| | | return purchaseLedgerService.getPurchaseNo(); |
| | | } |
| | | } |