package com.fjhx.purchase.service.purchase;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.purchase.entity.purchase.dto.PurchaseDto;
import com.fjhx.purchase.entity.purchase.dto.PurchasePayRecordDto;
import com.fjhx.purchase.entity.purchase.dto.PurchaseSelectDto;
import com.fjhx.purchase.entity.purchase.po.Purchase;
import com.fjhx.purchase.entity.purchase.vo.PurchaseVo;
import com.ruoyi.common.core.service.BaseService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * 采购 服务类
 * </p>
 *
 * @author
 * @since 2023-04-06
 */
public interface PurchaseService extends BaseService<Purchase> {

    /**
     * 采购分页
     */
    Page<PurchaseVo> getPage(PurchaseSelectDto dto);

    /**
     * 采购分页 维多利亚
     */
    Page<PurchaseVo> getPageByWdly(PurchaseSelectDto dto);

    /**
     * 采购明细
     */
    PurchaseVo detail(Long id);

    /**
     * 采购新增
     */
    void add(Purchase purchase);

    /**
     * 采购编辑
     */
    void edit(PurchaseDto purchaseDto);

    /**
     * 采购删除
     */
    void delete(Long id);

    /**
     * 根据供应商查询无发票的采购合同
     *
     * @param supplyId
     * @return
     */
    List<Purchase> getNoInvoiceListBySupplyId(String supplyId);

    /**
     * 根据供应商查询采购合同
     *
     * @param supplyId
     * @return
     */
    List<Purchase> getListBySupplyId(String supplyId);

    /**
     * 货款账单
     */
    Page<PurchaseDto> paymentBill(PurchaseSelectDto purchaseDto);

    /**
     * 采购统计（采购列表）
     */
    Map<String,Object> purchaseStatistics(PurchaseSelectDto dto);

    /**
     * 批量查询
     * @param ids
     * @return
     */
    List<Purchase> getListInId(List<Long> ids);

    /**
     * 采购头部统计
     * @return
     */
    Map<String,Object> statisticsPurchaseHead();
}
