| | |
| | | package com.ruoyi.business.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.business.dto.PurchaseRegistrationDto; |
| | | import com.ruoyi.business.entity.PurchaseRegistration; |
| | | import com.ruoyi.business.service.PurchaseRegistrationService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/business/purchaseRegistration") |
| | | @RequestMapping("/purchaseRegistration") |
| | | public class PurchaseRegistrationController { |
| | | private PurchaseRegistrationService purchaseRegistrationService; |
| | | |
| | | /** |
| | | * 查询 |
| | | */ |
| | | @GetMapping("/list") |
| | | public R<IPage<PurchaseRegistration>> list(Page page, PurchaseRegistrationDto purchaseRegistrationDto) { |
| | | IPage<PurchaseRegistration> list = purchaseRegistrationService.selectPurchaseRegistrationList(page,purchaseRegistrationDto); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 新增修改 |
| | | */ |
| | | @PostMapping("/addOrEditPR") |
| | | public R addOrEditSupply(@RequestBody PurchaseRegistrationDto purchaseRegistrationDto) { |
| | | return R.ok(purchaseRegistrationService.addOrEditPR(purchaseRegistrationDto)); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @DeleteMapping("/delPR") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(purchaseRegistrationService.delByIds(ids)); |
| | | } |
| | | |
| | | |
| | | } |