| | |
| | | import com.fgkj.dao.DAOHelper;
|
| | | import com.fgkj.dao.LimitNumberFactory;
|
| | | import com.fgkj.db.DBUtil;
|
| | | import com.fgkj.dto.BattMap_information;
|
| | | import com.fgkj.dto.Batt_endurance;
|
| | | import com.fgkj.dto.Page;
|
| | | import com.fgkj.dto.User_inf;
|
| | |
| | | }
|
| | | return nums;
|
| | | }
|
| | | //根据机房id查询该机房续航不足的数
|
| | | public int serchxuhangNotInThree_stationid(Object obj) {
|
| | | BattMap_information binformation=(BattMap_information) obj;
|
| | | String sql="select count(distinct tb_batt_endurance.deviceid) as nums from web_site.tb_batt_endurance " +
|
| | | " where endurance_actual_timelong<180 and tb_batt_endurance.stationid=? " ;
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binformation.getStationId()}, new CallBack() {
|
| | | |
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | int nums=rs.getInt("nums");
|
| | | list.add(nums);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | int nums=0;//续航不足3小时数
|
| | | if(list!=null&&list.size()>0){
|
| | | nums=(Integer) list.get(list.size()-1);
|
| | | }
|
| | | return nums;
|
| | | }
|
| | | public List serchByInfo(Object obj) {
|
| | | // TODO Auto-generated method stub
|
| | | return null;
|
| | |
| | | System.out.println(num);
|
| | | }*/
|
| | | //System.out.println(list.size());
|
| | | int nums=bimpl.serchxuhangNotInThree(uinf);
|
| | | /*int nums=bimpl.serchxuhangNotInThree(uinf);
|
| | | System.out.println(nums);*/
|
| | | BattMap_information binformation=new BattMap_information();
|
| | | binformation.setStationId("42000530");
|
| | | int nums=bimpl.serchxuhangNotInThree_stationid(binformation);
|
| | | System.out.println(nums);
|
| | | }
|
| | |
|