package com.fjhx.purchase.controller.purchase;

import com.fjhx.purchase.entity.purchase.dto.PurchasePayRecordDto;
import com.fjhx.purchase.entity.purchase.dto.PurchasePayRecordSelectDto;
import com.fjhx.purchase.entity.purchase.vo.PurchasePayRecordVo;
import com.fjhx.purchase.service.purchase.PurchasePayRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 采购付款记录 前端控制器
 * </p>
 *
 * @author
 * @since 2023-05-24
 */
@RestController
@RequestMapping("/purchasePayRecord")
public class PurchasePayRecordController {

    @Autowired
    private PurchasePayRecordService purchasePayRecordService;

    /**
     * 采购付款记录新增
     */
    @PostMapping("/add")
    public void add(@RequestBody PurchasePayRecordDto purchasePayRecordDto) {
        purchasePayRecordService.add(purchasePayRecordDto);
    }

    /**
     * 采购付款记录明细
     */
    @PostMapping("/detail")
    public PurchasePayRecordVo detail(@RequestBody PurchasePayRecordSelectDto dto) {
        return purchasePayRecordService.detail(dto);
    }

}
