Java通过ftl模板导出word最详细教程

x33g5p2x  于2022-05-24 转载在 Java  
字(93.8k)|赞(0)|评价(0)|浏览(648)

首先用office建一个word文档
参数写自己查询出来的字段,我在这里房里图片是方便找到位置替换为64位编码

模板创建好之后,另存为Word 2003 XML文档(*.xml) 存储为别的可能会报错,我只用这一种
存储为xml之后千万不要用word打开,最好用notpad++打开,复制里面的数据到格式化xml工具在线格式化工具格式化一下(注:该工具有弊端,会把定义的参数打散,需要自己手动修改一下)
比如这里我定义的是${about},他给分开,只需要删除多余的<w:r>标签即可

修改后

图片导出的只需要把我的那些数据复制替换一下就可以了,记住自己逻辑里面写的集合名称就ok了,
详情点击下面的标题
templates
找到我的<#list>判断
1175-1232行

里面的参数都是和逻辑处理那边对应的
导出后截图

application.yml

  1. spring:
  2. profiles:
  3. active: dev
  4. servlet:
  5. multipart:
  6. max-file-size: 102400MB
  7. max-request-size: 102400MB
  8. mybatis-plus:
  9. configuration:
  10. # 不打印sql
  11. # log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  12. # 打印sql
  13. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  14. # map集合值为null时也返回
  15. call-setters-on-nulls: true
  16. multipart:
  17. enabled: true
  18. max-file-size: 100MB
  19. max-request-size: 100MB

application-dev.yml

  1. spring:
  2. datasource:
  3. url: jdbc:postgresql://localhost:5432/word
  4. username: postgres
  5. password:
  6. driver-class-name: org.postgresql.Driver
  7. server:
  8. port: 8799
  9. servlet:
  10. context-path: /ftl
  11. uploadFilePath: E:\apache-tomcat-9.0.41\apache-tomcat-9.0.41\webapps\rfwg_files

