package com.fjhx.service.purchase;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.base.BaseService;
import com.fjhx.entity.apply.ApplyPurchase;
import com.fjhx.entity.purchase.Purchase;

import java.util.Map;

/**
 * <p>
 * 采购 服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-12-01
 */
public interface PurchaseService extends BaseService<Purchase> {

    /**
     * 待采购列表
     *
     * @param condition 查询条件
     * @return
     */
    Page<ApplyPurchase> stayPurchasePage(Map<String, Object> condition);

    /**
     * 已采购列表
     *
     * @param condition 查询条件
     * @return
     */
    Page<Purchase> getPage(Map<String, Object> condition);

    /**
     * 获取审批详情
     *
     * @param id 采购ID
     * @return
     */
    Purchase getFlowDetailsById(Long id);

    /**
     * 取消 或 结束
     *
     * @param id     采购ID
     * @param status 采购状态
     */
    void cancelOrEnd(Long id, Integer status);
}
