| | |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | File file0=new File("d:/safetyWork/file"); |
| | | File file0=new File("/mnt/data/web/file"); |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "d:/safetyWork/file/安全工作记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/safetyWork/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "/mnt/data/web/file/安全工作记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (comSwSafetyWorkRecordVO.getPatrolTime() != null) { |
| | |
| | | // configuration.setClassForTemplateLoading(this.getClass(), ""); |
| | | |
| | | // 指定路径的第二种方式,我的路径是C:/a.ftl |
| | | configuration.setDirectoryForTemplateLoading(new File("d:/safetyWork/file/")); |
| | | configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/")); |
| | | |
| | | // 输出文档路径及名称 |
| | | // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() + |
| | |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | File file0=new File("d:/patrolRecord/file"); |
| | | File file0=new File("/mnt/data/web/file"); |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "d:/patrolRecord/file/巡查记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/patrolRecord/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "/mnt/data/web/file/巡查记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (comSwPatrolRecordVO.getPatrolTime() != null) { |
| | |
| | | // configuration.setClassForTemplateLoading(this.getClass(), ""); |
| | | |
| | | // 指定路径的第二种方式,我的路径是C:/a.ftl |
| | | configuration.setDirectoryForTemplateLoading(new File("d:/patrolRecord/file/")); |
| | | configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/")); |
| | | |
| | | // 输出文档路径及名称 |
| | | // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() + |