pom

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-parent</artifactId>
  9. <version>2.3.1.RELEASE</version>
  10. <relativePath/> <!-- lookup parent from repository -->
  11. </parent>
  12. <groupId>com.lxl</groupId>
  13. <artifactId>mybatisplus</artifactId>
  14. <version>0.0.1-SNAPSHOT</version>
  15. <name>mybatisplus</name>
  16. <description>Demo project for Spring Boot</description>
  17. <properties>
  18. <java.version>1.8</java.version>
  19. </properties>
  20. <dependencies>
  21. <dependency>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.springframework.boot</groupId>
  27. <artifactId>spring-boot-starter-web</artifactId>
  28. </dependency>
  29. <dependency>
  30. <groupId>com.baomidou</groupId>
  31. <artifactId>mybatis-plus-boot-starter</artifactId>
  32. <version>3.3.1.tmp</version>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.postgresql</groupId>
  36. <artifactId>postgresql</artifactId>
  37. <scope>runtime</scope>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.freemarker</groupId>
  41. <artifactId>freemarker</artifactId>
  42. <version>2.3.28</version>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.projectlombok</groupId>
  46. <artifactId>lombok</artifactId>
  47. <optional>true</optional>
  48. </dependency>
  49. <!-- fastjson -->
  50. <dependency>
  51. <groupId>com.alibaba</groupId>
  52. <artifactId>fastjson</artifactId>
  53. <version>1.2.58</version>
  54. </dependency>
  55. <!--io流转换-->
  56. <dependency>
  57. <groupId>commons-io</groupId>
  58. <artifactId>commons-io</artifactId>
  59. <version>2.6</version>
  60. </dependency>
  61. <!--添加本地的jacob.jar包 -->
  62. <dependency>
  63. <groupId>jacob</groupId>
  64. <artifactId>jacob</artifactId>
  65. <version>1.19</version>
  66. </dependency>
  67. <!--word转pdf-->
  68. <dependency>
  69. <groupId>e-iceblue</groupId>
  70. <artifactId>spire.doc.free</artifactId>
  71. <version>3.9.0</version>
  72. </dependency>
  73. <!--io流转换-->
  74. <dependency>
  75. <groupId>commons-io</groupId>
  76. <artifactId>commons-io</artifactId>
  77. <version>2.6</version>
  78. </dependency>
  79. </dependencies>
  80. <build>
  81. <finalName>manage-application</finalName>
  82. <resources>
  83. <resource>
  84. <directory>src/main/resources</directory>
  85. <includes>
  86. <include>*</include>
  87. <include>*/*</include>
  88. </includes>
  89. <filtering>true</filtering>
  90. </resource>
  91. <resource>
  92. <directory>rc/main/resources</directory>
  93. <includes>
  94. <include>**/*.xml</include>
  95. </includes>
  96. </resource>
  97. <resource>
  98. <directory>src/main/resources</directory>
  99. <includes>
  100. <include>**/*.ftl</include>
  101. </includes>
  102. </resource>
  103. </resources>
  104. </build>
  105. </project>

utils

这里我先把工具类放在上面是为了防止下面类里面数据会被错

  1. package com.cao.ftlword.utils;
  2. import java.io.Serializable;
  3. /**
  4. * 消息对象
  5. */
  6. public class AjaxObj implements Serializable {
  7. private static final long serialVersionUID = 4806448810229890854L;
  8. private int code;
  9. private String msg;
  10. private String token;
  11. private Object data;
  12. private Boolean flag;
  13. public AjaxObj() {
  14. }
  15. public Boolean getFlag() {
  16. return flag;
  17. }
  18. public void setFlag(Boolean flag) {
  19. this.flag = flag;
  20. }
  21. public AjaxObj(int code, String msg) {
  22. this.code = code;
  23. this.msg = msg;
  24. }
  25. public AjaxObj(int code, String msg, Object data) {
  26. this.code = code;
  27. this.msg = msg;
  28. this.data = data;
  29. }
  30. public AjaxObj(int code, String msg, Object data, Boolean flag) {
  31. this.code = code;
  32. this.msg = msg;
  33. this.data = data;
  34. this.flag = flag;
  35. }
  36. public int getCode() {
  37. return code;
  38. }
  39. public void setCode(int code) {
  40. this.code = code;
  41. }
  42. public String getMsg() {
  43. return msg;
  44. }
  45. public void setMsg(String msg) {
  46. this.msg = msg;
  47. }
  48. public String getToken() {
  49. return token;
  50. }
  51. public void setToken(String token) {
  52. this.token = token;
  53. }
  54. public Object getData() {
  55. return data;
  56. }
  57. public void setData(Object data) {
  58. this.data = data;
  59. }
  60. }
  1. import com.alibaba.fastjson.JSONArray;
  2. import com.alibaba.fastjson.JSONObject;
  3. import org.springframework.core.io.Resource;
  4. import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
  5. import org.springframework.core.io.support.ResourcePatternResolver;
  6. import org.springframework.util.DigestUtils;
  7. import org.springframework.util.ObjectUtils;
  8. import org.springframework.web.multipart.MultipartFile;
  9. import javax.servlet.http.HttpServletRequest;
  10. import javax.servlet.http.HttpServletResponse;
  11. import java.io.*;
  12. import java.text.SimpleDateFormat;
  13. import java.util.*;
  14. public class CommUtils {
  15. /**
  16. * 判断一个对象(包括String、以及Collection下的各个子类集合) 是否为空, 为空则返回true, 否则会返回false
  17. */
  18. @SuppressWarnings("rawtypes")
  19. public static boolean isEmpty(Object obj) {
  20. if (obj == null)
  21. return true;
  22. if (obj instanceof String) {
  23. if (((String) obj).equals(""))
  24. return true;
  25. }
  26. if (obj instanceof Collection<?>) {
  27. if (((Collection) obj).size() <= 0)
  28. return true;
  29. }
  30. if (obj instanceof String[]) {
  31. if (((String[]) obj).length <= 0) {
  32. return true;
  33. }
  34. }
  35. if (obj instanceof Object[]) {
  36. if (((Object[]) obj).length <= 0) {
  37. return true;
  38. }
  39. }
  40. return false;
  41. }
  42. /**
  43. * 生成uuid
  44. *
  45. * @return
  46. */
  47. public static String getUUID() {
  48. return UUID.randomUUID().toString().replace("-", "");
  49. }
  50. /**
  51. * 将指定日期按照指定的格式以字符串的形式进行返回
  52. */
  53. public static String getDate(String pattern, Date date) {
  54. SimpleDateFormat format = new SimpleDateFormat(pattern);
  55. return format.format(date);
  56. }
  57. /**
  58. * 将当前日期按照 "年-月-日 时:分:秒" 的日期格式以字符串的形式返回
  59. */
  60. public static String getDate() {
  61. return getDate("yyyy-MM-dd HH:mm:ss", new Date());
  62. }
  63. public static String getMD5(String str) {
  64. return DigestUtils.md5DigestAsHex(str.getBytes());
  65. }
  66. /**
  67. * 下载文件
  68. */
  69. public static void downloadFile(String path, HttpServletResponse response) {
  70. File file = new File(path);
  71. byte[] buffer = new byte[(int) file.length()];
  72. FileInputStream fis = null; //文件输入流
  73. BufferedInputStream bis = null;
  74. OutputStream os = null; //输出流
  75. try {
  76. os = response.getOutputStream();
  77. fis = new FileInputStream(file);
  78. bis = new BufferedInputStream(fis);
  79. int i = bis.read(buffer);
  80. while (i != -1) {
  81. os.write(buffer);
  82. i = bis.read(buffer);
  83. }
  84. } catch (Exception e) {
  85. // TODO Auto-generated catch block
  86. e.printStackTrace();
  87. }
  88. System.out.println("----------file download----------" + path);
  89. try {
  90. bis.close();
  91. fis.close();
  92. } catch (IOException e) {
  93. // TODO Auto-generated catch block
  94. e.printStackTrace();
  95. }
  96. }
  97. //递归删文件
  98. public static boolean delAllFile(File file) {
  99. if (!file.exists()) {
  100. return false;
  101. }
  102. if (file.isDirectory()) {
  103. File[] files = file.listFiles();
  104. if (files != null) {
  105. for (File f : files) {
  106. delAllFile(f);
  107. }
  108. }
  109. }
  110. return file.delete();
  111. }
  112. public static void delDiskFile(String filePath) {
  113. //删除磁盘上的附件文件
  114. try {
  115. File file = new File(filePath);
  116. if (file.exists()) {
  117. CommUtils.delAllFile(new File(filePath));
  118. }
  119. } catch (Exception e) {
  120. e.printStackTrace();
  121. }
  122. }
  123. public static File multipartFileToFile(MultipartFile multipartFile) {
  124. try {
  125. // 获取文件名
  126. String fileName = multipartFile.getOriginalFilename();
  127. // 获取文件后缀
  128. String prefix = fileName.substring(fileName.lastIndexOf("."));
  129. // 用uuid作为文件名,防止生成的临时文件重复
  130. File tempFile = File.createTempFile(CommUtils.getUUID(), prefix);
  131. multipartFile.transferTo(tempFile);
  132. return tempFile;
  133. } catch (Exception e) {
  134. e.printStackTrace();
  135. }
  136. return null;
  137. }
  138. // 逆向递归删除空目录
  139. public void delEmptyPath(String path) {
  140. File file = new File(path);
  141. if (file.exists() && file.isDirectory()) {
  142. File[] files = file.listFiles();
  143. if (files != null && files.length > 0)
  144. return;
  145. if (file.delete()) {
  146. delEmptyPath(file.getParent());
  147. }
  148. }
  149. }
  150. //拷贝到临时文件夹
  151. public static void copyDir(String sourcePath, String newPath) throws IOException {
  152. File file = new File(sourcePath);
  153. String[] filePath = file.list();
  154. if (!(new File(newPath)).exists()) {
  155. (new File(newPath)).mkdir();
  156. } else {
  157. delAllFile(new File(newPath));
  158. (new File(newPath)).mkdir();
  159. }
  160. if (filePath != null) {
  161. for (int i = 0; i < filePath.length; i++) {
  162. if ((new File(sourcePath + file.separator + filePath[i])).isDirectory()) {
  163. copyDir(sourcePath + file.separator + filePath[i], newPath + file.separator + filePath[i]);
  164. }
  165. if (new File(sourcePath + file.separator + filePath[i]).isFile() && !new File(sourcePath + file.separator + filePath[i]).getName().contains("ys_")) {
  166. copyFile(sourcePath + file.separator + filePath[i], newPath + file.separator + filePath[i]);
  167. }
  168. }
  169. }
  170. }
  171. public static void copyFile(String oldPath, String newPath) throws IOException {
  172. File oldFile = new File(oldPath);
  173. File file = new File(newPath);
  174. FileInputStream in = new FileInputStream(oldFile);
  175. FileOutputStream out = new FileOutputStream(file);
  176. byte[] buffer = new byte[2097152];
  177. while ((in.read(buffer)) != -1) {
  178. out.write(buffer);
  179. }
  180. out.close();
  181. in.close();
  182. }
  183. public static File getTemplateFile(String templatePath) throws Exception {
  184. File file = File.createTempFile("temp", null);
  185. ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
  186. Resource[] resources = resolver.getResources(templatePath);
  187. if (resources.length == 1) {
  188. InputStream inputStream = resources[0].getInputStream();
  189. inputStreamToFile(inputStream, file);
  190. } else {
  191. System.out.println("请检查模板文件是否存在");
  192. }
  193. return file;
  194. }
  195. public static void inputStreamToFile(InputStream ins, File file) {
  196. try {
  197. OutputStream os = new FileOutputStream(file);
  198. int bytesRead = 0;
  199. byte[] buffer = new byte[8192];
  200. while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) {
  201. os.write(buffer, 0, bytesRead);
  202. }
  203. os.close();
  204. ins.close();
  205. } catch (Exception e) {
  206. e.printStackTrace();
  207. }
  208. }
  209. public static File searchFile(File dir) {
  210. File[] subFiles = dir.listFiles(); //获取e盘下所有的文件或文件夹对象
  211. File resFile = dir;
  212. if (null != subFiles) {
  213. for (File subFile : subFiles) {
  214. if (subFile.isDirectory()) { //文件夹则递归寻找,后缀为jpg文件则输出名字
  215. resFile = searchFile(subFile);
  216. } else if (subFile.isFile() && subFile.getName().endsWith(".shp")) {
  217. resFile = subFile;
  218. break;
  219. }
  220. }
  221. }
  222. return resFile;
  223. }
  224. /**
  225. * byte数组转换成16进制字符串
  226. */
  227. public static String bytesToHexString(byte[] src) {
  228. StringBuilder stringBuilder = new StringBuilder();
  229. if (src == null || src.length <= 0) {
  230. return null;
  231. }
  232. for (int i = 0; i < src.length; i++) {
  233. int v = src[i] & 0xFF;
  234. String hv = Integer.toHexString(v);
  235. if (hv.length() < 2) {
  236. stringBuilder.append(0);
  237. }
  238. stringBuilder.append(hv);
  239. }
  240. return stringBuilder.toString();
  241. }
  242. /**
  243. * 根据文件流判断图片类型
  244. */
  245. public static String getPicType(FileInputStream fis) {
  246. //读取文件的前几个字节来判断图片格式
  247. byte[] b = new byte[4];
  248. try {
  249. fis.read(b, 0, b.length);
  250. String type = bytesToHexString(b).toUpperCase();
  251. if (type.contains("FFD8FF")) {
  252. return "jpg";
  253. } else if (type.contains("89504E47")) {
  254. return "png";
  255. } else if (type.contains("47494638")) {
  256. return "gif";
  257. } else if (type.contains("424D")) {
  258. return "bmp";
  259. } else {
  260. return "unknown";
  261. }
  262. } catch (IOException e) {
  263. e.printStackTrace();
  264. } finally {
  265. if (fis != null) {
  266. try {
  267. fis.close();
  268. } catch (IOException e) {
  269. e.printStackTrace();
  270. }
  271. }
  272. }
  273. return null;
  274. }
  275. public static boolean isPicBySuffix(String suffix) {
  276. if (".JPG".equals(suffix.toUpperCase()) || ".PNG".equals(suffix.toUpperCase())
  277. || ".JPEG".equals(suffix.toUpperCase()) || ".GIF".equals(suffix.toUpperCase())
  278. || ".BMP".equals(suffix.toUpperCase())) {
  279. return true;
  280. }
  281. return false;
  282. }
  283. public static boolean isWordBySuffix(String suffix) {
  284. if (".DOC".equals(suffix.toUpperCase()) || ".DOCX".equals(suffix.toUpperCase())) {
  285. return true;
  286. }
  287. return false;
  288. }
  289. public static boolean isDxfBySuffix(String suffix) {
  290. if (".DXF".equals(suffix.toUpperCase())) {
  291. return true;
  292. }
  293. return false;
  294. }
  295. public static boolean isZipBySuffix(String suffix) {
  296. if (".ZIP".equals(suffix.toUpperCase())) {
  297. return true;
  298. }
  299. return false;
  300. }
  301. public static boolean isExcelBySuffix(String suffix) {
  302. if (".XLS".equals(suffix.toUpperCase()) || ".XLSX".equals(suffix.toUpperCase())) {
  303. return true;
  304. }
  305. return false;
  306. }
  307. public static JSONObject xAxisSeries(List<Object> xAxisDataList, List<Object> seriesDataList) {
  308. JSONObject jsonObject = new JSONObject();
  309. JSONObject xAxisData = new JSONObject();
  310. xAxisData.put("data", xAxisDataList);
  311. jsonObject.put("xAxis", xAxisData);
  312. JSONObject dd = new JSONObject();
  313. dd.put("data", seriesDataList);
  314. JSONArray jsonArray = new JSONArray();
  315. jsonArray.add(dd);
  316. jsonObject.put("series", jsonArray);
  317. return jsonObject;
  318. }
  319. public static JSONObject legendSeries(List<Object> legendDataList, List<Object> seriesDataList) {
  320. JSONObject jsonObject = new JSONObject();
  321. JSONObject legendData = new JSONObject();
  322. legendData.put("data", legendDataList);
  323. jsonObject.put("legend", legendData);
  324. JSONObject dd = new JSONObject();
  325. JSONArray ja = new JSONArray();
  326. for (int i = 0; i < seriesDataList.size(); i++) {
  327. JSONObject jo = new JSONObject();
  328. jo.put("name", legendDataList.get(i));
  329. jo.put("value", seriesDataList.get(i));
  330. ja.add(jo);
  331. }
  332. dd.put("data", ja);
  333. JSONArray jsonArray = new JSONArray();
  334. jsonArray.add(dd);
  335. jsonObject.put("series", jsonArray);
  336. return jsonObject;
  337. }
  338. public static void getSignPIdAndIndex(JSONArray jsonArray, String suuid, Map<String, Integer> map) {
  339. for (int i = 0; i < jsonArray.size(); i++) {
  340. JSONObject jsonObject = jsonArray.getJSONObject(i);
  341. JSONArray children = jsonObject.getJSONArray("children");
  342. if (!ObjectUtils.isEmpty(children) && children.size() > 0) {
  343. getSignPIdAndIndex(children, suuid, map);
  344. } else {
  345. if (suuid.equals(jsonObject.getString("id"))) {
  346. map.put(jsonObject.getString("parentTId"), i);
  347. }
  348. }
  349. }
  350. }
  351. public static String getIpAddress(HttpServletRequest request) {
  352. String ip = request.getHeader("x-forwarded-for");
  353. if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
  354. ip = request.getHeader("Proxy-Client-IP");
  355. }
  356. if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
  357. ip = request.getHeader("WL-Proxy-Client-IP");
  358. }
  359. if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
  360. ip = request.getHeader("HTTP_CLIENT_IP");
  361. }
  362. if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
  363. ip = request.getHeader("HTTP_X_FORWARDED_FOR");
  364. }
  365. if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
  366. ip = request.getRemoteAddr();
  367. }
  368. return ip;
  369. }
  370. public static String toUTF8(String str) {
  371. if (isEmpty(str)) {
  372. return "";
  373. }
  374. try {
  375. if (str.equals(new String(str.getBytes("GB2312"), "GB2312"))) {
  376. str = new String(str.getBytes("GB2312"), "utf-8");
  377. return str;
  378. }
  379. } catch (Exception exception) {
  380. }
  381. try {
  382. if (str.equals(new String(str.getBytes("ISO-8859-1"), "ISO-8859-1"))) {
  383. str = new String(str.getBytes("ISO-8859-1"), "utf-8");
  384. return str;
  385. }
  386. } catch (Exception exception1) {
  387. }
  388. try {
  389. if (str.equals(new String(str.getBytes("GBK"), "GBK"))) {
  390. str = new String(str.getBytes("GBK"), "utf-8");
  391. return str;
  392. }
  393. } catch (Exception exception3) {
  394. }
  395. return str;
  396. }
  397. // 文件和视频
  398. public static boolean suffixName(String suffixName) {
  399. if ((".txt").equalsIgnoreCase(suffixName) || (".dwg").equalsIgnoreCase(suffixName)
  400. || (".jpg").equalsIgnoreCase(suffixName) || (".jpeg").equalsIgnoreCase(suffixName) || (".png").equalsIgnoreCase(suffixName)
  401. || (".bmp").equalsIgnoreCase(suffixName) || (".gif").equalsIgnoreCase(suffixName)
  402. || (".mp4").equalsIgnoreCase(suffixName) || (".avi").equalsIgnoreCase(suffixName)
  403. || (".3gp").equalsIgnoreCase(suffixName) || (".flv").equalsIgnoreCase(suffixName)
  404. || (".rar").equalsIgnoreCase(suffixName) || (".zip").equalsIgnoreCase(suffixName)
  405. || (".doc").equalsIgnoreCase(suffixName) || (".docx").equalsIgnoreCase(suffixName)
  406. || (".xlsx").equalsIgnoreCase(suffixName) || (".xls").equalsIgnoreCase(suffixName) || (".pdf").equalsIgnoreCase(suffixName)
  407. || (".ppt").equalsIgnoreCase(suffixName) || (".pps").equalsIgnoreCase(suffixName) || (".pptx").equalsIgnoreCase(suffixName)) {
  408. return true;
  409. } else {
  410. return false;
  411. }
  412. }
  413. // 图片
  414. public static boolean suffixNameImage(String suffixName) {
  415. if ((".tiff").equalsIgnoreCase(suffixName) || (".pjp").equalsIgnoreCase(suffixName)
  416. || (".jfif").equalsIgnoreCase(suffixName) || (".gif").equalsIgnoreCase(suffixName) || (".svg").equalsIgnoreCase(suffixName)
  417. || (".bmp").equalsIgnoreCase(suffixName) || (".png").equalsIgnoreCase(suffixName)
  418. || (".jpeg").equalsIgnoreCase(suffixName) || (".svgz").equalsIgnoreCase(suffixName)
  419. || (".jpg").equalsIgnoreCase(suffixName) || (".webp").equalsIgnoreCase(suffixName)
  420. || (".ico").equalsIgnoreCase(suffixName) || (".xbm").equalsIgnoreCase(suffixName)
  421. || (".dib").equalsIgnoreCase(suffixName) || (".tif").equalsIgnoreCase(suffixName)
  422. || (".pjpeg").equalsIgnoreCase(suffixName) || (".avif").equalsIgnoreCase(suffixName)) {
  423. return true;
  424. } else {
  425. return false;
  426. }
  427. }
  428. // 文件不包含视频
  429. public static boolean suffixNameFile(String suffixName) {
  430. if ((".txt").equalsIgnoreCase(suffixName) || (".dwg").equalsIgnoreCase(suffixName)
  431. || (".jpg").equalsIgnoreCase(suffixName) || (".jpeg").equalsIgnoreCase(suffixName) || (".png").equalsIgnoreCase(suffixName)
  432. || (".bmp").equalsIgnoreCase(suffixName) || (".gif").equalsIgnoreCase(suffixName)
  433. || (".rar").equalsIgnoreCase(suffixName) || (".zip").equalsIgnoreCase(suffixName)
  434. || (".doc").equalsIgnoreCase(suffixName) || (".docx").equalsIgnoreCase(suffixName)
  435. || (".xlsx").equalsIgnoreCase(suffixName) || (".xls").equalsIgnoreCase(suffixName) || (".pdf").equalsIgnoreCase(suffixName)
  436. || (".ppt").equalsIgnoreCase(suffixName) || (".pps").equalsIgnoreCase(suffixName) || (".pptx").equalsIgnoreCase(suffixName)) {
  437. return true;
  438. } else {
  439. return false;
  440. }
  441. }
  442. // 文件不包含视频
  443. public static boolean suffixNameExcel(String suffixName) {
  444. if ((".xlsx").equalsIgnoreCase(suffixName) || (".xls").equalsIgnoreCase(suffixName) || (".pdf").equalsIgnoreCase(suffixName)) {
  445. return true;
  446. } else {
  447. return false;
  448. }
  449. }
  450. }
  1. import org.springframework.beans.factory.annotation.Value;
  2. import javax.servlet.http.HttpServletResponse;
  3. import java.io.*;
  4. import java.net.URLDecoder;
  5. import java.util.UUID;
  6. public class FileUtil {
  7. @Value("${uploadFilePath}")
  8. private String uploadFilePath;
  9. private FileUtil() {
  10. }
  11. /**
  12. * File转换为byte[]
  13. */
  14. public static byte[] getBytesByFile(File file) {
  15. try {
  16. //获取输入流
  17. FileInputStream fis = new FileInputStream(file);
  18. //新的 byte 数组输出流,缓冲区容量1024byte
  19. ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
  20. //缓存
  21. byte[] b = new byte[1024];
  22. int n;
  23. while ((n = fis.read(b)) != -1) {
  24. bos.write(b, 0, n);
  25. }
  26. fis.close();
  27. //改变为byte[]
  28. byte[] data = bos.toByteArray();
  29. //
  30. bos.close();
  31. return data;
  32. } catch (Exception e) {
  33. e.printStackTrace();
  34. }
  35. return null;
  36. }
  37. public static void uploadFile(byte[] file, String filePath, String fileName) throws IOException {
  38. File targetFile = new File(filePath);
  39. if (!targetFile.exists()) {
  40. if (!targetFile.mkdirs()) {
  41. throw new IOException();
  42. }
  43. }
  44. FileOutputStream out = null;
  45. try {
  46. out = new FileOutputStream(filePath + "/" + fileName);
  47. out.write(file);
  48. out.flush();
  49. } catch (IOException e) {
  50. throw new IOException();
  51. } finally {
  52. if (out != null) {
  53. out.close();
  54. }
  55. }
  56. }
  57. public static boolean deleteFile(String fileName) {
  58. File file = new File(fileName);
  59. // 如果文件路径所对应的文件存在,并且是一个文件,则直接删除
  60. if (file.exists() && file.isFile()) {
  61. if (file.delete()) {
  62. return true;
  63. } else {
  64. return false;
  65. }
  66. }
  67. return false;
  68. }
  69. public static String renameToUUID(String fileName) {
  70. return UUID.randomUUID() + "." + fileName.substring(fileName.lastIndexOf(".") + 1);
  71. }
  72. /**
  73. * 文件删除方法
  74. */
  75. public static boolean deleteQuietly(String fileAddress) {
  76. File file = new File(fileAddress);
  77. if (file == null) {
  78. return false;
  79. } else {
  80. try {
  81. if (file.isDirectory()) {
  82. // cleanDirectory(file);
  83. }
  84. } catch (Exception var3) {
  85. ;
  86. }
  87. try {
  88. return file.delete();
  89. } catch (Exception var2) {
  90. return false;
  91. }
  92. }
  93. }
  94. /**
  95. * 下载本地文件
  96. */
  97. public static void downloadLocal(HttpServletResponse response, String filePath,String encode) {
  98. response.setContentType("text/html;charset=" + encode);
  99. try {
  100. // 读到流中
  101. InputStream inStream = new FileInputStream(filePath); // 文件的存放路径
  102. // path是指欲下载的文件的路径
  103. File file = new File(filePath);
  104. // 取得文件名
  105. String fileName = file.getName();
  106. // 设置输出的格式
  107. response.reset();
  108. response.setContentType("bin");
  109. response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes(encode), "ISO8859-1") + "\"");
  110. // 循环取出流中的数据
  111. byte[] b = new byte[100];
  112. int len;
  113. while ((len = inStream.read(b)) > 0) {
  114. response.getOutputStream().write(b, 0, len);
  115. }
  116. inStream.close();
  117. } catch (IOException e) {
  118. e.printStackTrace();
  119. }
  120. }
  121. /**
  122. * 通过文件路径直接修改文件名
  123. *
  124. * @param filePath 需要修改的文件的完整路径
  125. * @param newFileName 需要修改的文件的名称
  126. * @return
  127. */
  128. public static String FixFileName(String filePath, String newFileName) {
  129. File f = new File(filePath);
  130. if (!f.exists()) { // 判断原文件是否存在(防止文件名冲突)
  131. return null;
  132. }
  133. newFileName = newFileName.trim();
  134. if ("".equals(newFileName) || newFileName == null) // 文件名不能为空
  135. return null;
  136. String newFilePath = null;
  137. if (f.isDirectory()) { // 判断是否为文件夹
  138. newFilePath = filePath.substring(0, filePath.lastIndexOf("/")) + "/" + newFileName;
  139. } else {
  140. newFilePath = filePath.substring(0, filePath.lastIndexOf("/")) + "/" + newFileName;
  141. }
  142. File nf = new File(newFilePath);
  143. try {
  144. f.renameTo(nf); // 修改文件名
  145. } catch (Exception err) {
  146. err.printStackTrace();
  147. return null;
  148. }
  149. return newFilePath;
  150. }
  151. /*
  152. *写文件
  153. */
  154. public static boolean write(String filePath, String fileName, String fileContent) throws IOException {
  155. boolean result = false;
  156. File targetFile = new File(filePath);
  157. if (!targetFile.exists()) {
  158. if (!targetFile.mkdirs()) {
  159. throw new IOException();
  160. }
  161. }
  162. try {
  163. FileOutputStream fs = new FileOutputStream(filePath+"/"+fileName);
  164. //byte[] b = fileContent.getBytes();
  165. BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fs, "UTF-8"));
  166. /*
  167. 带bom的utf8
  168. fs.write( 0xef );
  169. fs.write( 0xbb);
  170. fs.write( 0xbf);*/
  171. writer.write(fileContent);
  172. writer.flush();
  173. writer.close();
  174. result = true;
  175. } catch (Exception e) {
  176. e.printStackTrace();
  177. }
  178. return result;
  179. }
  180. //需要注意的是当删除某一目录时,必须保证该目录下没有其他文件才能正确删除,否则将删除失败。
  181. public static boolean deleteFolder(File folder) throws Exception {
  182. boolean flag = false;
  183. if (!folder.exists()) {
  184. throw new Exception("文件不存在");
  185. }
  186. File[] files = folder.listFiles();
  187. if (files != null) {
  188. for (File file : files) {
  189. if (file.isDirectory()) {
  190. //递归直到目录下没有文件
  191. deleteFolder(file);
  192. // System.err.println("删除目录下所有文件");
  193. flag=true;
  194. } else {
  195. //删除
  196. file.delete();
  197. // System.err.println("删除文件夹里面的文件");
  198. flag=true;
  199. }
  200. }
  201. }
  202. //删除
  203. folder.delete();
  204. return flag;
  205. }
  206. public static void downloadFile(HttpServletResponse resp, String downloadPath) throws IOException {
  207. String filePath = null;
  208. try {
  209. filePath= URLDecoder.decode(downloadPath,"UTF-8");
  210. } catch (UnsupportedEncodingException e) {
  211. e.printStackTrace();
  212. }
  213. //String realPath = "D:" + File.separator + "apache-tomcat-8.5.15" + File.separator + "files";
  214. String realPath=filePath;//项目路径下你存放文件的地方
  215. File file = new File(realPath);
  216. if(!file.exists()){
  217. throw new IOException("文件不存在");
  218. }
  219. String name = new String(file.getName().getBytes("GBK"), "ISO-8859-1");
  220. resp.reset();
  221. /*
  222. * 跨域配置
  223. * */
  224. resp.addHeader("Access-Control-Allow-Origin", "*");
  225. resp.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE");
  226. resp.addHeader("Access-Control-Allow-Headers", "Content-Type");
  227. resp.setContentType("application/octet-stream");
  228. resp.setCharacterEncoding("utf-8");
  229. resp.setContentLength((int) file.length());
  230. resp.setHeader("Content-Disposition", "attachment;filename=" + name);
  231. byte[] buff = new byte[1024];
  232. BufferedInputStream bis = null;
  233. OutputStream os = null;
  234. try {
  235. os = resp.getOutputStream();
  236. bis = new BufferedInputStream(new FileInputStream(file));
  237. int i = 0;
  238. while ((i = bis.read(buff)) != -1) {
  239. os.write(buff, 0, i);
  240. os.flush();
  241. }
  242. } catch (IOException e) {
  243. e.printStackTrace();
  244. } finally {
  245. try {
  246. bis.close();
  247. } catch (IOException e) {
  248. e.printStackTrace();
  249. }
  250. }
  251. }
  252. }
  1. import com.spire.doc.Document;
  2. import com.spire.doc.FileFormat;
  3. import freemarker.template.Configuration;
  4. import freemarker.template.Template;
  5. import org.apache.tomcat.util.codec.binary.Base64;
  6. import org.springframework.stereotype.Component;
  7. import javax.servlet.ServletOutputStream;
  8. import javax.servlet.http.HttpServletResponse;
  9. import java.io.*;
  10. import java.util.HashMap;
  11. import java.util.Map;
  12. /**
  13. *
  14. * <p>Title: ftl模板文件转成word文件下载</p>
  15. * <p>Description: </p>
  16. * <p>Company: 常州培涵信息科技有限公司</p>
  17. * <p>使用说明:
  18. * 1.对于简单文件下载 只需要在map里面put
  19. * 2.对于附属图片的需要调用makeImagePathToBASE64Encoder进行编码
  20. * 3.对于循环需要使用List<Object> 此处Object为业务对象
  21. * </p>
  22. */
  23. @Component
  24. public class FtlToWord {
  25. private static Configuration configuration = null;
  26. private static Map<String, Template> allTemplates = null;
  27. /**
  28. * 配置模板
  29. * @param fileName
  30. * @param filePath
  31. */
  32. public static void configure(String fileName, String filePath) {
  33. configuration = new Configuration();
  34. configuration.setDefaultEncoding("utf-8");
  35. configuration.setClassForTemplateLoading(FtlToWord.class, filePath);
  36. allTemplates = new HashMap<String, Template>(); // Java 7 钻石语法
  37. try {
  38. allTemplates.put(fileName, configuration.getTemplate(fileName + ".ftl"));
  39. } catch (IOException e) {
  40. e.printStackTrace();
  41. throw new RuntimeException(e);
  42. }
  43. }
  44. /**
  45. * 创建文档
  46. */
  47. public static File createDoc(Map<?, ?> dataMap, String templateName) {
  48. String name = "temp" + (int) (Math.random() * 100000) + ".doc";
  49. File f = new File(name);
  50. Template t = allTemplates.get(templateName);
  51. try {
  52. // 这个地方不能使用FileWriter因为需要指定编码类型否则生成的Word文档会因为有无法识别的编码而无法打开
  53. Writer w = new OutputStreamWriter(new FileOutputStream(f), "utf-8");
  54. t.process(dataMap, w);
  55. w.close();
  56. } catch (Exception ex) {
  57. ex.printStackTrace();
  58. throw new RuntimeException(ex);
  59. }
  60. return f;
  61. }
  62. /**
  63. * 下载文档
  64. */
  65. public static void downloadDoc(HttpServletResponse response, Map<?, ?> dataMap, String templateName, String downloadName) throws IOException {
  66. File file = null;
  67. InputStream fin = null;
  68. ServletOutputStream out = null;
  69. try {
  70. // 调用工具类WordGenerator的createDoc方法生成Word文档
  71. file = FtlToWord.createDoc(dataMap,templateName);
  72. fin = new FileInputStream(file);
  73. response.setCharacterEncoding("utf-8");
  74. response.setContentType("application/msword");
  75. // 设置浏览器以下载的方式处理该文件默认名为resume.doc
  76. response.addHeader("Content-Disposition", "attachment;filename="+downloadName+".doc");
  77. out = response.getOutputStream();
  78. byte[] buffer = new byte[512]; // 缓冲区
  79. int bytesToRead = -1;
  80. // 通过循环将读入的Word文件的内容输出到浏览器中
  81. while((bytesToRead = fin.read(buffer)) != -1) {
  82. out.write(buffer, 0, bytesToRead);
  83. }
  84. } finally {
  85. if(fin != null) fin.close();
  86. if(out != null) out.close();
  87. if(file != null) file.delete(); // 删除临时文件
  88. }
  89. }
  90. public static String makeImagePathToBASE64Encoder(String imagePath) throws IOException {
  91. /** 将图片转化为**/
  92. InputStream in = null;
  93. byte[] data = null;
  94. try {
  95. in = new FileInputStream(imagePath);
  96. data = new byte[in.available()];
  97. in.read(data);
  98. in.close();
  99. } catch (Exception e) {
  100. e.printStackTrace();
  101. }finally {
  102. if(in != null){
  103. in.close();
  104. }
  105. }
  106. /** 进行base64位编码 只支持Java8**/
  107. //Encoder encoder = Base64.getEncoder();
  108. // String encodeToString = encoder.encodeToString(data);
  109. String encodeToString = Base64.encodeBase64String(data);
  110. return encodeToString;
  111. }
  112. /**
  113. * 下载文档存到本地
  114. */
  115. public static void downloadDocLocal(Map<?, ?> dataMap, String templateName, String downloadName,String path,String uuid) throws IOException {
  116. File file = null;
  117. InputStream fin = null;
  118. // 存到本地
  119. OutputStream os = null;
  120. try {
  121. // 调用工具类WordGenerator的createDoc方法生成Word文档
  122. file = FtlToWord.createDoc(dataMap,templateName);
  123. fin = new FileInputStream(file);
  124. byte[] bs = new byte[1024];
  125. // 读取到的数据长度
  126. int len;
  127. // 输出的文件流保存到本地文件
  128. File tempFile = new File(path);
  129. if (!tempFile.exists()) {
  130. tempFile.mkdirs();
  131. }
  132. downloadName = new String(downloadName.getBytes("ISO-8859-1"), "utf-8");
  133. os = new FileOutputStream(tempFile.getPath() + File.separator + downloadName+".doc");
  134. // 开始读取,存到服务器
  135. while ((len = fin.read(bs)) != -1) {
  136. os.write(bs, 0, len);
  137. }
  138. } finally {
  139. if(fin != null) fin.close();
  140. if(os != null) os.close();
  141. // if(out != null) out.close();
  142. if(file != null) file.delete(); // 删除临时文件
  143. }
  144. }
  145. public static void wordToPdf(String fileName,String fileNameToDown){
  146. Document doc = new Document(fileName);
  147. doc.saveToFile( fileNameToDown, FileFormat.PDF);
  148. }
  149. }
  1. import com.alibaba.fastjson.JSON;
  2. import com.alibaba.fastjson.TypeReference;
  3. import java.util.Map;
  4. public class JsonUtil {
  5. /**
  6. * 将json转化成map
  7. */
  8. public static Map<String, Object> convertJsonStrToMap(String jsonStr){
  9. Map<String, Object> map = JSON.parseObject(
  10. jsonStr,new TypeReference<Map<String, Object>>(){} );
  11. return map;
  12. }
  13. }
  1. public class ReturnValCode {
  2. /**
  3. * 操作失败的标志码
  4. */
  5. public static final int RETURN_VALUE_CODES_FAIL = -1;
  6. /**
  7. * 操作成功的标志码
  8. */
  9. public static final int RTN_VAL_CODE_SUCCESS = 0;
  10. /**
  11. * 登录成功
  12. */
  13. public static final int LOGIN_SUCCESS = 101;
  14. public static final int UN_LOGIN_OR_TIME_OUT = -101;
  15. /**
  16. * 登录失败-账户名或者密码错误
  17. */
  18. public static final int LOGIN_FAIL = 102;
  19. /**
  20. * 非激活状态
  21. */
  22. public static final int LOGIN_UN_ACTIV = 103;
  23. /**
  24. * 应用程序与数据库操作发生错误
  25. */
  26. public static final int LOGIN_EXCEPTION = 104;
  27. }
  1. import java.sql.Timestamp;
  2. import java.text.ParseException;
  3. import java.text.SimpleDateFormat;
  4. import java.util.Date;
  5. public class Tools {
  6. /**
  7. * 获取当前的年月日的时间, 返回的格式形如pattern指定的格式, 默认的类型为yyyy-MM, 即返回 年-月<br/>
  8. * pattern的格式参考jdk手册中的说明, 诸如yyyy-MM-dd
  9. */
  10. public static String getDate(String pattern) {
  11. if(pattern==null || "".equals(pattern))
  12. pattern = "yyyy-MM";
  13. return new SimpleDateFormat(pattern).format(new Date());
  14. }
  15. /**
  16. * 字符串转成日期
  17. */
  18. public static Date getDateStr(String pattern,String str) {
  19. SimpleDateFormat sdf = new SimpleDateFormat(pattern);
  20. Date date = null;
  21. try {
  22. date = sdf.parse(str);
  23. } catch (ParseException e) {
  24. // TODO Auto-generated catch block
  25. e.printStackTrace();
  26. }
  27. return date;
  28. }
  29. /**
  30. * 获取timestamp时间戳
  31. */
  32. public static Timestamp getTimestamp(String pattern) {
  33. if(pattern==null || "".equals(pattern))
  34. pattern = "yyyy-MM-dd HH:mm:ss";
  35. return Timestamp.valueOf(new SimpleDateFormat(pattern).format(new Date()));
  36. }
  37. /**
  38. * 获取timestamp时间戳
  39. */
  40. public static Timestamp getTimes(String str,String pattern) {
  41. //if(pattern==null || "".equals(pattern))
  42. //pattern = "yyyy-MM-dd HH:mm:ss";
  43. Timestamp ts = new Timestamp(System.currentTimeMillis());
  44. ts = Timestamp.valueOf(str);
  45. System.err.println("你好:"+ts);
  46. return ts;
  47. }
  48. }

