| | |
| | | return list; |
| | | } |
| | | //系统概览获取半小时交流输入统计 |
| | | public List<PwrHisRealAcInDto> getHalfHourPwrHisAcinData(String tableName,Integer granularity,String halfHourAgoTime) { |
| | | public List<PwrHisRealAcInDto> getHalfHourPwrHisAcinData(String tableName,Integer granularity,Date recordDatetime,Date recordDatetime1) { |
| | | String sql="select distinct record_datetime,acin1_vola,acin1_volb,acin1_volc,acin2_vola,acin2_volb,acin2_volc " + |
| | | ",acin1_curra,acin1_currb,acin1_currc,acin2_curra,acin2_currb,acin2_currc " + |
| | | "from (select a.*, (@i:= @i+1) as number " + |
| | | " from (select * from "+tableName+" "+ |
| | | " where record_datetime>='"+halfHourAgoTime+"') a, " + |
| | | " (select @i:=0) b) c "+ |
| | | " where c.number%"+granularity+"=0 or c.number=1 "; |
| | | " from "+tableName+" where record_datetime>='"+ActionUtil.sdf.format(recordDatetime)+"'" + |
| | | " and record_datetime<='"+ActionUtil.sdf.format(recordDatetime1)+ |
| | | "' and record_num%"+granularity+"=0 or record_num=1 or record_num=100 "; |
| | | sql+=" order by record_datetime asc"; |
| | | List<PwrHisRealAcInDto> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |