package org.jeecg.modules.device.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.device.entity.BuRiskItemValue;
import org.jeecg.modules.device.mapper.BuRiskItemValueMapper;
import org.jeecg.modules.device.model.DeviceRate;
import org.jeecg.modules.device.service.IBuRiskItemValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: bu_risk_item_value
 * @Author: jeecg-boot
 * @Date:   2024-08-02
 * @Version: V1.0
 */
@Service
public class BuRiskItemValueServiceImpl extends ServiceImpl<BuRiskItemValueMapper, BuRiskItemValue> implements IBuRiskItemValueService {

    @Autowired
    private BuRiskItemValueMapper buRiskItemValueMapper;


    @Override
    public BuRiskItemValue getDataByTwoId(String deviceId,String riskId){
        return buRiskItemValueMapper.getDataByTwoId(deviceId,riskId);
    }

    @Override
    public List<BuRiskItemValue> getDeviceItemStatus(String deviceId){
        return buRiskItemValueMapper.getDeviceItemStatus(deviceId);
    }

    @Override
    public long getDeviceAbnormalCount(){
        long deviceAbnormalCount = buRiskItemValueMapper.getDeviceAbnormalCount();
        return deviceAbnormalCount;
    }

    @Override
    public List<DeviceRate> getDeviceRiskRate() {
        return buRiskItemValueMapper.getDeviceRiskRate();
    }

    @Override
    public List<DeviceRate> getDeviceAccEssRate() {
        return buRiskItemValueMapper.getDeviceAccEssRate();
    }

    @Override
    public List<DeviceRate> getDeviceFaultRate() {
        return buRiskItemValueMapper.getDeviceAccEssRate();
    }

}
