package cn.iocoder.yudao.module.mes.service.mdm; import cn.iocoder.yudao.module.mes.dal.dataobject.mdm.MesMdmItemDO; import java.util.Collection; import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; /** * MDM 物料 Service 接口 * * 专门用于查询 mdm_item 表 */ public interface MesMdmItemService { /** * 获得物料 * * @param id 编号 * @return 物料 */ MesMdmItemDO getItem(Long id); /** * 校验物料存在 * * @param id 编号 * @return 物料 */ MesMdmItemDO validateItemExists(Long id); /** * 校验物料存在且启用 * * @param id 编号 * @return 物料 */ MesMdmItemDO validateItemExistsAndEnable(Long id); /** * 获得物料列表 * * @param ids 编号数组 * @return 物料列表 */ List getItemList(Collection ids); /** * 获得物料 Map * * @param ids 编号数组 * @return 物料 Map */ default Map getItemMap(Collection ids) { return convertMap(getItemList(ids), MesMdmItemDO::getId); } }