落后单体查询。ld9查询, 电池实时状态查询添加市级筛选
| | |
| | | package com.fgkj.dao;
|
| | |
|
| | | public class BattTestData {
|
| | | final public static int BATT_MON_COUNT_MAX = 512;
|
| | | final public static int BATT_DISCHARGE=3;//放电测试
|
| | | final public static int BATT_RES=5;//内阻测试
|
| | | |
| | | final public static int BATT_MON_COUNT_MAX = 512;
|
| | |
|
| | | final public static byte BATTDATA_NULL = 0;
|
| | | final public static byte BATTDATA_FLOAT = 1;
|
| | |
| | | "FROM web_site.tb_badbatt_mon,db_battinf.tb_battinf " +
|
| | | "where web_site.tb_badbatt_mon.battgroupid=db_battinf.tb_battinf.BattGroupId " +
|
| | | "and test_starttime>=? and test_starttime<=? " +
|
| | | "and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ?";
|
| | | "and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ? and db_battinf.tb_battinf.stationname2 like ? ";
|
| | |
|
| | | //选取蓄电池组条件
|
| | | String idSqlT=" and db_battinf.tb_battinf.battgroupid!=? ";
|
| | |
| | | sql=baseSql+endSql+limitSql;
|
| | | //System.out.println(sql);
|
| | | List<Batt_Maint_Dealarm> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{
|
| | | binf.getBattProductDate(),binf.getBattProductDate1(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%",
|
| | | binf.getBattProductDate(),binf.getBattProductDate1(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%","%"+binf.getStationName2()+"%",
|
| | | binf.getBattGroupId(),uinf.getUId(),
|
| | | (page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
|
| | |
|
| | |
| | | " and db_user.tb_user_inf.uid=? )";
|
| | | baseSql+=userSql;
|
| | | //机房维护区选择
|
| | | String stationSql=" AND db_battinf.tb_battinf.stationname like ? AND db_battinf.tb_battinf.stationname1 like ? ";
|
| | | String stationSql=" AND db_battinf.tb_battinf.stationname like ? AND db_battinf.tb_battinf.stationname1 like ? AND db_battinf.tb_battinf.stationname2 like ? ";
|
| | | baseSql+=stationSql;
|
| | | //电池状态
|
| | | String stateSqlT=" AND batt_state=? ";
|
| | |
| | | String limitSql=" limit ?,?";
|
| | | sql=baseSql+endSql+limitSql;
|
| | | //System.out.println(sql);
|
| | | List<Batt_State> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName()+"%","%"+binf.getStationName1()+"%"
|
| | | List<Batt_State> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"
|
| | | ,binf.getNum(),(page.getPageCurr() - 1)*page.getPageSize(),
|
| | | page.getPageSize()}, new CallBack() {
|
| | |
|
| | |
| | |
|
| | | 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+=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){
|
| | | }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() {
|
| | |
| | | " and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " and db_user.tb_user_inf.uid=? " +
|
| | | " and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ?)";
|
| | | " and db_battinf.tb_battinf.stationname1 like ? and db_battinf.tb_battinf.stationname like ? and db_battinf.tb_battinf.stationname2 like ?)";
|
| | | baseSql+=userSql;
|
| | |
|
| | | String endSql=" ORDER BY web_site.tb_badld9_mon.battgroupid asc ";
|
| | |
| | | //System.out.println(sql);
|
| | | List<Batt_Maint_Dealarm> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{
|
| | | binf.getBattProductDate(),binf.getBattProductDate1(),
|
| | | binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%",
|
| | | binf.getBattGroupId(),uinf.getUId(),"%"+binf.getStationName1()+"%","%"+binf.getStationName()+"%","%"+binf.getStationName2()+"%",
|
| | | (page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|