| | |
| | | if (pageCount > 0) |
| | | list = hazardousWasteService.selectAll(startTime,endTime,status,applyPerson,getUser().getProject(),department,tid,first, pageSize); |
| | | } |
| | | }else { |
| | | this.setRowCount(0); |
| | | } |
| | | //查询更换模式 |
| | | if (isSearch) { |
| | | isSearch = false; |
| | | } |
| | | selectedOne = null; |
| | | } catch (Exception e) { |
| | | logger.error("error occured.", e); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public HazardousWaste getRowData(String rowKey) { |
| | | Iterator<HazardousWaste> iterator = this.iterator(); |
| | | HazardousWaste su = null; |
| | | while (iterator.hasNext()) { |
| | | su = iterator.next(); |
| | | if ( su.getId().equals(Long.parseLong(rowKey))) { |
| | | return su; |
| | | } |
| | | } |
| | | return null; |
| | | // Iterator<HazardousWaste> iterator = this.iterator(); |
| | | // HazardousWaste su = null; |
| | | // while (iterator.hasNext()) { |
| | | // su = iterator.next(); |
| | | // if ( su.getId().equals(Long.parseLong(rowKey))) { |
| | | // return su; |
| | | // } |
| | | // } |
| | | return hazardousWasteService.selectById(Long.parseLong(rowKey)); |
| | | } |
| | | }; |
| | | } |
| | |
| | | |
| | | List<HazardousWaste> list = null; |
| | | try { |
| | | int pageCount = hazardousWasteService.countStatistics(startTime,endTime,status,applyPerson,project,department); |
| | | |
| | | this.setRowCount(pageCount); |
| | | if (pageCount > 0) |
| | | list = hazardousWasteService.selectStatistics(startTime,endTime,status,applyPerson,project,department,first, pageSize); |
| | | if (getUser().getWaster() != null){ |
| | | if (getUser().getWaster().equals(Waster.MANAGE)){ |
| | | int pageCount = hazardousWasteService.countStatistics(startTime,endTime,status,applyPerson,project,department); |
| | | this.setRowCount(pageCount); |
| | | if (pageCount > 0) |
| | | list = hazardousWasteService.selectStatistics(startTime,endTime,status,applyPerson,project,department,first, pageSize); |
| | | }else if (StringUtils.isNotBlank(getUser().getProject())){ |
| | | int pageCount = hazardousWasteService.countStatistics(startTime,endTime,status,applyPerson,getUser().getProject(),department); |
| | | this.setRowCount(pageCount); |
| | | if (pageCount > 0) |
| | | list = hazardousWasteService.selectStatistics(startTime,endTime,status,applyPerson,getUser().getProject(),department,first, pageSize); |
| | | } |
| | | }else { |
| | | this.setRowCount(0); |
| | | } |
| | | |
| | | //查询更换模式 |
| | | if (isAnalysSearch) { |
| | |
| | | |
| | | @Override |
| | | public HazardousWaste getRowData(String rowKey) { |
| | | Iterator<HazardousWaste> iterator = this.iterator(); |
| | | HazardousWaste su = null; |
| | | while (iterator.hasNext()) { |
| | | su = iterator.next(); |
| | | if ( su.getId().equals(Long.parseLong(rowKey))) { |
| | | return su; |
| | | } |
| | | } |
| | | // Iterator<HazardousWaste> iterator = this.iterator(); |
| | | // HazardousWaste su = null; |
| | | // while (iterator.hasNext()) { |
| | | // su = iterator.next(); |
| | | // if ( su.getId().equals(Long.parseLong(rowKey))) { |
| | | // return su; |
| | | // } |
| | | // } |
| | | return null; |
| | | } |
| | | }; |
| | |
| | | } |
| | | |
| | | public void exportStatistics2Excel(){ |
| | | List<Map> list = hazardousWasteService.exportStatisticsList(startTime,endTime,status,applyPerson,project,department); |
| | | List<Map> list = new ArrayList<>(); |
| | | if (getUser().getWaster() != null){ |
| | | if (getUser().getWaster().equals(Waster.MANAGE)){ |
| | | list = hazardousWasteService.exportStatisticsList(startTime,endTime,status,applyPerson,project,department); |
| | | }else if (StringUtils.isNotBlank(getUser().getProject())){ |
| | | list = hazardousWasteService.exportStatisticsList(startTime,endTime,status,applyPerson,getUser().getProject(),department); |
| | | } |
| | | } |
| | | try{ |
| | | hazardousWasteService.exportStatistics2Excel(list); |
| | | }catch (Exception e){ |