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

---
 gx_tieta/WebRoot/mobil/battM.html                           |   10 +-
 gx_tieta/WebRoot/iframe/batt-state-statistical-details.html |    4 
 gx_tieta/WebRoot/index.jsp                                  |    2 
 gx_tieta/WebRoot/mobil/testdata.html                        |    2 
 gx_tieta/WebRoot/mobil/selectbatt.html                      |  150 +++++++++++++++++++++++++++++++++++++
 gx_tieta/WebRoot/mobil/selectcounty.html                    |    2 
 gx_tieta/src/com/fgkj/services/Battalarm_dataService.java   |   15 ++-
 gx_tieta/WebRoot/mobil/control.html                         |    1 
 gx_tieta/WebRoot/mobil/history.html                         |    9 +
 9 files changed, 180 insertions(+), 15 deletions(-)

diff --git a/gx_tieta/WebRoot/iframe/batt-state-statistical-details.html b/gx_tieta/WebRoot/iframe/batt-state-statistical-details.html
index 30b4904..0dc1272 100644
--- a/gx_tieta/WebRoot/iframe/batt-state-statistical-details.html
+++ b/gx_tieta/WebRoot/iframe/batt-state-statistical-details.html
@@ -125,7 +125,7 @@
 					,{field:'warntype', title:'寮傚父绫诲瀷', align:'center'}
 					,{field:'warnstarttime', title:'寮傚父寮�濮嬫椂闂�', align:'center', sort: true}
 					,{field:'warnendtime', title:'寮傚父缁撴潫鏃堕棿', align:'center'}
-					,{field:'warntimelen', title:'寮傚父鏃堕暱(绉�)', align:'center'}
+					,{field:'warntimelen', title:'寮傚父鏃堕暱(鍒嗛挓)', align:'center'}
 			    ]]
 				,data: rsData
 			    ,page: {
@@ -164,7 +164,7 @@
 						if(temp.warntypenum == _data.station_event_type){
 							temp.warnendtime = _data.record_datetime;
 							var timelong = (new Date(temp.warnendtime).getTime()- new Date(temp.warnstarttime).getTime())/1000;
-							temp.warntimelen = timelong;
+							temp.warntimelen = (timelong/60).toFixed(2);
 						}
 				
 					}
diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp
index 30785bd..d977595 100644
--- a/gx_tieta/WebRoot/index.jsp
+++ b/gx_tieta/WebRoot/index.jsp
@@ -956,6 +956,8 @@
 	         				Almarr.push(/*{
 	         				name:"<s:text name='Capacity'/><s:text name='Alarm'/><s:text name='Alarm'/>",val:parseInt(data.BattGroupId)			// 瀹归噺鍛婅鍛婅 									
 		         			} ,*/{
+		         				name:"<s:text name='On-line_voltage'/>",val:parseInt(data.Record_Id),				// 鍦ㄧ嚎鐢靛帇 
+		         			},{
 		         				name:"<s:text name='Group_voltage'/>",val:parseInt(data.MonNum),					// 缁勭鐢靛帇 
 		         			},{
 		         				name:"<s:text name='Charging_current'/>",val:parseInt(data.alm_id),					// 鍏呯數鐢垫祦 
diff --git a/gx_tieta/WebRoot/mobil/battM.html b/gx_tieta/WebRoot/mobil/battM.html
index ea2dbf0..2112e4d 100644
--- a/gx_tieta/WebRoot/mobil/battM.html
+++ b/gx_tieta/WebRoot/mobil/battM.html
@@ -56,7 +56,7 @@
 			}
 		}*/
 		
-		var temp = getCookie("county");
+		var temp = getCookie("battselect");
 		temp = JSON.parse(temp);
 		console.info(temp);
 		//鏍规嵁鏈烘埧id鏌ヨ鐢垫睜缁�
