From 2d05296d36e200eb66711057f4997872efab46d1 Mon Sep 17 00:00:00 2001
From: hdw <hdw@192.168.1.4>
Date: 星期一, 24 十二月 2018 10:14:18 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/ram/Bts_station_stateAction.class   |    0 
 gx_tieta/src/com/fgkj/services/ram/Bts_station_stateService.java                      |    8 +++-
 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/ram/Bts_station_stateImpl.class    |    0 
 gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java                         |   42 +++++++++++++++++++--
 gx_tieta/.classpath                                                                   |    2 
 gx_tieta/src/com/fgkj/actions/ram/Bts_station_stateAction.java                        |    9 +++-
 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Bts_station_stateService.class |    0 
 7 files changed, 52 insertions(+), 9 deletions(-)

diff --git a/gx_tieta/.classpath b/gx_tieta/.classpath
index 3efe9b5..11472aa 100644
--- a/gx_tieta/.classpath
+++ b/gx_tieta/.classpath
@@ -44,7 +44,6 @@
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-api.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-impl.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jacob.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="com.genuitec.runtime.library/com.genuitec.generic_5.0">
 		<attributes>
 			<attribute name="owner.project.facets" value="jst.web"/>
@@ -62,5 +61,6 @@
 			<attribute name="owner.project.facets" value="jst.jsf"/>
 		</attributes>
 	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
 </classpath>
diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/ram/Bts_station_stateAction.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/ram/Bts_station_stateAction.class
index a97604b..84792de 100644
--- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/ram/Bts_station_stateAction.class
+++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/ram/Bts_station_stateAction.class
Binary files differ
diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/ram/Bts_station_stateImpl.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/ram/Bts_station_stateImpl.class
index 564b58e..9a74f5b 100644
--- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/ram/Bts_station_stateImpl.class
+++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/ram/Bts_station_stateImpl.class
Binary files differ
diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Bts_station_stateService.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Bts_station_stateService.class
index 54b2080..4828308 100644
--- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Bts_station_stateService.class
+++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Bts_station_stateService.class
Binary files differ
diff --git a/gx_tieta/src/com/fgkj/actions/ram/Bts_station_stateAction.java b/gx_tieta/src/com/fgkj/actions/ram/Bts_station_stateAction.java
index 7537c98..b3dea6f 100644
--- a/gx_tieta/src/com/fgkj/actions/ram/Bts_station_stateAction.java
+++ b/gx_tieta/src/com/fgkj/actions/ram/Bts_station_stateAction.java
@@ -41,8 +41,13 @@
 		result = tojson(model);          	
 		return SUCCESS;
     }
-    
-    
+  //鏌ヨ璁惧SD鍗$殑瀹炴椂鐘舵��
+    public String serchSDCard(){
+    	BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
+    	ServiceModel model = service.serchSDCard(binf);
+    	result=tojson(model);
+    	return SUCCESS;
+    }
     
     
     
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 bf9c9c2..53ec2d7 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
@@ -301,6 +301,40 @@
 		}
 		return nums;
 	}
+	 
+	//鏌ヨ璁惧SD鍗$殑瀹炴椂鐘舵��
+	public int serchSDCard(Object obj) {
+		BattInf binf=(BattInf) obj;
+		String sql=" select distinct station_stat from  db_ram_db.tb_bts_station_state where station_id=? ";
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[] {binf.getStationId()} , new CallBack() {
+			
+			@Override
+			public List getResults(ResultSet rs) {
+				List list=new ArrayList();
+				try {
+					while(rs.next()) {
+						int station_stat=rs.getInt("station_stat");
+						if((station_stat&1024)>1) {
+							list.add(1);
+						}else {
+							list.add(0);
+						}
+					}
+				} catch (SQLException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				return list;
+			}
+		});
+		int station_stat=1;
+		if(list!=null&&list.size()>0) {
+			station_stat=(int) list.get(list.size()-1);
+		}
+		return station_stat;
+	}
+	
+
 	public List serchByInfo(Object obj) {
 		// TODO Auto-generated method stub
 		return null;
@@ -313,7 +347,7 @@
 		binf.setStationName2("");
 		binf.setStationName3("");
 		binf.setStationName5("");
-		binf.setStationId("");
+		binf.setStationId("42000603");
 		binf.setBattGroupNum(62);
 		User_inf uinf=new User_inf();
 		uinf.setUId(1002);
@@ -331,12 +365,12 @@
 		/*BattMap_information bm=new BattMap_information();
 		bm.setStationId("42000570");
 		int nums=bimpl.serchByStationId(bm);*/
-		int nums=bimpl.serchByState_diaozhan(uinf);
+		//int nums=bimpl.serchByState_diaozhan(uinf);
 		/*BattMap_information bm=new BattMap_information();
 		bm.setStationId("42000366");
 		int nums=bimpl.serchByStationId_diaozhan(bm);*/
-		
-		System.out.println(nums);
+		int station_state=bimpl.serchSDCard(binf);
+		System.out.println(station_state);
 	}
 
 	
diff --git a/gx_tieta/src/com/fgkj/services/ram/Bts_station_stateService.java b/gx_tieta/src/com/fgkj/services/ram/Bts_station_stateService.java
index 16ead5d..ea2f0af 100644
--- a/gx_tieta/src/com/fgkj/services/ram/Bts_station_stateService.java
+++ b/gx_tieta/src/com/fgkj/services/ram/Bts_station_stateService.java
@@ -6,7 +6,6 @@
 import com.fgkj.dao.BaseDAOFactory;
 import com.fgkj.dao.impl.BadBatt_monImpl;
 import com.fgkj.dao.impl.BattInfImpl;
-import com.fgkj.dao.impl.BattPower_offImpl;
 import com.fgkj.dao.impl.Batt_enduranceImpl;
 import com.fgkj.dao.impl.Battalarm_dataDAOImpl;
 import com.fgkj.dao.impl.ram.Bts_station_stateImpl;
@@ -67,5 +66,10 @@
 		model.setMsgT(String.valueOf(xuhangnums));//瀛樺湪缁埅涓嶈冻3灏忔椂鐨勬満鎴夸釜鏁�
 		return model;
     }
-    
+    //鏌ヨ璁惧SD鍗$殑瀹炴椂鐘舵��
+    public ServiceModel serchSDCard(Object obj) {
+    	int station_state=((Bts_station_stateImpl)dao).serchSDCard(obj);
+    	model.setData(station_state);
+    	return model;
+    }
 }

--
Gitblit v1.9.1