package com.njcn.prepare.executor;

import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetDPOService;
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetMPOService;
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetYPOService;
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicOrgService;
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicService;
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicVoltageService;
import com.njcn.prepare.harmonic.service.mysql.area.RStatOrgService;
import com.njcn.prepare.harmonic.service.mysql.dim.*;
import com.njcn.prepare.harmonic.service.mysql.line.PollutionService;
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.*;
import com.njcn.prepare.harmonic.service.mysql.upload.IRUploadCommPointBusService;
import com.njcn.prepare.harmonic.service.mysql.upload.IRUploadEvaluationDataDService;
import com.njcn.prepare.harmonic.service.mysql.send.ConverterIndexStatisticsPOService;
import com.njcn.prepare.harmonic.service.mysql.send.PqTypicalSourceCreatePOService;
import com.njcn.prepare.harmonic.service.mysql.upload.IRUploadMainMonitorDataService;
import com.njcn.prepare.harmonic.service.mysql.upload.IRUploadPointStatisticalDataDService;
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;

/**
 * Description:
 * Date: 2023/11/10  10:39【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@LiteflowComponent
@RequiredArgsConstructor
public class OrgPointExecutor extends BaseExecutor{

    private final ROperatingIndexService rOperatingIndexService;
    private final RStatOrgService rStatOrgService;

    private final PollutionService pollutionService;

    private final RStatHarmonicService rStatHarmonicService;
    private final RStatHarmonicVoltageService rStatHarmonicVoltageService;
    private final RStatHarmonicOrgService rstatHarmonicOrgService;
    private final RStatEventService rStatEventDService;
    private final RStatEventVoltageService rStatEventVoltageService;
    private final RStatEventOrgService rStatEventOrgService;
    private final RStatLoadTypeService rStatLoadTypeService;

    private final RAlarmCountService rAlarmCountService;

    private final RDimBusbarHarmnicDPOService rDimBusbarHarmnicDPOService;

    private final RDimBusTargetDPOService rDimBusTargetDPOService;
    private final RDimBusTargetMPOService rDimBusTargetMPOService;
    private final RDimBusTargetYPOService rDimBusTargetYPOService;

    private final IRDimObjTargetDService irDimObjTargetDService;
    private final IRDimObjTargetMService irDimObjTargetMService;
    private final IRDimObjTargetYService irDimObjTargetYService;

    private final IRDimObjGlobalDService irDimObjGlobalDService;
    private final IRDimObjGlobalMService irDimObjGlobalMService;
    private final IRDimObjGlobalYService irDimObjGlobalYService;

    private final RDimBusStationEventStartisDPOService rDimBusStationEventStartisDPOService;
    private final RDimBusStationEventStartisMPOService rDimBusStationEventStartisMPOService;
    private final RDimBusStationEventStartisYPOService rDimBusStationEventStartisYPOService;
    private final IRUploadPointStatisticalDataDService irUploadPointStatisticalDataDService;


    private final ConverterIndexStatisticsPOService converterIndexStatisticsPOService;
    private final PqTypicalSourceCreatePOService pqTypicalSourceCreatePOService;
    private final IRUploadEvaluationDataDService irUploadEvaluationDataDService;

    private final IRUploadCommPointBusService irUploadCommPointBusService;

    private final IRUploadMainMonitorDataService irUploadMainMonitorDataService;
    /**
     *
     * 3.3.2.	单位标数据质量
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rOperatingIndex", nodeType = NodeTypeEnum.COMMON)
    public boolean processOperatingIndexAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rOperatingIndex", nodeType = NodeTypeEnum.COMMON)
    public void processOperatingIndexProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_operating_index_d")) {
            //日表
            rOperatingIndexService.handleDay(calculatedParam);
        }
        else if (tag.equalsIgnoreCase("r_operating_index_m")) {
            //日表
            rOperatingIndexService.handleMonth(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_operating_index_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rOperatingIndexService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_operating_index_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rOperatingIndexService.handleYear(calculatedParam);
            }
        }
    }

    /**
     *
     * 3.4.2.	单位监测点统计
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatOrg", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatOrgAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatOrg", nodeType = NodeTypeEnum.COMMON)
    public void processRStatOrgProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_org_d")) {
            //日表
            rStatOrgService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_org_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatOrgService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_org_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                rStatOrgService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_org_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rStatOrgService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 3.4.16.	单位污区图统计（新增）
     *
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatPollutionOrg", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatPollutionOrgAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatPollutionOrg", nodeType = NodeTypeEnum.COMMON)
    public void processRStatPollutionOrgProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_pollution_org_d")) {
            //日表
            pollutionService.handleOrgDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_pollution_org_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                pollutionService.handleOrgMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_pollution_org_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                pollutionService.handleOrgQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_pollution_org_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                pollutionService.handleOrgYear(calculatedParam);
            }
        }
    }


    /**
     *
     * 3.4.4.	单位监测点稳态指标统计-监测点类别（对象类型）
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatHarmonic", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatHarmonicAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatHarmonic", nodeType = NodeTypeEnum.COMMON)
    public void processRStatHarmonicProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_harmonic_d")) {
            //日表
            rStatHarmonicService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_harmonic_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatHarmonicService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_harmonic_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                rStatHarmonicService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_harmonic_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rStatHarmonicService.handleYear(calculatedParam);
            }
        }
    }

    /**
     *
     * 3.4.5.	单位监测点稳态指标统计-电压等级
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatHarmonicVoltage", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatHarmonicVoltageAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatHarmonicVoltage", nodeType = NodeTypeEnum.COMMON)
    public void processRStatHarmonicVoltageProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_harmonic_voltage_d")) {
            //日表
            rStatHarmonicVoltageService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_harmonic_voltage_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatHarmonicVoltageService.handleMonth(calculatedParam);
            }
        }
    }



    /**
     *
     * 3.4.8.	单位监测点稳态指标统计-监测点类别（对象类型）
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatHarmonicOrg", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatHarmonicOrgAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatHarmonicOrg", nodeType = NodeTypeEnum.COMMON)
    public void processRStatHarmonicOrgProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_harmonic_org_d")) {
            //日表
            rstatHarmonicOrgService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_harmonic_org_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rstatHarmonicOrgService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_harmonic_org_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                rstatHarmonicOrgService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_harmonic_org_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rstatHarmonicOrgService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 3.4.6.	单位监测点暂态指标统计-监测点类别（对象类型）
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatEvent", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatEventAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatEvent", nodeType = NodeTypeEnum.COMMON)
    public void processRStatEventProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_event_d")) {
            //日表
            rStatEventDService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_event_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatEventDService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_event_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                rStatEventDService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_event_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rStatEventDService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 3.4.7.	单位监测点暂态指标统计-电压等级
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatEventVoltage", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatEventVoltageAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatEventVoltage", nodeType = NodeTypeEnum.COMMON)
    public void processRStatEventVoltageProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_event_voltage_d")) {
            //日表
            rStatEventVoltageService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_event_voltage_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatEventVoltageService.handleMonth(calculatedParam);
            }
        }
    }


    /**
     * 3.4.9.	单位暂态指标数据统计
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatEventOrg", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatEventOrgAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatEventOrg", nodeType = NodeTypeEnum.COMMON)
    public void processRStatEventOrgProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_event_org_d")) {
            //日表
            rStatEventOrgService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_event_org_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatEventOrgService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_event_org_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                rStatEventOrgService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_event_org_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rStatEventOrgService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 3.4.12.	单位干扰源电流类指标超标统计
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatEventLoadType", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatEventLoadTypeAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatEventLoadType", nodeType = NodeTypeEnum.COMMON)
    public void processRStatEventLoadTypeProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_load_type_d")) {
            //日表
            rStatLoadTypeService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_load_type_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rStatLoadTypeService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_load_type_q")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //季表
                rStatLoadTypeService.handleQtr(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_stat_load_type_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rStatLoadTypeService.handleYear(calculatedParam);
            }
        }
    }

    /**
     *3.4.14.	单位指标告警统计
     */

    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rStatAlarmCount", nodeType = NodeTypeEnum.COMMON)
    public boolean processRStatAlarmCountAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rStatAlarmCount", nodeType = NodeTypeEnum.COMMON)
    public void processRStatAlarmCountProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_stat_alarm_count_w")) {
            //周表
            rAlarmCountService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_stat_area_alarm_count_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rAlarmCountService.handleMonth(calculatedParam);
            }
        }
    }


    /**
     * 河北主网新增算法表r_dim_busbar_harmnic_d作为中间表
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimBusbarHarmnic", nodeType = NodeTypeEnum.COMMON)
    public boolean processRDimBusbarHarmnicAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimBusbarHarmnic", nodeType = NodeTypeEnum.COMMON)
    public void processRDimBusbarHarmnicProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_dim_busbar_harmnic_d")) {
            //日表
            rDimBusbarHarmnicDPOService.handleDay(calculatedParam);
        }
    }



//    /**
//     * 河北主网新增算法表r_dim_station_target_d/m/y
//     */
//    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimStationTarget", nodeType = NodeTypeEnum.COMMON)
//    public boolean processRDimStationTargetAccess(NodeComponent bindCmp) {
//        return isAccess(bindCmp);
//    }
//    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimStationTarget", nodeType = NodeTypeEnum.COMMON)
//    public void processRDimStationTargetProcess(NodeComponent bindCmp) {
//        String tag = bindCmp.getTag();
//        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
//        if (tag.equalsIgnoreCase("r_dim_station_target_d")) {
//            //日表
//            rDimStationTargetDPOService.handleDay(calculatedParam);
//        } else if (tag.equalsIgnoreCase("r_dim_station_target_m")) {
//            //数据补招不执行非日表算法
//            if (!calculatedParam.isRepair()) {
//                //月表
//                rDimStationTargetMPOService.handleMonth(calculatedParam);
//            }
//        }else if (tag.equalsIgnoreCase("r_dim_station_target_y")) {
//            //数据补招不执行非日表算法
//            if (!calculatedParam.isRepair()) {
//                //年表
//                rDimStationTargetYPOService.handleYear(calculatedParam);
//            }
//        }
//    }

    /**
     * 河北主网新增算法表r_dim_bus_target_d/m/y
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimBusTarget", nodeType = NodeTypeEnum.COMMON)
    public boolean processRDimBusTargetAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimBusTarget", nodeType = NodeTypeEnum.COMMON)
    public void processRDimBusTargetProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_dim_bus_target_d")) {
            //日表
            rDimBusTargetDPOService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_dim_bus_target_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rDimBusTargetMPOService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_dim_bus_target_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rDimBusTargetYPOService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 河北主网新增算法表r_dim_obj_target_d/m/y
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimObjTarget", nodeType = NodeTypeEnum.COMMON)
    public boolean processRDimObjTargetAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimObjTarget", nodeType = NodeTypeEnum.COMMON)
    public void processRDimObjTargetProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_dim_obj_target_d")) {
            //日表
            irDimObjTargetDService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_dim_obj_target_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                irDimObjTargetMService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_dim_obj_target_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                irDimObjTargetYService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 河北主网新增算法表r_dim_obj_target_d/m/y
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimObjGlobal", nodeType = NodeTypeEnum.COMMON)
    public boolean processRDimObjGlobalAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimObjGlobal", nodeType = NodeTypeEnum.COMMON)
    public void processRDimObjGlobalProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_dim_obj_global_d")) {
            //日表
            irDimObjGlobalDService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_dim_obj_global_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                irDimObjGlobalMService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_dim_obj_global_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                irDimObjGlobalYService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 河北主网新增算法表r_dim_obj_target_d/m/y
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimObjBusStationEventStartis", nodeType = NodeTypeEnum.COMMON)
    public boolean processRDimObjBusStationEventStartisAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimObjBusStationEventStartis", nodeType = NodeTypeEnum.COMMON)
    public void processDimObjBusStationEventStartisProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_dim_bus_station_event_startis_d")) {
            //日表
            rDimBusStationEventStartisDPOService.handleDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("r_dim_bus_station_event_startis_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                rDimBusStationEventStartisMPOService.handleMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("r_dim_bus_station_event_startis_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                rDimBusStationEventStartisYPOService.handleYear(calculatedParam);
            }
        }
    }

    /**
     * 河北国网上送接口
     * 2.4.1.17接收电能质量主配网监测点统计数据接口
     * xuyang
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rUploadPointStatisticalData", nodeType = NodeTypeEnum.COMMON)
    public boolean rUploadPointStatisticalDataAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rUploadPointStatisticalData", nodeType = NodeTypeEnum.COMMON)
    public void rUploadPointStatisticalDataProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_upload_point_statistical_data_d")) {
            //日表
            irUploadPointStatisticalDataDService.insertPointStatisticalDataDay(bindCmp.getRequestData());
        } else if (tag.equalsIgnoreCase("r_upload_point_statistical_data_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                irUploadPointStatisticalDataDService.insertPointStatisticalDataMonth(bindCmp.getRequestData());
            }
        } else if (tag.equalsIgnoreCase("r_upload_point_statistical_data_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                irUploadPointStatisticalDataDService.insertPointStatisticalDataYear(bindCmp.getRequestData());
            }
        }
    }

    /**
     * 河北国网上送接口
     * 2.4.1.18	接收电能质量换流站指标汇总统计数据接口
     * xuyang
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "converterIndexStatistics", nodeType = NodeTypeEnum.COMMON)
    public boolean converterIndexStatisticsAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "converterIndexStatistics", nodeType = NodeTypeEnum.COMMON)
    public void converterIndexStatisticsProcess(NodeComponent bindCmp) {
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        converterIndexStatisticsPOService.handlerDay(calculatedParam);
    }
    /**
     *河北国网上送接口
     *2.4.1.9	接收电能质量典型源荷指标统计数据接口
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "pqTypicalSourceCreatePOService", nodeType = NodeTypeEnum.COMMON)
    public boolean pqTypicalSourceCreatePOServiceAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "pqTypicalSourceCreatePOService", nodeType = NodeTypeEnum.COMMON)
    public void pqTypicalSourceCreatePOServiceProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("pq_typical_source_create_d")) {
            //日表
            pqTypicalSourceCreatePOService.handlerDay(calculatedParam);
        } else if (tag.equalsIgnoreCase("pq_typical_source_create_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                pqTypicalSourceCreatePOService.handlerMonth(calculatedParam);
            }
        }else if (tag.equalsIgnoreCase("pq_typical_source_create_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //年表
                pqTypicalSourceCreatePOService.handleYear(calculatedParam);
            }
        }
    }
    /**
     * 河北国网上送接口
     * 2.4.1.8接收电能质量基准水平评估数据接口
     * xuyang
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rUploadEvaluationData", nodeType = NodeTypeEnum.COMMON)
    public boolean rUploadEvaluationDataAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rUploadEvaluationData", nodeType = NodeTypeEnum.COMMON)
    public void rUploadEvaluationDataProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_upload_evaluation_data_d")) {
            //日表
            irUploadEvaluationDataDService.insertEvaluationDataDay(bindCmp.getRequestData());
        } else if (tag.equalsIgnoreCase("r_upload_evaluation_data_m")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                irUploadEvaluationDataDService.insertEvaluationDataMonth(bindCmp.getRequestData());
            }
        } else if (tag.equalsIgnoreCase("r_upload_evaluation_data_y")) {
            //数据补招不执行非日表算法
            if (!calculatedParam.isRepair()) {
                //月表
                irUploadEvaluationDataDService.insertEvaluationDataYear(bindCmp.getRequestData());
            }
        }
    }

    /**
     * 河北国网上送接口
     * 22.4.1.38接收电能质量公共连接点监测数据统计数据接口
     * xuyang
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rUploadCommPoint", nodeType = NodeTypeEnum.COMMON)
    public boolean rUploadCommPointAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rUploadCommPoint", nodeType = NodeTypeEnum.COMMON)
    public void rUploadCommPointProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_upload_comm_point_d")) {
            //日表
            irUploadCommPointBusService.handlerDay(calculatedParam.getDataDate());
        } else if (tag.equalsIgnoreCase("r_upload_comm_point_m")) {
                //月表
            irUploadCommPointBusService.handlerMonth(calculatedParam.getDataDate());
        } else if (tag.equalsIgnoreCase("r_upload_comm_point_y")) {
                //月表
            irUploadCommPointBusService.handlerYear(calculatedParam.getDataDate());
        }
    }


    /**
     * 河北国网上送接口
     * 22.4.1.38接收电能质量公共连接点监测数据统计数据接口
     * xuyang
     */
    @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rUploadMainMonitor", nodeType = NodeTypeEnum.COMMON)
    public boolean rUploadMainMonitorAccess(NodeComponent bindCmp) {
        return isAccess(bindCmp);
    }
    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rUploadMainMonitor", nodeType = NodeTypeEnum.COMMON)
    public void rUploadMainMonitorProcess(NodeComponent bindCmp) {
        String tag = bindCmp.getTag();
        CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
        if (tag.equalsIgnoreCase("r_upload_main_monitor_data_d")) {
            //日表
            irUploadMainMonitorDataService.handlerDay(calculatedParam.getDataDate());
        } else if (tag.equalsIgnoreCase("r_upload_main_monitor_data_m")) {
            //月表
            irUploadMainMonitorDataService.handlerMonth(calculatedParam.getDataDate());
        } else if (tag.equalsIgnoreCase("r_upload_main_monitor_data_y")) {
            //月表
            irUploadMainMonitorDataService.handlerYear(calculatedParam.getDataDate());
        }
    }

}
