package com.fgkj.services.bts61850; import java.util.List; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.BaseDAOFactory; import com.fgkj.dto.BTS_61850_state; import com.fgkj.dto.ServiceModel; public class BTS_61850_stateService { private BaseDAO dao; private ServiceModel model; public BTS_61850_stateService() { super(); this.dao =BaseDAOFactory.getBaseDAO(BaseDAO.BTS_61850_STATE); this.model = new ServiceModel(); } //查询所有BTS_61850_STATE设备的事实数据 public ServiceModel searchAll() { List list=dao.searchAll(); if(list!=null&&list.size()>0){ model.setCode(1); model.setData(list); model.setMsg("查询成功!"); }else{ model.setCode(0); model.setMsg("查询失败!"); } return model; } //11.1BTS_61850_STATE设备通信状态查询 public ServiceModel serchByCondition(Object obj){ BTS_61850_state bts=(BTS_61850_state) obj; //BTS_61850_STATE数据 List list = dao.serchByCondition(bts); if(list!=null && list.size()>0){ model.setCode(1); model.setData(list); }else{ model.setCode(0); model.setMsg("查询失败!"); } return model; } }