package com.sw.mes.crucible.service;

import com.sw.mes.core.base.BaseService;
import com.sw.mes.crucible.dto.CrucibleFixedCastingSaveDto;
import com.sw.mes.crucible.entity.CrucibleFixedCasting;

/**
 * @author lf
 * @description
 * @date 2024/1/8 9:09
 */
public interface CrucibleFixedCastingService extends BaseService<CrucibleFixedCasting> {
    CrucibleFixedCasting findByEquipmentCodeAndfixedCastingType(Integer equipmentCode, String fixedCastingType);

    CrucibleFixedCasting findByEquipmentIdAndfixedCastingTypeAndIdNot(Integer equipmentCode, String fixedCastingType, Integer id);

    void batchCreate(CrucibleFixedCastingSaveDto dto);

    CrucibleFixedCasting findByEquipment(String code);

    /**
     * 根据设备号查询坩埚定投方案
     * 优先查询定投类型实验的且完成数量小于定投炉数的; 不存在查询定投类型量产的
     * @param code
     * @return
     */
    CrucibleFixedCasting getCrucibleFixedCastingByEquipmentCode(String code);

}
