package com.njcn.prepare.executor;

import com.njcn.prepare.harmonic.service.mysql.cvt.IDataHarmRateVCvtService;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.annotation.LiteflowMethod;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
import com.yomahub.liteflow.enums.NodeTypeEnum;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;


/**
 * @author xy
 * @version 1.0.0
 * @date 2025年1月16日
 */
@Slf4j
@LiteflowComponent
@RequiredArgsConstructor
public class MeasurementHourExecutor extends BaseExecutor {



    @Resource
    private IDataHarmRateVCvtService dataHarmRateVCvtService;


    /**
     * 监测点cvt转换算法()
     * @author hzj
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "dataHarmRateVCvt", nodeType = NodeTypeEnum.COMMON)
    public boolean dataVCvtAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "dataHarmRateVCvt", nodeType = NodeTypeEnum.COMMON)
    public void dataVCvtProcess(NodeComponent bindCmp) {
        dataHarmRateVCvtService.dataHarmRateVCvtHandler(bindCmp.getRequestData());
    }

}
