| | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @RestController |
| | | @RequestMapping("/purchase/ledger") |
| | | @AllArgsConstructor |
| | | @Api(tags = "采购台账") |
| | | @Tag(name = "采购台账") |
| | | @Slf4j |
| | | public class PurchaseLedgerController extends BaseController { |
| | | private IPurchaseLedgerService purchaseLedgerService; |
| | |
| | | */ |
| | | @Log(title = "导入采购台账", businessType = BusinessType.INSERT) |
| | | @PostMapping("/import") |
| | | @ApiOperation("导入采购台账") |
| | | @Operation(summary = "导入采购台账") |
| | | public AjaxResult importData(@RequestParam("file") |
| | | @ApiParam(value = "Excel文件", required = true) |
| | | MultipartFile file) { |
| | | return purchaseLedgerService.importData(file); |
| | | } |
| | | |
| | | @ApiOperation("导出采购台账模板") |
| | | @Operation(summary = "导出采购台账模板") |
| | | @PostMapping("/exportTemplate") |
| | | public void exportTemplate(HttpServletResponse response) { |
| | | // 1. 模板文件在resources/static下的路径 |
| | |
| | | /** |
| | | * 查询采购模板 |
| | | */ |
| | | @ApiOperation("/查询采购模板") |
| | | @Operation(summary = "/查询采购模板") |
| | | @GetMapping("/getPurchaseTemplateList") |
| | | public AjaxResult getPurchaseTemplateList() { |
| | | List<PurchaseLedgerTemplate> purchaseLedgers = purchaseLedgerTemplateMapper.selectList(null); |
| | |
| | | return AjaxResult.success(purchaseLedgerService.selectPurchaseLedgerListPage(page, purchaseLedger)); |
| | | } |
| | | |
| | | @ApiOperation("生成采购序列号") |
| | | @Operation(summary = "生成采购序列号") |
| | | @GetMapping("/createPurchaseNo") |
| | | @Log(title = "生成采购序列号", businessType = BusinessType.OTHER) |
| | | public AjaxResult createPurchaseNo() { |