controller

  1. import com.cao.ftlword.service.CompanyService;
  2. import com.cao.ftlword.utils.AjaxObj;
  3. import com.cao.ftlword.utils.JsonUtil;
  4. import com.cao.ftlword.utils.ReturnValCode;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.*;
  7. import javax.servlet.http.HttpServletRequest;
  8. import javax.servlet.http.HttpServletResponse;
  9. import java.util.Map;
  10. @RestController
  11. @RequestMapping("/company")
  12. public class CompanyController {
  13. @Autowired
  14. private CompanyService companyService;
  15. // 新增方案与附件,修改方案与附件,根据uuid判断
  16. @PostMapping("/insertCompany")
  17. public AjaxObj insertProject(String info, HttpServletRequest request) {
  18. Map<String, Object> infoMap = JsonUtil.convertJsonStrToMap(info);
  19. companyService.insertCompanyAndAttach(infoMap,request);
  20. return new AjaxObj(ReturnValCode.RTN_VAL_CODE_SUCCESS, "请求成功");
  21. }
  22. @GetMapping("/wordDownload")
  23. public void wordDownload(String uuid,
  24. HttpServletResponse response) throws Exception {
  25. companyService.wordDownload(uuid,response);
  26. }
  27. }

entity

  1. import com.baomidou.mybatisplus.annotation.TableId;
  2. import lombok.Data;
  3. @Data
  4. public class Company {
  5. @TableId
  6. private String uuid; // 主键
  7. private String name; // 公司名称
  8. private String webUrl; // 网址
  9. private String createUser; // 创始人
  10. private String createTime; // 成立时间
  11. private String dist; // 公司地址
  12. private String range; // 经营范围
  13. private String about; // 简介
  14. }
  1. import com.baomidou.mybatisplus.annotation.TableId;
  2. import lombok.Data;
  3. @Data
  4. public class CompanyAttach {
  5. @TableId
  6. private String uuid; // 主键
  7. private String attachPath; // 附件路径
  8. private String comId; // 公司id
  9. }

