81041
2018-11-20 ece08fd739c0a004b4bee932f37c81b81a7acaeb
gx_tieta/src/com/fgkj/services/ram/Bts_station_stateService.java
@@ -4,6 +4,9 @@
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BaseDAOFactory;
import com.fgkj.dao.impl.BattInfImpl;
import com.fgkj.dao.impl.BattPower_offImpl;
import com.fgkj.dao.impl.ram.Bts_station_stateImpl;
import com.fgkj.dto.ServiceModel;
public class Bts_station_stateService {
@@ -28,5 +31,18 @@
      }
      return model;   
   }
   //查询当前机房停电数
   public ServiceModel serchByState(Object obj) {
      int nums=((Bts_station_stateImpl)dao).serchByState(obj);
      model.setNewsum(nums);
      return model;
   }
   //机房断电统计(首页上的饼状图)
    public ServiceModel serchPowerOff(Object obj){
       int powerNum=((Bts_station_stateImpl)dao).serchByState(obj);   //断电实时数
      int devNum=(new BattInfImpl()).serchByDeviceId(obj);      //总设备数
      model.setSum(powerNum);
      model.setNewsum(devNum);
      return model;
    }
}