package com.sw.mes.wipstorage.service;

import com.sw.mes.base.factory.init.entity.CrystalMaterialRelation;
import com.sw.mes.base.workinprocess.dto.PlanProcessingOrderWipStorageDto;
import com.sw.mes.base.workinprocess.dto.ProcessingOrderNewDto;
import com.sw.mes.base.workinprocess.entity.PlanProcessingOrder;
import com.sw.mes.core.dto.sap.SendReportSapGoodsmvtDto;
import com.sw.mes.core.response.Result;
import com.sw.mes.yb.pad.entity.SectionNoDetail;
import com.sw.mes.yb.production.entity.LongCrystal;

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

public interface WipStorageYbService {

    /**
     * @param planProcessingOrderWipStorageDto
     * @param sendEapCutCraft                  是否人工过站推送eap截断加工记录
     * @return
     */
    Result execJd(PlanProcessingOrderWipStorageDto planProcessingOrderWipStorageDto, boolean sendEapCutCraft);

    /**
     * pad 通用进站
     *
     * @param processingOrderCodes 进站工单号
     * @param deviceCode           设备编号
     * @param wipStorageCode       站点代码
     * @return
     */
    Result padInStation(List<String> processingOrderCodes, String deviceCode, String wipStorageCode);

    /**
     * 开方出站
     *
     * @param processingOrderCode 晶段编号/工单号
     * @param flowLineLable       出站路线
     * @param planProcessingOrder 出站工单
     * @return
     */
    Result execKfOut(String processingOrderCode, String flowLineLable, PlanProcessingOrder planProcessingOrder);

    void setProcessingOrderNewDto(List<ProcessingOrderNewDto> processingOrderNewDtos, List<SectionNoDetail> sectionNoDetails);

    Result execKfOut(List<String> sectionNoArr, PlanProcessingOrderWipStorageDto result, String flowLineLable, String wipStorageCode);


    List<String> getSectionNos(Integer materialType, String sectionNo);

    void sendReportSapGoodsmvt(String bwart,String kostl,String aufnr,String matnr,String charg,String menge,String meins,String werks,String lgort,String crystalNo,String umlgo,String procName,String deviceNo,String againNum);

    Result sendWarehouseInputBillBo(LongCrystal longCrystal, BigDecimal weight, String type, String umlgo, String warehouseCode, CrystalMaterialRelation crystalMaterialRelation,String sectionNo);

    void sendReportSapGoodsmvtList(List<SendReportSapGoodsmvtDto> list);

    long getStationTime(String code, String inStation, String outStation);
}
