From 6382c2a4220ff5774dba39848c2faabf0f7002f1 Mon Sep 17 00:00:00 2001
From: didiyu <1293722656@qq.com>
Date: 星期一, 10 十二月 2018 10:39:42 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://didiyu@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index 0ef3f65..992983c 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -12,6 +12,7 @@
 
 import javax.persistence.Id;
 import javax.sql.ConnectionEvent;
+import javax.swing.text.StyledEditorKit.BoldAction;
 
 import sun.security.action.GetBooleanAction;
 
@@ -35,6 +36,7 @@
 import com.fgkj.dto.Batttestdata;
 import com.fgkj.dto.Batttestdata_inf;
 import com.fgkj.dto.Batttestdatastop;
+import com.fgkj.dto.Database_backup;
 import com.fgkj.dto.Limit;
 import com.fgkj.dto.Page;
 import com.fgkj.dto.RoleLimit;
@@ -74,12 +76,12 @@
 				String sql = "insert into db_battinf.tb_battinf(" +
 						"StationId,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp,FbsDeviceIp_YM,FbsDeviceIp_WG,"
 						+ "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
-						",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone" +
+						",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone,Station_install" +
 						") values('"+binf.getStationId()+"','"+binf.getStationName()+"','"+binf.getStationName1()+"','"+binf.getStationName2()+"','"+binf.getStationName3()+"','"+binf.getStationName4()+"','"+binf.getStationName5()+
 						"','"+binf.getStationIp()+"',"+binf.getFBSDeviceId()+",'"+binf.getFbsDeviceIp()+"','"+binf.getFbsDeviceIp_YM()+"','"+binf.getFbsDeviceIp_WG()+"','"+binf.getFBSDeviceName()+"',"+binf.getGroupIndexInFBSDevice()+
 						","+binf.getBattGroupId()+","+binf.getBattGroupNum()+",'"+binf.getBattGroupName()+"',"+binf.getFloatVolLevel()+","+binf.getOfflineVolLevel()+","+binf.getBattFloatCurrent()+
 						","+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.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()+")";
 				
 				if(binf.getStationId().equals(maxs)){
 					maxs++;
@@ -93,7 +95,13 @@
 				 }
 			}
 		}
-		boolean bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
+		Boolean bl=false;
+		boolean en=BattinfGroupFactory.backup_battinf();
+		if(en){
+			bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
+		}else{
+			return false;
+		}
 		(new User_logService()).addPro(listU);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
 		return bl;
 	
@@ -122,7 +130,7 @@
 				String sql = "update db_battinf.tb_battinf set StationId='"+binf.getStationId()+"',StationName='"+binf.getStationName()+"',StationName1='"+binf.getStationName1()+"',StationName2='"+binf.getStationName2()+"',StationName3='"+binf.getStationName3()+"',StationName4='"+binf.getStationName4()+"',StationName5='"+binf.getStationName5()+"',StationIp='"+binf.getStationIp()+"',FBSDeviceId="+binf.getFBSDeviceId()+",FbsDeviceIp='"+binf.getFbsDeviceIp()+"',"
 						+ "FBSDeviceName='"+binf.getFBSDeviceName()+"',GroupIndexInFBSDevice="+binf.getGroupIndexInFBSDevice()+",BattGroupNum="+binf.getBattGroupNum()+",BattGroupName='"+binf.getBattGroupName()+"',FloatVolLevel="+binf.getFloatVolLevel()+",OfflineVolLevel="+binf.getOfflineVolLevel()+",BattFloatCurrent="+binf.getBattFloatCurrent()+"," +
 						  "MonCount="+binf.getMonCount()+",MonCapStd="+binf.getMonCapStd()+",monVolStd="+binf.getMonVolStd()+",monResStd="+binf.getMonResStd()+",MonSerStd="+binf.getMonSerStd()+",MonVolLowToAvg="+binf.getMonVolLowToAvg()+",BattProducer='"+binf.getBattProducer()+"',BattModel='"+binf.getBattModel()+"',BattProductDate='"+DAOHelper.sdf.format(binf.getBattProductDate())+"',BattInUseDate='"+DAOHelper.sdf.format(binf.getBattInUseDate())+"', "
-						 +" Load_curr="+binf.getLoad_curr()+",install_user='"+binf.getInstall_user()+"',DisCurrMax="+binf.getDisCurrMax()+",station_phone='"+binf.getStation_phone()+"'  where battgroupId="+binf.getBattGroupId();
+						 +" Load_curr="+binf.getLoad_curr()+",install_user='"+binf.getInstall_user()+"',DisCurrMax="+binf.getDisCurrMax()+",station_phone='"+binf.getStation_phone()+"',Station_install="+binf.getStation_install()+"  where battgroupId="+binf.getBattGroupId();
 				sql_str.add(sql);
 				{
 					String msg="淇敼"+binf.getStationName()+"鏈烘埧"+binf.getBattGroupId()+"鐢垫睜缁勭殑淇℃伅";
@@ -131,8 +139,16 @@
 				 }
 			}
 		}
+		
+		
+		Boolean bl=false;
+		boolean en=BattinfGroupFactory.backup_battinf();
+		if(en){
+			bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
+		}else{
+			return false;
+		}
 		(new User_logService()).addPro(listU);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
-		Boolean bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
 		return bl;
 	}
     //淇敼鐢垫睜淇℃伅閰嶇疆(ip鍦板潃,鎺╃爜鍜岀綉鍏�)
@@ -166,8 +182,14 @@
 				 }
 			}
 		}
+		Boolean bl=false;
+		boolean en=BattinfGroupFactory.backup_battinf();
+		if(en){
+			bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
+		}else{
+			return false;
+		}
 		(new User_logService()).addPro(listU);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
-		Boolean bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
 		return bl;
 	}
     //鏍规嵁缁存姢鍖哄拰鏈烘埧鍚嶇О鏌ヨ鐢垫睜缁勪俊鎭�(鐢垫睜缁勪俊鎭厤缃�)
@@ -177,9 +199,9 @@
 		Page page=bmd.getPage();
 		Connection conn= DBUtil.getConn();
 		String numberSql=" SELECT FOUND_ROWS() number";
-		String sql="select SQL_CALC_FOUND_ROWS distinct(StationId),StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp,"
+		String sql="select SQL_CALC_FOUND_ROWS distinct(StationId),StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp,"
 				+ "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
-				 ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone  " +
+				 ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone,Station_install  " +
 				 " From db_battinf.tb_battinf " +
 				 " Where StationName like ? and StationName1 like ? and StationName2 like ?  and StationName5 like ? " +
 				 " order by StationId  " +
@@ -194,6 +216,7 @@
 					while (rs.next()) {
 						BattInf binf = new BattInf();
 						binf.setStationId(rs.getString("stationId"));
+						binf.setStationName(rs.getString("stationName"));
 						binf.setStationName1(rs.getString("stationName1"));
 						binf.setStationName2(rs.getString("stationName2"));
 						binf.setStationName3(rs.getString("stationName3"));
@@ -227,6 +250,7 @@
 						binf.setInstall_user(rs.getString("install_user"));
                         binf.setDisCurrMax(rs.getFloat("disCurrMax"));
                         binf.setStation_phone(rs.getString("station_phone"));
+                        binf.setStation_install(rs.getInt("station_install"));
 						list.add(binf);
 
 					}

--
Gitblit v1.9.1