From 6f15ff9f459ac08777fbc01995238e3ac4a700b0 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期一, 22 十月 2018 10:23:06 +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/BattInfImpl.java |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index 3767a63..b8f8349 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -3628,7 +3628,12 @@
 				" from db_battinf.tb_battinf " +
 				" left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
 				" on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
-				" where stationname2 like ? ";
+				" where stationname2 like ?  ";
+		//鐢ㄦ埛绠$悊
+		String userSql=" and StationId in(" +
+				" select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id  and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
+				" ) ";
+		sql+=userSql;
 		//閫変腑鍝佺墝涓�鑷�
 		String producerSqlT=" order by BattProducer,MonCapStd,MonVolStd,BattGroupId ";//涓�鑷�
 		String producerSqlF=" order by MonCapStd,MonVolStd,BattGroupId ";//涓嶄竴鑷�
@@ -3637,7 +3642,7 @@
 		}else{
 			sql+=producerSqlF;
 		}
-		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%"}, new CallBack() {
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%",binf.getNum()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List<BattInf> list=new ArrayList();
@@ -3704,7 +3709,12 @@
 				" left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
 				" on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
 				" where stationname1 like ? and stationname2 like ? and stationname3 like ?  and battgroupname like ?  and battgroupid=? ";
-		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId()}, new CallBack() {
+		//鐢ㄦ埛绠$悊
+		String userSql=" and StationId in(" +
+				" select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id  and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
+				" ) ";
+		sql+=userSql;
+		List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId(),binf.getNum()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List<BattInf> list=new ArrayList();
@@ -3769,11 +3779,12 @@
 		
 		BattInfImpl biml = new BattInfImpl();
 		BattInf binf = new BattInf();
+		binf.setNum(1002);
 		binf.setBattGroupId(1000001);
 		binf.setStationName("");
 		binf.setStationName1("");
 		binf.setStationName2("");
-		binf.setStationName3("姝︽眽婧愭殺瀹為獙瀹�1");
+		binf.setStationName3("");
 		binf.setBattGroupName("");
 		binf.setBattProducer("1");
 		User_inf uinf=new User_inf();
@@ -3800,8 +3811,8 @@
 		//List<BattInf> list = biml.serchByConditionNew(bmd);
 		//List<BattInf> list=biml.serchByTestType(bmd);
 		//List<BattInf> list=biml.serchGroupAssess(bmd);
-		//List<BattInf> list=biml.serchMakeGroup(binf);
-		List<BattInf> list=biml.serchGroupByInfor(binf);
+		List<BattInf> list=biml.serchMakeGroup(binf);
+		//List<BattInf> list=biml.serchGroupByInfor(binf);
 		for (BattInf b : list) {
 			System.out.println(b);
 		}

--
Gitblit v1.9.1