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 lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 预警数据处理
 * 调整预警使用策略
 * @Author: 胡杨
 * @Name: FaultProcessingStrategy
 * @Description: 预警数据处理
 * @CreatedDate: 2024/9/30 下午7:47
 * @FilePath: com.muyu.data.processing.strategy.branch
 */

@Slf4j
@Component
public class WarningProcessingStrategy 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 WarningJudgmentStrategy();
    }

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