package com.zfire.mall.manager.commonmapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zfire.mall.manager.bean.CommonCountBean;
import com.zfire.mall.manager.bean.k3.K3ReceiptBean;
import com.zfire.mall.manager.bean.k3.v2.KingDeeCategoryVO;
import com.zfire.mall.manager.plus.entity.KingDeeMaterial;
import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface K3Mapper {


    /**
     * 查询零售单的执行明细
     * @return
     * String billType,String billNo,String wlCompanyType,String customerName,String settleType,
     *                                       String startTime,String endTime
     */
    @SqlParser(filter = true)
    public IPage<K3ReceiptBean> queryReceiptBill(
            IPage page,
            @Param("billType") String billType,
            @Param("billNo") String billNo,
            @Param("wlCompanyType") String wlCompanyType,
            @Param("customerName") String customerName,
            @Param("settleType") String settleType,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime,
            @Param("customerId") String customerId,
            @Param("websitNumber") String websitNumber
    );


    /**
     * 查询物料的所有单位
     */
    @SqlParser(filter = true)
    public List<KingDeeMaterial> queryMaterialUnit();


    @SqlParser(filter = true)
    public CommonCountBean queryReceiptBillCount(
            @Param("billType") String billType,
            @Param("billNo") String billNo,
            @Param("wlCompanyType") String wlCompanyType,
            @Param("customerName") String customerName,
            @Param("settleType") String settleType,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime,
            @Param("customerId") String customerId,
            @Param("websitNumber") String websitNumber
    );


    IPage<KingDeeCategoryVO> v2ListPage(Page page, @Param("ex") ZfireParamBean zfireParamBean);
}
