From 48baf25f530fc9c51a194230959f674939fbf3b1 Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.25>
Date: 星期二, 13 十一月 2018 13:18:17 +0800
Subject: [PATCH] 升级页面实时刷新

---
 gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java |  431 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 313 insertions(+), 118 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index d160367..5c22148 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -30,6 +30,7 @@
 import com.fgkj.dto.Batt_Maint_Dealarm;
 import com.fgkj.dto.Batt_maint_inf;
 import com.fgkj.dto.Batt_maintenance_inf;
+import com.fgkj.dto.Battinf_ex;
 import com.fgkj.dto.Batttestdata;
 import com.fgkj.dto.Batttestdata_inf;
 import com.fgkj.dto.Batttestdatastop;
@@ -41,6 +42,7 @@
 import com.fgkj.dto.User_log;
 import com.fgkj.dto.User_task_batt_template;
 import com.fgkj.services.User_logService;
+import com.sun.org.apache.bcel.internal.generic.LSTORE;
 
 public class BattInfImpl implements BaseDAO, CallBack {
 	//娣诲姞鏂扮殑鐢垫睜缁�(澶氫釜)
@@ -387,11 +389,11 @@
 		return list;
 	}
 	
-	//5.3娣诲姞閫夊彇鐢垫睜缁勬垨鑰呮満鎴挎垨鑰呯淮鎶ゅ尯
+	//5.3娣诲姞閫夊彇鐢垫睜缁勬垨鑰呮満鎴挎垨鑰呯淮鎶ゅ尯鎴栬�呭叏鍖哄幙
 	public List serchBatt(Object obj) {
 		BattInf binf=(BattInf) obj;
 		String sql="";
-		String baseSql="select distinct(battgroupid),stationid,stationname,stationname1,battgroupname from db_battinf.tb_battinf " +
+		String baseSql="select distinct(battgroupid),stationid,stationname,stationname1,stationname2,stationname5,battgroupname from db_battinf.tb_battinf " +
 				"where ";
 		 //鐢ㄤ簬缁存姢鍖�
 		String station1SqlT=" stationname1!=? ";//鍏ㄩ儴
@@ -408,6 +410,14 @@
 			baseSql+=station2SqlT;
 		}else{
 			baseSql+=station2SqlF;
+		}
+		//鐢ㄤ簬鍖哄幙
+		String station5SqlT=" and stationname5!=? ";//鍏ㄩ儴
+		String station5SqlF=" and stationname5=? ";
+		if(binf.getStationName5().equals("")){
+			baseSql+=station5SqlT;
+		}else{
+			baseSql+=station5SqlF;
 		}
 		//鐢ㄤ簬鏈烘埧绔欑偣
 		String stationSqlT=" and stationname!=? ";//鍏ㄩ儴
@@ -428,7 +438,7 @@
 		String endSql=" order by stationid ";
 		sql=baseSql+endSql;
 		//System.out.println(sql);
-		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationName1(),binf.getStationName2(),binf.getStationName(),binf.getBattGroupId()}, new CallBack() {
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationName1(),binf.getStationName2(),binf.getStationName5(),binf.getStationName(),binf.getBattGroupId()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List list=new ArrayList();
@@ -439,6 +449,8 @@
 					binf.setStationId(rs.getString("StationId"));
 					binf.setStationName(rs.getString("stationName"));
 					binf.setStationName1(rs.getString("stationName1"));
+					binf.setStationName2(rs.getString("stationName2"));
+					binf.setStationName5(rs.getString("stationName5"));
 					binf.setBattGroupName(rs.getString("battGroupName"));
 					list.add(binf);
 					}
