package com.tofly.watermeter.custom.mapper.meterBusiness;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.watermeter.custom.entity.meterBusiness.dto.CodeDto;
import com.tofly.watermeter.custom.entity.meterBusiness.dto.RemoveTableDto;
import com.tofly.watermeter.custom.entity.meterBusiness.dto.TableInfoDto;
import com.tofly.watermeter.custom.entity.meterBusiness.dto.WareHousingDto;
import com.tofly.watermeter.entity.Bwrkdetail;
import com.tofly.watermeter.entity.Bwrksbdatail;
import com.tofly.watermeter.entity.Bwsjdatail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author 泡泡
 */
@Mapper
public interface WareHousingMapper {

    Page<Map> count(Page page, @Param("dto") WareHousingDto dto);

    List<Map> count(@Param("dto") WareHousingDto dto);

    Page<Map> countByVendor(Page page, @Param("dto") WareHousingDto dto);

    List<Map> countByVendor(@Param("dto") WareHousingDto dto);

    Page<Map> countByCaliber(Page page, @Param("dto") WareHousingDto dto);

    boolean bulkStorage(@Param("tail")List<Bwrksbdatail> tail);

    List<TableInfoDto> countInventory();

    List<CodeDto> getCode(Integer pcid);

    List<RemoveTableDto> queryInfo(@Param("ids") List<String> ids);

    boolean insertBatch(@Param("list") List<Bwrkdetail> list);

    boolean saveFirstInspection(@Param("list") List<Bwsjdatail> list);

    Page<Map> getAllInfo(Page page,@Param("dto") WareHousingDto dto);

    List<Map> countBatchNo(@Param("dto") WareHousingDto dto);
    Page<Map> countBatchNo(Page page,@Param("dto") WareHousingDto dto);

    List<Map> batchNoInfo(@Param("dto") WareHousingDto dto);
    Page<Map> batchNoInfo(Page page,@Param("dto") WareHousingDto dto);

    List<String> getAllTableCode();

    Long getCjbl(@Param("sbkj") Long sbkj);
}
