From 3e4465519fc0bebf411f1accb97a2d053273beac Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期三, 26 九月 2018 14:46:15 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/batt-life-manage.jsp | 103 +++++++++------------------------------------------ gx_tieta/src/com/fgkj/dao/impl/Batt_enduranceImpl.java | 6 +- 2 files changed, 22 insertions(+), 87 deletions(-) diff --git a/gx_tieta/WebRoot/batt-life-manage.jsp b/gx_tieta/WebRoot/batt-life-manage.jsp index 4434ebc..4abed5f 100644 --- a/gx_tieta/WebRoot/batt-life-manage.jsp +++ b/gx_tieta/WebRoot/batt-life-manage.jsp @@ -80,16 +80,18 @@ </select> </td> <td> - <select id="life_type"> - <option value="0">瀹炴椂缁埅</option> - <option value="1">娼滃湪缁埅</option> + <select id="endurance_state"> + <option value=0>鍏ㄩ儴</option> + <option value=1>瀹炴椂缁埅</option> + <option value=2>娼滃湪缁埅</option> </select> </td> <td> - <select id="warn_type"> - <option value="0">缁埅鏃堕棿灏忎簬1灏忔椂</option> - <option value="1">缁埅鏃堕棿灏忎簬2灏忔椂</option> - <option value="2">缁埅鏃堕棿灏忎簬3灏忔椂</option> + <select id="endurance_timelong"> + <option value =0>鍏ㄩ儴</option> + <option value=60>缁埅鏃堕棿灏忎簬1灏忔椂</option> + <option value=120>缁埅鏃堕棿灏忎簬2灏忔椂</option> + <option value=180>缁埅鏃堕棿灏忎簬3灏忔椂</option> </select> </td> <!-- <td style="width: 15%"> @@ -333,10 +335,6 @@ $select.text(''); for(var i=0;i<data.data.length;i++){ var $option=$("<option></option>"); - /* if(i==0){ - $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.data.length+"<s:text name='Species'/>)"); - $option.attr("value", ""); - }else */ { $option.text(data.data[i]); $option.attr("value",data.data[i]); @@ -349,76 +347,16 @@ ///findserchByBattGroupNamebystationname(); }); } - - /* //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 - $.post("BattInfAction_serchByStation",null,function(data){ - data=data.result; - data=eval("("+data+")"); - //console.info(data); - if(data.code==1 && data.data.length>0){ - var $select=$("#station_name1"); - $select.text(""); - for(var i=0;i<=data.data.length;i++){ - $option=$("<option></option>"); - if(i==0){ - $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.sum+"<s:text name='Species'/>)"); - $option.attr("value", ""); - }else{ - $option.text(data.data[i-1].StationName1); - $option.attr("value",data.data[i-1].StationName1); - } - $select.append($option); - } - } - findStationNamebyStationname1(); - }); - - //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 - $('#station_name1').change(function(){ - findStationNamebyStationname1(); - }); - - //鏍规嵁缁存姢鍖烘煡璇㈢珯鐐� - function findStationNamebyStationname1(){ - //var stationid = getQueryString("stationId"); - var selectvalue=$("#station_name1 option:selected").val(); - //alert(selectvalue); - $.post("BattInfAction_serchByStationName","bif.StationName1="+selectvalue,function(data){ - //console.info(data); - data=data.result; - data=eval("("+data+")"); - if(data.code==1 && data.data.length>0){ - var $select = $("#station_name"); - $select.text(""); - for(var i=0;i<=data.data.length;i++){ - var $option=$("<option></option>"); - if(i==0){ - $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.sum+"<s:text name='Species'/>)"); - $option.attr("value", ""); - }else{ - $option.text(data.data[i-1].StationName); - $option.attr("value",data.data[i-1].StationName); - - } - $select.append($option); - } - } - }); - } */ - //鏋勯�犳煡璇㈡潯浠� function createSearchParam(){ //alert($('#endu_type').val()); var temp = { - num:3, //鐢垫睜鐘舵�� - BattGroupId:$("#endu_type").val(), //鏌ヨ鏁版嵁 - StationName:$('#station_name').val(), //鏈烘埧鍚� - StationName1:$('#station_name1').val(), //缁存姢鍖� - /* BattProductDate:$('#starttime').val()+" 00:00:00", - BattProductDate1:$('#endtime').val()+" 23:59:59", */ //鐢熶骇鏃ユ湡娈� + note:$('#station_name').val(), //鏌ヨ鏁版嵁 + endurance_state:$('#endurance_state').val(), //鏈烘埧鍚� + endurance_timelong:$('#endurance_timelong').val(), //缁存姢鍖� }; - //console.info(temp); + console.info(temp); return temp; } @@ -437,10 +375,10 @@ arrTd = new Array(); $.ajax({ type: "post", - url: "Batttestdata_infAction!serchBattLife", + url: "Batt_enduranceAction!serchByCondition", async:true, dataType:'text', - data:"result="+JSON.stringify(temp), + data:"json="+JSON.stringify(temp), success: function(data){ data = eval("("+data+")"); var model = eval("("+data.result+")"); @@ -454,14 +392,11 @@ }else{ Page.pageAll = 0; noContent.showNoContent("鏆傛棤鏌ヨ缁撴灉!"); + loading.hideLoading(); } - var pageNum = Math.ceil(Page.pageAll/Page.pageSize); - $('#page_num').val(Page.pageCurr); - $('#current').text(Page.pageCurr+"/"+pageNum); - $('#total').text(Page.pageAll); - - createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus); - loading.hideLoading(); + + //createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus); + // loading.hideLoading(); }, error:function(){ loading.hideLoading(); diff --git a/gx_tieta/src/com/fgkj/dao/impl/Batt_enduranceImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Batt_enduranceImpl.java index 490600b..6fc39ff 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/Batt_enduranceImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/Batt_enduranceImpl.java @@ -46,7 +46,7 @@ " from web_site.tb_batt_endurance,db_battinf.tb_battinf " + " where tb_batt_endurance.stationid=db_battinf.tb_battinf.stationid " ; //鏈烘埧绛涢�� - String stationSql=" and tb_batt_endurance.stationid like ?"; + String stationSql=" and db_battinf.tb_battinf.StationName like ?"; sql+=stationSql; //缁埅鐘舵�� String enduranceSqlT=" and endurance_state=? "; @@ -67,7 +67,7 @@ //鎺掑簭鏃堕棿 String orderSql=" order by endurance_timelong asc"; //System.out.println(sql); - List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+bendurance.getStationid()+"%",bendurance.getEndurance_state(),bendurance.getEndurance_timelong()}, new CallBack() { + List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+bendurance.getNote()+"%",bendurance.getEndurance_state(),bendurance.getEndurance_timelong()}, new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); @@ -102,7 +102,7 @@ public static void main(String[] args) { Batt_enduranceImpl bimpl=new Batt_enduranceImpl(); Batt_endurance ben=new Batt_endurance(); - ben.setStationid(""); + ben.setNote(""); ben.setEndurance_state(0); ben.setEndurance_timelong(0); List list=bimpl.serchByCondition(ben); -- Gitblit v1.9.1