package com.unis.visualization.modular.grainOilReserve.service.impl;

import com.unis.visualization.modular.grainOilReserve.mapper.MonitorAIMapper;
import com.unis.visualization.modular.grainOilReserve.service.MonitorAIService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class MonitorAIServiceImpl implements MonitorAIService {
    @Resource
    private MonitorAIMapper monitorAIMapper;

    @Override
    public Integer selectMonitorCount() {
        return monitorAIMapper.selectMonitorCount();
    }

    @Override
    public Integer selectFaultMonitorCount() {
        return monitorAIMapper.selectFaultMonitorCount();
    }

    @Override
    public Integer selectMonitorProportion() {
        Integer sum = monitorAIMapper.selectMonitorCount();
       Integer sy = monitorAIMapper.selectMonitorProportion();
       Integer proportion =sy/sum *100;
        return proportion;
    }
}
