package cn.estsh.i3plus.ext.mes.pcn.api.job;

import cn.estsh.i3plus.pojo.mes.bean.offline.MesWorkOrderAssemblyOffline;
import cn.estsh.i3plus.pojo.mes.bean.offline.MesWorkOrderOffline;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMesWorkOrderOfflineRestoreDispatchService {

    @Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {ImppBusiException.class, Exception.class})
    void saveWorkOrderOffline(MesWorkOrderOffline workOrderOffline, Boolean result);

    @Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {ImppBusiException.class, Exception.class})
    Boolean doRestoreWorkOrderOfflineData(String organizeCode, MesWorkOrderOffline workOrderOffline, List<MesWorkOrderAssemblyOffline> workOrderAssemblyOfflineList, String now, Boolean flag);

}