@@ -1057,104 +1069,106 @@
 			
 			public List getResults(ResultSet rs) { List list = new ArrayList();
 			  try {
-				  while (rs.next()) { BattInf batt = new BattInf();
-				  
-				  batt.setNum(Integer.parseInt(rs.getString("num")));
-				  
-				  batt.setStationId((rs.getString("StationId")));
-				  
-				  batt.setStationName(rs.getString("StationName"));
-				  
-				  batt.setStationName1(rs.getString("StationName1"));
-				  
-				  batt.setStationName2(rs.getString("StationName2"));
-				  
-				  batt.setStationName3(rs.getString("StationName3"));
-				  
-				  batt.setStationName4(rs.getString("StationName4"));
-				  
-				  batt.setStationName5(rs.getString("StationName5"));
-				  
-				  batt.setStationName6(rs.getString("StationName6"));
-				  
-				  batt.setStationName7(rs.getString("StationName7"));
-				  
-				  batt.setStationName8(rs.getString("StationName8"));
-				  
-				  batt.setStationName9(rs.getString("StationName9"));
-				  
-				  batt.setStationIp(rs.getString("StationIp"));
-				  
-				  batt.setFBSDeviceId(Integer.parseInt(rs.getString("FBSDeviceId")));
-				  
-				  batt.setFbsDeviceIp(rs.getString("FbsDeviceIp"));
-				  
-				  batt.setFBSDeviceName(rs.getString("FBSDeviceName"));
-				  
-				  batt.setGroupIndexInFBSDevice(Integer.parseInt(rs.getString(
-				  "GroupIndexInFBSDevice")));
-				  
-				  batt.setBattModel(rs.getString("BattModel"));
-				  
-				  batt.setBattGroupId(Integer.parseInt(rs.getString("BattGroupId")));
-				  
-				  batt.setBattGroupNum(Integer.parseInt(rs.getString("BattGroupNum")));
-				  
-				  batt.setBattGroupName(rs.getString("BattGroupName"));
-				  
-				  batt.setBattGroupName1(rs.getString("BattGroupName1"));
-				 
-				  batt.setBattGroupName2(rs.getString("BattGroupName2"));
-				  
-				  batt.setBattGroupName3(rs.getString("BattGroupName3"));
-				  
-				  batt.setBattGroupName4(rs.getString("BattGroupName4"));
-				  
-				  batt.setBattGroupName5(rs.getString("BattGroupName5"));
-				  
-				  batt.setBattGroupName6(rs.getString("BattGroupName6"));
-				  
-				  batt.setFloatVolLevel(Float.parseFloat(rs.getString("FloatVolLevel")));
-				  
-				  batt.setOfflineVolLevel(Float.parseFloat(rs.getString("OfflineVolLevel"))) ;
-				 
-				  batt.setBattFloatCurrent(Float.parseFloat(rs.getString("BattFloatCurrent")));
-				  
-				  batt.setDeviceId(rs.getString("DeviceId"));
-				  
-				  batt.setDeviceName(rs.getString("DeviceName"));
-				  
-				  batt.setMonCount(Integer.parseInt(rs.getString("MonCount")));
-				  
-				  batt.setMonCapStd(Float.parseFloat(rs.getString("MonCapStd")));
-				  
-				  batt.setMonResStd(Float.parseFloat(rs.getString("MonResStd")));
-				 
-				  batt.setMonSerStd(Float.parseFloat(rs.getString("MonSerStd")));
-				  
-				  batt.setMonTmpStd(Float.parseFloat(rs.getString("MonTmpStd")));
-				  
-				  batt.setMonVolStd(Float.parseFloat(rs.getString("MonVolStd")));
-				  
-				  batt.setMonVolLowToAvg(Float.parseFloat(rs.getString("MonVolLowToAvg")));
-				  
-				  batt.setMonNum(Integer.parseInt(rs.getString("MonNum")));
-				  
-				  batt.setBattProducer(rs.getString("BattProducer"));
-				  
-				  batt.setBattProductDate((Date) rs.getObject("BattProductDate"));
-				  
-				  batt.setBattInUseDate((Date) rs.getObject("BattInUseDate"));
-				  
-				  batt.setSignalId(rs.getString("SignalId"));
-				  
-				  batt.setCInterFaceId(Integer.parseInt(rs.getString("CInterFaceId")));
-				  
-				  batt.setSignalName(rs.getString("SignalName"));
-				  int BattGuarantDayCount=rs.getInt("BattGuarantDayCount")-ActionUtil.daysBetween(rs.getDate("BattInUseDate"), new Date());//鍓╀綑淇濅慨澶╂暟
-				  batt.setBattGuarantDayCount(BattGuarantDayCount);
-					
-				  list.add(batt); } } catch (SQLException e) { e.printStackTrace(); }
+				  while (rs.next()) { 
+					  BattInf batt = new BattInf();
+					  
+					  batt.setNum(Integer.parseInt(rs.getString("num")));
+					  
+					  batt.setStationId((rs.getString("StationId")));
+					  
+					  batt.setStationName(rs.getString("StationName"));
+					  
+					  batt.setStationName1(rs.getString("StationName1"));
+					  
+					  batt.setStationName2(rs.getString("StationName2"));
+					  
+					  batt.setStationName3(rs.getString("StationName3"));
+					  
+					  batt.setStationName4(rs.getString("StationName4"));
+					  
+					  batt.setStationName5(rs.getString("StationName5"));
+					  
+					  batt.setStationName6(rs.getString("StationName6"));
+					  
+					  batt.setStationName7(rs.getString("StationName7"));
+					  
+					  batt.setStationName8(rs.getString("StationName8"));
+					  
+					  batt.setStationName9(rs.getString("StationName9"));
+					  
+					  batt.setStationIp(rs.getString("StationIp"));
+					  
+					  batt.setFBSDeviceId(Integer.parseInt(rs.getString("FBSDeviceId")));
+					  
+					  batt.setFbsDeviceIp(rs.getString("FbsDeviceIp"));
+					  
+					  batt.setFBSDeviceName(rs.getString("FBSDeviceName"));
+					  
+					  batt.setGroupIndexInFBSDevice(Integer.parseInt(rs.getString(
+					  "GroupIndexInFBSDevice")));
+					  
+					  batt.setBattModel(rs.getString("BattModel"));
+					  
+					  batt.setBattGroupId(Integer.parseInt(rs.getString("BattGroupId")));
+					  
+					  batt.setBattGroupNum(Integer.parseInt(rs.getString("BattGroupNum")));
+					  
+					  batt.setBattGroupName(rs.getString("BattGroupName"));
+					  
+					  batt.setBattGroupName1(rs.getString("BattGroupName1"));
+					 
+					  batt.setBattGroupName2(rs.getString("BattGroupName2"));
+					  
+					  batt.setBattGroupName3(rs.getString("BattGroupName3"));
+					  
+					  batt.setBattGroupName4(rs.getString("BattGroupName4"));
+					  
+					  batt.setBattGroupName5(rs.getString("BattGroupName5"));
+					  
+					  batt.setBattGroupName6(rs.getString("BattGroupName6"));
+					  
+					  batt.setFloatVolLevel(Float.parseFloat(rs.getString("FloatVolLevel")));
+					  
+					  batt.setOfflineVolLevel(Float.parseFloat(rs.getString("OfflineVolLevel"))) ;
+					 
+					  batt.setBattFloatCurrent(Float.parseFloat(rs.getString("BattFloatCurrent")));
+					  
+					  batt.setDeviceId(rs.getString("DeviceId"));
+					  
+					  batt.setDeviceName(rs.getString("DeviceName"));
+					  
+					  batt.setMonCount(Integer.parseInt(rs.getString("MonCount")));
+					  
+					  batt.setMonCapStd(Float.parseFloat(rs.getString("MonCapStd")));
+					  
+					  batt.setMonResStd(Float.parseFloat(rs.getString("MonResStd")));
+					 
+					  batt.setMonSerStd(Float.parseFloat(rs.getString("MonSerStd")));
+					  
+					  batt.setMonTmpStd(Float.parseFloat(rs.getString("MonTmpStd")));
+					  
+					  batt.setMonVolStd(Float.parseFloat(rs.getString("MonVolStd")));
+					  
+					  batt.setMonVolLowToAvg(Float.parseFloat(rs.getString("MonVolLowToAvg")));
+					  
+					  batt.setMonNum(Integer.parseInt(rs.getString("MonNum")));
+					  
+					  batt.setBattProducer(rs.getString("BattProducer"));
+					  
+					  batt.setBattProductDate((Date) rs.getObject("BattProductDate"));
+					  
+					  batt.setBattInUseDate((Date) rs.getObject("BattInUseDate"));
+					  
+					  batt.setSignalId(rs.getString("SignalId"));
+					  
+					  batt.setCInterFaceId(Integer.parseInt(rs.getString("CInterFaceId")));
+					  
+					  batt.setSignalName(rs.getString("SignalName"));
+					  int BattGuarantDayCount=rs.getInt("BattGuarantDayCount")-ActionUtil.daysBetween(rs.getDate("BattInUseDate"), new Date());//鍓╀綑淇濅慨澶╂暟
+					  batt.setBattGuarantDayCount(BattGuarantDayCount);
+						
+					  list.add(batt); 
+				  } } catch (SQLException e) { e.printStackTrace(); }
 				  return list; }
 
 		});
