From af57cd2f73a05174bc8df1247bf80cc024a0b603 Mon Sep 17 00:00:00 2001
From: LiJun <LiJun@192.168.10.30>
Date: 星期五, 16 十一月 2018 11:21:17 +0800
Subject: [PATCH] 跨域访问修改,辨别客户端的域名或iP地址

---
 gx_tieta/src/com/fgkj/actions/Batt_rtdataAction.java       |   11 --
 gx_tieta/src/com/fgkj/actions/Batttestdata_infAction.java  |   10 --
 gx_tieta/src/com/fgkj/Filters/CrossDomainLimitFilter.java  |   70 +++++++++++++++++
 gx_tieta/src/com/fgkj/actions/BattInfAction.java           |    8 -
 gx_tieta/src/com/fgkj/actions/Batt_rtstateAction.java      |   11 --
 gx_tieta/src/com/fgkj/actions/BatttestdataAction.java      |    9 --
 gx_tieta/WebRoot/WEB-INF/web.xml                           |    8 ++
 gx_tieta/.settings/org.eclipse.core.resources.prefs        |    3 
 gx_tieta/src/com/fgkj/actions/ActionUtil.java              |    2 
 gx_tieta/src/com/fgkj/actions/ram/Fbs9100_stateAction.java |    7 -
 gx_tieta/.settings/org.jboss.tools.jst.web.xml             |   68 ++++++++--------
 11 files changed, 126 insertions(+), 81 deletions(-)

diff --git a/gx_tieta/.settings/org.eclipse.core.resources.prefs b/gx_tieta/.settings/org.eclipse.core.resources.prefs
index 51180c8..d416ee2 100644
--- a/gx_tieta/.settings/org.eclipse.core.resources.prefs
+++ b/gx_tieta/.settings/org.eclipse.core.resources.prefs
@@ -1,4 +1,4 @@
-#Fri Dec 29 09:32:30 CST 2017
+#Thu Nov 15 16:53:51 CST 2018
 eclipse.preferences.version=1
 encoding//WebRoot/Top.jsp=UTF-8
 encoding//WebRoot/addplan.jsp=UTF-8
@@ -36,6 +36,7 @@
 encoding//WebRoot/oprsrch.jsp=UTF-8
 encoding//WebRoot/upload.jsp=UTF-8
 encoding//WebRoot/uploadresis.jsp=UTF-8
+encoding//src/com/fgkj/Filters/CrossDomainLimitFilter.java=UTF-8
 encoding//src/com/fgkj/Filters/Encroding.java=UTF-8
 encoding//src/com/fgkj/actions/ActionUtil.java=UTF-8
 encoding//src/com/fgkj/actions/Batt_maint_infAction.java=UTF-8
diff --git a/gx_tieta/.settings/org.jboss.tools.jst.web.xml b/gx_tieta/.settings/org.jboss.tools.jst.web.xml
index 7ad3e7b..ab7f92f 100644
--- a/gx_tieta/.settings/org.jboss.tools.jst.web.xml
+++ b/gx_tieta/.settings/org.jboss.tools.jst.web.xml
@@ -9,73 +9,73 @@
  <file-system NAME="classes" location="%workspace.home%/classes" model-entity="FileSystemFolder"/>
  <file-system NAME="fuguang" location="%eclipse.project%" model-entity="FileSystemFolder"/>
  <file-system NAME="lib-javaee.jar"
