Merge branch 'FBS9600' of http://whychdw@118.89.139.230:10101/r/FBS9600App.git into FBS9600
| | |
| | | private int alm_is_confirmed; |
| | | private Date alm_confirmed_time; |
| | | private int alm_cleared_type; |
| | | private String note; |
| | | |
| | | private Page page; |
| | | public int getNum() { |
| | |
| | | this.page = page; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Battalram_data{" + |
| | |
| | | ", alm_is_confirmed=" + alm_is_confirmed + |
| | | ", alm_confirmed_time=" + alm_confirmed_time + |
| | | ", alm_cleared_type=" + alm_cleared_type + |
| | | ", note='" + note + '\'' + |
| | | ", page=" + page + |
| | | '}'; |
| | | } |
| | |
| | | @Override |
| | | public List serchByCondition(SQLiteDatabase db, Object obj) { |
| | | Battalram_data adata=(Battalram_data)obj; |
| | | String numsql = "select count(*) from tb_battalarm_data where "; |
| | | String sql=" select * from tb_battalarm_data where "; |
| | | String numsql = "select count(*) from tb_battalarm_data,tb_battinf where tb_battinf.BattGroupId=tb_battalarm_data.BattGroupId "; |
| | | String sql=" select distinct tb_battalarm_data.num,tb_battalarm_data.BattGroupId,tb_battalarm_data.MonNum,alm_id,alm_signal_id,alm_start_time,alm_end_time,alm_value,alm_is_confirmed,alm_confirmed_time,alm_cleared_type" + |
| | | ",tb_battinf.BattGroupName " + |
| | | " from tb_battalarm_data,tb_battinf where tb_battinf.BattGroupId=tb_battalarm_data.BattGroupId "; |
| | | //告警类型 |
| | | String typeSqlT=" alm_cleared_type!=? "; |
| | | String typeSqlF=" alm_cleared_type=? "; |
| | | String typeSqlT=" and alm_cleared_type!=? "; |
| | | String typeSqlF=" and alm_cleared_type=? "; |
| | | if(adata.getAlm_cleared_type()==100){ |
| | | sql+=typeSqlT; |
| | | numsql+=typeSqlT; |
| | |
| | | a.setAlm_is_confirmed(rs.getInt(rs.getColumnIndex("alm_is_confirmed"))); |
| | | a.setAlm_confirmed_time(ActionUtil.sdf.parse(rs.getString(rs.getColumnIndex("alm_confirmed_time")))); |
| | | a.setAlm_cleared_type(rs.getInt(rs.getColumnIndex("alm_cleared_type"))); |
| | | a.setNote(rs.getString(rs.getColumnIndex("BattGroupName"))); |
| | | Page page=new Page(); |
| | | page.setPageAll(count); |
| | | a.setPage(page); |
| | |
| | | package com.fgkj.service; |
| | | |
| | | import android.database.sqlite.SQLiteDatabase; |
| | | import android.util.Log; |
| | | import android.webkit.JavascriptInterface; |
| | | import android.webkit.WebView; |
| | | |
| | |
| | | //根据battfroupid查询历史数据查询 |
| | | @JavascriptInterface |
| | | public void serchByCondition(String obj) { |
| | | //Log.e("Battalram_dataService", "serchByCondition: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" ); |
| | | //Log.e("Battalram_dataService", "serchByCondition: "+obj ); |
| | | ServiceModel model=new ServiceModel(); |
| | | SQLiteDatabase db=dbHelper.getWritableDatabase(); |
| | | Battalram_data adata= ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(obj,Battalram_data.class); |
| | | List list=dao.serchByCondition(db,adata); |
| | | //Log.e("Battalram_dataService", "serchByCondition: "+list); |
| | | if(list!=null&&list.size()>0){ |
| | | model.code=1; |
| | | model.cmd_type=adata.getAlm_cleared_type(); |
| | |
| | | import com.fgkj.dao.SQLdm; |
| | | import com.fgkj.dto.Battresdata; |
| | | import com.fgkj.dto.Batttestdata_inf; |
| | | import com.fgkj.service.Battalram_dataService; |
| | | import com.fgkj.service.BattinfService; |
| | | import com.fgkj.service.BattresdataService; |
| | | import com.fgkj.service.Battresdata_infService; |
| | |
| | | webview.addJavascriptInterface(new BattresdataService(webview, dbHelper),BattresdataService.BATTRESDATASERVICE_NAME); |
| | | //tb_battresdata_inf表的操作 |
| | | webview.addJavascriptInterface(new Battresdata_infService(webview, dbHelper),Battresdata_infService.BATTRESDATA_INFSERVICE_NAME); |
| | | //添加告警接口 |
| | | webview.addJavascriptInterface(new Battalram_dataService(webview,dbHelper),Battalram_dataService.BATTALRAM_DATASERVICE_NAME); |
| | | } |
| | | |
| | | @Override |