@@ -1668,7 +1682,7 @@
 		Connection conn=DBUtil.getConn();
 		String numberSql=" SELECT FOUND_ROWS() number";
 		String sql="";
-		String baseSql=" select SQL_CALC_FOUND_ROWS distinct(db_battinf.tb_battinf.BattgroupId),db_battinf.tb_battinf.stationid,StationName1,StationName,stationip,BattGroupName,BattGroupName1,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate " +
+		String baseSql=" select SQL_CALC_FOUND_ROWS distinct(db_battinf.tb_battinf.BattgroupId),db_battinf.tb_battinf.stationid,StationName1,StationName2,StationName5,StationName,stationip,BattGroupName,BattGroupName1,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate " +
 			       " from  db_battinf.tb_battinf " +
 			       " where  ";
 		//閫夊彇钃勭數姹犵粍鏉′欢
@@ -1686,7 +1700,7 @@
 				" and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id  " +
 				" and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid  " +
 				" and db_user.tb_user_inf.uid=? " +
-		        " and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ? and db_battinf.tb_battinf.stationname2 like ?)";
+		        " and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ? and db_battinf.tb_battinf.stationname2 like ? and db_battinf.tb_battinf.stationname5 like ?) ";
 		baseSql+=userSql;
 		//鎺掑簭
 		String endSql=" order by db_battinf.tb_battinf.battgroupid asc ";
