package com.willalp.control.service;

import com.willalp.control.domain.HsControlTiming;
import com.willalp.control.domain.vo.OpenOrCloseVo;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

/**
 * @author hs
 *
 * 控制业务处理
 */
public interface ControlService {

    /**
     * APP控制灯的打开或者关闭
     *
     * @param openOrCloseVo
     * @return
     */
    int openOrClose(OpenOrCloseVo openOrCloseVo);

    /**
     * 异步获取jvm中执行口和设备信息并发送指令
     *
     * @param useNoId
     * @param openOrClose
     */
    void getIpAndCmdByUseNoIdAndSend(Long useNoId,int openOrClose);

    /**
     * 异步检索定时开/关任务并执行
     *
     * @param list
     * @param startOrEnd
     */
    @Async("asyncServiceExecutor")
    void asyncTimingStartOrEnd(List<HsControlTiming>list,int startOrEnd);

}
