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.PurchaseSelectDto;
import com.fjhx.purchase.entity.purchase.po.Purchase;
import com.fjhx.purchase.entity.purchase.vo.PurchaseVo;
import com.fjhx.wms.entity.PurchaseDetailPo;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.service.BaseService;
import com.ruoyi.common.utils.wrapper.IWrapper;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


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

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

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

    /**
     * 分页数据统计
     */
    PurchaseVo getPageStatistics(PurchaseSelectDto dto);

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

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

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

    /**
     * 采购修正
     */
    void purchaseCorrect(PurchaseDto purchaseDto);

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

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

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

    /**
     * 获取已采购 采购人列表
     */
    List<SysUser> getPurchaseUserList();

    /**
     * 获取已采购产品部门列表
     */
    List<SysDept> getDepts();

    /**
     * 获取已采购数量
     */
    List<PurchaseDetailPo> getPurchaseCountList(IWrapper<Object> wrapper);

    /**
     * 修改采购状态（采购作废/结束）
     */
    void editPurchaseStatus(PurchaseDto purchaseDto);

    /**
     * 采购付款excel导出
     */
    void purchasePayExcelExport(PurchaseSelectDto dto, HttpServletResponse httpServletResponse);

    /**
     * 修改采购单号
     */
    void editContractCode(PurchaseDto dto);
}
