From dab2ba08883998703cdf52e28fa55dfbd006ce6a Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期二, 06 十一月 2018 11:13:41 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/src/com/fgkj/dao/impl/ram/Bts_gprs_stateImpl.java    |   25 +++++--
 gx_tieta/src/com/fgkj/actions/ram/Bts_gprs_stateAction.java   |    6 +-
 gx_tieta/.settings/org.jboss.tools.jst.web.xml                |   68 +++++++++++-----------
 gx_tieta/src/com/fgkj/services/ram/Bts_gprs_stateService.java |   25 +++++--
 4 files changed, 71 insertions(+), 53 deletions(-)

diff --git a/gx_tieta/.settings/org.jboss.tools.jst.web.xml b/gx_tieta/.settings/org.jboss.tools.jst.web.xml
index f101a28..7ad3e7b 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:\MyEclipse10\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\javaee.jar" model-entity="FileSystemJar"/>
+  location="D:\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:\MyEclipse10\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-impl.jar" model-entity="FileSystemJar"/>
+  location="D:\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:\MyEclipse10\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-api.jar" model-entity="FileSystemJar"/>
+  location="D:\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:\MyEclipse10\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jstl-1.2.jar" model-entity="FileSystemJar"/>
+  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"/>
  <file-system NAME="lib-c3p0-0.9.5.jar"
-  location="E:\GitWorkSpace\gx_tieta\gx_tieta\lib\c3p0-0.9.5.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\lib\c3p0-oracle-thin-extras-0.9.5.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\lib\mchange-commons-java-0.2.9.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\mchange-commons-java-0.2.9.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-resources.jar"
-  location="D:\MyEclipse10\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\resources.jar" model-entity="FileSystemJar"/>
+  location="D:\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:\MyEclipse10\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\dnsns.jar" model-entity="FileSystemJar"/>
+  location="D:\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:\MyEclipse10\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\localedata.jar" model-entity="FileSystemJar"/>
+  location="D:\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:\MyEclipse10\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\sunjce_provider.jar" model-entity="FileSystemJar"/>
+  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"/>
  <file-system NAME="lib-commons-beanutils-1.7.0.jar"
-  location="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-beanutils-1.7.0.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-codec-1.10.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-collections-3.1.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-lang-2.5.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-pool-1.2.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\dom4j-1.6.1.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ezmorph-1.0.3.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\freemarker-2.3.16.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\gson-2.2.4.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\javassist-3.11.0.GA.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\json-lib-2.1-jdk15.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.33-bin.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ognl-3.0.1.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\poi-3.10.1-20140818.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\poi-3.10.1-20140818.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-sqljdbc.jar"
-  location="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\sqljdbc.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\sqljdbc.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-struts2-core-2.2.3.jar"
-  location="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-core-2.2.3.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-json-plugin-2.2.3.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-sunspoter-stream-1.0.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\xwork-core-2.2.3.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\xwork-core-2.2.3.jar" model-entity="FileSystemJar"/>
  <file-system NAME="lib-jacob.jar"
-  location="E:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\jacob.jar" model-entity="FileSystemJar"/>
+  location="D:\GitWorkSpace\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/src/com/fgkj/actions/ram/Bts_gprs_stateAction.java b/gx_tieta/src/com/fgkj/actions/ram/Bts_gprs_stateAction.java
index e921a55..d787d79 100644
--- a/gx_tieta/src/com/fgkj/actions/ram/Bts_gprs_stateAction.java
+++ b/gx_tieta/src/com/fgkj/actions/ram/Bts_gprs_stateAction.java
@@ -15,10 +15,10 @@
 	private String json;
 	private String result;
 	
