package com.pqs9000.serviceimpl.report;

import com.pqs9000.mapper.report.GetVoltageMapper;
import com.pqs9000.pojo.report.Condition;
import com.pqs9000.pojo.report.ReportValue;
import com.pqs9000.service.report.GetVoltage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GetVoltageImpl implements GetVoltage {
    @Autowired
    private GetVoltageMapper getVoltageMapper;

    @Override
    public List<ReportValue> getVoltageData(Condition condition) {
        List<ReportValue> list = getVoltageMapper.getVoltageData(condition);
        RegroupData.regroupData(list, true);

        return list;
    }
}
