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

import com.muyu.data.processing.domain.BasicData;
import java.util.HashMap;
import java.util.List;
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.leaves.FaultAlarmStrategy;
import com.muyu.data.processing.strategy.leaves.FenceAlarmStrategy;
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 FenceJudgmentStrategy 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 FenceAlarmStrategy();
    }

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