package com.prolog.eis.schedule;

import com.prolog.eis.common.util.RunTimeHelper;
import com.prolog.eis.service.shelves.BackService;
import com.prolog.eis.service.shelves.CarryTaskCallbackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class InboundSchedule {

    @Resource
    CarryTaskCallbackService carryTaskCallbackService;


    @Resource
    private BackService backService;

    /**
     * 入库任务回告wms和转历史
     *
     * @throws Exception
     */
    @Scheduled(initialDelay = 3000, fixedDelay = 3000)
    public void inBoundRepeat() throws Exception {
        RunTimeHelper.RunDispatch(">定时发起入库容器回告", () -> {
            backService.wmsInCallBack();
        });
    }

}
