From eeff0e75180a127e83e9c691e805fdab543e8581 Mon Sep 17 00:00:00 2001 From: 星伟 <星伟@192.168.10.25> Date: 星期四, 27 九月 2018 10:07:36 +0800 Subject: [PATCH] 电池组的serchBymonNum --- gx_tieta/src/com/fgkj/dao/impl/Batt_attentionImpl.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/Batt_attentionImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Batt_attentionImpl.java index dc13c8c..f04b312 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/Batt_attentionImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/Batt_attentionImpl.java @@ -86,6 +86,14 @@ }else{ baseSql+=station1SqlF; } + //鐢ㄤ簬甯傜骇绛涢�� + String station2SqlT=" and stationname2!=? ";//鍏ㄩ儴 + String station2SqlF=" and stationname2=? "; + if(binf.getStationName2().equals("")){ + baseSql+=station2SqlT; + }else{ + baseSql+=station2SqlF; + } //鐢ㄤ簬鏈烘埧绔欑偣 String stationSqlT=" and stationname!=? ";//鍏ㄩ儴 String stationSqlF=" and stationname=? "; @@ -118,7 +126,7 @@ //System.out.println(sql); List<BattInf> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{ binf.getNum() - ,binf.getStationName1(),binf.getStationName(),binf.getBattGroupId(),binf.getMonNum() + ,binf.getStationName1(),binf.getStationName2(),binf.getStationName(),binf.getBattGroupId(),binf.getMonNum() ,(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() { public List getResults(ResultSet rs) { -- Gitblit v1.9.1