package com.zd.laboratory.service.impl;

import com.zd.common.core.enums.HardwareTypeEnum;
import com.zd.laboratory.config.HardwareFunctionStatusConfig;
import com.zd.laboratory.service.ILabOperateHardwareService;
import com.zd.system.api.laboratory.domain.SensorFunctionStatus;
import com.zd.system.api.laboratory.domain.vo.SenseValVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Controller
 *
 * @author cyl
 * @date 2021/10/5
 */
@Service
public class LabOperateHardwareServiceImpl implements ILabOperateHardwareService {

    @Autowired
    public HardwareFunctionStatusConfig hardwareFunctionStatusConfig;


    @Override
    public void operateHardWare(Map <HardwareTypeEnum, String> hardwareMap,Long subjectId) {

    }

    /**
     * 获取所有配置的传感器及功能
     * @return
     */
    @Override
    public List<SenseValVO> queryAllSysSensorAndFunction()
    {
        return hardwareFunctionStatusConfig.getSenseValVOS();
    }

    /**
     * 获取所有配置的传感器的功能 - 仅功能列表
     * @return
     */
    @Override
    public List<SensorFunctionStatus> queryAllSysSensorInFunction()
    {
        return hardwareFunctionStatusConfig.getSensorFunctionStatuses();
    }


}