mapper

这里我把两个写在一起,没有分开,开发的时候最好把mapper分开写

  1. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  2. import com.cao.ftlword.entity.Company;
  3. import org.apache.ibatis.annotations.Param;
  4. import org.springframework.stereotype.Repository;
  5. import java.util.Date;
  6. import java.util.List;
  7. import java.util.Map;
  8. @Repository
  9. public interface CompanyMapper extends BaseMapper<Company> {
  10. // 新增公司
  11. void insertCompany(Map<String,Object> map);
  12. // 新增附件
  13. void insertCompanyAttach(Map<String,Object> map);
  14. // 根据公司id获取到详情
  15. Company selectCompany(@Param("uuid")String uuid);
  16. // 根据公司id获取到相关图片
  17. List<Map<String, Object>> selectCompanyAttach(@Param("uuid")String uuid);
  18. }

service

  1. package com.cao.ftlword.service;
  2. import javax.servlet.http.HttpServletRequest;
  3. import javax.servlet.http.HttpServletResponse;
  4. import java.util.Map;
  5. public interface CompanyService {
  6. // 新增工程与附件
  7. void insertCompanyAndAttach(Map<String,Object> info, HttpServletRequest request);
  8. // 导出word
  9. void wordDownload(String uuid, HttpServletResponse response);
  10. }

impl

  1. import com.alibaba.fastjson.JSON;
  2. import com.cao.ftlword.entity.Company;
  3. import com.cao.ftlword.mapper.CompanyMapper;
  4. import com.cao.ftlword.service.CompanyService;
  5. import com.cao.ftlword.utils.CommUtils;
  6. import com.cao.ftlword.utils.FileUtil;
  7. import com.cao.ftlword.utils.FtlToWord;
  8. import com.cao.ftlword.vo.WordVo;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.beans.factory.annotation.Value;
  11. import org.springframework.stereotype.Service;
  12. import org.springframework.web.multipart.MultipartFile;
  13. import org.springframework.web.multipart.MultipartHttpServletRequest;
  14. import javax.servlet.http.HttpServletRequest;
  15. import javax.servlet.http.HttpServletResponse;
  16. import java.io.File;
  17. import java.io.IOException;
  18. import java.io.UnsupportedEncodingException;
  19. import java.util.ArrayList;
  20. import java.util.HashMap;
  21. import java.util.List;
  22. import java.util.Map;
  23. @Service
  24. public class CompanyServiceImpl implements CompanyService {
  25. @Autowired
  26. private CompanyMapper companyMapper;
  27. @Value("${uploadFilePath}")
  28. private String uploadFilePath;
  29. @Override
  30. public void insertCompanyAndAttach(Map<String, Object> info, HttpServletRequest request) {
  31. // 新增项目与文件
  32. info.put("uuid", CommUtils.getUUID());
  33. String projId = info.get("uuid") + "";
  34. // 项目基本信息入库
  35. companyMapper.insertCompany(info);
  36. // 处理文件的map
  37. Map<String, Object> map = new HashMap<>();
  38. //处理附件
  39. List<MultipartFile> files = ((MultipartHttpServletRequest) request).getFiles("files");
  40. //上传图片
  41. try {
  42. if (!files.isEmpty()) {
  43. for (int i = 0; i < files.size(); i++) {
  44. MultipartFile file = files.get(i);
  45. //获取文件全称 包含后缀
  46. String fName = file.getOriginalFilename();
  47. //截取文件后缀
  48. String attachId = CommUtils.getUUID();
  49. map.put("uuid", CommUtils.getUUID());
  50. map.put("attach_path", "/word/" + projId + "/" + attachId + "/" + fName);
  51. map.put("comId", projId);
  52. // 存到数据库中
  53. companyMapper.insertCompanyAttach(map);
  54. // 上传文件到tomcat
  55. FileUtil.uploadFile(file.getBytes(), uploadFilePath + "/word/" + projId + "/" + attachId,
  56. fName);
  57. }
  58. }
  59. } catch (Exception e) {
  60. e.printStackTrace();
  61. }
  62. }
  63. @Override
  64. public void wordDownload(String uuid, HttpServletResponse response) {
  65. // 1.根据公司id获取到详情,转化为map
  66. Company company = companyMapper.selectCompany(uuid);
  67. Map<String, Object> projectBaseInfo = JSON.parseObject(JSON.toJSONString(company), Map.class);
  68. // 2.根据公司id获取到相关图片
  69. List<Map<String, Object>> list = companyMapper.selectCompanyAttach(uuid);
  70. // 3.存储到图片的路径集合
  71. List<WordVo> image = new ArrayList<>();
  72. // 4.循环获取
  73. for (int i = 0; i < list.size(); i++) {
  74. WordVo doc=new WordVo();
  75. String attach_path = list.get(i).get("attach_path") + "";
  76. String replace = attach_path.replace("\\", "\\");
  77. try {
  78. doc.setImage(FtlToWord.makeImagePathToBASE64Encoder(uploadFilePath+ File.separator+list.get(i).get("attach_path")));
  79. } catch (IOException e) {
  80. e.printStackTrace();
  81. }
  82. image.add(doc);
  83. }
  84. //----------------------------------------------------------------
  85. projectBaseInfo.put("image", image);
  86. //将信息添加到Map里,附件,配置模板,配置模板
  87. String fileName = "简介";
  88. String filePath = "/templates";
  89. FtlToWord.configure(fileName, filePath);
  90. //下载word
  91. String templateName = "简介";
  92. String downloadName = projectBaseInfo.get("name")+"简介";
  93. try {
  94. downloadName = new String(downloadName.getBytes("utf-8"), "ISO-8859-1");
  95. } catch (UnsupportedEncodingException e) {
  96. e.printStackTrace();
  97. }
  98. try {
  99. FtlToWord.downloadDoc(response, projectBaseInfo, templateName, downloadName);
  100. } catch (IOException e) {
  101. e.printStackTrace();
  102. }
  103. }
  104. }

vo

  1. import lombok.Data;
  2. @Data
  3. public class WordVo {
  4. private String image; // 过程图片
  5. }

启动类

  1. import org.mybatis.spring.annotation.MapperScan;
  2. import org.springframework.boot.SpringApplication;
  3. import org.springframework.boot.autoconfigure.SpringBootApplication;
  4. @SpringBootApplication
  5. @MapperScan("com.cao.ftlword.mapper")
  6. public class FtlWordApplication {
  7. public static void main(String[] args) {
  8. SpringApplication.run(FtlWordApplication.class, args);
  9. System.err.println("*********ftl导出word项目启动成功*********");
  10. }
  11. }

resources

