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

import com.sw.mes.core.base.BaseService;
import com.sw.mes.core.dto.CooperateDataInfoDto;
import com.sw.mes.core.response.Result;
import com.sw.mes.core.utils.RequestPage;
import com.sw.mes.yb.pad.dto.RecutDto;
import com.sw.mes.yb.pad.entity.ReCut;
import org.springframework.data.jpa.domain.Specification;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

// 方棒返切

public interface FbReCutService extends BaseService<ReCut> {

    List<ReCut> findByExample(Specification<ReCut> specification, RequestPage page);

    /**
     * 通过载具编号找到要返切的方棒编号
     *
     * @param trayNo
     * @return
     */
    Result<Map<String, Object>> findByTrayNo(String trayNo);

    Result<BigDecimal> getSecitonNoInfo(String sectionNoFb);

    // 保存晶段信息
    Result saveSegmentNo(RecutDto recutDto);


    ReCut findReCutInfoBySectionNo(String sectionNo);

    Result<RecutDto> getSectionNoFbRecutInfo(RecutDto recutDto);

    Result<ReCut> getReCutBySectionNo(String sectionNo);

    void deleteReCut(Long id);

    ReCut findBySectionNoAndStatus(String sectionNo, int status);

    Result getCooperateInfo(CooperateDataInfoDto cooperateDataInfoDto);

    Result<BigDecimal> findLengthBySecitonNo(String sectionNo);

    Result<RecutDto> getSectionNoFbRecutInfoNew(RecutDto recutDto);

    // 保存晶段信息
    Result saveSegmentNoNew(RecutDto recutDto);
}
