package com.fjhx.stock.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.base.Condition;
import com.fjhx.entity.stock.StockWater;
import com.fjhx.utils.wrapperUtil.IWrapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.tenant.annotation.TenantIgnore;

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

/**
 * <p>
 * 出入库 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2022-07-04
 */
public interface StockWaterMapper extends BaseMapper<StockWater> {

    @TenantIgnore
    List<Map<String, Object>> getPickingStatistics(@Param("ew") QueryWrapper<?> wrapper);

    @TenantIgnore
    Map<String, Integer> getPickingStockChangeTypeCount(@Param("ew") QueryWrapper<?> wrapper);

    @TenantIgnore
    Page<Map<String, Object>> getPickingPage(@Param("page") Page<StockWater> page, @Param("ew") QueryWrapper<?> wrapper);

    @TenantIgnore
    List<Map<String, Object>> contractPaymentStatistics(@Param("ew") QueryWrapper<?> wrapper);

    @TenantIgnore
    Page<Map<String, Object>> subscriptionAmountPage(@Param("page") Page<StockWater> page, @Param("ew") QueryWrapper<?> wrapper);

    @TenantIgnore
    List<Map<String, Object>> remainingToday();

    @TenantIgnore
    Page<Map<String, Object>> remainingTodayPage(@Param("page") Page<StockWater> page, @Param("ew") QueryWrapper<?> wrapper);

    @TenantIgnore
    List<Map<String, Object>> selectMaterialHouse(@Param("ew") QueryWrapper<Object> wrapper);

    @TenantIgnore
    List<String> selectMaterialIdByHouseId(@Param("houseId") String houseId);

    @TenantIgnore
    List<Map<String, Object>> inStockList(@Param("ew") QueryWrapper<Object> wrapper);

    @TenantIgnore
    List<Map<String, Object>> remainingTodayList(@Param("ew") QueryWrapper<?> wrapper);

    @InterceptorIgnore(tenantLine = "1")
    @TenantIgnore
    Page<Map<String, Object>> receiptSequence(@Param("page") Page<StockWater> page, @Param("condition") Map<String, String> condition);

    @TenantIgnore
    List<Map<String, Object>> contractPaymentList(@Param("balancePurBillNo") String balancePurBillNo);

    @TenantIgnore
    List<Map<String, Object>> receiptList(@Param("purchaseBillNo") String purchaseBillNo);

    List<Map<String, Object>> getWater(@Param("ew") QueryWrapper<Object> wrapper);

    List<Map<String, Object>> getMaterialReturn(@Param("ew") QueryWrapper<Object> wrapper);

    List<Map<String, Object>> getTransferPickingList(@Param("ew") QueryWrapper<Object> wrapper);

    List<Map<String, Object>> getTransferBackList(@Param("ew") QueryWrapper<Object> wrapper);

    List<Map<String, Object>> getInventoryDetails(@Param("condition") Condition condition);

    Page<Map<String, Object>> outPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<Object> wrapper);

    Map<String, Object> outStatistics(@Param("ew") IWrapper<Object> wrapper);

}
