package com.sw.mes.sap;

import com.sw.mes.base.workinprocess.entity.PlanProcessingOrder;
import com.sw.mes.core.entity.TurnstoreTrayItem;
import com.sw.mes.yb.production.entity.LongCrystal;
import org.springframework.scheduling.annotation.Async;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SapServer {
    @Async
    void sendGr(List<TurnstoreTrayItem> turnstoreTrayItemList);

    @Async
    @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
    void addWorkHour(LongCrystal longCrystal, PlanProcessingOrder planProcessingOrder);
}
