package com.xisc.pm.domain.repository;

import com.xisc.pm.api.dto.PmPdSlabSplitDTO;
import com.xisc.pm.domain.entity.PmPdSlab;
import org.hzero.mybatis.base.BaseRepository;

import java.util.List;

/**
 * 组板板坯表(PmPdSlab)资源库
 *
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @since 2024-07-31 16:30:30
 */
public interface PmPdSlabRepository extends BaseRepository<PmPdSlab> {
    /**
     * 查询
     *
     * @param pmPdSlab 查询条件
     * @return 返回值
     */
    List<PmPdSlab> selectList(PmPdSlab pmPdSlab);

    /**
     * 根据主键查询（可关联表）
     *
     * @param pdSlabId 主键
     * @return 返回值
     */
    PmPdSlab selectByPrimary(Long pdSlabId);

    /**
     * 查询MM_SLAB信息
     * @param slabId
     * @param organizationId
     * @return
     */
    PmPdSlabSplitDTO selectMmSlabBySlabId(Long slabId, Long organizationId);
    
    /**
     * 通过板坯号列表查询MM板坯信息
     * @param slabNoList
     * @param organizationId
     * @return
     */
    List<PmPdSlabSplitDTO> selectMmSlabBySlabNoList(List<String> slabNoList, Long organizationId);

    /**
     * 通过板坯号查询板坯信息
     * @param slabNo
     * @param organizationId
     * @return
     */
    List<PmPdSlab> selectListBySlabNo(String slabNo, Long organizationId);

    /**
     * 
     * @param virtualSlabNo
     * @return
     */
    PmPdSlab selectByVirtualSlabNo(String virtualSlabNo, Long organizationId);

    /**
     * 根据虚拟板坯号列表查询
     *
     * @param virtualSlabNoList
     * @param tenantId
     * @return
     */
    List<PmPdSlab> selectByVirtualSlabNoList(List<String> virtualSlabNoList, Long tenantId);

    /**
     * 通过板坯号查询板坯信息
     * @param slabNoList
     * @param organizationId
     * @return
     */
    List<PmPdSlab> selectListBySlabNoList(List<String> slabNoList, Long organizationId);

}