@@ -65,11 +65,13 @@
 			var data = {
 						StationName1: temp.StationName1,
 						StationName2: temp.StationName2,
-						StationName5: temp.StationName5
+						StationName5: temp.StationName5,
+						StationName: temp.StationName,
+						StationId: temp.StationId
 					};
 			$.ajax({ 	
 		        type: "post", 				
-		        url: "BattInfAction!serchStationName3",				
+		        url: "BattInfAction!serchBattByStation",				
 		        async:true,				
 		        dataType:'text',
 		        data:"json = "+JSON.stringify(data),
@@ -105,7 +107,7 @@
 			for (var i = 0; i < dataList.length; i++){
 				var _li = $('<li></li');
 				
-				var _a = $('<a href="javascript:void(0);" target="_top" data-ajax="false" value=""  data-transition="slide">'+dataList[i].StationName3+'</a>');
+				var _a = $('<a href="javascript:void(0);" target="_top" data-ajax="false" value=""  data-transition="slide">'+dataList[i].BattGroupName+'</a>');
 				// 灏哶a娣诲姞鍒癬li锛屽皢_li娣诲姞鍒癬ul涓�
 				_li.append(_a);
 				_ul.append(_li);
diff --git a/gx_tieta/WebRoot/mobil/control.html b/gx_tieta/WebRoot/mobil/control.html
index be1daec..3658a99 100644
--- a/gx_tieta/WebRoot/mobil/control.html
+++ b/gx_tieta/WebRoot/mobil/control.html
@@ -107,6 +107,7 @@
 		function searchBattInfo(){
 			var temp = getCookie("batt");
 			var batt = JSON.parse(temp);
+			console.info(batt);
 			arrTd = new Array();
 			$.ajax({ 	
 		        type: "post", 				
diff --git a/gx_tieta/WebRoot/mobil/history.html b/gx_tieta/WebRoot/mobil/history.html
index ab57eec..69d7432 100644
--- a/gx_tieta/WebRoot/mobil/history.html
+++ b/gx_tieta/WebRoot/mobil/history.html
@@ -63,6 +63,7 @@
 			var res_list=new Array();			//鐢靛鍐呴樆娴嬭瘯鏁版嵁
 			var temp = getCookie("batt");
 			var batt=eval("("+temp+")");
+			console.info(batt);
 			$(document).ready(function(){
 				//console.info(batt);
 				
@@ -94,6 +95,10 @@
 			
 			function searchcharedata(batt){
 				loadshow();
+				var temp = {
+					num:batt.FBSDeviceId,
+					BattGroupId:batt.BattGroupId
+				};
 				jieneng_charge_list = new Array();		//鑺傝兘鍏呯數娴嬭瘯鏁版嵁
 				tingdian_charge_list = new Array();		//鍋滅數鍏呯數娴嬭瘯鏁版嵁
 				
@@ -101,10 +106,10 @@
 				tingdian_discharge_list = new Array();	//鍋滅數鏀剧數娴嬭瘯鏁版嵁
 				//jiafu_discharge_list = new Array();	//鍋囪礋杞芥斁鐢垫祴璇曟暟鎹�
 				$.ajax({
-					url : "Batttestdata_infAction!findByInfo",
+					url : "Batttestdata_infAction_searchBattTestInfDataById",
 					async: true,
 					type : "POST",
-					data : "bti.BattGroupId="+batt.BattGroupId,
+					data : "json="+JSON.stringify(temp),
 					dataType :	"json",
 					success : function(data){
 						//console.info(data);
diff --git a/gx_tieta/WebRoot/mobil/selectbatt.html b/gx_tieta/WebRoot/mobil/selectbatt.html
new file mode 100644
index 0000000..87fc9cb
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/selectbatt.html
@@ -0,0 +1,150 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<title></title>
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
+<link rel="stylesheet" href="css/breadcrumb.css">
+<script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
+<script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
+<script type="text/javascript" src="mobilJs/base.js"></script>
+</head>
+	<body>
+		<!-- 涓夌骇鑿滃崟鍐呭	-->
+		<div data-role="page">
+			<div data-role="header" data-position="fixed">
+				<a href="machineroomM.html" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" target="_top" style="padding-top:0.7em;padding-bottom:0.7em;">杩斿洖</a>
+				<h1>钃勭數姹犵粍</h1>
+			</div>
+	
+			<div data-role="content">
+				<ul class="breadcrumb"></ul>
+				<div id="battList2"></div>
+			</div>
+			<div data-role="footer" data-position="fixed">
+				<!-- <h1>绂忓厜鐢靛瓙鏈夐檺鍏徃</h1> -->
+			</div>
+		</div>
+	</body>
+	<script type="text/javascript" src="js/battNav.js"></script>
+	<script type="text/javascript">
+		
+		var battinlist = new Array();			//鎵�鏈夌數姹犵粍鐨勬暟缁�
+		
+		$(document).ready(function(){
+			setCookie('batt', '');
+			//init();
+			searchkBattByStationid();
+		});
+		
+	/*	function init(){
+			var temp = getCookie("county");
+			if(temp != '' || temp != undefined) {
+				temp = eval('('+temp+')');
+				
+				var data = [
+					{url: 'javascript:JumpHomePage();', txt: '棣栭〉'},
+					{url: 'machineroomM.html', txt: temp.StationName5 },
+					{url: 'javascript:;', txt: '钃勭數姹犵粍'}
+				];
+				addBreadCrumb($('.breadcrumb').eq(0),data);
+							
+				searchkBattByStationid(temp.StationId);
+			}else {
+				window.location.href="machineroomM.html";
+			}
+		}*/
+		
+		var temp = getCookie("county");
+		temp = JSON.parse(temp);
+		console.info(temp);
+		//鏍规嵁鏈烘埧id鏌ヨ鐢垫睜缁�
+		function searchkBattByStationid(){
+			loadshow();
+			var data = {
+						StationName1: temp.StationName1,
+						StationName2: temp.StationName2,
+						StationName5: temp.StationName5
+					};
+			$.ajax({ 	
+		        type: "post", 				
+		        url: "BattInfAction!serchStationName3",				
+		        async:true,				
+		        dataType:'text',
+		        data:"json = "+JSON.stringify(data),
+		        success: function(data){							        	
+					data = eval('('+data+')');
+					var model = eval('('+data.result+')');
+					console.info(model);
+					if(model.code == 1){
+						battinlist = model.data;
+						createUl($('#battList2'), model.data);
+					}
+					loadclose();
+	        	},
+	        	error:function(){
+					loadclose();
+	        	} 				
+			});
+		}
+		
+		/*
+			澹版槑涓�涓嚱鏁癱reateUl,鐢ㄤ簬鐢熸垚ul鍜宭i
+			@param ulCon ul鐨勫鍣�
+			@param dataList  ul鐨勬暟鎹唴瀹�
+		*/
+		function createUl(ulCon, dataList) {
+			// 娓呯悊瀹瑰櫒涓嬬殑ul
+			ulCon.find('ul').remove();
+			
+			// 鍒涘缓ul
+			var _ul = $('<ul data-role="listview" data-inset="true"></ul>');
+			
+			// 閬嶅巻dataList鐢熸垚li鍜宎
+			for (var i = 0; i < dataList.length; i++){
+				var _li = $('<li></li');
+				
+				var _a = $('<a href="javascript:void(0);" target="_top" data-ajax="false" value=""  data-transition="slide">'+dataList[i].StationName3+'</a>');
+				// 灏哶a娣诲姞鍒癬li锛屽皢_li娣诲姞鍒癬ul涓�
+				_li.append(_a);
+				_ul.append(_li);
+			}
+			
+			// 灏哶ul娣诲姞鍒板鍣ㄤ腑
+			ulCon.append(_ul).trigger('create');			
+			loadclose();
+		}
+		
+		$(document).ready(function () {
+			var aLi = -1;
+			$('#battList2').on('click', 'ul li', function () {
+				aLi = $(this).index();
+				batt = getbatt(battinlist,aLi);
+				var json=window.JSON.stringify(batt);
+				setCookie("battselect",json);
+				window.location.href="battM.html";
+			});
+		});
+		
+		
+		
+		//鑾峰彇褰撳墠閫変腑鐨刡att
+		function getbatt(arr,index){
+			console.log(arr);
+			console.log(index);
+			if(arr.length>index){
+				return arr[index];
+			}
+			return undefined;
+		};
+		
+		$(function(){
+			$('.breadcrumb').on('tap', 'a[href="#page0"]', function() {
+				list=getList(battinlist,0,batt);
+				//init();
+			});
+		});
+	</script>
+	
+</html>
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/mobil/selectcounty.html b/gx_tieta/WebRoot/mobil/selectcounty.html
index 2007bb1..ac27a89 100644
--- a/gx_tieta/WebRoot/mobil/selectcounty.html
+++ b/gx_tieta/WebRoot/mobil/selectcounty.html
@@ -65,7 +65,7 @@
 				
 				var json=window.JSON.stringify(county);
 				setCookie("county",json);
-				window.location.href="battM.html";
+				window.location.href="selectbatt.html";
 			});
 				
 		});
diff --git a/gx_tieta/WebRoot/mobil/testdata.html b/gx_tieta/WebRoot/mobil/testdata.html
index 9839d58..8def9de 100644
--- a/gx_tieta/WebRoot/mobil/testdata.html
+++ b/gx_tieta/WebRoot/mobil/testdata.html
@@ -55,7 +55,7 @@
 			<script type="text/javascript" src="js/battNav.js"></script>
 			<script type="text/javascript">
 				$(function() {
-				console.warn(111133);
+				//console.warn(111133);
 				console.info(batt);
 					var data = [
 						{url: 'javascript:JumpHomePage();', txt: '棣栭〉'},
diff --git a/gx_tieta/src/com/fgkj/services/Battalarm_dataService.java b/gx_tieta/src/com/fgkj/services/Battalarm_dataService.java
index 8592d42..517783f 100644
--- a/gx_tieta/src/com/fgkj/services/Battalarm_dataService.java
+++ b/gx_tieta/src/com/fgkj/services/Battalarm_dataService.java
@@ -27,6 +27,7 @@
 import com.fgkj.dto.Batttestdata_inf;
 import com.fgkj.dto.Page;
 import com.fgkj.dto.ServiceModel;
+import com.fgkj.dto.User;
 import com.fgkj.dto.User_inf;
 import com.fgkj.dto.User_log;
 
@@ -238,7 +239,7 @@
 		adata.setAlm_cleared_type(0);//鍗曚綋鍐呴樆鍛婅鏁�
 		adata.setUsr_Id(0);//杩炴帴鏉¢樆鎶楀憡璀︽暟
 		adata.setAlm_value(0f);//瀹归噺鏇存崲鍛婅
-
+        adata.setRecord_Id(0l);//鍦ㄧ嚎鐢靛帇鍛婅鏁�
 		bmd.setAdata(adata);
 		int numZ=0;//鍛婅鎬绘暟
 		//姹傚叓绉嶇被鍨嬪憡璀︾殑鏁伴噺  
@@ -279,6 +280,9 @@
 				}
 				if(list.get(i).getAlm_id()==AlarmDaoFactory.Alarm_CapChange){
 					adata.setAlm_value((float)list.get(i).getNum());//瀹归噺鏇存崲鍛婅鏁�
+					numZ+=list.get(i).getNum();
+				}if(list.get(i).getAlm_id()==AlarmDaoFactory.Alarm_vol_Online){
+					adata.setRecord_Id((long)list.get(i).getNum());//鍦ㄧ嚎鐢靛帇鍛婅鏁�
 					numZ+=list.get(i).getNum();
 				}
 
@@ -566,20 +570,21 @@
 		tdata.setRecord_time(ActionUtil.getSimpDate(date1));
 		tdata.setRecord_time1(ActionUtil.getSimpDate(date2));
 		
+		User_inf uinf=new User_inf();
+		uinf.setUId(1002);
 		Batt_Maint_Dealarm bmd = new Batt_Maint_Dealarm();
 		bmd.setPage(p);
 		bmd.setAdata(adata);
 		bmd.setMainf(mainf);
 		bmd.setBinf(binf);
 		bmd.setTdata(tdata);
+		bmd.setUinf(uinf);
 		//System.out.println(bmd);
 		//bs.serchByCondition(bmd);
 		//bs.serchByInfo(bmd);
-		//.serchAlm(bmd);
+		bs.serchAlm(bmd);
 		//bs.serchGood();
-		User_inf uinf=new User_inf();
-		uinf.setUId(1038);
-		bs.serchTopAlmTen(uinf);
+		//bs.serchTopAlmTen(uinf);
 	}
 
 }

--
Gitblit v1.9.1