whyclj
2020-07-22 a5729100cb1eaa3584b3a194e46e1b8b52b3ed1a
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
45
46
47
48
49
50
51
52
53
package com.fgkj.services;
 
import java.util.List;
 
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BaseDAOFactory;
import com.fgkj.dao.impl.Batt_enduranceImpl;
import com.fgkj.dto.ServiceModel;
 
public class Batt_enduranceService {
    private BaseDAO dao;
    private ServiceModel model;
    
    public Batt_enduranceService() {
        super();
        dao =BaseDAOFactory.getBaseDAO(BaseDAO.BATT_ENDURANCE);
        model = new ServiceModel();
    }
    //续航时间的查询
    public ServiceModel serchByCondition(Object obj) {
        List list=dao.serchByCondition(obj);
        if(list.size()>0&&list!=null){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
    //续航不足1小时,2小时等的饼状图
    public ServiceModel serchByState_xuhang(Object obj) {
        List list=((Batt_enduranceImpl)dao).serchByState_xuhang(obj);
        if(list.size()>0&&list!=null){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
    //导航上续航不足3小时的个数
    public ServiceModel serchxuhangNotInThree(Object obj) {
        int nums=((Batt_enduranceImpl)dao).serchxuhangNotInThree(obj);
        model.setMsg("查询成功!");
        model.setSum(nums);
        return model;
    }
 
}