81041
2018-11-21 50114c2feb0ae955bfaf1da8ce7be62344ebc110
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,20 @@
      }
      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 dianzhanNum=((Bts_station_stateImpl)dao).serchByState_diaozhan(obj);   //掉站实时数
      int devNum=(new BattInfImpl()).serchByDeviceId(obj);      //总设备数
      model.setSum(powerNum);
      model.setNewsum(devNum);
      model.setCode(dianzhanNum);
      return model;
    }
}