From 104cf721e069d81f0874b32465a273d8e63e539c Mon Sep 17 00:00:00 2001
From: 81041 <81041@DESKTOP-025NVD9>
Date: 星期六, 05 一月 2019 10:37:44 +0800
Subject: [PATCH] 修改

---
 gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java
index 3bda3d9..ad7b2aa 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java
@@ -138,9 +138,15 @@
 						","+binf.getMonCount()+","+binf.getMonCapStd()+","+binf.getMonVolStd()+","+binf.getMonResStd()+","+binf.getMonSerStd()+","+binf.getMonVolLowToAvg()+
 						",'"+binf.getBattProducer()+"','"+binf.getBattModel()+"','"+DAOHelper.sdf.format(binf.getBattProductDate())+"','"+DAOHelper.sdf.format(binf.getBattInUseDate())+"',"+binf.getLoad_curr()+",'"+binf.getInstall_user()+"',"+binf.getDisCurrMax()+",'"+binf.getStation_phone()+"',"+binf.getStation_install()+")";
 			    sql_str.add(sql_insert_binf);
+			    //缁欐坊鍔犵殑鏈烘埧鍔犲叆鍖呮満缁勶紙绠$悊鍛樼粍锛�
+			    String baoji_sql_main="REPLACE into db_user.tb_user_battgroup_baojigroup_battgroup(baoji_group_id,StationId,BattGroupId) values('100011','"+binf.getStationId()+"',"+binf.getBattGroupId()+")";
+			    sql_str.add(baoji_sql_main);
+			   //System.out.println(baoji_sql_main);
+			    //缁欐坊鍔犵殑鏈烘埧鍔犲叆鍖呮満缁勶紙璇ョ敤鎴风殑锛�
 			    String baoji_sql="REPLACE into db_user.tb_user_battgroup_baojigroup_battgroup(baoji_group_id,StationId,BattGroupId) " + 
-			    		         " SELECT baoji_group_id,'"+binf.getStationId()+"',"+binf.getBattGroupId()+" from  db_user.tb_user_battgroup_baojigroup ";
+			    		         " SELECT baoji_group_id,'"+binf.getStationId()+"',"+binf.getBattGroupId()+" from  db_user.tb_user_battgroup_baojigroup_usr where uid="+bapply.getApply_uid();
 			    sql_str.add(baoji_sql);
+			    
 			    {
 					String msg="纭娣诲姞"+binf.getStationName()+"鏈烘埧"+binf.getBattGroupId()+"鐢垫睜缁勭殑淇℃伅";
 					User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
@@ -285,9 +291,15 @@
 				 ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone "
 				 + ",longitude,latitude,address " +
 				" from db_battinf.tb_battinf_apply " +
-				" where apply_en=?  order by apply_date desc" +
-				" limit ?,? ";
-		List<Battinf_apply> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{bapply.getApply_en(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
+				" where ";
+		//鏈鎵�
+		if(bapply.getApply_en()==0) {
+			sql+=" apply_en=?  and check_en!=? ";
+		}else {
+			sql+=" apply_en=?  and check_en=? ";
+		}
+	    sql+=" order by apply_date desc limit ?,?";
+		List<Battinf_apply> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{bapply.getApply_en(),bapply.getCheck_en(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
 			
 			public List getResults(ResultSet rs) {
 				List list=new ArrayList();
@@ -752,7 +764,8 @@
 		Battinf_apply bapply=new Battinf_apply();
 		bapply.setApply_date(ActionUtil.getSimpDate(date2));
 		bapply.setApply_uid(1004);
-		
+		bapply.setApply_en(1);
+		bapply.setCheck_en(1);
 		
 		BattInf binf=new BattInf();
 		binf.setStationName("骞胯タ鐪�-鐧捐壊-GX鐧捐壊涔愪笟鍘跨珛鏂板皬鍖篧F-BTS璁惧");
@@ -793,11 +806,11 @@
 
 		Page page=new Page();
 		page.setPageCurr(1);
-		page.setPageSize(10);
+		page.setPageSize(20);
 		binf.setPage(page);
 		bapply.setBinf(binf);
-		/*List list=bimpl.serchByCondition(page);
-		System.out.println(list.size());*/
+		List list=bimpl.serchByCondition(bapply);
+		System.out.println(list.size());
 		/*List list=new ArrayList();
 		list.add(bapply);
 		boolean bl=bimpl.add(list);
@@ -814,7 +827,7 @@
 		for (Fbs9100_state f : list) {
 			System.out.println(f.getDev_id()+"   "+f.getDev_commcount());
 		}*/
-		List list=bimpl.serchById(bapply);
-		System.err.println(list.size());
+		/*List list=bimpl.serchById(bapply);
+		System.err.println(list.size());*/
 	}
 }

--
Gitblit v1.9.1