From 649bed5440ef694163c9010d1e9cdf6de24c3b91 Mon Sep 17 00:00:00 2001 From: 星伟 <星伟@192.168.10.25> Date: 星期四, 27 九月 2018 11:50:15 +0800 Subject: [PATCH] 电池单体统计分析查询添加市级筛选 --- gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java index d391570..75cc4c9 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java @@ -223,6 +223,16 @@ sqlT+=station1SqlF; sqlE+=station1SqlF; } + //鐢ㄤ簬甯傜骇 + String station2SqlT=" and stationname2!=? ";//鍏ㄩ儴 + String station2SqlF=" and stationname2=? "; + if(binf.getStationName2().equals("")){ + sqlT+=station2SqlT; + sqlE+=station2SqlT; + }else{ + sqlT+=station2SqlF; + sqlE+=station2SqlF; + } //鎸夌収battgroupid鎺掑簭 String tendSql=" order by db_batt_testdata.tb_batttestdatastop_"+binf.getBattGroupId()+".test_record_count asc,db_batt_testdata.tb_batttestdatastop_" +binf.getBattGroupId()+".mon_num asc "; String eendSql=" order by db_batt_testdata.tb_battresdata_"+binf.getBattGroupId()+".test_record_count asc,db_batt_testdata.tb_battresdata_" +binf.getBattGroupId()+".mon_num asc "; @@ -239,11 +249,11 @@ if(tdata.getTest_type()==3){ sql=sqlT; //System.out.println(sql); - list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getMonNum(),binf.getStationName1(),binf.getStationName()},new BattinfThirdImpl()); + list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getMonNum(),binf.getStationName1(),binf.getStationName2(),binf.getStationName()},new BattinfThirdImpl()); }else if(tdata.getTest_type()==5){ sql=sqlE; //System.out.println(sql); - list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getMonNum()*10+1,binf.getStationName1(),binf.getStationName()},new CallBack() { + list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getMonNum()*10+1,binf.getStationName1(),binf.getStationName2(),binf.getStationName()},new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); -- Gitblit v1.9.1