| | |
| | | sqlExecuteService.execute(sql); |
| | | } |
| | | |
| | | //29-SubTablePageInfoUtils.java;104行 |
| | | //29,65-SubTablePageInfoUtils.java;104行 |
| | | public int getCountForTX(PwrdevAlarmHistory param){ |
| | | String sql="select count(distinct alarm.num) as number from db_pwrdev_alarm."+param.getRecordYear()+" alarm,db_pwrdev_inf.tb_pwrdev_inf inf " + |
| | | " where alarm.PowerDeviceId = inf.PowerDeviceId "; |
| | |
| | | return list; |
| | | } |
| | | |
| | | //34,51-SubTablePageInfoUtils.java;121行 |
| | | //34,51,64-SubTablePageInfoUtils.java;121行 |
| | | public int getCountForInterface(InterfaceParam param){ |
| | | String sql="SELECT count(*) as number FROM db_alarm."+param.getRecordYear()+" history,db_battinf.tb_battinf " + |
| | | " where history.dev_id=db_battinf.tb_battinf.FbsDeviceId "; |
| | |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | //66-SubTablePageInfoUtils.java;80行 |
| | | public int getCount(AlarmPar param){ |
| | | String sql="select count(distinct history.num) as number " + |
| | | " from db_alarm."+param.getRecordYear()+" history,db_battinf.tb_battinf " + |
| | | " where history.battgroupid=db_battinf.tb_battinf.battgroupid " + |
| | | " and alm_id in("+param.getAlmIdOne()+","+param.getAlmIdTwo()+", "+param.getAlmIdThree()+ ", "+param.getAlmIdFour()+ ", "+param.getAlmIdFive()+ ", "+param.getAlmIdSix()+ ", "+param.getAlmIdSeven()+ ", "+param.getAlmIdEight()+ ") " + |
| | | " and alm_signal_id%2 in("+param.getAlmSignalIdOne()+","+param.getAlmSignalIdTwo()+") " + |
| | | " and alm_level in( "+param.getAlmLevelOne()+ ", "+param.getAlmLevelTwo()+ ", "+param.getAlmLevelThree()+ ", "+param.getAlmLevelFour()+ ") " + |
| | | " and alm_start_time>='"+ActionUtil.sdf.format(param.getAlmStartTime())+"' and alm_start_time <='"+ActionUtil.sdf.format(param.getAlmStartTime1())+"' " + |
| | | " and db_battinf.tb_battinf.stationname1 like '%"+param.getStationname1()+"%' " + |
| | | " and db_battinf.tb_battinf.stationname like '%"+param.getStationname()+"%' "; |
| | | if(param.getBattGroupId()==0){ |
| | | sql+=" and db_battinf.tb_battinf.battgroupid!="+param.getBattGroupId()+" "; |
| | | }else{ |
| | | sql+=" and db_battinf.tb_battinf.battgroupid="+param.getBattGroupId()+" "; |
| | | } |
| | | sql+=" and history.BattGroupId " + |
| | | " in(select distinct db_battinf.tb_battinf.battgroupid from " + |
| | | " db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf " + |
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " + |
| | | " 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="+param.getUId()+" " + |
| | | " )"; |
| | | List list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | LinkedList<Object> temp = new LinkedList<>(); |
| | | try { |
| | | while (rs.next()) |
| | | temp.add(rs.getInt("number")); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return temp; |
| | | } |
| | | }); |
| | | int num =0; |
| | | if(list!=null){ |
| | | num= (int) list.get(0); |
| | | } |
| | | return num; |
| | | } |
| | | } |