package com.erp.purchase.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.erp.purchase.dto.PurchaseOrderDTO;
import com.erp.purchase.entity.PurchaseOrder;

import java.util.List;

public interface PurchaseOrderService {

    IPage<PurchaseOrder> listPage(PurchaseOrderDTO.QueryRequest query);

    PurchaseOrder getById(Long id);

    PurchaseOrder getByOrderNo(String orderNo);

    PurchaseOrder create(PurchaseOrderDTO.CreateRequest request, Long operatorId);

    PurchaseOrder update(PurchaseOrderDTO.UpdateRequest request, Long operatorId);

    void delete(Long id, Long operatorId);

    PurchaseOrder approve(Long id, PurchaseOrderDTO.ApproveRequest request, Long operatorId);

    void cancel(Long id, Long operatorId);

    void submit(Long id, Long operatorId);
}
