From 5afa60f61accb9b33749cfc9dba30b36e429ad31 Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.13>
Date: 星期一, 10 十二月 2018 13:55:44 +0800
Subject: [PATCH] 设备连接详情修改查出910000000设备

---
 gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java |    9 +++++----
 gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java  |   26 +++++++++++++++-----------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java b/gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java
index ec0e9aa..ea3e9d9 100644
--- a/gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java
+++ b/gx_tieta/src/com/fgkj/actions/App_bts_comm_taskAction.java
@@ -1,6 +1,7 @@
 package com.fgkj.actions;
 
 import com.fgkj.dto.BattInf;
+import com.fgkj.dto.Page;
 import com.fgkj.dto.ServiceModel;
 import com.fgkj.dto.User_inf;
 import com.fgkj.services.App_bts_comm_taskService;
@@ -16,10 +17,10 @@
 	
 	//鏍规嵁鐪佸競鍖烘満鎴垮悕绉版煡璇�
 	public String serchByCondition(){
-		BattInf binf=getGson("").fromJson(json, BattInf.class);
-		User_inf uinf=(User_inf) getUser();
-		binf.setNum(uinf.getUId());
-		ServiceModel model=service.serchByCondition(binf);
+		Page page=getGson("").fromJson(json, Page.class);
+		/*User_inf uinf=(User_inf) getUser();
+		binf.setNum(uinf.getUId());*/
+		ServiceModel model=service.serchByCondition(page);
 		result=tojson(model);
 		return SUCCESS;
 	}
diff --git a/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java b/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java
index b2ddd4b..97b3cd1 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java
@@ -45,24 +45,25 @@
 	}
     //鏍规嵁鐪佸競鍖烘満鎴垮悕绉版煡璇�(uid鏀惧湪num涓�)
 	public List serchByCondition(Object obj) {
-		BattInf binf=(BattInf) obj;
-		Page page=binf.getPage();
+		//BattInf binf=(BattInf) obj;
+		Page page=(Page) obj;
 		Connection conn=DBUtil.getConn();
 		String numberSql=" SELECT FOUND_ROWS() number";
 		String sql=" select SQL_CALC_FOUND_ROWS distinct dev_id,thread_id,battgroup_cnt,battgroup_id1,battgroup_index1,battgroup_id2,battgroup_index2,battgroup_id3,battgroup_index3,battgroup_id4,battgroup_index4,connet_time,dev_comm_runtime,break_type " +
 				"  ,stationName,stationName1,stationName2,stationName3,stationName5,StationId " +
-				" from db_app_sys.tb_app_bts_comm_task,db_battinf.tb_battinf  " +
-				" where db_app_sys.tb_app_bts_comm_task.dev_id=db_battinf.tb_battinf.fBSDeviceId " +
-				" and stationName1 like ? and stationName2 like ? and stationId like ? and stationName5 like ? " +
-				"  and db_app_sys.tb_app_bts_comm_task.dev_id in (" +
+				" from db_app_sys.tb_app_bts_comm_task " +
+				" left outer join db_battinf.tb_battinf  on db_app_sys.tb_app_bts_comm_task.dev_id=db_battinf.tb_battinf.fBSDeviceId " +
+				//" where  stationName1 like ? and stationName2 like ? and stationId like ? and stationName5 like ? " +
+				/*"  and db_app_sys.tb_app_bts_comm_task.dev_id in (" +
 				"  select distinct db_battinf.tb_battinf.fBSDeviceId  " +
 				"  from db_battinf.tb_battinf " +
 				"  left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " +
 				"  left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
 				"  left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
-				"  where db_user.tb_user_inf.uid=? and db_battinf.tb_battinf.station_install=1 ) "+
-				"  limit ?,? ";
-		List<App_bts_comm_task> list=DAOHelper.executeQueryLimit(sql, conn,new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationId()+"%","%"+binf.getStationName5()+"%",binf.getNum(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
+				"  where db_user.tb_user_inf.uid=? and db_battinf.tb_battinf.station_install=1 ) "+*/
+				"  order by dev_id limit ?,? ";
+		//System.out.println(sql);                                                    //"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationId()+"%","%"+binf.getStationName5()+"%",binf.getNum()
+		List<App_bts_comm_task> list=DAOHelper.executeQueryLimit(sql, conn,new Object[]{(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List list=new ArrayList();
@@ -119,9 +120,12 @@
 		binf.setBattGroupNum(62);
 		Page p=new Page();
 		p.setPageCurr(1);
-		p.setPageSize(10);
+		p.setPageSize(100);
 		binf.setPage(p);
-		List list=aimpl.serchByCondition(binf);
+		List<App_bts_comm_task> list=aimpl.serchByCondition(binf);
+		for (App_bts_comm_task task : list) {
+			System.out.println(task);
+		}
 		System.out.println(list.size());
 	}
 	public List serchByInfo(Object obj) {

--
Gitblit v1.9.1