From 35fefed0792c40cb99b8d15fa5811bbb5992bff9 Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期一, 21 一月 2019 10:42:24 +0800 Subject: [PATCH] 修改 --- gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java index 75cc4c9..d8119a3 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/BattinfThirdImpl.java @@ -10,6 +10,7 @@ import com.fgkj.actions.ActionUtil; import com.fgkj.dao.BaseDAO; +import com.fgkj.dao.BattTestData; import com.fgkj.dao.CallBack; import com.fgkj.dao.DAOHelper; import com.fgkj.db.DBUtil; @@ -131,11 +132,11 @@ String endSql=" order by db_battinf.tb_battinf.battgroupid "; sqlT+=endSql; sqlE+=endSql; - if(tdata.getTest_type()==3){ + if(tdata.getTest_type()==BattTestData.BATT_DISCHARGE){ sql=sqlT; //System.out.println(sql); list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getStationName1(),binf.getStationName()},new BattinfThirdImpl()); - }else if(tdata.getTest_type()==5){ + }else if(tdata.getTest_type()==BattTestData.BATT_RES){ sql=sqlE; //System.out.println(sql); list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getStationName1(),binf.getStationName()},new CallBack() { @@ -233,6 +234,16 @@ sqlT+=station2SqlF; sqlE+=station2SqlF; } + //鐢ㄤ簬鍖哄幙 + String station5SqlT=" and stationname5!=? ";//鍏ㄩ儴 + String station5SqlF=" and stationname5=? "; + if(binf.getStationName5().equals("")){ + sqlT+=station5SqlT; + sqlE+=station5SqlT; + }else{ + sqlT+=station5SqlF; + sqlE+=station5SqlF; + } //鎸夌収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 "; @@ -246,14 +257,14 @@ sqlT+=stationSqlF+tendSql; sqlE+=stationSqlF+eendSql; } - if(tdata.getTest_type()==3){ + if(tdata.getTest_type()==BattTestData.BATT_DISCHARGE){ sql=sqlT; //System.out.println(sql); - 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){ + list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId(),tdata.getTest_type(),binf.getMonNum(),binf.getStationName1(),binf.getStationName2(),binf.getStationName5(),binf.getStationName()},new BattinfThirdImpl()); + }else if(tdata.getTest_type()==BattTestData.BATT_RES){ 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.getStationName2(),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.getStationName5(),binf.getStationName()},new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); -- Gitblit v1.9.1