package com.bonus.canteen.core.supply.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpPurPlanDetail;
import com.bonus.canteen.core.supply.purchase.domain.vo.DrpPurDetailSupplierVO;
import com.bonus.canteen.core.supply.purchase.domain.vo.DrpPurPlanDetailListVO;
import com.bonus.canteen.core.supply.purchase.domain.vo.DrpPurPlanDetailPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DrpPurPlanDetailMapper extends BaseMapper<DrpPurPlanDetail> {
   List<DrpPurPlanDetailPageVO> selectListByPlanId(String planId);

//   @Select({"SELECT mm.material_name,mmc.category_name,dppd.pur_num,du.unit_name,dppd.size,ds.supplier_name,dpp.plan_id,dpp.pur_date,dpp.remark,dppd.supplier_id,IF( mu.real_name IS NULL OR mu.real_name = '', mu.username, mu.real_name ) purUserName FROM drp_pur_plan_detail dppd LEFT JOIN drp_purchase_plan dpp ON dpp.plan_id = dppd.plan_id LEFT JOIN menu_material mm ON mm.material_id = dppd.material_id LEFT JOIN menu_material_category mmc ON mmc.category_id = mm.category_id LEFT JOIN drp_unit du ON du.unit_id = dppd.unit_id LEFT JOIN drp_supplier ds ON ds.supplier_id = dppd.supplier_id LEFT JOIN mgr_user mu ON mu.user_id = dpp.pur_user_id WHERE dpp.plan_id = #{planId}"})
//   List<DrpPurDetailSupplierVO> listPurDetailGroupBySupplier(String planId);
//
//   List<DrpExcelPurPlanDetailVO> listExcelPurPlanDetail(@Param("planId") String planId);

   List<DrpPurPlanDetailListVO> listDetailById(@Param("planId") String planId);
//
//   List<PurPlanDetailModel> listDetailByIdList(@Param("planIdList") List<String> planIdList);
//
//   List<DrpFetchMaterialImportPurPlanDetailPageVO> pageFetchMaterialImportPurPlanDetail(@Param("content") DrpFetchMaterialImportPurPlanDetailPageDTO content);
}
