package com.whyc.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.whyc.dto.Response; import com.whyc.mapper.BattLithiumRtDataMapper; import com.whyc.pojo.db_lithium_ram_db.BattLithiumRtData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class BattLithiumRtDataService { @Autowired(required = false) private BattLithiumRtDataMapper mapper; //获取a200电池组数据 public Response getA200RtDataState(int devId) { QueryWrapper wrapper=new QueryWrapper(); wrapper.eq("dev_id",devId); wrapper.orderByAsc("batt_idx"); wrapper.orderByAsc("mon_num"); List list=mapper.selectList(wrapper); return new Response().setII(1,list!=null,list,"获取电池组数据"); } //获取actm电池组数据 public Response getActmRtdataState(int devId,Integer index) { QueryWrapper wrapper=new QueryWrapper(); wrapper.eq("dev_id",devId); wrapper.eq("batt_idx",index); wrapper.orderByAsc("batt_idx"); wrapper.orderByAsc("mon_num"); List list=mapper.selectList(wrapper); return new Response().setII(1,list!=null,list,"获取电池组数据"); } }