package com.bonus.canteen.core.drp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.drp.dto.AndroidSearchMaterialDTO;
import com.bonus.canteen.core.drp.model.DrpInventory;
import com.bonus.canteen.core.drp.vo.AndroidSearchMaterialVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface DrpInventoryMapper extends BaseMapper<DrpInventory> {
//   List<DrpInventoryPageVO> pageDrpInventory(@Param("content") DrpInventoryPageDTO content);

   @Select({"select material_name from menu_material where material_id = #{materialId}"})
   String selectMaterialName(@Param("materialId") Long materialId);
//
//   Page<DrpListAllMaterialVO> selectAllMaterialList(Page<DrpListAllMaterialVO> page, @Param("content") DrpListAllMaterialDTO content, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull, @Param("delFlag") Integer delFlag, @Param("categoryIdList") List<Long> categoryIdList, @Param("warehouseId") Long warehouseId);
//
//   @Select({"select category_id id, parent_id, category_name from menu_material_category where del_flag = #{delFlag}"})
//   List<MenuCategoryTreeVO> selectCategoryTree(Integer delFlag);

   List<AndroidSearchMaterialVO> selectAndroidMaterialList(@Param("content") AndroidSearchMaterialDTO content, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull, @Param("delFlag") Integer delFlag);

//   List<AndroidSearchInventoryMaterialVO> searchInventoryMaterial(@Param("content") AndroidSearchInventoryMaterialDTO content, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull, @Param("delFlag") Integer delFlag);
//
//   InventoryModel getInventoryNumByMaterialId(@Param("materialId") Long materialId, @Param("warehouseId") Long warehouseId, @Param("unitId") Long unitId);
//
   void minusInventoryNumById(@Param("inventoryId") Long inventoryId, @Param("fetchNum") BigDecimal fetchNum);

   void plusInventoryNumById(@Param("inventoryId") Long inventoryId, @Param("materialNum") BigDecimal materialNum);
//
//   List<MaterialInventoryVO> selectInventoryByMaterialIdList(@Param("materialIdList") List<Long> materialIdList, @Param("warehouseId") Long warehouseId);
//
//   List<DrpMaterialInventoryPageVO> pageMaterialInventory(@Param("content") DrpMaterialInventoryPageDTO content, @Param("warehouseAuthority") List<Long> warehouseAuthority, @Param("areaAuth") List<Long> areaAuth);
//
//   List<DrpMaterialInventoryDetailPageVO> listAllWarehouseInventory(@Param("content") DrpMaterialInventoryPageDTO content, @Param("materialId") Long materialId, @Param("unitId") Long unitId, @Param("warehouseAuthority") List<Long> warehouseAuthority, @Param("areaAuth") List<Long> areaAuth);
//
//   List<DrpMaterialWarehouseInventoryVO> getMaterialWarehouseInventory(@Param("delFlag") Integer delFlag, @Param("content") DrpMaterialWarehouseInventoryGetDTO content);
//
//   BigDecimal checkInventoryNum(@Param("warehouseId") Long warehouseId);
//
//   Page<WarehouseCategoryPageDTO> getWarehouseCategory(Page<WarehouseCategoryDTO> resultPage, @Param("content") WarehouseCategoryDTO content);
//
//   List<DrpMaterialInventoryExportVO> materialInventoryExport(@Param("content") DrpMaterialInventoryPageDTO content, @Param("warehouseAuthority") List<Long> warehouseAuthority, @Param("areaAuth") List<Long> areaAuth);
//
//   List<DrpSumInventoryNumVO> sumInventoryNumById(@Param("inventoryIdList") List<Long> inventoryId, @Param("status") Integer status);
//
//   List<DrpAppAllMaterialTypesVO> getInventoryMaterialAllTypes(@Param("content") DrpInventoryCategoryDTO content, @Param("delFlag") Integer delFlag);
//
//   List<Long> listInventoryCategory(@Param("content") AndroidOutInventoryCategoryListDTO content);
}
