| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.process.dto.ProcessReportDto; |
| | | import com.ruoyi.process.mapper.ProcessReportMapper; |
| | | import com.ruoyi.process.pojo.ProcessReport; |
| | | import com.ruoyi.process.service.ProcessReportService; |
| | |
| | | @Resource |
| | | private ProcessReportMapper processReportMapper; |
| | | |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public IPage<ProcessReport> pageProcessReport(Page page, ProcessReport processReport) { |
| | | //todo 仅看我 |
| | | IPage<ProcessReport> processReportIPage = processReportMapper.pageProcessReport(page, QueryWrappers.queryWrappers(processReport)); |
| | | // for (ProcessReport record : processReportIPage.getRecords()) { |
| | | // List<String> name = new ArrayList<>(); |
| | | // for (String s : record.getSignatory().split(",")) { |
| | | // User user = userMapper.selectById(Integer.parseInt(s)); |
| | | // name.add(user.getName()); |
| | | // } |
| | | // String signatoryName = name.stream().collect(Collectors.joining(",")); |
| | | // record.setSignatoryName(signatoryName); |
| | | // } |
| | | |
| | | return processReportIPage; |
| | | } |
| | | |
| | | @Override |
| | | public void exportProcessReport(List<Integer> ids, HttpServletResponse response) { |
| | | List<ProcessReport> processReports = processReportMapper.getIds(ids); |
| | | // for (ProcessReport record : processReports) { |
| | | // List<String> name = new ArrayList<>(); |
| | | // if(StringUtils.isNotBlank(record.getSignatory())){ |
| | | // for (String s : record.getSignatory().split(",")) { |
| | | // User user = userMapper.selectById(Integer.parseInt(s)); |
| | | // name.add(user.getName()); |
| | | // } |
| | | // String signatoryName = name.stream().collect(Collectors.joining(",")); |
| | | // record.setSignatoryName(signatoryName); |
| | | // } |
| | | // } |
| | | public void exportProcessReport(ProcessReportDto dto, HttpServletResponse response) { |
| | | List<ProcessReport> processReports = processReportMapper.exportProcessReport(); |
| | | // 获取路径 |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/report-deal.docx"); |
| | | Configure configure = Configure.builder() |