whycxzp
2025-05-26 e7bd17e3a9377b0a513ff9e11f14c7b7dc7c383e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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<BattLithiumRtData> 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<BattLithiumRtData> list=mapper.selectList(wrapper);
        return new Response().setII(1,list!=null,list,"获取电池组数据");
    }
}