| | |
| | | if(his.getEndTime()!=null){ |
| | | sql+=" and alm_start_time <='"+ThreadLocalUtil.format(his.getEndTime(),1)+"' "; |
| | | } |
| | | if(his.getAlmIds()!=null){ |
| | | String[] almId=his.getAlmIds().split(","); |
| | | sql+=" and history.alm_id in ("; |
| | | for (int i=0;i<almId.length;i++) { |
| | | if(i==almId.length-1){ |
| | | sql=sql+almId[i]+") "; |
| | | }else{ |
| | | sql=sql+almId[i]+","; |
| | | } |
| | | } |
| | | } |
| | | List list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | |
| | | if(his.getEndTime()!=null){ |
| | | sql+=" and alm_start_time <='"+ThreadLocalUtil.format(his.getEndTime(),1)+"' "; |
| | | } |
| | | if(his.getAlmIds()!=null){ |
| | | String[] almId=his.getAlmIds().split(","); |
| | | sql+=" and history.alm_id in ("; |
| | | for (int i=0;i<almId.length;i++) { |
| | | if(i==almId.length-1){ |
| | | sql=sql+almId[i]+") "; |
| | | }else{ |
| | | sql=sql+almId[i]+","; |
| | | } |
| | | } |
| | | } |
| | | sql+=" ORDER BY alm_start_time asc limit "+ his.getLimitStart()+","+ his.getLimitEnd()+" "; |
| | | List<LockAlarmHis> list=sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |