From 51e7ebffeec98f76fcc8c5c33a4b4f526c50a309 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期四, 06 十二月 2018 16:28:12 +0800
Subject: [PATCH] 后台修改图标

---
 gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java |   44 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java
index e8d8225..dff7238 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java
@@ -51,7 +51,7 @@
 		Connection conn=DBUtil.getConn();
 		String numberSql="SELECT FOUND_ROWS() number";//瀛樻斁鎬绘暟
 		String sql="select SQL_CALC_FOUND_ROWS distinct station_id,dev_id,record_datetime,station_stat,station_poff_start_time,station_fadian_start_time" +
-				   " ,station_diaozhan_start_time,station_temp,station_damp,station_dooropen_start_time,station_xuhang_start_time" +
+				   " ,station_diaozhan_start_time,station_temp,station_damp,station_dooropen_start_time,station_xuhang_start_time,station_xuhang_end_time" +
 				   " ,tb_battinf.stationname,tb_battinf.stationname1,tb_battinf.stationname2,tb_battinf.stationname3,tb_battinf.stationname5 " +
 				   " from db_ram_db.tb_bts_station_state,db_battinf.tb_battinf  " +
 				   " where  tb_bts_station_state.dev_id=db_battinf.tb_battinf.FBSDeviceId  " +
@@ -154,6 +154,7 @@
 						b.setStation_damp(rs.getFloat("station_damp"));
 						b.setStation_dooropen_start_time(rs.getTimestamp("station_dooropen_start_time"));
 						b.setStation_xuhang_start_time(rs.getTimestamp("station_xuhang_start_time"));
+						b.setStation_xuhang_end_time(rs.getTimestamp("station_xuhang_end_time"));
 						b.setStationName(rs.getString("stationName"));
 						b.setStationName1(rs.getString("stationName1"));
 						b.setStationName2(rs.getString("stationName2"));
@@ -263,6 +264,35 @@
 		}
 		return nums;
 	}
+	//鏌ヨ鍏蜂綋鏌愭満鎴挎帀绔欐暟(鏍规嵁station_id )
+	public int serchByStationId_diaozhan(Object obj) {
+		BattMap_information binformation=(BattMap_information) obj;
+		String sql="select count(num) as nums  from db_ram_db.tb_bts_station_state " +
+				" where  station_stat&32>1   " +
+				" and station_id=?  " +
+				" limit 1 ";
+		//System.out.println(sql);
+		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) {
+					e.printStackTrace();
+				}
+				return list;
+			}
+		});
+		int nums=0;//鏈�鍚庣殑缁撴灉
+		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;
@@ -274,8 +304,9 @@
 		binf.setStationName1("");
 		binf.setStationName2("");
 		binf.setStationName3("");
+		binf.setStationName5("");
 		binf.setStationId("");
-		binf.setBattGroupNum(36);
+		binf.setBattGroupNum(62);
 		User_inf uinf=new User_inf();
 		uinf.setUId(1002);
 		Page p=new Page();
@@ -287,12 +318,17 @@
 			//System.out.println(bs.getStation_stat_diaozhan()+"  "+bs.getStation_stat_dooropen()+"  "+bs.getStation_stat_fadian()+"   "+bs.getStation_stat_xuhang()+"  "+bs.getStation_stat_poff());
 		    System.out.println(bs);
 		}
-		int nums=bimpl.serchByState(uinf);
+		//System.out.println(list.size());
+		//int nums=bimpl.serchByState(uinf);
 		/*BattMap_information bm=new BattMap_information();
 		bm.setStationId("42000570");
 		int nums=bimpl.serchByStationId(bm);*/
 		//int nums=bimpl.serchByState_diaozhan(uinf);
-		System.out.println(nums);
+		/*BattMap_information bm=new BattMap_information();
+		bm.setStationId("42000366");
+		int nums=bimpl.serchByStationId_diaozhan(bm);
+		
+		System.out.println(nums);*/
 	}
 
 	

--
Gitblit v1.9.1