whyclj
2019-10-29 1c0469e45346d464e0c5672ee68f9ecd4fb6be7c
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
package com.fgkj.services.Ld9;
 
import java.util.List;
 
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BaseDAOFactory;
import com.fgkj.dao.impl.Ld9.BadLd9_monImpl;
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.ServiceModel;
 
public class BadLd9_monService {
     private BaseDAO dao;
     private ServiceModel model;
    
    public BadLd9_monService() {
        dao = BaseDAOFactory.getBaseDAO(BaseDAO.BADLD9_MON);
        model = new ServiceModel();
    }
    
    //查询落后单体总数
    public ServiceModel searchNums(Object obj) {
        int nums= ((BadLd9_monImpl)dao).searchNums(obj);
        model.setSum(nums);
        return model;
    }
    //落后单体查询:根据条件查询落后单体
    public ServiceModel serchByInfo(Object obj) {
        List<Batt_Maint_Dealarm> list=dao.serchByInfo(obj);
        if(list!=null&&list.size()>0){
            model.setData(list);
            model.setCode(1);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
    
}