package com.hzs.scm.purchase.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.scm.po.ext.PoOrderExt;
import com.hzs.common.domain.scm.purchase.IcPurchaseInH;
import com.hzs.common.domain.scm.purchase.ext.IcPurchaseInHExt;
import com.hzs.scm.pub.param.ScmApproveParam;
import com.hzs.scm.purchase.param.PurchaseInParam;
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
import com.hzs.system.sys.dto.LoginUser;

import java.util.List;

/**
 * <p>
 * 采购订单表头 服务类
 * </p>
 *
 * @author hzs
 * @since 2023-11-17
 */
public interface IIcPurchaseInHService extends IService<IcPurchaseInH> {

    /*
     * @description: 新增保存采购入库单
     * @author: sui q
     * @date: 2023/11/22 9:56
     * @param: null null
     **/
    void insertSavePurchaseByPoOrder(List<PoOrderExt> poOrderList, PurchaseInParam purchaseInhParam, Long pkMember);

    /*
     * @description: 新增保存采购退货单
     * @author: sui q
     * @date: 2023/11/22 9:56
     * @param: null null
     **/
    void insertSavePurchaseBack(IcPurchaseInHExt purchaseInExt, PurchaseInParam purchaseInhParam);

    /*
     * @description: 修改保存采购入库单
     * @author: sui q
     * @date: 2023/11/23 9:10
     * @param: null null
     **/
    void updateSavePurchaseByPoOrder(List<PoOrderExt> poOrderList, IcPurchaseInHExt purchaseInhExt,
                                     PurchaseInParam purchaseInhParam, Long pkMember);

    /*
     * @description: 根据主键删除采购入库单，只有保存的可以删除
     * @author: sui q
     * @date: 2023/11/23 11:22
     * @param: null null
     **/
    void deletePurchaseByPk(Long pkPurchase, Long pkMember);

    /*
     * @description: 根据主键查询销售出库单
     * @author: sui q
     * @date: 2023/11/24 13:52
     * @param: null null
     **/
    IcPurchaseInHExt queryPurchaseInExtById(Long pkId, Integer orderStatus, Integer pkCountry);

    /*
     * @description: 根据主键查询入库单
     * @author: sui q
     * @date: 2023/11/24 13:52
     * @param: null null
     **/
    IcPurchaseInHExt queryPurchaseInhExtById(Long pkId, Integer orderStatus, Integer pkCountry);

    /*
     * @description: 查询会员端显示的采购入库单
     * @author: sui q
     * @date: 2023/11/25 9:55
     * @param: null null
     **/
    IcPurchaseInHExt queryDisPurchaseInhExtById(Long pkId, Integer orderStatus);

    /*
     * @description: 查询列表
     * @author: sui q
     * @date: 2023/11/28 15:48
     * @param: null null
     **/
    List<IcPurchaseInHExt> queryDisPurchaseInExtByCondition(PurchaseInParam purchaseInParam);

    /*
     * @description: 查询统计报表，采购入库单汇总
     * @author: sui q
     * @date: 2024/2/22 14:42
     * @param: null null
     **/
    List<IcPurchaseInHExt> queryTotalPurchaseInhExtByCondition(PurchaseInParam purchaseInParam);

}