@@ -1696,7 +1710,7 @@
 		sql=baseSql+endSql+limitSql;
 		//System.out.println(sql);
         List<BattInf> list=DAOHelper.executeQueryLimit(sql,conn, new Object[]{
-			binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%","%"+binf.getStationName2()+"%",
+			binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%",  
 			(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
@@ -1708,6 +1722,8 @@
 						binf.setBattGroupId(rs.getInt("battGroupId"));
 						binf.setStationId(rs.getString("stationId"));
 						binf.setStationName1(rs.getString("stationName1"));
+						binf.setStationName2(rs.getString("stationName2"));
+						binf.setStationName5(rs.getString("stationName5"));
 						binf.setStationName(rs.getString("stationName"));
 						binf.setStationIp(rs.getString("stationIp"));
 						binf.setBattGroupName(rs.getString("battGroupName"));
@@ -1887,7 +1903,7 @@
 			Page page =bmd.getPage();
 			Batttestdata_inf tinf=bmd.getTdata();
 			String sql="";
-			String baseSql=" select  distinct(db_battinf.tb_battinf.BattgroupId),StationName1,StationName,stationip,BattGroupName,BattGroupName1,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate " +
+			String baseSql=" select  distinct(db_battinf.tb_battinf.BattgroupId),StationName1,StationName2,StationName5,StationName,stationip,BattGroupName,BattGroupName1,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate " +
 				       " ,db_batt_testdata.tb_batttestdata_inf.test_record_count,test_starttime " +
 				       "from  db_battinf.tb_battinf,db_batt_testdata.tb_batttestdata_inf " +
 				       " where db_battinf.tb_battinf.battgroupid=db_batt_testdata.tb_batttestdata_inf.battgroupid " +
@@ -1907,7 +1923,7 @@
 				" and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id  " +
 				" and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid  " +
 				" and db_user.tb_user_inf.uid=? " +
-			    " and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ? and db_battinf.tb_battinf.stationname2 like ?)";
+			    " and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ? and db_battinf.tb_battinf.stationname2 like ? and db_battinf.tb_battinf.stationname5 like ?)";
 			baseSql+=userSql;
 			//鍏呯數鏀剧數閫夋嫨
 			String test_typeA="";//鍏ㄩ儴
@@ -1943,7 +1959,7 @@
 			//System.out.println(sql);
 	     	List<BattInf> list=DAOHelper.executeQuery(sql,DBUtil.getConn(), new Object[]{
 				tinf.getRecord_time(),tinf.getRecord_time1()
-				,binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%","%"+binf.getStationName2()+"%"
+				,binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%"
 				}, new CallBack() {
 				
 				public List getResults(ResultSet rs) {
@@ -1954,6 +1970,8 @@
 							BattInf binf=new BattInf();
 							binf.setBattGroupId(rs.getInt("battGroupId"));
 							binf.setStationName1(rs.getString("stationName1"));
+							binf.setStationName2(rs.getString("stationName2"));
+							binf.setStationName2(rs.getString("stationName5"));
 							binf.setStationName(rs.getString("stationName"));
 							binf.setStationIp(rs.getString("stationIp"));
 							binf.setBattGroupName(rs.getString("battGroupName"));
@@ -3448,7 +3466,7 @@
 				" FROM db_battinf.tb_battinf " +
 				" where StationName1 like ? and StationName2 like ?  " +
 				" ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
-		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List list=new ArrayList();
@@ -3738,12 +3756,12 @@
 	//鐢垫睜閰嶇粍绠$悊(閲嶈)
 	public List serchMakeGroup(Object obj){
 		BattInf binf=(BattInf) obj;
-		String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount " +
+		String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname5,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount " +
 				" ,battinf_re.old_stationname,old_battgroupname,old_battproducer,old_stationid,old_battgroupid,old_monum,new_stationname,new_battgroupname,new_battproducer,new_stationid,new_battgroupid,new_monum,rebuild_time,rebuild_uid,rebuild_address,rebuild_clear_type " +
 				" from db_battinf.tb_battinf " +
 				" left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
 				" on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
-				" where stationname2 like ?  ";
+				" where stationname2 like ?  and stationname5 like ?  ";
 		//鐢ㄦ埛绠$悊
 		String userSql=" and StationId in(" +
 				" select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id  and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
@@ -3757,7 +3775,7 @@
 		}else{
 			sql+=producerSqlF;
 		}
-		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%",binf.getNum()}, new CallBack() {
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%",binf.getNum()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List<BattInf> list=new ArrayList();
@@ -3772,6 +3790,7 @@
 						binf.setStationName1(rs.getString("stationName1"));
 						binf.setStationName2(rs.getString("stationName2"));
 						binf.setStationName3(rs.getString("stationName3"));
+						binf.setStationName5(rs.getString("stationName5"));
 						binf.setBattProducer(rs.getString("battProducer"));
 						binf.setMonVolStd(rs.getFloat("monVolStd"));
 						binf.setMonCapStd(rs.getFloat("monCapStd"));
@@ -3818,18 +3837,18 @@
 	//鐢垫睜閰嶇粍绠$悊(閲嶈)
 	public List serchGroupByInfor(Object obj){
 		BattInf binf=(BattInf) obj;
-		String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount " +
+		String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname,stationname3,stationname5,BattProducer,MonVolStd,MonCapStd,monCount " +
 				" ,battinf_re.old_stationname,old_battgroupname,old_battproducer,old_stationid,old_battgroupid,old_monum,new_stationname,new_battgroupname,new_battproducer,new_stationid,new_battgroupid,new_monum,rebuild_time,rebuild_uid,rebuild_address,rebuild_clear_type " +
 				" from db_battinf.tb_battinf " +
 				" left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
 				" on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
-				" where stationname1 like ? and stationname2 like ? and stationname3 like ?  and battgroupname like ?  and battgroupid=? ";
+				" where stationname1 like ? and stationname2 like ? and stationname3 like ?  and stationname5 like ? and battgroupname like ?  and battgroupid=? ";
 		//鐢ㄦ埛绠$悊
 		String userSql=" and StationId in(" +
 				" select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id  and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
 				" ) ";
 		sql+=userSql;
-		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId(),binf.getNum()}, new CallBack() {
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationName5()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId(),binf.getNum()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List<BattInf> list=new ArrayList();
@@ -3844,6 +3863,7 @@
 						binf.setStationName1(rs.getString("stationName1"));
 						binf.setStationName2(rs.getString("stationName2"));
 						binf.setStationName3(rs.getString("stationName3"));
+						binf.setStationName5(rs.getString("stationName5"));
 						binf.setBattProducer(rs.getString("battProducer"));
 						binf.setMonVolStd(rs.getFloat("monVolStd"));
 						binf.setMonCapStd(rs.getFloat("monCapStd"));
@@ -3887,7 +3907,180 @@
 		});
 		return list;
 	}
-	
+	//棣栭〉涓婃牴鎹畇tationid鏌ヨ鐢垫睜缁勭殑鏈哄巻鍗�
+	public List serchBattAllInfoByStationId(Object obj){
+		BattInf binf=(BattInf) obj;
+		String sql="select * from db_battinf.tb_battinf,db_battinf.tb_battinf_ex " +
+				" where db_battinf.tb_battinf.stationId=db_battinf.tb_battinf_ex.stationid " +
+				" and db_battinf.tb_battinf.stationId=? " +
+				" order by db_battinf.tb_battinf.battgroupid";
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationId()}, new CallBack() {
+			
+			public List getResults(ResultSet rs) {
+				List list=new ArrayList();
+				try {
+					while(rs.next()){
+						  BattInf batt = new BattInf();
+						  
+						  batt.setStationId((rs.getString("StationId")));
+						  
+						  batt.setStationName(rs.getString("StationName"));
+						  
+						  batt.setStationName1(rs.getString("StationName1"));
+						  
+						  batt.setStationName2(rs.getString("StationName2"));
+						  
+						  batt.setStationName3(rs.getString("StationName3"));
+						  
+						  batt.setStationName4(rs.getString("StationName4"));
+						  
+						  batt.setStationName5(rs.getString("StationName5"));
+						  
+						  batt.setStationName6(rs.getString("StationName6"));
+						  
+						  batt.setStationName7(rs.getString("StationName7"));
+						  
+						  batt.setStationName8(rs.getString("StationName8"));
+						  
+						  batt.setStationName9(rs.getString("StationName9"));
+						  
+						  batt.setStationIp(rs.getString("StationIp"));
+						  
+						  batt.setFBSDeviceId(Integer.parseInt(rs.getString("FBSDeviceId")));
+						  
+						  batt.setFbsDeviceIp(rs.getString("FbsDeviceIp"));
+						  
+						  batt.setFBSDeviceName(rs.getString("FBSDeviceName"));
+						  
+						  batt.setGroupIndexInFBSDevice(Integer.parseInt(rs.getString(
+						  "GroupIndexInFBSDevice")));
+						  
+						  batt.setBattModel(rs.getString("BattModel"));
+						  
+						  batt.setBattGroupId(Integer.parseInt(rs.getString("BattGroupId")));
+						  
+						  batt.setBattGroupNum(Integer.parseInt(rs.getString("BattGroupNum")));
+						  
+						  batt.setBattGroupName(rs.getString("BattGroupName"));
+						  
+						  batt.setBattGroupName1(rs.getString("BattGroupName1"));
+						 
+						  batt.setBattGroupName2(rs.getString("BattGroupName2"));
+						  
+						  batt.setBattGroupName3(rs.getString("BattGroupName3"));
+						  
+						  batt.setBattGroupName4(rs.getString("BattGroupName4"));
+						  
+						  batt.setBattGroupName5(rs.getString("BattGroupName5"));
+						  
+						  batt.setBattGroupName6(rs.getString("BattGroupName6"));
+						  
+						  batt.setFloatVolLevel(Float.parseFloat(rs.getString("FloatVolLevel")));
+						  
+						  batt.setOfflineVolLevel(Float.parseFloat(rs.getString("OfflineVolLevel"))) ;
+						 
+						  batt.setBattFloatCurrent(Float.parseFloat(rs.getString("BattFloatCurrent")));
+						  
+						  batt.setDeviceId(rs.getString("DeviceId"));
+						  
+						  batt.setDeviceName(rs.getString("DeviceName"));
+						  
+						  batt.setMonCount(Integer.parseInt(rs.getString("MonCount")));
+						  
+						  batt.setMonCapStd(Float.parseFloat(rs.getString("MonCapStd")));
+						  
+						  batt.setMonResStd(Float.parseFloat(rs.getString("MonResStd")));
+						 
+						  batt.setMonSerStd(Float.parseFloat(rs.getString("MonSerStd")));
+						  
+						  batt.setMonTmpStd(Float.parseFloat(rs.getString("MonTmpStd")));
+						  
+						  batt.setMonVolStd(Float.parseFloat(rs.getString("MonVolStd")));
+						  
+						  batt.setMonVolLowToAvg(Float.parseFloat(rs.getString("MonVolLowToAvg")));
+						  
+						  batt.setMonNum(Integer.parseInt(rs.getString("MonNum")));
+						  
+						  batt.setBattProducer(rs.getString("BattProducer"));
+						  
+						  batt.setBattProductDate((Date) rs.getObject("BattProductDate"));
+						  
+						  batt.setBattInUseDate((Date) rs.getObject("BattInUseDate"));
+						  
+						  batt.setSignalId(rs.getString("SignalId"));
+						  
+						  batt.setCInterFaceId(Integer.parseInt(rs.getString("CInterFaceId")));
+						  
+						  batt.setSignalName(rs.getString("SignalName"));
+						  int BattGuarantDayCount=rs.getInt("BattGuarantDayCount")-ActionUtil.daysBetween(rs.getDate("BattInUseDate"), new Date());//鍓╀綑淇濅慨澶╂暟
+						  batt.setBattGuarantDayCount(BattGuarantDayCount);
+						  
+						  Battinf_ex binf_ex=new Battinf_ex();
+							binf_ex.setStationId(rs.getString("stationId"));
+							binf_ex.setFBSDeviceId(rs.getInt("fBSDeviceId"));
+							binf_ex.setStationName(rs.getString("stationName"));
+							binf_ex.setStationCode(rs.getString("stationCode"));
+							binf_ex.setStationRegion(rs.getString("stationRegion"));
+							binf_ex.setKeyWords(rs.getString("keyWords"));
+							binf_ex.setAffiliation(rs.getString("affiliation"));
+							binf_ex.setDataSources(rs.getString("dataSources"));
+							binf_ex.setStationType(rs.getString("stationType"));
+							binf_ex.setLongitude(rs.getDouble("longitude"));
+							binf_ex.setLatitude(rs.getInt("latitude"));
+							binf_ex.setStationAddr(rs.getString("stationAddr"));
+							binf_ex.setStationLevel(rs.getString("stationLevel"));
+							binf_ex.setMaintenanceState(rs.getString("maintenanceState"));
+							binf_ex.setBlockedState(rs.getString("blockedState"));
+							binf_ex.setMaintenanceCompany(rs.getString("maintenanceCompany"));
+							binf_ex.setBusinessScenario(rs.getString("businessScenario"));
+							binf_ex.setCoverScenario(rs.getString("coverScenario"));
+							binf_ex.setSiteTerrain(rs.getString("siteTerrain"));
+							binf_ex.setPropertyRights(rs.getString("propertyRights"));
+							binf_ex.setPropertyUnit(rs.getString("propertyUnit"));
+							binf_ex.setIsShare(rs.getString("isShare"));
+							binf_ex.setUseUnit(rs.getString("useUnit"));
+							binf_ex.setSiteCode(rs.getString("siteCode"));
+							binf_ex.setHistorySiteCode(rs.getString("historySiteCode"));
+							binf_ex.setSiteInternalNumber(rs.getString("siteInternalNumber"));
+							binf_ex.setSitePinyinReferred(rs.getString("sitePinyinReferred"));
+							binf_ex.setSiteChineseReferred(rs.getString("siteChineseReferred"));
+							binf_ex.setSiteMergeRecord(rs.getString("siteMergeRecord"));
+							binf_ex.setIsOpenBusiness(rs.getString("isOpenBusiness"));
+							binf_ex.setSchoolPersonnel(rs.getString("schoolPersonnel"));
+							binf_ex.setEntryTime(rs.getString("entryTime"));
+							binf_ex.setModifyPeople(rs.getString("modifyPeople"));
+							binf_ex.setModifyTime(rs.getString("modifyTime"));
+							binf_ex.setNote(rs.getString("note"));
+							binf_ex.setSiteReceivesMark(rs.getString("siteReceivesMark"));
+							binf_ex.setSiteValidity(rs.getString("siteValidity"));
+							binf_ex.setSiteNameCMCC(rs.getString("siteNameCMCC"));
+							binf_ex.setSiteNameCUCC(rs.getString("siteNameCUCC"));
+							binf_ex.setSiteNameCTC(rs.getString("siteNameCTC"));
+							binf_ex.setProducer(rs.getString("producer"));
+							binf_ex.setLastTimeLong(rs.getDouble("lastTimeLong"));
+							binf_ex.setLastTimeType(rs.getString("lastTimeType"));
+							binf_ex.setLastTimeDate(rs.getTimestamp("lastTimeDate"));
+							binf_ex.setShareInfo(rs.getString("shareInfo"));
+							binf_ex.setElectPowerCMCC(rs.getInt("electPowerCMCC"));
+							binf_ex.setElectPowerCUCC(rs.getInt("electPowerCUCC"));
+							binf_ex.setElectPowerCTC(rs.getInt("electPowerCTC"));
+							binf_ex.setIsCanElectPower(rs.getInt("isCanElectPower"));
+							binf_ex.setUpperStationRoute(rs.getDouble("upperStationRoute"));
+							binf_ex.setUpperStationDifficult(rs.getString("upperStationDifficult"));
+							binf_ex.setClienteleErrorService(rs.getString("clienteleErrorService"));
+							
+							batt.setBinf_ex(binf_ex);
+						    list.add(batt); 
+					}
+				} catch (SQLException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				return list;
+			}
+		});
+		return list;
+	}
 	
 	public static void main(String[] args) throws ParseException {
 		//new BattInfImpl().searchAll();
@@ -3902,6 +4095,7 @@
 		binf.setStationName3("");
 		binf.setBattGroupName("");
 		binf.setBattProducer("1");
+		binf.setStationId("42000002");
 		User_inf uinf=new User_inf();
 		uinf.setUId(1002);
 		
@@ -3929,10 +4123,11 @@
 		//List<BattInf> list=biml.serchMakeGroup(binf);
 		//List<BattInf> list=biml.serchGroupByInfor(binf);
 		//List<BattInf> list=biml.searchInform1(bmd);
-		List<BattInf> list=biml.serchStationName5(binf);
-		/*for (BattInf b : list) {
+		//<BattInf> list=biml.serchStationName5(binf);
+		List<BattInf> list=biml.serchBattAllInfoByStationId(binf);
+		for (BattInf b : list) {
 			System.out.println(b);
-		}*/
+		}
 		System.out.println(list.size());
 	}
 	

--
Gitblit v1.9.1