package com.sw.mes.yb.production.service;

import com.sw.mes.core.base.BaseService;
import com.sw.mes.yb.production.entity.ProductionFurnaceMaterialSplit;

import java.util.List;

public interface ProductionFurnaceMaterialSplitService extends BaseService<ProductionFurnaceMaterialSplit> {

    /**
     * 根据任务id、复投次数删除
     *
     * @param taskId
     * @param againNum
     */
    void deleteByTaskIdAndAgainNum(Long taskId, Integer againNum);

    /**
     * 根据任务id、复投次数、桶编号查询
     *
     * @param taskId
     * @param againNum
     * @param bucketIndex
     * @return
     */
    List<ProductionFurnaceMaterialSplit> findByBucketIndex(Long taskId, Integer againNum, Integer bucketIndex);

    /**
     * 根据炉次号和复投次数查询
     */
    List<ProductionFurnaceMaterialSplit> findByLotNoAndAgainNum(String lotNo, Integer againNum);

    /**
     * 根据叫料类型0初装1初始复投2取段复投、任务id、桶号查询分桶方案
     * @param rawType
     * @param taskId
     * @param bucketIndex
     * @return
     */
    List<ProductionFurnaceMaterialSplit> findByRawTypeAndTaskIdAndBucketIndex(Integer rawType, Long taskId, Integer bucketIndex);


    /**
     * 根据任务id、rowType删除
     *
     * @param taskId
     * @param rowType
     */
    void deleteByTaskIdAndRawType(Long taskId, Integer rowType);
}