-	//淇敼绯荤粺鍙傛暟
-	public String updateGprs() {
+	//鑾峰彇gprs淇″彿
+	public String update() {
 		Bts_gprs_state gprs = getGson().fromJson(json, Bts_gprs_state.class);
-		ServiceModel model = service.updateGprs(gprs);
+		ServiceModel model = service.update(gprs);
 		{   String msg="";
 		    if(gprs.getNum()==FBS9100_ComBase.CMD_ReadGPRSCSQ){
 				 msg="鑾峰彇"+gprs.getDev_id()+"鐨勮澶囩郴缁熷弬鏁�";
diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_gprs_stateImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_gprs_stateImpl.java
index c1e16eb..34228ba 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_gprs_stateImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_gprs_stateImpl.java
@@ -25,8 +25,12 @@
 		// TODO Auto-generated method stub
 		return false;
 	}
+	//缁檊prs鍙戦�佹寚浠�
 	public boolean update(Object obj) {
-		return false;
+		Bts_gprs_state gprs=(Bts_gprs_state) obj;
+		String sql=" update db_ram_db.tb_bts_gprs_state set AT_cmd=? where dev_id=? ";
+		boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{gprs.getAT_cmd(),gprs.getDev_id()});
+		return bl;
 	}
 
 	public boolean del(Object obj) {
@@ -73,22 +77,25 @@
 		return list;
 	}
 	//绯荤粺鍙傛暟鍛戒护鎿嶄綔璁惧鏃剁殑cmd鍜宎ck鏍¢獙	
-	public boolean sendCmdToFBS9100Dev(int cmd,int dev_id)
+	public Bts_gprs_state sendCmdToFBS9100Dev(int cmd,int dev_id)
 	{ 
 		int m_cmd = cmd;
 		int m_cmd_ack = cmd;
+		Bts_gprs_state gprs=new Bts_gprs_state();
+		gprs.setOp_cmd(0);
 		switch(m_cmd) {
 			case FBS9100_ComBase.CMD_ReadGPRSCSQ: m_cmd_ack = FBS9100_ComBase.CMD_ReadGPRSCSQAck; break;
-			default: return false;
+			default: return gprs;
 		}
-		boolean res_exe = false;
+		//boolean res_exe = false;
+		String ack_inf="";
 		String sql = "UPDATE db_ram_db.tb_bts_gprs_state  SET "
 						+ " op_cmd=? " 
 						+ " WHERE dev_id=? ";
 		Boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{m_cmd,dev_id});
 		if(true == bl)
 		{
-			sql = "SELECT op_cmd FROM db_ram_db.tb_bts_gprs_state "+
+			sql = "SELECT op_cmd,ack_inf FROM db_ram_db.tb_bts_gprs_state "+
 						" WHERE dev_id="+dev_id;
 			Connection conn=DBUtil.getConn();
 			PreparedStatement ps = null;
@@ -101,8 +108,10 @@
 						if(rs.next())
 						{
 							if(rs.getInt("op_cmd") == m_cmd_ack)
-							{
-								res_exe = true;
+							{  
+								gprs.setAck_inf(rs.getString("ack_inf"));
+								gprs.setOp_cmd(m_cmd_ack);
+								//res_exe = true;
 								break;
 							}
 						}
@@ -120,7 +129,7 @@
 			}
 			DBUtil.close(rs, ps, conn);
 		}
-		return res_exe;
+		return gprs;
 	}
 	public List serchByInfo(Object obj) {
 		// TODO Auto-generated method stub
diff --git a/gx_tieta/src/com/fgkj/services/ram/Bts_gprs_stateService.java b/gx_tieta/src/com/fgkj/services/ram/Bts_gprs_stateService.java
index 9d916fa..9b7f11f 100644
--- a/gx_tieta/src/com/fgkj/services/ram/Bts_gprs_stateService.java
+++ b/gx_tieta/src/com/fgkj/services/ram/Bts_gprs_stateService.java
@@ -4,6 +4,7 @@
 
 import com.fgkj.dao.BaseDAO;
 import com.fgkj.dao.BaseDAOFactory;
+import com.fgkj.dao.FBS9100_ComBase;
 import com.fgkj.dao.impl.ram.Bts_gprs_stateImpl;
 import com.fgkj.dto.ServiceModel;
 import com.fgkj.dto.ram.Bts_gprs_state;
@@ -18,16 +19,24 @@
 		model=new ServiceModel();
 	}
 	//鑾峰彇gprs淇″彿
-	public ServiceModel updateGprs(Object obj) {
+	public ServiceModel update(Object obj) {
 		Bts_gprs_state gprs=(Bts_gprs_state) obj;
-		boolean bl=((Bts_gprs_stateImpl)dao).sendCmdToFBS9100Dev(gprs.getNum(), gprs.getDev_id());
-		if(bl){
-			model.setCode(1);
-			model.setMsg("鑾峰彇GPRS淇″彿鎴愬姛!");
-	    }else{
-	    	model.setCode(0);
+		boolean b=dao.update(gprs);
+		if(b){
+			Bts_gprs_state g=((Bts_gprs_stateImpl)dao).sendCmdToFBS9100Dev(gprs.getNum(), gprs.getDev_id());
+			if(g.getOp_cmd()==FBS9100_ComBase.CMD_ReadGPRSCSQAck){
+				model.setCode(1);
+				model.setData(g);
+				model.setMsg("鑾峰彇GPRS淇″彿鎴愬姛!");
+		    }else{
+		    	model.setCode(0);
+				model.setMsg("鑾峰彇GPRS淇″彿澶辫触,璇锋鏌ョ綉缁�!");
+		    }
+		}else{
+			model.setCode(0);
 			model.setMsg("鑾峰彇GPRS淇″彿澶辫触,璇锋鏌ョ綉缁�!");
-	    }
+		}
+		
 		return model;	
 	}
 	

--
Gitblit v1.9.1