5 天以前 0d7d874912d0147376826b55667a1deb6547ed91
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -6,7 +6,7 @@
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.domain.R;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.purchase.dto.PaymentHistoryRecordVo;
import com.ruoyi.purchase.dto.PaymentLedgerDto;
@@ -62,8 +62,8 @@
     * 获取付款登记详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(paymentRegistrationService.selectPaymentRegistrationById(id));
    public R<?> getInfo(@PathVariable("id") Long id) {
        return R.ok(paymentRegistrationService.selectPaymentRegistrationById(id));
    }
    /**
@@ -72,8 +72,9 @@
    @Log(title = "付款登记", businessType = BusinessType.INSERT)
    @PostMapping
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult add(@RequestBody List<PaymentRegistration>  paymentRegistration) {
        return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
    public R<?> add(@RequestBody List<PaymentRegistration>  paymentRegistration) {
        paymentRegistrationService.insertPaymentRegistration(paymentRegistration);
        return R.ok();
    }
    /**
@@ -82,8 +83,9 @@
    @Log(title = "付款登记", businessType = BusinessType.UPDATE)
    @PutMapping
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) {
        return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration));
    public R<?> edit(@RequestBody PaymentRegistration paymentRegistration) {
        paymentRegistrationService.updatePaymentRegistration(paymentRegistration);
        return R.ok();
    }
    /**
@@ -91,8 +93,9 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.DELETE)
    @DeleteMapping("/del")
    public AjaxResult remove(@RequestBody Long[] ids) {
        return toAjax(paymentRegistrationService.deletePaymentRegistrationByIds(ids));
    public R<?> remove(@RequestBody Long[] ids) {
        paymentRegistrationService.deletePaymentRegistrationByIds(ids);
        return R.ok();
    }
    /**
@@ -100,51 +103,52 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.DELETE)
    @DeleteMapping("/delete")
    public AjaxResult delete(@RequestBody Long[] ids) {
        return toAjax(paymentRegistrationService.delete(ids));
    public R<?> delete(@RequestBody Long[] ids) {
        paymentRegistrationService.delete(ids);
        return R.ok();
    }
    /**
     * 获取付款登记详细信息
     */
    @GetMapping(value = "/byPurchaseId/{id}")
    public AjaxResult getPurchaseInfo(@PathVariable("id") Long id) {
        return success(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
    public R<?> getPurchaseInfo(@PathVariable("id") Long id) {
        return R.ok(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
    }
    /**
     * 获取付款登记详细信息
     */
    @GetMapping(value = "/paymentLedgerList")
    public AjaxResult paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
    public R<?> paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
                                        Integer detailPageNum,
                                        Integer detailPageSize) {
        IPage<Map<String, Object>> mapIPage = paymentRegistrationService.selectPaymentLedgerList(paymentLedgerDto, page, detailPageNum, detailPageSize);
        return success(mapIPage);
        return R.ok(mapIPage);
    }
    /**
     * 供应商往来分页接口
     */
    @GetMapping("/supplierNameListPage")
    public AjaxResult supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
        return success(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
    public R<?> supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
        return R.ok(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
    }
    /**
     * 供应商往来分页接口
     */
    @GetMapping("/supplierNameListPageDetails")
    public AjaxResult supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
        return success(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
    public R<?> supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
        return R.ok(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
    }
    /**
     * 获取本月应付信息
     */
    @GetMapping(value = "/paymentMonthList")
    public AjaxResult paymentMonthList() {
        return success(paymentRegistrationService.paymentMonthList());
    public R<?> paymentMonthList() {
        return R.ok(paymentRegistrationService.paymentMonthList());
    }
    /**
@@ -166,9 +170,9 @@
     * @return
     */
    @GetMapping("/getPaymentRecordList/{supplierId}")
    public AjaxResult getPaymentRecordList(@PathVariable Long supplierId) {
    public R<?> getPaymentRecordList(@PathVariable Long supplierId) {
        List<PaymentHistoryRecordVo> paymentRecordList = paymentRegistrationService.getPaymentRecordList(supplierId);
        return success(paymentRecordList);
        return R.ok(paymentRecordList);
    }
    /**