mapper

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.cao.ftlword.mapper.CompanyMapper">
  4. <insert id="insertCompany">
  5. insert into t_company(uuid,name,web_url,create_user,create_time,dist,range,about)
  6. values(#{uuid},#{name},#{webUrl},#{createUser},#{createTime},#{dist},#{range},#{about})
  7. </insert>
  8. <insert id="insertCompanyAttach">
  9. insert into t_company_attach(uuid,attach_path,com_id)
  10. values(#{uuid},#{attach_path},#{comId})
  11. </insert>
  12. <select id="selectCompany" resultType="com.cao.ftlword.entity.Company">
  13. select * from t_company where uuid=#{uuid}
  14. </select>
  15. <select id="selectCompanyAttach" resultType="map">
  16. select * from t_company_attach where com_id=#{uuid}
  17. </select>
  18. </mapper>

templates

简介.ftl
<#setting classic_compatible=true> 参数为空则不会报错

  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <?mso-application progid="Word.Document"?>
  3. <#setting classic_compatible=true>
  4. <w:wordDocument
  5. xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
  6. xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
  7. xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
  8. xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:o="urn:schemas-microsoft-com:office:office"
  11. xmlns:v="urn:schemas-microsoft-com:vml"
  12. xmlns:w10="urn:schemas-microsoft-com:office:word"
  13. xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
  14. xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
  15. xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
  16. xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2"
  17. xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">
  18. <w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/>
  19. <o:DocumentProperties>
  20. <o:Author>kris</o:Author>
  21. <o:LastAuthor>kris</o:LastAuthor>
  22. <o:Revision>2</o:Revision>
  23. <o:TotalTime>1</o:TotalTime>
  24. <o:Created>2021-03-25T06:36:00Z</o:Created>
  25. <o:LastSaved>2021-03-25T06:36:00Z</o:LastSaved>
  26. <o:Pages>1</o:Pages>
  27. <o:Words>19</o:Words>
  28. <o:Characters>111</o:Characters>
  29. <o:Lines>1</o:Lines>
  30. <o:Paragraphs>1</o:Paragraphs>
  31. <o:CharactersWithSpaces>129</o:CharactersWithSpaces>
  32. <o:Version>16</o:Version>
  33. </o:DocumentProperties>
  34. <w:fonts>
  35. <w:defaultFonts w:ascii="等线" w:fareast="等线" w:h-ansi="等线" w:cs="Times New Roman"/>
  36. <w:font w:name="Times New Roman">
  37. <w:panose-1 w:val="02020603050405020304"/>
  38. <w:charset w:val="00"/>
  39. <w:family w:val="Roman"/>
  40. <w:pitch w:val="variable"/>
  41. <w:sig w:usb-0="E0002EFF" w:usb-1="C000785B" w:usb-2="00000009" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/>
  42. </w:font>
  43. <w:font w:name="宋体">
  44. <w:altName w:val="SimSun"/>
  45. <w:panose-1 w:val="02010600030101010101"/>
  46. <w:charset w:val="86"/>
  47. <w:family w:val="auto"/>
  48. <w:pitch w:val="variable"/>
  49. <w:sig w:usb-0="00000003" w:usb-1="288F0000" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/>
  50. </w:font>
  51. <w:font w:name="宋体">
  52. <w:altName w:val="SimSun"/>
  53. <w:panose-1 w:val="02010600030101010101"/>
  54. <w:charset w:val="86"/>
  55. <w:family w:val="auto"/>
  56. <w:pitch w:val="variable"/>
  57. <w:sig w:usb-0="00000003" w:usb-1="288F0000" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/>
  58. </w:font>
  59. <w:font w:name="等线">
  60. <w:altName w:val="DengXian"/>
  61. <w:panose-1 w:val="02010600030101010101"/>
  62. <w:charset w:val="86"/>
  63. <w:family w:val="auto"/>
  64. <w:pitch w:val="variable"/>
  65. <w:sig w:usb-0="A00002BF" w:usb-1="38CF7CFA" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="0004000F" w:csb-1="00000000"/>
  66. </w:font>
  67. <w:font w:name="微软雅黑">
  68. <w:panose-1 w:val="020B0503020204020204"/>
  69. <w:charset w:val="86"/>
  70. <w:family w:val="Swiss"/>
  71. <w:pitch w:val="variable"/>
  72. <w:sig w:usb-0="80000287" w:usb-1="2ACF3C50" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="0004001F" w:csb-1="00000000"/>
  73. </w:font>
  74. <w:font w:name="@宋体">
  75. <w:panose-1 w:val="02010600030101010101"/>
  76. <w:charset w:val="86"/>
  77. <w:family w:val="auto"/>
  78. <w:pitch w:val="variable"/>
  79. <w:sig w:usb-0="00000003" w:usb-1="288F0000" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/>
  80. </w:font>
  81. <w:font w:name="@微软雅黑">
  82. <w:charset w:val="86"/>
  83. <w:family w:val="Swiss"/>
  84. <w:pitch w:val="variable"/>
  85. <w:sig w:usb-0="80000287" w:usb-1="2ACF3C50" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="0004001F" w:csb-1="00000000"/>
  86. </w:font>
  87. <w:font w:name="@等线">
  88. <w:panose-1 w:val="02010600030101010101"/>
  89. <w:charset w:val="86"/>
  90. <w:family w:val="auto"/>
  91. <w:pitch w:val="variable"/>
  92. <w:sig w:usb-0="A00002BF" w:usb-1="38CF7CFA" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="0004000F" w:csb-1="00000000"/>
  93. </w:font>
  94. </w:fonts>
  95. <w:styles>
  96. <w:versionOfBuiltInStylenames w:val="7"/>
  97. <w:latentStyles w:defLockedState="off" w:latentStyleCount="371">
  98. <w:lsdException w:name="Normal"/>
  99. <w:lsdException w:name="heading 1"/>
  100. <w:lsdException w:name="heading 2"/>
  101. <w:lsdException w:name="heading 3"/>
  102. <w:lsdException w:name="heading 4"/>
  103. <w:lsdException w:name="heading 5"/>
  104. <w:lsdException w:name="heading 6"/>
  105. <w:lsdException w:name="heading 7"/>
  106. <w:lsdException w:name="heading 8"/>
  107. <w:lsdException w:name="heading 9"/>
  108. <w:lsdException w:name="index 1"/>
  109. <w:lsdException w:name="index 2"/>
  110. <w:lsdException w:name="index 3"/>
  111. <w:lsdException w:name="index 4"/>
  112. <w:lsdException w:name="index 5"/>
  113. <w:lsdException w:name="index 6"/>
  114. <w:lsdException w:name="index 7"/>
  115. <w:lsdException w:name="index 8"/>
  116. <w:lsdException w:name="index 9"/>
  117. <w:lsdException w:name="toc 1"/>
  118. <w:lsdException w:name="toc 2"/>
  119. <w:lsdException w:name="toc 3"/>
  120. <w:lsdException w:name="toc 4"/>
  121. <w:lsdException w:name="toc 5"/>
  122. <w:lsdException w:name="toc 6"/>
  123. <w:lsdException w:name="toc 7"/>
  124. <w:lsdException w:name="toc 8"/>
  125. <w:lsdException w:name="toc 9"/>
  126. <w:lsdException w:name="Normal Indent"/>
  127. <w:lsdException w:name="footnote text"/>
  128. <w:lsdException w:name="annotation text"/>
  129. <w:lsdException w:name="header"/>
  130. <w:lsdException w:name="footer"/>
  131. <w:lsdException w:name="index heading"/>
  132. <w:lsdException w:name="caption"/>
  133. <w:lsdException w:name="table of figures"/>
  134. <w:lsdException w:name="envelope address"/>
  135. <w:lsdException w:name="envelope return"/>
  136. <w:lsdException w:name="footnote reference"/>
  137. <w:lsdException w:name="annotation reference"/>
  138. <w:lsdException w:name="line number"/>
  139. <w:lsdException w:name="page number"/>
  140. <w:lsdException w:name="endnote reference"/>
  141. <w:lsdException w:name="endnote text"/>
  142. <w:lsdException w:name="table of authorities"/>
  143. <w:lsdException w:name="macro"/>
  144. <w:lsdException w:name="toa heading"/>
  145. <w:lsdException w:name="List"/>
  146. <w:lsdException w:name="List Bullet"/>
  147. <w:lsdException w:name="List Number"/>
  148. <w:lsdException w:name="List 2"/>
  149. <w:lsdException w:name="List 3"/>
  150. <w:lsdException w:name="List 4"/>
  151. <w:lsdException w:name="List 5"/>
  152. <w:lsdException w:name="List Bullet 2"/>
  153. <w:lsdException w:name="List Bullet 3"/>
  154. <w:lsdException w:name="List Bullet 4"/>
  155. <w:lsdException w:name="List Bullet 5"/>
  156. <w:lsdException w:name="List Number 2"/>
  157. <w:lsdException w:name="List Number 3"/>
  158. <w:lsdException w:name="List Number 4"/>
  159. <w:lsdException w:name="List Number 5"/>
  160. <w:lsdException w:name="Title"/>
  161. <w:lsdException w:name="Closing"/>
  162. <w:lsdException w:name="Signature"/>
  163. <w:lsdException w:name="Default Paragraph Font"/>
  164. <w:lsdException w:name="Body Text"/>
  165. <w:lsdException w:name="Body Text Indent"/>
  166. <w:lsdException w:name="List Continue"/>
  167. <w:lsdException w:name="List Continue 2"/>
  168. <w:lsdException w:name="List Continue 3"/>
  169. <w:lsdException w:name="List Continue 4"/>
  170. <w:lsdException w:name="List Continue 5"/>
  171. <w:lsdException w:name="Message Header"/>
  172. <w:lsdException w:name="Subtitle"/>
  173. <w:lsdException w:name="Salutation"/>
  174. <w:lsdException w:name="Date"/>
  175. <w:lsdException w:name="Body Text First Indent"/>
  176. <w:lsdException w:name="Body Text First Indent 2"/>
  177. <w:lsdException w:name="Note Heading"/>
  178. <w:lsdException w:name="Body Text 2"/>
  179. <w:lsdException w:name="Body Text 3"/>
  180. <w:lsdException w:name="Body Text Indent 2"/>
  181. <w:lsdException w:name="Body Text Indent 3"/>
  182. <w:lsdException w:name="Block Text"/>
  183. <w:lsdException w:name="Hyperlink"/>
  184. <w:lsdException w:name="FollowedHyperlink"/>
  185. <w:lsdException w:name="Strong"/>
  186. <w:lsdException w:name="Emphasis"/>
  187. <w:lsdException w:name="Document Map"/>
  188. <w:lsdException w:name="Plain Text"/>
  189. <w:lsdException w:name="E-mail Signature"/>
  190. <w:lsdException w:name="HTML Top of Form"/>
  191. <w:lsdException w:name="HTML Bottom of Form"/>
  192. <w:lsdException w:name="Normal (Web)"/>
  193. <w:lsdException w:name="HTML Acronym"/>
  194. <w:lsdException w:name="HTML Address"/>
  195. <w:lsdException w:name="HTML Cite"/>
  196. <w:lsdException w:name="HTML Code"/>
  197. <w:lsdException w:name="HTML Definition"/>
  198. <w:lsdException w:name="HTML Keyboard"/>
  199. <w:lsdException w:name="HTML Preformatted"/>
  200. <w:lsdException w:name="HTML Sample"/>
  201. <w:lsdException w:name="HTML Typewriter"/>
  202. <w:lsdException w:name="HTML Variable"/>
  203. <w:lsdException w:name="Normal Table"/>
  204. <w:lsdException w:name="annotation subject"/>
  205. <w:lsdException w:name="No List"/>
  206. <w:lsdException w:name="Outline List 1"/>
  207. <w:lsdException w:name="Outline List 2"/>
  208. <w:lsdException w:name="Outline List 3"/>
  209. <w:lsdException w:name="Table Simple 1"/>
  210. <w:lsdException w:name="Table Simple 2"/>
  211. <w:lsdException w:name="Table Simple 3"/>
  212. <w:lsdException w:name="Table Classic 1"/>
  213. <w:lsdException w:name="Table Classic 2"/>
  214. <w:lsdException w:name="Table Classic 3"/>
  215. <w:lsdException w:name="Table Classic 4"/>
  216. <w:lsdException w:name="Table Colorful 1"/>
  217. <w:lsdException w:name="Table Colorful 2"/>
  218. <w:lsdException w:name="Table Colorful 3"/>
  219. <w:lsdException w:name="Table Columns 1"/>
  220. <w:lsdException w:name="Table Columns 2"/>
  221. <w:lsdException w:name="Table Columns 3"/>
  222. <w:lsdException w:name="Table Columns 4"/>
  223. <w:lsdException w:name="Table Columns 5"/>
  224. <w:lsdException w:name="Table Grid 1"/>
  225. <w:lsdException w:name="Table Grid 2"/>
  226. <w:lsdException w:name="Table Grid 3"/>
  227. <w:lsdException w:name="Table Grid 4"/>
  228. <w:lsdException w:name="Table Grid 5"/>
  229. <w:lsdException w:name="Table Grid 6"/>
  230. <w:lsdException w:name="Table Grid 7"/>
  231. <w:lsdException w:name="Table Grid 8"/>
  232. <w:lsdException w:name="Table List 1"/>
  233. <w:lsdException w:name="Table List 2"/>
  234. <w:lsdException w:name="Table List 3"/>
  235. <w:lsdException w:name="Table List 4"/>
  236. <w:lsdException w:name="Table List 5"/>
  237. <w:lsdException w:name="Table List 6"/>
  238. <w:lsdException w:name="Table List 7"/>
  239. <w:lsdException w:name="Table List 8"/>
  240. <w:lsdException w:name="Table 3D effects 1"/>
  241. <w:lsdException w:name="Table 3D effects 2"/>
  242. <w:lsdException w:name="Table 3D effects 3"/>
  243. <w:lsdException w:name="Table Contemporary"/>
  244. <w:lsdException w:name="Table Elegant"/>
  245. <w:lsdException w:name="Table Professional"/>
  246. <w:lsdException w:name="Table Subtle 1"/>
  247. <w:lsdException w:name="Table Subtle 2"/>
  248. <w:lsdException w:name="Table Web 1"/>
  249. <w:lsdException w:name="Table Web 2"/>
  250. <w:lsdException w:name="Table Web 3"/>
  251. <w:lsdException w:name="Balloon Text"/>
  252. <w:lsdException w:name="Table Grid"/>
  253. <w:lsdException w:name="Table Theme"/>
  254. <w:lsdException w:name="Placeholder Text"/>
  255. <w:lsdException w:name="No Spacing"/>
  256. <w:lsdException w:name="Light Shading"/>
  257. <w:lsdException w:name="Light List"/>
  258. <w:lsdException w:name="Light Grid"/>
  259. <w:lsdException w:name="Medium Shading 1"/>
  260. <w:lsdException w:name="Medium Shading 2"/>
  261. <w:lsdException w:name="Medium List 1"/>
  262. <w:lsdException w:name="Medium List 2"/>
  263. <w:lsdException w:name="Medium Grid 1"/>
  264. <w:lsdException w:name="Medium Grid 2"/>
  265. <w:lsdException w:name="Medium Grid 3"/>
  266. <w:lsdException w:name="Dark List"/>
  267. <w:lsdException w:name="Colorful Shading"/>
  268. <w:lsdException w:name="Colorful List"/>
  269. <w:lsdException w:name="Colorful Grid"/>
  270. <w:lsdException w:name="Light Shading Accent 1"/>
  271. <w:lsdException w:name="Light List Accent 1"/>
  272. <w:lsdException w:name="Light Grid Accent 1"/>
  273. <w:lsdException w:name="Medium Shading 1 Accent 1"/>
  274. <w:lsdException w:name="Medium Shading 2 Accent 1"/>
  275. <w:lsdException w:name="Medium List 1 Accent 1"/>
  276. <w:lsdException w:name="Revision"/>
  277. <w:lsdException w:name="List Paragraph"/>
  278. <w:lsdException w:name="Quote"/>
  279. <w:lsdException w:name="Intense Quote"/>
  280. <w:lsdException w:name="Medium List 2 Accent 1"/>
  281. <w:lsdException w:name="Medium Grid 1 Accent 1"/>
  282. <w:lsdException w:name="Medium Grid 2 Accent 1"/>
  283. <w:lsdException w:name="Medium Grid 3 Accent 1"/>
  284. <w:lsdException w:name="Dark List Accent 1"/>
  285. <w:lsdException w:name="Colorful Shading Accent 1"/>
  286. <w:lsdException w:name="Colorful List Accent 1"/>
  287. <w:lsdException w:name="Colorful Grid Accent 1"/>
  288. <w:lsdException w:name="Light Shading Accent 2"/>
  289. <w:lsdException w:name="Light List Accent 2"/>
  290. <w:lsdException w:name="Light Grid Accent 2"/>
  291. <w:lsdException w:name="Medium Shading 1 Accent 2"/>
  292. <w:lsdException w:name="Medium Shading 2 Accent 2"/>
  293. <w:lsdException w:name="Medium List 1 Accent 2"/>
  294. <w:lsdException w:name="Medium List 2 Accent 2"/>
  295. <w:lsdException w:name="Medium Grid 1 Accent 2"/>
  296. <w:lsdException w:name="Medium Grid 2 Accent 2"/>
  297. <w:lsdException w:name="Medium Grid 3 Accent 2"/>
  298. <w:lsdException w:name="Dark List Accent 2"/>
  299. <w:lsdException w:name="Colorful Shading Accent 2"/>
  300. <w:lsdException w:name="Colorful List Accent 2"/>
  301. <w:lsdException w:name="Colorful Grid Accent 2"/>
  302. <w:lsdException w:name="Light Shading Accent 3"/>
  303. <w:lsdException w:name="Light List Accent 3"/>
  304. <w:lsdException w:name="Light Grid Accent 3"/>
  305. <w:lsdException w:name="Medium Shading 1 Accent 3"/>
  306. <w:lsdException w:name="Medium Shading 2 Accent 3"/>
  307. <w:lsdException w:name="Medium List 1 Accent 3"/>
  308. <w:lsdException w:name="Medium List 2 Accent 3"/>
  309. <w:lsdException w:name="Medium Grid 1 Accent 3"/>
  310. <w:lsdException w:name="Medium Grid 2 Accent 3"/>
  311. <w:lsdException w:name="Medium Grid 3 Accent 3"/>
  312. <w:lsdException w:name="Dark List Accent 3"/>
  313. <w:lsdException w:name="Colorful Shading Accent 3"/>
  314. <w:lsdException w:name="Colorful List Accent 3"/>
  315. <w:lsdException w:name="Colorful Grid Accent 3"/>
  316. <w:lsdException w:name="Light Shading Accent 4"/>
  317. <w:lsdException w:name="Light List Accent 4"/>
  318. <w:lsdException w:name="Light Grid Accent 4"/>
  319. <w:lsdException w:name="Medium Shading 1 Accent 4"/>
  320. <w:lsdException w:name="Medium Shading 2 Accent 4"/>
  321. <w:lsdException w:name="Medium List 1 Accent 4"/>
  322. <w:lsdException w:name="Medium List 2 Accent 4"/>
  323. <w:lsdException w:name="Medium Grid 1 Accent 4"/>
  324. <w:lsdException w:name="Medium Grid 2 Accent 4"/>
  325. <w:lsdException w:name="Medium Grid 3 Accent 4"/>
  326. <w:lsdException w:name="Dark List Accent 4"/>
  327. <w:lsdException w:name="Colorful Shading Accent 4"/>
  328. <w:lsdException w:name="Colorful List Accent 4"/>
  329. <w:lsdException w:name="Colorful Grid Accent 4"/>
  330. <w:lsdException w:name="Light Shading Accent 5"/>
  331. <w:lsdException w:name="Light List Accent 5"/>
  332. <w:lsdException w:name="Light Grid Accent 5"/>
  333. <w:lsdException w:name="Medium Shading 1 Accent 5"/>
  334. <w:lsdException w:name="Medium Shading 2 Accent 5"/>
  335. <w:lsdException w:name="Medium List 1 Accent 5"/>
  336. <w:lsdException w:name="Medium List 2 Accent 5"/>
  337. <w:lsdException w:name="Medium Grid 1 Accent 5"/>
  338. <w:lsdException w:name="Medium Grid 2 Accent 5"/>
  339. <w:lsdException w:name="Medium Grid 3 Accent 5"/>
  340. <w:lsdException w:name="Dark List Accent 5"/>
  341. <w:lsdException w:name="Colorful Shading Accent 5"/>
  342. <w:lsdException w:name="Colorful List Accent 5"/>
  343. <w:lsdException w:name="Colorful Grid Accent 5"/>
  344. <w:lsdException w:name="Light Shading Accent 6"/>
  345. <w:lsdException w:name="Light List Accent 6"/>
  346. <w:lsdException w:name="Light Grid Accent 6"/>
  347. <w:lsdException w:name="Medium Shading 1 Accent 6"/>
  348. <w:lsdException w:name="Medium Shading 2 Accent 6"/>
  349. <w:lsdException w:name="Medium List 1 Accent 6"/>
  350. <w:lsdException w:name="Medium List 2 Accent 6"/>
  351. <w:lsdException w:name="Medium Grid 1 Accent 6"/>
  352. <w:lsdException w:name="Medium Grid 2 Accent 6"/>
  353. <w:lsdException w:name="Medium Grid 3 Accent 6"/>
  354. <w:lsdException w:name="Dark List Accent 6"/>
  355. <w:lsdException w:name="Colorful Shading Accent 6"/>
  356. <w:lsdException w:name="Colorful List Accent 6"/>
  357. <w:lsdException w:name="Colorful Grid Accent 6"/>
  358. <w:lsdException w:name="Subtle Emphasis"/>
  359. <w:lsdException w:name="Intense Emphasis"/>
  360. <w:lsdException w:name="Subtle Reference"/>
  361. <w:lsdException w:name="Intense Reference"/>
  362. <w:lsdException w:name="Book Title"/>
  363. <w:lsdException w:name="Bibliography"/>
  364. <w:lsdException w:name="TOC Heading"/>
  365. <w:lsdException w:name="Plain Table 1"/>
  366. <w:lsdException w:name="Plain Table 2"/>
  367. <w:lsdException w:name="Plain Table 3"/>
  368. <w:lsdException w:name="Plain Table 4"/>
  369. <w:lsdException w:name="Plain Table 5"/>
  370. <w:lsdException w:name="Grid Table Light"/>
  371. <w:lsdException w:name="Grid Table 1 Light"/>
  372. <w:lsdException w:name="Grid Table 2"/>
  373. <w:lsdException w:name="Grid Table 3"/>
  374. <w:lsdException w:name="Grid Table 4"/>
  375. <w:lsdException w:name="Grid Table 5 Dark"/>
  376. <w:lsdException w:name="Grid Table 6 Colorful"/>
  377. <w:lsdException w:name="Grid Table 7 Colorful"/>
  378. <w:lsdException w:name="Grid Table 1 Light Accent 1"/>
  379. <w:lsdException w:name="Grid Table 2 Accent 1"/>
  380. <w:lsdException w:name="Grid Table 3 Accent 1"/>
  381. <w:lsdException w:name="Grid Table 4 Accent 1"/>
  382. <w:lsdException w:name="Grid Table 5 Dark Accent 1"/>
  383. <w:lsdException w:name="Grid Table 6 Colorful Accent 1"/>
  384. <w:lsdException w:name="Grid Table 7 Colorful Accent 1"/>
  385. <w:lsdException w:name="Grid Table 1 Light Accent 2"/>
  386. <w:lsdException w:name="Grid Table 2 Accent 2"/>
  387. <w:lsdException w:name="Grid Table 3 Accent 2"/>
  388. <w:lsdException w:name="Grid Table 4 Accent 2"/>
  389. <w:lsdException w:name="Grid Table 5 Dark Accent 2"/>
  390. <w:lsdException w:name="Grid Table 6 Colorful Accent 2"/>
  391. <w:lsdException w:name="Grid Table 7 Colorful Accent 2"/>
  392. <w:lsdException w:name="Grid Table 1 Light Accent 3"/>
  393. <w:lsdException w:name="Grid Table 2 Accent 3"/>
  394. <w:lsdException w:name="Grid Table 3 Accent 3"/>
  395. <w:lsdException w:name="Grid Table 4 Accent 3"/>
  396. <w:lsdException w:name="Grid Table 5 Dark Accent 3"/>
  397. <w:lsdException w:name="Grid Table 6 Colorful Accent 3"/>
  398. <w:lsdException w:name="Grid Table 7 Colorful Accent 3"/>
  399. <w:lsdException w:name="Grid Table 1 Light Accent 4"/>
  400. <w:lsdException w:name="Grid Table 2 Accent 4"/>
  401. <w:lsdException w:name="Grid Table 3 Accent 4"/>
  402. <w:lsdException w:name="Grid Table 4 Accent 4"/>
  403. <w:lsdException w:name="Grid Table 5 Dark Accent 4"/>
  404. <w:lsdException w:name="Grid Table 6 Colorful Accent 4"/>
  405. <w:lsdException w:name="Grid Table 7 Colorful Accent 4"/>
  406. <w:lsdException w:name="Grid Table 1 Light Accent 5"/>
  407. <w:lsdException w:name="Grid Table 2 Accent 5"/>
  408. <w:lsdException w:name="Grid Table 3 Accent 5"/>
  409. <w:lsdException w:name="Grid Table 4 Accent 5"/>
  410. <w:lsdException w:name="Grid Table 5 Dark Accent 5"/>
  411. <w:lsdException w:name="Grid Table 6 Colorful Accent 5"/>
  412. <w:lsdException w:name="Grid Table 7 Colorful Accent 5"/>
  413. <w:lsdException w:name="Grid Table 1 Light Accent 6"/>
  414. <w:lsdException w:name="Grid Table 2 Accent 6"/>
  415. <w:lsdException w:name="Grid Table 3 Accent 6"/>
  416. <w:lsdException w:name="Grid Table 4 Accent 6"/>
  417. <w:lsdException w:name="Grid Table 5 Dark Accent 6"/>
  418. <w:lsdException w:name="Grid Table 6 Colorful Accent 6"/>
  419. <w:lsdException w:name="Grid Table 7 Colorful Accent 6"/>
  420. <w:lsdException w:name="List Table 1 Light"/>
  421. <w:lsdException w:name="List Table 2"/>
  422. <w:lsdException w:name="List Table 3"/>
  423. <w:lsdException w:name="List Table 4"/>
  424. <w:lsdException w:name="List Table 5 Dark"/>
  425. <w:lsdException w:name="List Table 6 Colorful"/>
  426. <w:lsdException w:name="List Table 7 Colorful"/>
  427. <w:lsdException w:name="List Table 1 Light Accent 1"/>
  428. <w:lsdException w:name="List Table 2 Accent 1"/>
  429. <w:lsdException w:name="List Table 3 Accent 1"/>
  430. <w:lsdException w:name="List Table 4 Accent 1"/>
  431. <w:lsdException w:name="List Table 5 Dark Accent 1"/>
  432. <w:lsdException w:name="List Table 6 Colorful Accent 1"/>
  433. <w:lsdException w:name="List Table 7 Colorful Accent 1"/>
  434. <w:lsdException w:name="List Table 1 Light Accent 2"/>
  435. <w:lsdException w:name="List Table 2 Accent 2"/>
  436. <w:lsdException w:name="List Table 3 Accent 2"/>
  437. <w:lsdException w:name="List Table 4 Accent 2"/>
  438. <w:lsdException w:name="List Table 5 Dark Accent 2"/>
  439. <w:lsdException w:name="List Table 6 Colorful Accent 2"/>
  440. <w:lsdException w:name="List Table 7 Colorful Accent 2"/>
  441. <w:lsdException w:name="List Table 1 Light Accent 3"/>
  442. <w:lsdException w:name="List Table 2 Accent 3"/>
  443. <w:lsdException w:name="List Table 3 Accent 3"/>
  444. <w:lsdException w:name="List Table 4 Accent 3"/>
  445. <w:lsdException w:name="List Table 5 Dark Accent 3"/>
  446. <w:lsdException w:name="List Table 6 Colorful Accent 3"/>
  447. <w:lsdException w:name="List Table 7 Colorful Accent 3"/>
  448. <w:lsdException w:name="List Table 1 Light Accent 4"/>
  449. <w:lsdException w:name="List Table 2 Accent 4"/>
  450. <w:lsdException w:name="List Table 3 Accent 4"/>
  451. <w:lsdException w:name="List Table 4 Accent 4"/>
  452. <w:lsdException w:name="List Table 5 Dark Accent 4"/>
  453. <w:lsdException w:name="List Table 6 Colorful Accent 4"/>
  454. <w:lsdException w:name="List Table 7 Colorful Accent 4"/>
  455. <w:lsdException w:name="List Table 1 Light Accent 5"/>
  456. <w:lsdException w:name="List Table 2 Accent 5"/>
  457. <w:lsdException w:name="List Table 3 Accent 5"/>
  458. <w:lsdException w:name="List Table 4 Accent 5"/>
  459. <w:lsdException w:name="List Table 5 Dark Accent 5"/>
  460. <w:lsdException w:name="List Table 6 Colorful Accent 5"/>
  461. <w:lsdException w:name="List Table 7 Colorful Accent 5"/>
  462. <w:lsdException w:name="List Table 1 Light Accent 6"/>
  463. <w:lsdException w:name="List Table 2 Accent 6"/>
  464. <w:lsdException w:name="List Table 3 Accent 6"/>
  465. <w:lsdException w:name="List Table 4 Accent 6"/>
  466. <w:lsdException w:name="List Table 5 Dark Accent 6"/>
  467. <w:lsdException w:name="List Table 6 Colorful Accent 6"/>
  468. <w:lsdException w:name="List Table 7 Colorful Accent 6"/>
  469. </w:latentStyles>
  470. <w:style w:type="paragraph" w:default="on" w:styleId="a">
  471. <w:name w:val="Normal"/>
  472. <wx:uiName wx:val="正文"/>
  473. <w:pPr>
  474. <w:widowControl w:val="off"/>
  475. <w:jc w:val="both"/>
  476. </w:pPr>
  477. <w:rPr>
  478. <wx:font wx:val="等线"/>
  479. <w:kern w:val="2"/>
  480. <w:sz w:val="21"/>
  481. <w:sz-cs w:val="22"/>
  482. <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
  483. </w:rPr>
  484. </w:style>
  485. <w:style w:type="character" w:default="on" w:styleId="a0">
  486. <w:name w:val="Default Paragraph Font"/>
  487. <wx:uiName wx:val="默认段落字体"/>
  488. </w:style>
  489. <w:style w:type="table" w:default="on" w:styleId="a1">
  490. <w:name w:val="Normal Table"/>
  491. <wx:uiName wx:val="普通表格"/>
  492. <w:rPr>
  493. <wx:font wx:val="等线"/>
  494. <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
  495. </w:rPr>
  496. <w:tblPr>
  497. <w:tblInd w:w="0" w:type="dxa"/>
  498. <w:tblCellMar>
  499. <w:top w:w="0" w:type="dxa"/>
  500. <w:left w:w="108" w:type="dxa"/>
  501. <w:bottom w:w="0" w:type="dxa"/>
  502. <w:right w:w="108" w:type="dxa"/>
  503. </w:tblCellMar>
  504. </w:tblPr>
  505. </w:style>
  506. <w:style w:type="list" w:default="on" w:styleId="a2">
  507. <w:name w:val="No List"/>
  508. <wx:uiName wx:val="无列表"/>
  509. </w:style>
  510. <w:style w:type="table" w:styleId="a3">
  511. <w:name w:val="Table Grid"/>
  512. <wx:uiName wx:val="网格型"/>
  513. <w:basedOn w:val="a1"/>
  514. <w:rsid w:val="00B62005"/>
  515. <w:rPr>
  516. <wx:font wx:val="等线"/>
  517. </w:rPr>
  518. <w:tblPr>
  519. <w:tblBorders>
  520. <w:top w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  521. <w:left w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  522. <w:bottom w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  523. <w:right w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  524. <w:insideH w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  525. <w:insideV w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  526. </w:tblBorders>
  527. </w:tblPr>
  528. </w:style>
  529. <w:style w:type="character" w:styleId="a4">
  530. <w:name w:val="annotation reference"/>
  531. <wx:uiName wx:val="批注引用"/>
  532. <w:rsid w:val="00B62005"/>
  533. <w:rPr>
  534. <w:sz w:val="21"/>
  535. <w:sz-cs w:val="21"/>
  536. </w:rPr>
  537. </w:style>
  538. <w:style w:type="paragraph" w:styleId="a5">
  539. <w:name w:val="annotation text"/>
  540. <wx:uiName wx:val="批注文字"/>
  541. <w:basedOn w:val="a"/>
  542. <w:link w:val="a6"/>
  543. <w:rsid w:val="00B62005"/>
  544. <w:pPr>
  545. <w:jc w:val="left"/>
  546. </w:pPr>
  547. <w:rPr>
  548. <wx:font wx:val="等线"/>
  549. </w:rPr>
  550. </w:style>
  551. <w:style w:type="character" w:styleId="a6">
  552. <w:name w:val="批注文字 字符"/>
  553. <w:basedOn w:val="a0"/>
  554. <w:link w:val="a5"/>
  555. <w:rsid w:val="00B62005"/>
  556. </w:style>
  557. <w:style w:type="paragraph" w:styleId="a7">
  558. <w:name w:val="annotation subject"/>
  559. <wx:uiName wx:val="批注主题"/>
  560. <w:basedOn w:val="a5"/>
  561. <w:next w:val="a5"/>
  562. <w:link w:val="a8"/>
  563. <w:rsid w:val="00B62005"/>
  564. <w:rPr>
  565. <wx:font wx:val="等线"/>
  566. <w:b/>
  567. <w:b-cs/>
  568. </w:rPr>
  569. </w:style>
  570. <w:style w:type="character" w:styleId="a8">
  571. <w:name w:val="批注主题 字符"/>
  572. <w:link w:val="a7"/>
  573. <w:rsid w:val="00B62005"/>
  574. <w:rPr>
  575. <w:b/>
  576. <w:b-cs/>
  577. </w:rPr>
  578. </w:style>
  579. <w:style w:type="paragraph" w:styleId="a9">
  580. <w:name w:val="Balloon Text"/>
  581. <wx:uiName wx:val="批注框文本"/>
  582. <w:basedOn w:val="a"/>
  583. <w:link w:val="aa"/>
  584. <w:rsid w:val="00B62005"/>
  585. <w:rPr>
  586. <wx:font wx:val="等线"/>
  587. <w:sz w:val="18"/>
  588. <w:sz-cs w:val="18"/>
  589. </w:rPr>
  590. </w:style>
  591. <w:style w:type="character" w:styleId="aa">
  592. <w:name w:val="批注框文本 字符"/>
  593. <w:link w:val="a9"/>
  594. <w:rsid w:val="00B62005"/>
  595. <w:rPr>
  596. <w:sz w:val="18"/>
  597. <w:sz-cs w:val="18"/>
  598. </w:rPr>
  599. </w:style>
  600. </w:styles>
  601. <w:shapeDefaults>
  602. <o:shapedefaults v:ext="edit" spidmax="1026"/>
  603. <o:shapelayout v:ext="edit">
  604. <o:idmap v:ext="edit" data="1"/>
  605. </o:shapelayout>
  606. </w:shapeDefaults>
  607. <w:docPr>
  608. <w:view w:val="print"/>
  609. <w:zoom w:percent="100"/>
  610. <w:doNotEmbedSystemFonts/>
  611. <w:bordersDontSurroundHeader/>
  612. <w:bordersDontSurroundFooter/>
  613. <w:defaultTabStop w:val="420"/>
  614. <w:drawingGridVerticalSpacing w:val="156"/>
  615. <w:displayHorizontalDrawingGridEvery w:val="0"/>
  616. <w:displayVerticalDrawingGridEvery w:val="2"/>
  617. <w:punctuationKerning/>
  618. <w:characterSpacingControl w:val="CompressPunctuation"/>
  619. <w:optimizeForBrowser/>
  620. <w:allowPNG/>
  621. <w:validateAgainstSchema/>
  622. <w:saveInvalidXML w:val="off"/>
  623. <w:ignoreMixedContent w:val="off"/>
  624. <w:alwaysShowPlaceholderText w:val="off"/>
  625. <w:compat>
  626. <w:spaceForUL/>
  627. <w:balanceSingleByteDoubleByteWidth/>
  628. <w:doNotLeaveBackslashAlone/>
  629. <w:ulTrailSpace/>
  630. <w:doNotExpandShiftReturn/>
  631. <w:adjustLineHeightInTable/>
  632. <w:breakWrappedTables/>
  633. <w:snapToGridInCell/>
  634. <w:wrapTextWithPunct/>
  635. <w:useAsianBreakRules/>
  636. <w:dontGrowAutofit/>
  637. <w:useFELayout/>
  638. </w:compat>
  639. <wsp:rsids>
  640. <wsp:rsidRoot wsp:val="00B62005"/>
  641. <wsp:rsid wsp:val="002B098C"/>
  642. <wsp:rsid wsp:val="00335F0E"/>
  643. <wsp:rsid wsp:val="00510709"/>
  644. <wsp:rsid wsp:val="008C605D"/>
  645. <wsp:rsid wsp:val="00B62005"/>
  646. </wsp:rsids>
  647. </w:docPr>
  648. <w:body>
  649. <wx:sect>
  650. <w:p wsp:rsidR="008C605D" wsp:rsidRDefault="00335F0E" wsp:rsidP="00B62005">
  651. <w:pPr>
  652. <w:jc w:val="center"/>
  653. <w:rPr>
  654. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  655. <wx:font wx:val="微软雅黑"/>
  656. <w:b/>
  657. <w:sz w:val="44"/>
  658. <w:sz-cs w:val="44"/>
  659. </w:rPr>
  660. </w:pPr>
  661. <w:r wsp:rsidR="002B098C">
  662. <w:rPr>
  663. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑" w:hint="fareast"/>
  664. <wx:font wx:val="微软雅黑"/>
  665. <w:b/>
  666. <w:sz w:val="44"/>
  667. <w:sz-cs w:val="44"/>
  668. </w:rPr>
  669. <w:t>${name}简介</w:t>
  670. </w:r>
  671. </w:p>
  672. <w:tbl>
  673. <w:tblPr>
  674. <w:tblW w:w="9072" w:type="dxa"/>
  675. <w:jc w:val="center"/>
  676. <w:tblBorders>
  677. <w:top w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  678. <w:left w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  679. <w:bottom w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  680. <w:right w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  681. <w:insideH w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  682. <w:insideV w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
  683. </w:tblBorders>
  684. <w:tblLook w:val="04A0"/>
  685. </w:tblPr>
  686. <w:tblGrid>
  687. <w:gridCol w:w="1855"/>
  688. <w:gridCol w:w="3100"/>
  689. <w:gridCol w:w="1849"/>
  690. <w:gridCol w:w="2268"/>
  691. </w:tblGrid>
  692. <w:tr wsp:rsidR="00510709" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  693. <w:trPr>
  694. <w:trHeight w:val="567"/>
  695. <w:jc w:val="center"/>
  696. </w:trPr>
  697. <w:tc>
  698. <w:tcPr>
  699. <w:tcW w:w="1855" w:type="dxa"/>
  700. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  701. <w:vAlign w:val="center"/>
  702. </w:tcPr>
  703. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  704. <w:pPr>
  705. <w:jc w:val="center"/>
  706. <w:rPr>
  707. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  708. <wx:font wx:val="宋体"/>
  709. <w:b/>
  710. <w:sz w:val="24"/>
  711. <w:sz-cs w:val="24"/>
  712. </w:rPr>
  713. </w:pPr>
  714. <w:r wsp:rsidRPr="00510709">
  715. <w:rPr>
  716. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  717. <wx:font wx:val="宋体"/>
  718. <w:b/>
  719. <w:sz w:val="24"/>
  720. <w:sz-cs w:val="24"/>
  721. </w:rPr>
  722. <w:t>公司名称</w:t>
  723. </w:r>
  724. </w:p>
  725. </w:tc>
  726. <w:tc>
  727. <w:tcPr>
  728. <w:tcW w:w="7217" w:type="dxa"/>
  729. <w:gridSpan w:val="3"/>
  730. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  731. <w:vAlign w:val="center"/>
  732. </w:tcPr>
  733. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  734. <w:pPr>
  735. <w:jc w:val="center"/>
  736. <w:rPr>
  737. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  738. <wx:font wx:val="宋体"/>
  739. <w:b/>
  740. <w:sz w:val="24"/>
  741. <w:sz-cs w:val="24"/>
  742. </w:rPr>
  743. </w:pPr>
  744. <w:r wsp:rsidRPr="00510709">
  745. <w:rPr>
  746. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  747. <wx:font wx:val="宋体"/>
  748. <w:b/>
  749. <w:sz w:val="24"/>
  750. <w:sz-cs w:val="24"/>
  751. </w:rPr>
  752. <w:t>${name}</w:t>
  753. </w:r>
  754. </w:p>
  755. </w:tc>
  756. </w:tr>
  757. <w:tr wsp:rsidR="00510709" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  758. <w:trPr>
  759. <w:trHeight w:val="567"/>
  760. <w:jc w:val="center"/>
  761. </w:trPr>
  762. <w:tc>
  763. <w:tcPr>
  764. <w:tcW w:w="1855" w:type="dxa"/>
  765. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  766. <w:vAlign w:val="center"/>
  767. </w:tcPr>
  768. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  769. <w:pPr>
  770. <w:jc w:val="center"/>
  771. <w:rPr>
  772. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  773. <wx:font wx:val="宋体"/>
  774. <w:b/>
  775. <w:sz w:val="24"/>
  776. <w:sz-cs w:val="24"/>
  777. </w:rPr>
  778. </w:pPr>
  779. <w:r wsp:rsidRPr="00510709">
  780. <w:rPr>
  781. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  782. <wx:font wx:val="宋体"/>
  783. <w:b/>
  784. <w:sz w:val="24"/>
  785. <w:sz-cs w:val="24"/>
  786. </w:rPr>
  787. <w:t>成立时间</w:t>
  788. </w:r>
  789. </w:p>
  790. </w:tc>
  791. <w:tc>
  792. <w:tcPr>
  793. <w:tcW w:w="3100" w:type="dxa"/>
  794. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  795. <w:vAlign w:val="center"/>
  796. </w:tcPr>
  797. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  798. <w:pPr>
  799. <w:jc w:val="center"/>
  800. <w:rPr>
  801. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  802. <wx:font wx:val="微软雅黑"/>
  803. <w:b/>
  804. <w:sz w:val="24"/>
  805. <w:sz-cs w:val="24"/>
  806. </w:rPr>
  807. </w:pPr>
  808. <w:r wsp:rsidRPr="00510709">
  809. <w:rPr>
  810. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  811. <wx:font wx:val="宋体"/>
  812. <w:b/>
  813. <w:sz w:val="24"/>
  814. <w:sz-cs w:val="24"/>
  815. </w:rPr>
  816. <w:t>${createTime}</w:t>
  817. </w:r>
  818. </w:p>
  819. </w:tc>
  820. <w:tc>
  821. <w:tcPr>
  822. <w:tcW w:w="1849" w:type="dxa"/>
  823. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  824. <w:vAlign w:val="center"/>
  825. </w:tcPr>
  826. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  827. <w:pPr>
  828. <w:jc w:val="center"/>
  829. <w:rPr>
  830. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  831. <wx:font wx:val="宋体"/>
  832. <w:b/>
  833. <w:sz w:val="24"/>
  834. <w:sz-cs w:val="24"/>
  835. </w:rPr>
  836. </w:pPr>
  837. <w:r wsp:rsidRPr="00510709">
  838. <w:rPr>
  839. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  840. <wx:font wx:val="宋体"/>
  841. <w:b/>
  842. <w:sz w:val="24"/>
  843. <w:sz-cs w:val="24"/>
  844. </w:rPr>
  845. <w:t>创始人</w:t>
  846. </w:r>
  847. </w:p>
  848. </w:tc>
  849. <w:tc>
  850. <w:tcPr>
  851. <w:tcW w:w="2268" w:type="dxa"/>
  852. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  853. <w:vAlign w:val="center"/>
  854. </w:tcPr>
  855. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  856. <w:pPr>
  857. <w:jc w:val="center"/>
  858. <w:rPr>
  859. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  860. <wx:font wx:val="宋体"/>
  861. <w:b/>
  862. <w:sz w:val="24"/>
  863. <w:sz-cs w:val="24"/>
  864. </w:rPr>
  865. </w:pPr>
  866. <w:r wsp:rsidRPr="00510709">
  867. <w:rPr>
  868. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  869. <wx:font wx:val="宋体"/>
  870. <w:b/>
  871. <w:sz w:val="24"/>
  872. <w:sz-cs w:val="24"/>
  873. </w:rPr>
  874. <w:t>${createUser}</w:t>
  875. </w:r>
  876. </w:p>
  877. </w:tc>
  878. </w:tr>
  879. <w:tr wsp:rsidR="00510709" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  880. <w:trPr>
  881. <w:trHeight w:val="567"/>
  882. <w:jc w:val="center"/>
  883. </w:trPr>
  884. <w:tc>
  885. <w:tcPr>
  886. <w:tcW w:w="1855" w:type="dxa"/>
  887. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  888. <w:vAlign w:val="center"/>
  889. </w:tcPr>
  890. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  891. <w:pPr>
  892. <w:jc w:val="center"/>
  893. <w:rPr>
  894. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  895. <wx:font wx:val="宋体"/>
  896. <w:b/>
  897. <w:sz w:val="24"/>
  898. <w:sz-cs w:val="24"/>
  899. </w:rPr>
  900. </w:pPr>
  901. <w:r wsp:rsidRPr="00510709">
  902. <w:rPr>
  903. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  904. <wx:font wx:val="宋体"/>
  905. <w:b/>
  906. <w:sz w:val="24"/>
  907. <w:sz-cs w:val="24"/>
  908. </w:rPr>
  909. <w:t>公司地址</w:t>
  910. </w:r>
  911. </w:p>
  912. </w:tc>
  913. <w:tc>
  914. <w:tcPr>
  915. <w:tcW w:w="7217" w:type="dxa"/>
  916. <w:gridSpan w:val="3"/>
  917. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  918. <w:vAlign w:val="center"/>
  919. </w:tcPr>
  920. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  921. <w:pPr>
  922. <w:jc w:val="center"/>
  923. <w:rPr>
  924. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  925. <wx:font wx:val="微软雅黑"/>
  926. <w:b/>
  927. <w:sz w:val="24"/>
  928. <w:sz-cs w:val="24"/>
  929. </w:rPr>
  930. </w:pPr>
  931. <w:r wsp:rsidRPr="00510709">
  932. <w:rPr>
  933. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  934. <wx:font wx:val="宋体"/>
  935. <w:b/>
  936. <w:sz w:val="24"/>
  937. <w:sz-cs w:val="24"/>
  938. </w:rPr>
  939. <w:t>${dist}</w:t>
  940. </w:r>
  941. </w:p>
  942. </w:tc>
  943. </w:tr>
  944. <w:tr wsp:rsidR="00510709" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  945. <w:trPr>
  946. <w:trHeight w:val="567"/>
  947. <w:jc w:val="center"/>
  948. </w:trPr>
  949. <w:tc>
  950. <w:tcPr>
  951. <w:tcW w:w="1855" w:type="dxa"/>
  952. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  953. <w:vAlign w:val="center"/>
  954. </w:tcPr>
  955. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  956. <w:pPr>
  957. <w:jc w:val="center"/>
  958. <w:rPr>
  959. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  960. <wx:font wx:val="宋体"/>
  961. <w:b/>
  962. <w:sz w:val="24"/>
  963. <w:sz-cs w:val="24"/>
  964. </w:rPr>
  965. </w:pPr>
  966. <w:r wsp:rsidRPr="00510709">
  967. <w:rPr>
  968. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  969. <wx:font wx:val="宋体"/>
  970. <w:b/>
  971. <w:sz w:val="24"/>
  972. <w:sz-cs w:val="24"/>
  973. </w:rPr>
  974. <w:t>经营范围</w:t>
  975. </w:r>
  976. </w:p>
  977. </w:tc>
  978. <w:tc>
  979. <w:tcPr>
  980. <w:tcW w:w="7217" w:type="dxa"/>
  981. <w:gridSpan w:val="3"/>
  982. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  983. <w:vAlign w:val="center"/>
  984. </w:tcPr>
  985. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  986. <w:pPr>
  987. <w:jc w:val="center"/>
  988. <w:rPr>
  989. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  990. <wx:font wx:val="微软雅黑"/>
  991. <w:b/>
  992. <w:sz w:val="24"/>
  993. <w:sz-cs w:val="24"/>
  994. </w:rPr>
  995. </w:pPr>
  996. <w:r wsp:rsidRPr="00510709">
  997. <w:rPr>
  998. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  999. <wx:font wx:val="宋体"/>
  1000. <w:b/>
  1001. <w:sz w:val="24"/>
  1002. <w:sz-cs w:val="24"/>
  1003. </w:rPr>
  1004. <w:t>${range}</w:t>
  1005. </w:r>
  1006. </w:p>
  1007. </w:tc>
  1008. </w:tr>
  1009. <w:tr wsp:rsidR="00510709" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  1010. <w:trPr>
  1011. <w:trHeight w:val="567"/>
  1012. <w:jc w:val="center"/>
  1013. </w:trPr>
  1014. <w:tc>
  1015. <w:tcPr>
  1016. <w:tcW w:w="1855" w:type="dxa"/>
  1017. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  1018. <w:vAlign w:val="center"/>
  1019. </w:tcPr>
  1020. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  1021. <w:pPr>
  1022. <w:jc w:val="center"/>
  1023. <w:rPr>
  1024. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  1025. <wx:font wx:val="宋体"/>
  1026. <w:b/>
  1027. <w:sz w:val="24"/>
  1028. <w:sz-cs w:val="24"/>
  1029. </w:rPr>
  1030. </w:pPr>
  1031. <w:r wsp:rsidRPr="00510709">
  1032. <w:rPr>
  1033. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  1034. <wx:font wx:val="宋体"/>
  1035. <w:b/>
  1036. <w:sz w:val="24"/>
  1037. <w:sz-cs w:val="24"/>
  1038. </w:rPr>
  1039. <w:t>网址</w:t>
  1040. </w:r>
  1041. </w:p>
  1042. </w:tc>
  1043. <w:tc>
  1044. <w:tcPr>
  1045. <w:tcW w:w="7217" w:type="dxa"/>
  1046. <w:gridSpan w:val="3"/>
  1047. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  1048. <w:vAlign w:val="center"/>
  1049. </w:tcPr>
  1050. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  1051. <w:pPr>
  1052. <w:jc w:val="center"/>
  1053. <w:rPr>
  1054. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  1055. <wx:font wx:val="微软雅黑"/>
  1056. <w:b/>
  1057. <w:sz w:val="24"/>
  1058. <w:sz-cs w:val="24"/>
  1059. </w:rPr>
  1060. </w:pPr>
  1061. <w:r wsp:rsidRPr="00510709">
  1062. <w:rPr>
  1063. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  1064. <wx:font wx:val="宋体"/>
  1065. <w:b/>
  1066. <w:sz w:val="24"/>
  1067. <w:sz-cs w:val="24"/>
  1068. </w:rPr>
  1069. <w:t>${webUrl}</w:t>
  1070. </w:r>
  1071. </w:p>
  1072. </w:tc>
  1073. </w:tr>
  1074. <w:tr wsp:rsidR="00510709" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  1075. <w:trPr>
  1076. <w:trHeight w:val="567"/>
  1077. <w:jc w:val="center"/>
  1078. </w:trPr>
  1079. <w:tc>
  1080. <w:tcPr>
  1081. <w:tcW w:w="1855" w:type="dxa"/>
  1082. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  1083. <w:vAlign w:val="center"/>
  1084. </w:tcPr>
  1085. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00B62005" wsp:rsidP="00510709">
  1086. <w:pPr>
  1087. <w:jc w:val="center"/>
  1088. <w:rPr>
  1089. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  1090. <wx:font wx:val="宋体"/>
  1091. <w:b/>
  1092. <w:sz w:val="24"/>
  1093. <w:sz-cs w:val="24"/>
  1094. </w:rPr>
  1095. </w:pPr>
  1096. <w:r wsp:rsidRPr="00510709">
  1097. <w:rPr>
  1098. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  1099. <wx:font wx:val="宋体"/>
  1100. <w:b/>
  1101. <w:sz w:val="24"/>
  1102. <w:sz-cs w:val="24"/>
  1103. </w:rPr>
  1104. <w:t>简介</w:t>
  1105. </w:r>
  1106. </w:p>
  1107. </w:tc>
  1108. <w:tc>
  1109. <w:tcPr>
  1110. <w:tcW w:w="7217" w:type="dxa"/>
  1111. <w:gridSpan w:val="3"/>
  1112. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  1113. <w:vAlign w:val="center"/>
  1114. </w:tcPr>
  1115. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  1116. <w:pPr>
  1117. <w:jc w:val="center"/>
  1118. <w:rPr>
  1119. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  1120. <wx:font wx:val="微软雅黑"/>
  1121. <w:b/>
  1122. <w:sz w:val="24"/>
  1123. <w:sz-cs w:val="24"/>
  1124. </w:rPr>
  1125. </w:pPr>
  1126. <w:r wsp:rsidRPr="00510709">
  1127. <w:rPr>
  1128. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  1129. <wx:font wx:val="宋体"/>
  1130. <w:b/>
  1131. <w:sz w:val="24"/>
  1132. <w:sz-cs w:val="24"/>
  1133. </w:rPr>
  1134. <w:t>${about}</w:t>
  1135. </w:r>
  1136. </w:p>
  1137. </w:tc>
  1138. </w:tr>
  1139. <w:tr wsp:rsidR="00335F0E" wsp:rsidRPr="00510709" wsp:rsidTr="00510709">
  1140. <w:trPr>
  1141. <w:trHeight w:val="567"/>
  1142. <w:jc w:val="center"/>
  1143. </w:trPr>
  1144. <w:tc>
  1145. <w:tcPr>
  1146. <w:tcW w:w="1855" w:type="dxa"/>
  1147. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  1148. <w:vAlign w:val="center"/>
  1149. </w:tcPr>
  1150. <w:p wsp:rsidR="00335F0E" wsp:rsidRPr="00510709" wsp:rsidRDefault="00335F0E" wsp:rsidP="00510709">
  1151. <w:pPr>
  1152. <w:jc w:val="center"/>
  1153. <w:rPr>
  1154. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体"/>
  1155. <wx:font wx:val="宋体"/>
  1156. <w:b/>
  1157. <w:sz w:val="24"/>
  1158. <w:sz-cs w:val="24"/>
  1159. </w:rPr>
  1160. </w:pPr>
  1161. <w:r wsp:rsidRPr="00510709">
  1162. <w:rPr>
  1163. <w:rFonts w:ascii="宋体" w:fareast="宋体" w:h-ansi="宋体" w:hint="fareast"/>
  1164. <wx:font wx:val="宋体"/>
  1165. <w:b/>
  1166. <w:sz w:val="24"/>
  1167. <w:sz-cs w:val="24"/>
  1168. </w:rPr>
  1169. <w:t>介绍图片</w:t>
  1170. </w:r>
  1171. </w:p>
  1172. </w:tc>
  1173. <w:tc>
  1174. <w:tcPr>
  1175. <w:tcW w:w="7217" w:type="dxa"/>
  1176. <w:gridSpan w:val="3"/>
  1177. <w:shd w:val="clear" w:color="auto" w:fill="auto"/>
  1178. <w:vAlign w:val="center"/>
  1179. </w:tcPr>
  1180. <#if image?exists>
  1181. <#list image as guo>
  1182. <w:p wsp:rsidR="00335F0E" wsp:rsidRPr="00492EB2" wsp:rsidRDefault="00492EB2" wsp:rsidP="00492EB2">
  1183. <w:pPr>
  1184. <w:jc w:val="center"/>
  1185. <w:rPr>
  1186. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  1187. <wx:font wx:val="微软雅黑"/>
  1188. <w:b/>
  1189. <w:sz w:val="24"/>
  1190. <w:sz-cs w:val="24"/>
  1191. </w:rPr>
  1192. </w:pPr>
  1193. <w:r wsp:rsidRPr="00492EB2">
  1194. <w:rPr>
  1195. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  1196. <wx:font wx:val="微软雅黑"/>
  1197. <w:b/>
  1198. <w:noProof/>
  1199. <w:sz w:val="24"/>
  1200. <w:sz-cs w:val="24"/>
  1201. </w:rPr>
  1202. <w:pict>
  1203. <v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
  1204. <v:stroke joinstyle="miter"/>
  1205. <v:formulas>
  1206. <v:f eqn="if lineDrawn pixelLineWidth 0"/>
  1207. <v:f eqn="sum @0 1 0"/>
  1208. <v:f eqn="sum 0 0 @1"/>
  1209. <v:f eqn="prod @2 1 2"/>
  1210. <v:f eqn="prod @3 21600 pixelWidth"/>
  1211. <v:f eqn="prod @3 21600 pixelHeight"/>
  1212. <v:f eqn="sum @0 0 1"/>
  1213. <v:f eqn="prod @6 1 2"/>
  1214. <v:f eqn="prod @7 21600 pixelWidth"/>
  1215. <v:f eqn="sum @8 21600 0"/>
  1216. <v:f eqn="prod @7 21600 pixelHeight"/>
  1217. <v:f eqn="sum @10 21600 0"/>
  1218. </v:formulas>
  1219. <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
  1220. <o:lock v:ext="edit" aspectratio="t"/>
  1221. </v:shapetype>
  1222. <w:binData w:name="${"wordml://0"+guo_index+3+"00000"+guo_index+1+".png"}" xml:space="preserve">
  1223. ${guo.image}</w:binData>
  1224. <v:shape id="图片 3" o:spid="_x0000_i1025" type="#_x0000_t75" style="width:250pt;height:130pt;visibility:visible;mso-wrap-style:square"><v:imagedata src="${"wordml://0"+guo_index+3+"00000"+guo_index+1+".png"}" o:title=""/></v:shape>
  1225. </w:pict>
  1226. </w:r>
  1227. </w:p>
  1228. </#list>
  1229. </#if>
  1230. </w:tc>
  1231. </w:tr>
  1232. </w:tbl>
  1233. <w:p wsp:rsidR="00B62005" wsp:rsidRPr="00B62005" wsp:rsidRDefault="00B62005" wsp:rsidP="00B62005">
  1234. <w:pPr>
  1235. <w:jc w:val="center"/>
  1236. <w:rPr>
  1237. <w:rFonts w:ascii="微软雅黑" w:fareast="微软雅黑" w:h-ansi="微软雅黑"/>
  1238. <wx:font wx:val="微软雅黑"/>
  1239. <w:b/>
  1240. <w:sz w:val="44"/>
  1241. <w:sz-cs w:val="44"/>
  1242. </w:rPr>
  1243. </w:pPr>
  1244. </w:p>
  1245. <w:sectPr wsp:rsidR="00B62005" wsp:rsidRPr="00B62005">
  1246. <w:pgSz w:w="11906" w:h="16838"/>
  1247. <w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="851" w:footer="992" w:gutter="0"/>
  1248. <w:cols w:space="425"/>
  1249. <w:docGrid w:type="lines" w:line-pitch="312"/>
  1250. </w:sectPr>
  1251. </wx:sect>
  1252. </w:body>
  1253. </w:wordDocument>

相关文章

最新文章

更多