package cn.cecep.talroad.service.strategy;

import cn.cecep.talroad.common.core.web.domain.AjaxResult;
import cn.cecep.talroad.domain.BasDevice;
import cn.cecep.talroad.domain.BasDeviceParam;
import cn.cecep.talroad.domain.PcFactory;
import cn.cecep.talroad.vo.FactoryDeviceVo;
import java.util.Date;
import java.util.List;
import lombok.extern.slf4j.Slf4j;

/**
 * @Auther: cjh
 * @Date: 2023-03-25 15:39
 * @Class: AbtractGtStrategyAdapter
 * @Deseription:
 * @Version V1.0
 */
@Slf4j
public abstract class AbstractStrategyAdapter implements Strategy {

    /**
     * 实时设备状态、放散状态、产量计算
     * @param industry
     * @param deviceType
     */
    @Override
    public void doCheckProcess(String industry,String deviceType,Date tempDate) {
        this.doProcess(industry,deviceType,tempDate);
    }


    /**
     * 历史产量-处理数据
     * @param factoryId
     * @param deviceType
     * @param tempDate
     */
    @Override
    public void doCheckProcessTemp(String factoryId,String industry,String deviceType,Date tempDate) {

        this.doProcessYieldTemp(factoryId, industry, deviceType, tempDate);
    }

    /**
     * 计算产量
     * @param vo
     */
    @Override
    public void doCheckProcessYield(FactoryDeviceVo vo){
        this.doProcessYield(vo);
    }

    /**
     * 处理设备停限产状态、放散状态
     * @param industry
     * @param deviceType
     * @param tempDate
     * @return
     */
    protected abstract void doProcess(String industry,String deviceType,Date tempDate);

    /**
     * 处理产量统计
     * @param vo
     */
    protected abstract void doProcessYield(FactoryDeviceVo vo);

    /**
     * 临时处理历史数据
     * @param factoryId
     * @param industry
     * @param deviceType
     * @param tempDate
     * @return
     */
    protected abstract void doProcessYieldTemp(String factoryId,String industry,String deviceType,Date tempDate);
}
