| | |
| | | });
|
| | | return list;
|
| | | }
|
| | | //导航上续航不足3小时的个数
|
| | | public int serchxuhangNotInThree(Object obj) {
|
| | | User_inf uinf=(User_inf) 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 in (" +
|
| | | " select distinct db_battinf.tb_battinf.stationid " +
|
| | | " from db_battinf.tb_battinf " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " where db_user.tb_user_inf.uid=? and db_battinf.tb_battinf.station_install=1) " ;
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId()}, 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;
|
| | |
| | |
|
| | | User_inf uinf=new User_inf();
|
| | | uinf.setUId(1002);
|
| | | List<Integer> list=bimpl.serchByState_xuhang(uinf);
|
| | | /*List<Integer> list=bimpl.serchByState_xuhang(uinf);
|
| | | for (int num : list) {
|
| | | System.out.println(num);
|
| | | }
|
| | | }*/
|
| | | //System.out.println(list.size());
|
| | | int nums=bimpl.serchxuhangNotInThree(uinf);
|
| | | System.out.println(nums);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|