package com.muyu.data.processing.strategy.leaves;

import com.muyu.data.processing.domain.BasicData;
import java.util.HashMap;

import com.muyu.data.processing.domain.Temporary2;
import com.muyu.data.processing.strategy.StrategyHandler;
import com.muyu.data.processing.strategy.abstractStrategyRouter;
import com.muyu.data.processing.strategy.core.RoutingStrategy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 围栏报警
 * 围栏数据记录并报警
 * @Author: 胡杨
 * @Name: BasicStrategy
 * @Description: 责任树 - 围栏报警
 * @CreatedDate: 2024/9/30 下午7:24
 * @FilePath: com.muyu.data.processing.strategy.branch
 */

@Slf4j
@Component
public class FenceAlarmStrategy extends abstractStrategyRouter<HashMap<String, BasicData>, Temporary2>
        implements StrategyHandler<HashMap<String, BasicData>, Temporary2> {
    @Override
    protected StrategyMapper<HashMap<String, BasicData>, Temporary2> registerStrategy() {
        log.info("围栏报警分支已完成。。。");
        return param -> new RoutingStrategy();
    }

    @Override
    public Temporary2 apply(HashMap<String, BasicData> basicDataMap) {
        return applyStrategy(basicDataMap);
    }
}
