From 53bdb26a0ae994418e92d93aab23d6f5e7225f37 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期一, 19 五月 2025 16:20:56 +0800 Subject: [PATCH] 产品 --- src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 110 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java b/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java new file mode 100644 index 0000000..b8f233d --- /dev/null +++ b/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java @@ -0,0 +1,110 @@ +package com.ruoyi.purchase.controller; + +import com.ruoyi.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.framework.web.page.TableDataInfo; +import com.ruoyi.purchase.dto.PaymentLedgerDto; +import com.ruoyi.purchase.dto.PaymentRegistrationDto; +import com.ruoyi.purchase.pojo.PaymentRegistration; +import com.ruoyi.purchase.service.IPaymentRegistrationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 浠樻鐧昏Controller + * + * @author ruoyi + * @date 2025-05-15 + */ +@RestController +@RequestMapping("/purchase/paymentRegistration") +public class PaymentRegistrationController extends BaseController +{ + @Autowired + private IPaymentRegistrationService paymentRegistrationService; + + /** + * 鏌ヨ浠樻鐧昏鍒楄〃 + */ +// @PreAuthorize("@ss.hasPermi('system:registration:list')") + @GetMapping("/list") + public TableDataInfo list(PaymentRegistrationDto paymentRegistrationDto) + { + startPage(); + List<PaymentRegistrationDto> list = paymentRegistrationService.selectPaymentRegistrationList(paymentRegistrationDto); + return getDataTable(list); + } + + /** + * 瀵煎嚭浠樻鐧昏鍒楄〃 + */ +// @Log(title = "浠樻鐧昏", businessType = BusinessType.EXPORT) +// @PostMapping("/export") +// public void export(HttpServletResponse response, PaymentRegistrationDto paymentRegistrationDto) +// { +// List<PaymentRegistrationDto> list = paymentRegistrationService.selectPaymentRegistrationList(paymentRegistrationDto); +// ExcelUtil<PaymentRegistration> util = new ExcelUtil<PaymentRegistration>(PaymentRegistration.class); +// util.exportExcel(response, list, "浠樻鐧昏鏁版嵁"); +// } + + /** + * 鑾峰彇浠樻鐧昏璇︾粏淇℃伅 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(paymentRegistrationService.selectPaymentRegistrationById(id)); + } + + /** + * 鏂板浠樻鐧昏 + */ + @Log(title = "浠樻鐧昏", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PaymentRegistration paymentRegistration) + { + return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration)); + } + + /** + * 淇敼浠樻鐧昏 + */ + @Log(title = "浠樻鐧昏", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) + { + return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration)); + } + + /** + * 鍒犻櫎浠樻鐧昏 + */ + @Log(title = "浠樻鐧昏", businessType = BusinessType.DELETE) + @DeleteMapping("/del") + public AjaxResult remove(@RequestBody Long[] ids) + { + return toAjax(paymentRegistrationService.deletePaymentRegistrationByIds(ids)); + } + + /** + * 鑾峰彇浠樻鐧昏璇︾粏淇℃伅 + */ + @GetMapping(value = "/byPurchaseId/{id}") + public AjaxResult getPurchaseInfo(@PathVariable("id") Long id) + { + return success(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id)); + } + + /** + * 鑾峰彇浠樻鐧昏璇︾粏淇℃伅 + */ + @GetMapping(value = "/paymentLedgerList") + public AjaxResult paymentLedgerList(PaymentLedgerDto paymentLedgerDto) + { + return success(paymentRegistrationService.selectPaymentLedgerList(paymentLedgerDto)); + } +} -- Gitblit v1.9.3