From 8b67d0abb22ebbab192fa51be7f271eb215999d9 Mon Sep 17 00:00:00 2001 From: 81041 <81041@192.168.10.9> Date: 星期一, 26 十一月 2018 15:34:06 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/mobil/batt-state-statistical.html | 63 ++++++++++++------------------- gx_tieta/src/com/fgkj/actions/User_infAction.java | 13 ++++++ gx_tieta/WebRoot/Top.jsp | 30 ++++++++++++++- 3 files changed, 66 insertions(+), 40 deletions(-) diff --git a/gx_tieta/WebRoot/Top.jsp b/gx_tieta/WebRoot/Top.jsp index ed8a59f..458dcfe 100644 --- a/gx_tieta/WebRoot/Top.jsp +++ b/gx_tieta/WebRoot/Top.jsp @@ -132,6 +132,9 @@ </div> <div class="cell-list control"> <img src="image/webStatus/control_normal.gif" alt="绾跨▼鐩戞帶绋嬪簭" title="绾跨▼鐩戞帶绋嬪簭杩愯锛氭甯�"> + </div> + <div class="cell-list server-time"> + 2018-11-26 00:00:00 </div> </div> <div class="international"> @@ -334,8 +337,6 @@ } - - $(function(){ $.ajax({ type: "post", @@ -528,6 +529,31 @@ warnAlarmData = temp; } + seachServerTime(); + //鑾峰彇鏈嶅姟鍣ㄤ笂鐨勬椂闂� + function seachServerTime(){ + $.ajax({ + type:"post", + url: "User_infAction!searchServerTime", + async:true, + dataType:'text', + data:null, + success: function(data){ + data = eval('('+data+')'); + var model = eval('('+data.result+')'); + if(model.code == 1){ + $('.server-time').text(model.msg); + }else{ + + } + setTimeout(seachServerTime, 1000); + }, + error:function() { + setTimeout(seachServerTime, 2000); + } + }); + } + // 鐩戞祴褰撳墠鐨勫憡璀︿俊鎭槸鍚︿负鏈�鏂扮殑鍛婅 function checkWarnDataIsNew(warnData) { var rs = 0; diff --git a/gx_tieta/WebRoot/mobil/batt-state-statistical.html b/gx_tieta/WebRoot/mobil/batt-state-statistical.html index 04f963b..e3d8203 100644 --- a/gx_tieta/WebRoot/mobil/batt-state-statistical.html +++ b/gx_tieta/WebRoot/mobil/batt-state-statistical.html @@ -110,9 +110,9 @@ <option value="">鍏ㄩ儴</option> </select> <p>缁熻鏂瑰紡</p> - <select id="" data-mini="true"> - <option value="">鎸夊勾缁熻</option> - <option value="">鎸夋湀缁熻</option> + <select id="statistics" data-mini="true"> + <option value="3">鎸夊勾缁熻</option> + <option value="1">鎸夋湀缁熻</option> </select> <p>鏃堕棿</p> @@ -193,19 +193,11 @@ loadshow(); var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):''; var temp = createSearchForm(); - console.info(stationid); - /*var temp = { - StationName1:$("#station_name1").val(), - StationName2:$("#city").val(), - StationName5: $("#county").val(), - StationName: $("#station_name").val(), - StationId: stationid - };*/ - //console.info(temp); + console.info(temp); var json = JSON.stringify(temp); //console.info(json); arrTd = new Array(); - $.post("Batt_Maint_DealarmAction_serchByConditionNew","result="+json,function(data){ + $.post("Bts_station_eventAction!serchByCondition","json="+json,function(data){ data=eval("("+data.result+")"); //console.info(data); if(data.code==1 && data.data.length>0){ @@ -214,14 +206,18 @@ arr=new Array(); index=0; for(var i=0;i<data.length;i++){ - Page.pageAll=data[i].Size; - arr[index++]=data[i].BattGroupId; //鐢垫睜缁刬d - arr[index++]=data[i].StationName; //鏈烘埧鍚嶇О - arr[index++]=data[i].StationIp; //鏈烘埧IP - arr[index++]=data[i].BattGroupName; //鐢垫睜缁勫悕绉� - arr[index++]=data[i].BattGroupNum; //鐢垫睜缁勫簭鍙� - - + arr[index++]=data[i].note; //娴嬭瘯鏃ユ湡 + arr[index++]=data[i].stationName; //鏈烘埧鍚嶇О + arr[index++]=data[i].station_event_type_poff; + arr[index++]=data[i].station_event_type_fadian; + arr[index++]=data[i].station_event_type_diaozhan; + arr[index++]=data[i].station_event_type_dooropen; + arr[index++]=data[i].station_event_type_xuhang; + arr[index++]=data[i].station_event_type_tempup; + arr[index++]=data[i].station_event_type_templow; + arr[index++]=data[i].station_event_type_dampup; + arr[index++]=data[i].station_event_type_damplow; + arr[index++]=""; //鎸夐挳 } //console.info(Page); createTbl(tbl, arrTh, arr); @@ -243,27 +239,18 @@ function createSearchForm(){ + var stationid = $('#homeName').find("option:selected").attr('Stationid'); var temp={ - page:{ - pageCurr:Page.pageCurr, - pageSize:Page.pageSize, - }, - binf:{ StationName1:$('#mainteArea').val(), StationName2:$('#city').val(), StationName5:$('#country').val(), - StationName:$('#homeName').val(), - - }, - - tdata:{ - - record_time:$('#startTestrecord').val(), //鐢垫睜娴嬭瘯璁板綍鏃堕棿娈� - record_time1:$('#endTestrecord').val() - - } - + StationName3:$('#homeName').val(), //鏈烘埧鍚嶇О + StationId: stationid?stationid:0, + BattInUseDate:$('#startTestrecord').val()+" 00:00:00", //鐢垫睜娴嬭瘯璁板綍鏃堕棿娈� + BattInUseDate1:$('#endTestrecord').val()+" 23:59:59", + BattGroupNum:$('#statistics').val(), }; + console.info(temp); return temp; } // stringify(createSearchForm()); @@ -433,7 +420,7 @@ //鏍规嵁鏈烘埧鑾峰彇鐢垫睜缁� function findserchByBattGroupNamebystationname(){ - var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):''; + var stationid = $("#country").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):''; var data = { StationName1: $("#mainteArea").val(), diff --git a/gx_tieta/src/com/fgkj/actions/User_infAction.java b/gx_tieta/src/com/fgkj/actions/User_infAction.java index 1b732d0..cb1ab3b 100644 --- a/gx_tieta/src/com/fgkj/actions/User_infAction.java +++ b/gx_tieta/src/com/fgkj/actions/User_infAction.java @@ -1,5 +1,7 @@ package com.fgkj.actions; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; import com.fgkj.dao.UinfDaoFactory; @@ -212,6 +214,17 @@ public String checkService(){ return SUCCESS; } + + //鑾峰彇鏈嶅姟鍣ㄧ殑鏃堕棿 + public String searchServerTime(){ + ServiceModel model = new ServiceModel(); + model.setCode(1); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + model.setMsg(sdf.format(new Date())); + result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model); + return SUCCESS; + } + public String test(){ System.out.println(upjson); System.out.println(uif); -- Gitblit v1.9.1