whyclxw
2025-05-29 3f2c786d82463b073eb8ba83553fdcc67131cb89
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.mapper.BattresdataInfMapper;
import com.whyc.pojo.db_batt_testdata.BattresdataInf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
@Service
public class BattresdataInfService {
    @Autowired(required = false)
    private BattresdataInfMapper mapper;
    //上一次内阻测试数据
    public BattresdataInf getLastTestData(Integer battgroupId) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("battgroup_id", battgroupId);
        wrapper.last(" limit 1");
        wrapper.last(" ORDER BY test_starttime DESC ");
        BattresdataInf rinf = mapper.selectOne(wrapper);
        return rinf;
    }
}