whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
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
40
41
42
43
44
package com.fgkj.services.Ld9;
 
import com.fgkj.dto.Ld9testdata_inf;
import com.fgkj.dto.ServiceModel;
import com.fgkj.mapper.impl.Ld9.Ld9testdata_infMapper;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
@Service
public class Ld9testdata_infService {
 
    @Resource
    private Ld9testdata_infMapper mapper;
 
    //历史数据查询
    public ServiceModel serchByCondition(Ld9testdata_inf ld9_inf) {
        ServiceModel model = new ServiceModel();
        List list=mapper.serchByCondition(ld9_inf);
        if(list!=null&&list.size()>0){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
    //历史数据查询(根据电池组id查询所有的放电单体)
    public ServiceModel serchByInfo(Ld9testdata_inf ld9_inf) {
        ServiceModel model = new ServiceModel();
        List list=mapper.serchByInfo(ld9_inf);
        if(list!=null&&list.size()>0){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
}