-  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\javaee.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\javaee.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-jsf-impl.jar"
-  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-impl.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-impl.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-jsf-api.jar"
-  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-api.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-api.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-jstl-1.2.jar"
-  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jstl-1.2.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jstl-1.2.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-c3p0-0.9.5.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\c3p0-0.9.5.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\lib\c3p0-0.9.5.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-c3p0-oracle-thin-extras-0.9.5.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\c3p0-oracle-thin-extras-0.9.5.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\lib\c3p0-oracle-thin-extras-0.9.5.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-mchange-commons-java-0.2.9.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\mchange-commons-java-0.2.9.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\lib\mchange-commons-java-0.2.9.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-resources.jar"
-  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\resources.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\resources.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-dnsns.jar"
-  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\dnsns.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\dnsns.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-localedata.jar"
-  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\localedata.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\localedata.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-sunjce_provider.jar"
-  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\sunjce_provider.jar" model-entity="FileSystemJar"/>
+  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\sunjce_provider.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-beanutils-1.7.0.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-beanutils-1.7.0.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-beanutils-1.7.0.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-codec-1.10.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-codec-1.10.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-codec-1.10.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-collections-3.1.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-collections-3.1.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-collections-3.1.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-dbcp-1.2.1.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-fileupload-1.2.2.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-io-2.0.1.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-lang-2.5.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-lang-2.5.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-lang-2.5.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-commons-pool-1.2.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-pool-1.2.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-pool-1.2.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-dom4j-1.6.1.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\dom4j-1.6.1.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\dom4j-1.6.1.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-ezmorph-1.0.3.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ezmorph-1.0.3.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ezmorph-1.0.3.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-freemarker-2.3.16.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\freemarker-2.3.16.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\freemarker-2.3.16.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-gson-2.2.4.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\gson-2.2.4.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\gson-2.2.4.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-javassist-3.11.0.GA.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\javassist-3.11.0.GA.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\javassist-3.11.0.GA.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-json-lib-2.1-jdk15.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\json-lib-2.1-jdk15.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\json-lib-2.1-jdk15.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-mysql-connector-java-5.1.33-bin.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.33-bin.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.33-bin.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-ognl-3.0.1.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ognl-3.0.1.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ognl-3.0.1.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-poi-3.10.1-20140818.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\poi-3.10.1-20140818.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\poi-3.10.1-20140818.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-sqljdbc.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\sqljdbc.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\sqljdbc.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-struts2-core-2.2.3.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-core-2.2.3.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-core-2.2.3.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-struts2-json-plugin-2.2.3.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-json-plugin-2.2.3.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-json-plugin-2.2.3.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-struts2-sunspoter-stream-1.0.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-sunspoter-stream-1.0.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-sunspoter-stream-1.0.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-xwork-core-2.2.3.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\xwork-core-2.2.3.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\xwork-core-2.2.3.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-jacob.jar"
-  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\jacob.jar" model-entity="FileSystemJar"/>
+  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\jacob.jar" model-entity="FileSystemJar"/>
  <web SERVLET_VERSION="2.4" model-entity="JstWeb" model-path="/web.xml">
   <module URI="/WEB-INF/faces-config.xml" model-entity="WebJSFModule"
    model-path="/faces-config.xml" src="src" web-root="WEB-ROOT"/>
diff --git a/gx_tieta/WebRoot/WEB-INF/web.xml b/gx_tieta/WebRoot/WEB-INF/web.xml
index 8ac93cb..b923bf3 100644
--- a/gx_tieta/WebRoot/WEB-INF/web.xml
+++ b/gx_tieta/WebRoot/WEB-INF/web.xml
@@ -29,6 +29,14 @@
     <url-pattern>/ExportTable.servlet</url-pattern>
   </servlet-mapping>
   <filter>
