package org.jeecg.config.init;

import org.jeecg.modules.deviceAsset.service.ICurveManagementService;
import org.jeecg.modules.deviceAsset.service.IRailManagementService;
import org.jeecg.modules.deviceAsset.service.ISwitchManagementService;
import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService;
import org.jeecg.modules.deviceAsset.service.impl.RailManagementServiceImpl;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.utils.UnitCodeUtil;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 初始化静态方法
 */
@Component
public class InitData implements InitializingBean {
    @Resource
    private ISwitchManagementService switchManagementService;

    @Resource
    private ICurveManagementService curveManagementService;

    @Resource
    private IVerticalCurveManagementService verticalCurveManagementService;

    @Resource
    private ILineAliasService lineAliasService;

    @Resource
    private IRailManagementService railManagementService;

    @Override
    public void afterPropertiesSet() throws Exception {
        UnitCodeUtil.setService(lineAliasService,
                switchManagementService,
                curveManagementService,
                verticalCurveManagementService,
                railManagementService);
    }
}
