| | |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | |
| | | /////////////////////////生成Tab表格数据///////////////////////// |
| | | |
| | | String fileName = this.getClass().getClassLoader().getResource("contractTemplate/" + contractTemplate + ".docx").getPath();//获取文件路径 |
| | | return WordUtils.generate(fileName, map, tabParam); |
| | | |
| | | // String outPdfPath = fileName.split("\\.")[0]+".pdf"; |
| | | ResponseEntity<InputStreamResource> generate = WordUtils.generate(fileName, map, tabParam); |
| | | // WordUtils.documents4jWordToPdf(fileName,outPdfPath); |
| | | return generate; |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |