From 1c45aa6534cb6b48f9dfeadd5b259b070e7e8ae7 Mon Sep 17 00:00:00 2001 From: 星伟 <星伟@192.168.10.25> Date: 星期四, 27 九月 2018 17:08:09 +0800 Subject: [PATCH] 设备告警参数加省市筛选条件 --- gx_tieta/src/com/fgkj/dao/impl/Dev_paramImpl.java | 5 +++-- gx_tieta/src/com/fgkj/dto/Dev_param.java | 27 ++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/Dev_paramImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Dev_paramImpl.java index aefaf23..99a5079 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/Dev_paramImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/Dev_paramImpl.java @@ -115,7 +115,8 @@ " alm_low_level,alm_high_en,alm_low_en," + " db_battinf.tb_battinf.stationname " + " from db_param.tb_dev_param,db_battinf.tb_battinf " + - " where db_param.tb_dev_param.dev_id=db_battinf.tb_battinf.FBSDeviceId " ; + " where db_param.tb_dev_param.dev_id=db_battinf.tb_battinf.FBSDeviceId " + + " and StationName1 like ? and StationName2 like ? and StationName like ? " ; //璁惧id鏉′欢 String devSqlT=" and dev_id=? "; String devSqlF=" and dev_id!=? "; @@ -135,7 +136,7 @@ String endSql=" order by db_param.tb_dev_param.num asc "; //鏈�缁堢殑SQl sql=baseSql+endSql; - List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{dparam.getDev_id(),dparam.getAlm_id()}, new CallBack() { + List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+dparam.getStationName1()+"%","%"+dparam.getStationName2()+"%","%"+dparam.getStationName()+"%",dparam.getDev_id(),dparam.getAlm_id()}, new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); diff --git a/gx_tieta/src/com/fgkj/dto/Dev_param.java b/gx_tieta/src/com/fgkj/dto/Dev_param.java index c028e97..d1970fe 100644 --- a/gx_tieta/src/com/fgkj/dto/Dev_param.java +++ b/gx_tieta/src/com/fgkj/dto/Dev_param.java @@ -13,6 +13,10 @@ private Integer alm_low_level; private Integer alm_high_en; private Integer alm_low_en; + + private String stationName; + private String stationName1; + private String stationName2; private String note; public Integer getNum() { @@ -82,6 +86,24 @@ public void setNote(String note) { this.note = note; } + public String getStationName() { + return stationName; + } + public void setStationName(String stationName) { + this.stationName = stationName; + } + public String getStationName1() { + return stationName1; + } + public void setStationName1(String stationName1) { + this.stationName1 = stationName1; + } + public String getStationName2() { + return stationName2; + } + public void setStationName2(String stationName2) { + this.stationName2 = stationName2; + } @Override public String toString() { return "Dev_param [num=" + num + ", dev_id=" + dev_id + ", alm_id=" @@ -89,8 +111,11 @@ + alm_high_coe + ", alm_low_coe=" + alm_low_coe + ", alm_high_level=" + alm_high_level + ", alm_low_level=" + alm_low_level + ", alm_high_en=" + alm_high_en - + ", alm_low_en=" + alm_low_en + ", note=" + note + "]"; + + ", alm_low_en=" + alm_low_en + ", stationName=" + stationName + + ", stationName1=" + stationName1 + ", stationName2=" + + stationName2 + ", note=" + note + "]"; } + } -- Gitblit v1.9.1