package com.jwipc.finance.controller.rest;


import com.jwipc.finance.entity.InvoicedApplyPa;
import com.jwipc.finance.logic.InvoicedApplyLogic;
import com.jwipc.finance.logic.InvoicedApplyPaLogic;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.jwipc.finance.constant.ModuleConst.MODULE_ROOT;

/**
 * @author shenyang.ou
 * @date 2024/3/5 13:56
 * @desc
 */
@RestController
@RequestMapping(MODULE_ROOT + "/invoiced/apply/pa/rest")
@RequiredArgsConstructor
public class InvoicedApplyPaRestController {
    private final InvoicedApplyPaLogic invoicedApplyPaLogic;

    /**
     * 根据采购申请明细IDS获取明细信息
     * @return 结果
     */
    @PostMapping("/find/paa/findPaaDetailByInvoiceApplyId")
    public ResponseEntity<List<InvoicedApplyPa>> findPaaDetailByInvoiceApplyId(Long invoiceApplyId) {
        return ResponseEntity.ok(invoicedApplyPaLogic.findPaaDetailByInvoiceApplyId(invoiceApplyId));
    }
}
