From ef0d9a4480f35f34d4c41b9b09876f9e9e02c947 Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.33>
Date: 星期五, 02 十一月 2018 09:21:56 +0800
Subject: [PATCH] 修改添加全区全市全省电池组的方法serchbatt

---
 gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index dd5ab85..76b6021 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -387,11 +387,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 +408,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 +436,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 +447,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);
 					}

--
Gitblit v1.9.1