| | |
| | |
|
| | | 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;
|
| | |
| | | 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() {
|
| | |
| | | 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 ";
|
| | |
| | | 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.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.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.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();
|