+  	<filter-name>CrossDomainLimitFilter</filter-name>
+  	<filter-class>com.fgkj.Filters.CrossDomainLimitFilter</filter-class>
+  </filter>
+  <filter-mapping>
+  	<filter-name>CrossDomainLimitFilter</filter-name>
+  	<url-pattern>/*</url-pattern>
+  </filter-mapping>
+  <filter>
     <filter-name>struts2</filter-name>
     <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
   </filter>
diff --git a/gx_tieta/src/com/fgkj/Filters/CrossDomainLimitFilter.java b/gx_tieta/src/com/fgkj/Filters/CrossDomainLimitFilter.java
new file mode 100644
index 0000000..95b38e2
--- /dev/null
+++ b/gx_tieta/src/com/fgkj/Filters/CrossDomainLimitFilter.java
@@ -0,0 +1,70 @@
+package com.fgkj.Filters;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import com.fgkj.actions.ActionUtil;
+import com.fgkj.dto.ServiceModel;
+
+public class CrossDomainLimitFilter implements Filter{
+	public static final int max_connect_count = 10;
+	
+	public final static String CROSS_DOMAIN_KEY	= "44c4a294cb66d13727c14b065dbe8548";		//璺ㄥ煙璇锋眰 key
+		
+	public void doFilter(ServletRequest req, ServletResponse response,
+			FilterChain chain) throws IOException, ServletException {
+		HttpServletRequest request=(HttpServletRequest)req;
+		String URL=request.getRequestURI();
+		//妫�娴嬭法鍩熻闂殑璇锋眰
+		if(URL != null && URL.endsWith("_ky")){
+			String key = req.getParameter("key");										//鑾峰彇鏍¢獙鐮�
+			ServiceModel model = new ServiceModel();									//鏄惁鍏佽璁块棶
+			boolean isAlowVisit = false;							
+			if(key != null && CROSS_DOMAIN_KEY.equals(key)){
+				SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+				System.out.println("璺ㄥ煙璁块棶鍩熷悕鎴杋p:"+request.getRemoteHost()+" At "+sdf.format(new Date()));
+				
+				isAlowVisit = true;
+			}else{
+				model.setMsg("璇嗗埆鐮侀敊璇�");
+			}			
+			if(isAlowVisit){
+				//閫氳繃璇锋眰
+				chain.doFilter(request, response);
+			}else{
+				//涓嶈兘鏀捐鐨勮姹�
+				PrintWriter out = response.getWriter();
+				out.write(ActionUtil.getGson().toJson(model));
+				out.flush();
+				out.close();
+			}
+		}else{
+			//闈炶法鍩熻姹�
+			chain.doFilter(request, response);
+		}
+		
+	}
+
+	public void init(FilterConfig arg0) throws ServletException {
+		
+	}
+
+	public void destroy() {
+		
+	}
+	
+	public static void main(String[] args) {
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		System.out.println(sdf.format(new Date()));
+	}
+}
diff --git a/gx_tieta/src/com/fgkj/actions/ActionUtil.java b/gx_tieta/src/com/fgkj/actions/ActionUtil.java
index d3193d6..86367a7 100644
--- a/gx_tieta/src/com/fgkj/actions/ActionUtil.java
+++ b/gx_tieta/src/com/fgkj/actions/ActionUtil.java
@@ -33,7 +33,7 @@
 public class ActionUtil extends ActionSupport{
 	public static String time_yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
 	
-	public final static String CROSS_DOMAIN_KEY	= "44c4a294cb66d13727c14b065dbe8548";		//璺ㄥ煙璇锋眰 key
+	
 	
 	public String key;																		//璺ㄥ煙璇嗗埆鐮�
 	
diff --git a/gx_tieta/src/com/fgkj/actions/BattInfAction.java b/gx_tieta/src/com/fgkj/actions/BattInfAction.java
index ee929e1..105f209 100644
--- a/gx_tieta/src/com/fgkj/actions/BattInfAction.java
+++ b/gx_tieta/src/com/fgkj/actions/BattInfAction.java
@@ -380,14 +380,8 @@
 	//璺ㄥ煙璁块棶鑾峰彇鎵�鏈夌數姹犵粍鐨勪俊鎭�<-------璺ㄥ煙----------->
 	public String searchInform_ky(){
 		isAllowHeaders();							//鍏佽璺ㄥ煙璁块棶
-		//System.out.println(key+"@@@@@@@@@@@@@@@@@@@@@@");
 		ServiceModel model = new ServiceModel();
-		if(key != null && CROSS_DOMAIN_KEY.equals(key)){
-			model = service.searchInform_ky();			
-		}else{			
-			model.setCode(0);
-			model.setMsg("璇嗗埆鐮侀敊璇�");
-		}
+		model = service.searchInform_ky();		
 		result = ActionUtil.tojson(model);
 		return SUCCESS;
 	}
diff --git a/gx_tieta/src/com/fgkj/actions/Batt_rtdataAction.java b/gx_tieta/src/com/fgkj/actions/Batt_rtdataAction.java
index 304eac1..bb15585 100644
--- a/gx_tieta/src/com/fgkj/actions/Batt_rtdataAction.java
+++ b/gx_tieta/src/com/fgkj/actions/Batt_rtdataAction.java
@@ -30,14 +30,9 @@
 	//璺ㄥ煙璁块棶鏌ヨ鐢垫睜缁勭殑鍗曚綋鏁版嵁			< ! ---- ----  璺ㄥ煙璁块棶  ------------>
 	public String serchByCondition_ky(){
 		ActionUtil.isAllowHeaders();
-		ServiceModel model = new ServiceModel();
-		if(key != null && CROSS_DOMAIN_KEY.equals(key)){			
-			Batt_rtdata rtdata=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_rtdata.class);
-			model=service.serchByCondition_ky(rtdata);			
-		}else{
-			model.setCode(0);
-			model.setMsg("璇嗗埆鐮侀敊璇�");
-		}
+		ServiceModel model = new ServiceModel();		
+		Batt_rtdata rtdata=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_rtdata.class);
+		model=service.serchByCondition_ky(rtdata);			
 		result=ActionUtil.tojson(model);
 		return SUCCESS;
 	}
diff --git a/gx_tieta/src/com/fgkj/actions/Batt_rtstateAction.java b/gx_tieta/src/com/fgkj/actions/Batt_rtstateAction.java
index d8ce249..09d13cc 100644
--- a/gx_tieta/src/com/fgkj/actions/Batt_rtstateAction.java
+++ b/gx_tieta/src/com/fgkj/actions/Batt_rtstateAction.java
@@ -92,14 +92,9 @@
 	public String serchByCondition_ky(){	
 		ActionUtil.isAllowHeaders();				//鍏佽璺ㄥ煙璁块棶
 		model = new ServiceModel();
-		if(key != null && CROSS_DOMAIN_KEY.equals(key)){
-			//System.out.println("寮�濮嬫煡璇tstate");
-			rtstate = ActionUtil.getGson().fromJson(json, Batt_rtstate.class);
-			model=service.serchByCondition_ky(rtstate);			
-		}else{
-			model.setCode(0);
-			model.setMsg("璇嗗埆鐮侀敊璇�");
-		}
+		//System.out.println("寮�濮嬫煡璇tstate");
+		rtstate = ActionUtil.getGson().fromJson(json, Batt_rtstate.class);
+		model=service.serchByCondition_ky(rtstate);			
 		//System.out.println(model);
 		result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
 		return SUCCESS;
diff --git a/gx_tieta/src/com/fgkj/actions/BatttestdataAction.java b/gx_tieta/src/com/fgkj/actions/BatttestdataAction.java
index e50ffd1..8010397 100644
--- a/gx_tieta/src/com/fgkj/actions/BatttestdataAction.java
+++ b/gx_tieta/src/com/fgkj/actions/BatttestdataAction.java
@@ -41,14 +41,7 @@
 	public String findhistory_ky(){
 		isAllowHeaders();
 		ServiceModel model = new ServiceModel();
-		if(key !=null && CROSS_DOMAIN_KEY.equals(key)){			
-			Batttestdata btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
-			//System.out.println(btd);
-			model = service.serchByCondition_ky(btd);
-		}else{
-			model.setCode(0);
-			model.setMsg("璇嗗埆鐮侀敊璇�");
-		}
+		model = service.serchByCondition_ky(btd);
 		result = ActionUtil.tojson(model);
 		//System.out.println("*************************");
 		return SUCCESS;
diff --git a/gx_tieta/src/com/fgkj/actions/Batttestdata_infAction.java b/gx_tieta/src/com/fgkj/actions/Batttestdata_infAction.java
index a78f163..89c21c4 100644
--- a/gx_tieta/src/com/fgkj/actions/Batttestdata_infAction.java
+++ b/gx_tieta/src/com/fgkj/actions/Batttestdata_infAction.java
@@ -94,14 +94,8 @@
 	 */
 	public String searchBattTestInfDataById_ky(){
 		isAllowHeaders();
-		if(key != null && CROSS_DOMAIN_KEY.equals(key)){
-			Batttestdata_inf bti = ActionUtil.getGson().fromJson(json, Batttestdata_inf.class);
-			model=service.serchByCondition_ky(bti);			
-		}else{
-			model = new ServiceModel();
-			model.setCode(0);
-			model.setMsg("璇嗗埆鐮侀敊璇�");
-		}
+		Batttestdata_inf bti = ActionUtil.getGson().fromJson(json, Batttestdata_inf.class);
+		model=service.serchByCondition_ky(bti);			
 		result=ActionUtil.tojson(model);
 		return SUCCESS;
 	}
diff --git a/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_stateAction.java b/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_stateAction.java
index 3762e11..f06e421 100644
--- a/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_stateAction.java
+++ b/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_stateAction.java
@@ -114,12 +114,7 @@
   	public String serchByCondition_ky(){  		
   		isAllowHeaders();												//鍏佽璺ㄥ煙璁块棶
   		ServiceModel model = new ServiceModel();
-  		if(key != null && CROSS_DOMAIN_KEY.equals(key)){
-  			model = service.serchByCondition_ky();  			
-  		}else{
-  			model.setCode(0);
-  			model.setMsg("璇嗗埆鐮侀敊璇�");
-  		}  				
+		model = service.serchByCondition_ky();  			
   		result = tojson(model);
   		return SUCCESS;	
   	}

--
Gitblit v1.9.1