一、简要描述
由于 easypoi对 word导出支持有限,也不能完成多记录导出。因此本次选择使用 freemarker来实现按自定义模板导出word。
使用 freemarker生成 word文档,基本流程如使用 easypoi一样简单,唯一的难点在于掌握如何配置 word模板,修改模板内容!
第一步:创建Word模板
(1)建议使用 office创建 word文档。原因:创建完成后,可轻松转为 Word 2003 XML文档(*.xml)
格式。
(2)xml 内容修改(重点)
1.模板制作成功后,可使用 Visual Studio Code 或者 IDEA
等工具打开 xml文件,打开后如下图:
红色部分:由于 xml文档内容非常多,为了便于修改,可在 Visual Studio Code 商店
安装 xml格式化插件。
绿色部分:xml 文档内容虽多,但很多内容是 word相关信息自带,无需关注。
2、直接往下翻,找到 <w:body> </w:body> 标签
,有点类似于 HTML,这里面存放的是模板内容,重要标签解释如下图:
注:上图中,不是"图片转成 base64",而是"图片内容的16进制字符串,失误,懒得改图了,特此注明!"
关于图片内容填充,此处我举个多图片例子,代码如下:
<w:p wsp:rsidR="00FE3676" wsp:rsidRDefault="009F529F">
<#list image as img>
<w:r>
<w:pict>
<w:binData w:name="${"wordml://img_"+img_index+".jpg"}" xml:space="preserve">${img.picture}</w:binData>
<v:shape id="_x0000_i1026" o:spid="_x0000_i1025" type="#_x0000_t75"
style="width:384pt;height:216pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="${"wordml://img_"+img_index+".jpg"}" o:title="2"/>
</v:shape>
</w:pict>
</w:r>
</#list>
</w:p>
(在博客底部,我会附上一份完整的 xml文件。该文件内容为 `多条记录循环,每条记录里会有多张图片的模板`)
(3)将 xml
文件后缀改为 ftl
文件,至此模板制作成功。
第二步:导入 Jar包
<!-- freemarker -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.30</version>
</dependency>
第三步:Controller 层接口
@ApiOperation(value = "导出 word文档")
@PostMapping("/word/export")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "用户id")})
public void wordExport(@RequestBody Long id,HttpServletRequest request, HttpServletResponse response) throws Exception {
service.wordExport(id, request, response);
}
第四步:Service 层业务
@Override
public void wordExport(Long id, HttpServletRequest request, HttpServletResponse response) throws IcmsException, IOException {
// 1.查询数据
User user = userDao.selectList(new QueryWrapper<User>().eq("id",id));
// 2.创建 map
Map<String,Object> data = new HashMap<>();
data.put("name",StringUtils.isEmpty(user.getName()) ? " ":user.getName()); // 姓名
data.put("age", null == user.getAge() ? " ":user.getAge()); // 年龄
data.put("sex",StringUtils.isEmpty(user.getSex()) ? " ":user.getSex()); // 性别
StringBuilder builder = new StringBuilder();
builder.append("<w:p></w:p>水果名称:草莓");
builder.append("<w:p></w:p>产地:海南");
data.put("content",builder.toString()); // 动态内容
// 3.处理图片
List<Map<String, Object>> resultPic = new ArrayList<>();
List<FileInfoModel> files = user.getFiles();
if(null != files && files.size() > 0){
for (int i = 0; i < files.size(); i++) {
// 判断图片路径是否为空
if(StringUtils.isEmpty(files.get(i).getUrl()))
continue;
Map<String, Object> pic = new HashMap<>();
String httpPath = request.getScheme() + "://" + request.getServerName() + files.get(i).getUrl(); // 图片路径
pic.put("picture", StringUtils.isEmpty(FileUtils.getImageString(httpPath)) ? " ":FileUtils.getImageString(httpPath));
resultPic.add(pic);
}
}else{
Map<String, Object> pic = new HashMap<>();
pic.put("picture", " ");
resultPic.add(pic);
}
map.put("image",resultPic);
// 4.执行导出
FileUtils.freemarkerExport("C:/Users/Administrator/Desktop","test.ftl",data,"C:/Users/Administrator/Desktop","test.docx",response);
}
关于业务描述,需要注意的点,和使用 easypoi一致。
我的另一篇博客:easypoi word 导出教程
第五步:FileUtils
通用工具类
public class FileUtils {
/**
* 使用 freemarker 生成word文档
*
* @param templateDir 模板所在目录路径
* @param templateName 模板 例如:xxx.ftl
* @param data 数据
* @param fileSavePath 文档生成后,存放的路径
* @param filename 生成后的文件名称,使用英文
* @param response
* @throws Exception
*/
public static void freemarkerExport(String templateDir, String templateName, Map<String, Object> data, String fileSavePath, String filename, HttpServletResponse response) throws Exception {
// 1.设置 freeMarker的版本和编码格式
Configuration configuration = new Configuration();
configuration.setDefaultEncoding("UTF-8");
// 2.设置 freeMarker生成Word文档,所需要的模板的路径
configuration.setDirectoryForTemplateLoading(new File(templateDir));
// 3.设置 freeMarker生成Word文档所需要的模板 ---> xxx.ftl
Template t = null;
try {
t = configuration.getTemplate(templateName); // 模板文件名称
} catch (IOException e) {
throw new IOException("获取 ftl模板失败!" + e.getMessage());
}
// 4.生成 Word文档的全路径名称
File outFile = new File(fileSavePath + filename);
// 5.创建一个 Word文档的输出流
Writer writer = null;
try {
writer = new OutputStreamWriter(new FileOutputStream(outFile), "utf-8");
} catch (Exception e) {
throw new Exception(e.getMessage());
}
try {
// 6.装载数据
t.process(data, writer);
response.setCharacterEncoding("utf-8");
response.addHeader("Content-Disposition", "attachment;filename=" + filename);
response.setContentType("application/force-download");
// 7.读取生成好的 Word文档
File file = new File(fileSavePath + filename);
FileInputStream is = new FileInputStream(file);
OutputStream os = response.getOutputStream();
byte[] b = new byte[1024];
int length;
while ((length = is.read(b)) > 0) {
os.write(b, 0, length);
}
os.flush();
os.close();
writer.flush();
writer.close();
} catch (IOException e) {
throw new IOException(e.getMessage());
} finally {
deleteTempFile(fileSavePath + filename);
}
}
/**
* 删除临时生成的文件
*/
public static void deleteTempFile(String filePath) {
File f = new File(filePath);
f.delete();
}
}
至此,按照以上顺序,即可完成 freemarker 导出 word!
二、扩展
1、图片转16进制字符串,并使用 base64编码。本地开发环境
public static String getImageString(String path) throws Exception {
InputStream input = new FileInputStream(path);
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int numBytesRead = 0;
while ((numBytesRead = input.read(buf)) != -1) {
output.write(buf, 0, numBytesRead);
}
byte[] data = output.toByteArray();
output.close();
input.close();
BASE64Encoder ecoder = new BASE64Encoder();
return ecoder.encode(data);
}
2、图片转16进制字符串,并使用 base64编码。Linux 生产环境
/**
* 将图片转换为 String存储
* @param path 文件 http路径
* @return String
* @throws IOException
*/
public static String getImageString(String path) throws IOException {
byte[] data = null;
URL url = null;
InputStream input = null;
try{
url = new URL(path);
HttpURLConnection httpUrl = (HttpURLConnection) url.openConnection();
httpUrl.connect();
httpUrl.getInputStream();
input = httpUrl.getInputStream();
}catch (Exception e) {
e.printStackTrace();
return null;
}
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int numBytesRead = 0;
while ((numBytesRead = input.read(buf)) != -1) {
output.write(buf, 0, numBytesRead);
}
data = output.toByteArray();
output.close();
input.close();
BASE64Encoder ecoder = new BASE64Encoder();
return ecoder.encode(data);
}
三、xml模板
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">
<w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/>
<o:DocumentProperties>
<o:Author>Windows 用户</o:Author>
<o:LastAuthor>Windows 用户</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>1</o:TotalTime>
<o:Created>2021-03-25T11:03:00Z</o:Created>
<o:LastSaved>2021-03-25T11:04:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>0</o:Words>
<o:Characters>1</o:Characters>
<o:Company>Microsoft</o:Company>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>1</o:CharactersWithSpaces>
<o:Version>16</o:Version>
</o:DocumentProperties>
<w:fonts>
<w:defaultFonts w:ascii="等线" w:fareast="等线" w:h-ansi="等线" w:cs="Times New Roman"/>
<w:font w:name="Times New Roman">
<w:panose-1 w:val="02020603050405020304"/>
<w:charset w:val="00"/>
<w:family w:val="Roman"/>
<w:pitch w:val="variable"/>
<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"/>
</w:font>
<w:font w:name="Times New Roman">
<w:panose-1 w:val="02020603050405020304"/>
<w:charset w:val="00"/>
<w:family w:val="Roman"/>
<w:pitch w:val="variable"/>
<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"/>
</w:font>
<w:font w:name="等线">
<w:altName w:val="DengXian"/>
<w:panose-1 w:val="02010600030101010101"/>
<w:charset w:val="86"/>
<w:family w:val="auto"/>
<w:pitch w:val="variable"/>
<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"/>
</w:font>
<w:font w:name="@等线">
<w:panose-1 w:val="02010600030101010101"/>
<w:charset w:val="86"/>
<w:family w:val="auto"/>
<w:pitch w:val="variable"/>
<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"/>
</w:font>
</w:fonts>
<w:styles>
<w:versionOfBuiltInStylenames w:val="7"/>
<w:latentStyles w:defLockedState="off" w:latentStyleCount="371">
<w:lsdException w:name="Normal"/>
<w:lsdException w:name="heading 1"/>
<w:lsdException w:name="heading 2"/>
<w:lsdException w:name="heading 3"/>
<w:lsdException w:name="heading 4"/>
<w:lsdException w:name="heading 5"/>
<w:lsdException w:name="heading 6"/>
<w:lsdException w:name="heading 7"/>
<w:lsdException w:name="heading 8"/>
<w:lsdException w:name="heading 9"/>
<w:lsdException w:name="index 1"/>
<w:lsdException w:name="index 2"/>
<w:lsdException w:name="index 3"/>
<w:lsdException w:name="index 4"/>
<w:lsdException w:name="index 5"/>
<w:lsdException w:name="index 6"/>
<w:lsdException w:name="index 7"/>
<w:lsdException w:name="index 8"/>
<w:lsdException w:name="index 9"/>
<w:lsdException w:name="toc 1"/>
<w:lsdException w:name="toc 2"/>
<w:lsdException w:name="toc 3"/>
<w:lsdException w:name="toc 4"/>
<w:lsdException w:name="toc 5"/>
<w:lsdException w:name="toc 6"/>
<w:lsdException w:name="toc 7"/>
<w:lsdException w:name="toc 8"/>
<w:lsdException w:name="toc 9"/>
<w:lsdException w:name="Normal Indent"/>
<w:lsdException w:name="footnote text"/>
<w:lsdException w:name="annotation text"/>
<w:lsdException w:name="header"/>
<w:lsdException w:name="footer"/>
<w:lsdException w:name="index heading"/>
<w:lsdException w:name="caption"/>
<w:lsdException w:name="table of figures"/>
<w:lsdException w:name="envelope address"/>
<w:lsdException w:name="envelope return"/>
<w:lsdException w:name="footnote reference"/>
<w:lsdException w:name="annotation reference"/>
<w:lsdException w:name="line number"/>
<w:lsdException w:name="page number"/>
<w:lsdException w:name="endnote reference"/>
<w:lsdException w:name="endnote text"/>
<w:lsdException w:name="table of authorities"/>
<w:lsdException w:name="macro"/>
<w:lsdException w:name="toa heading"/>
<w:lsdException w:name="List"/>
<w:lsdException w:name="List Bullet"/>
<w:lsdException w:name="List Number"/>
<w:lsdException w:name="List 2"/>
<w:lsdException w:name="List 3"/>
<w:lsdException w:name="List 4"/>
<w:lsdException w:name="List 5"/>
<w:lsdException w:name="List Bullet 2"/>
<w:lsdException w:name="List Bullet 3"/>
<w:lsdException w:name="List Bullet 4"/>
<w:lsdException w:name="List Bullet 5"/>
<w:lsdException w:name="List Number 2"/>
<w:lsdException w:name="List Number 3"/>
<w:lsdException w:name="List Number 4"/>
<w:lsdException w:name="List Number 5"/>
<w:lsdException w:name="Title"/>
<w:lsdException w:name="Closing"/>
<w:lsdException w:name="Signature"/>
<w:lsdException w:name="Default Paragraph Font"/>
<w:lsdException w:name="Body Text"/>
<w:lsdException w:name="Body Text Indent"/>
<w:lsdException w:name="List Continue"/>
<w:lsdException w:name="List Continue 2"/>
<w:lsdException w:name="List Continue 3"/>
<w:lsdException w:name="List Continue 4"/>
<w:lsdException w:name="List Continue 5"/>
<w:lsdException w:name="Message Header"/>
<w:lsdException w:name="Subtitle"/>
<w:lsdException w:name="Salutation"/>
<w:lsdException w:name="Date"/>
<w:lsdException w:name="Body Text First Indent"/>
<w:lsdException w:name="Body Text First Indent 2"/>
<w:lsdException w:name="Note Heading"/>
<w:lsdException w:name="Body Text 2"/>
<w:lsdException w:name="Body Text 3"/>
<w:lsdException w:name="Body Text Indent 2"/>
<w:lsdException w:name="Body Text Indent 3"/>
<w:lsdException w:name="Block Text"/>
<w:lsdException w:name="Hyperlink"/>
<w:lsdException w:name="FollowedHyperlink"/>
<w:lsdException w:name="Strong"/>
<w:lsdException w:name="Emphasis"/>
<w:lsdException w:name="Document Map"/>
<w:lsdException w:name="Plain Text"/>
<w:lsdException w:name="E-mail Signature"/>
<w:lsdException w:name="HTML Top of Form"/>
<w:lsdException w:name="HTML Bottom of Form"/>
<w:lsdException w:name="Normal (Web)"/>
<w:lsdException w:name="HTML Acronym"/>
<w:lsdException w:name="HTML Address"/>
<w:lsdException w:name="HTML Cite"/>
<w:lsdException w:name="HTML Code"/>
<w:lsdException w:name="HTML Definition"/>
<w:lsdException w:name="HTML Keyboard"/>
<w:lsdException w:name="HTML Preformatted"/>
<w:lsdException w:name="HTML Sample"/>
<w:lsdException w:name="HTML Typewriter"/>
<w:lsdException w:name="HTML Variable"/>
<w:lsdException w:name="Normal Table"/>
<w:lsdException w:name="annotation subject"/>
<w:lsdException w:name="No List"/>
<w:lsdException w:name="Outline List 1"/>
<w:lsdException w:name="Outline List 2"/>
<w:lsdException w:name="Outline List 3"/>
<w:lsdException w:name="Table Simple 1"/>
<w:lsdException w:name="Table Simple 2"/>
<w:lsdException w:name="Table Simple 3"/>
<w:lsdException w:name="Table Classic 1"/>
<w:lsdException w:name="Table Classic 2"/>
<w:lsdException w:name="Table Classic 3"/>
<w:lsdException w:name="Table Classic 4"/>
<w:lsdException w:name="Table Colorful 1"/>
<w:lsdException w:name="Table Colorful 2"/>
<w:lsdException w:name="Table Colorful 3"/>
<w:lsdException w:name="Table Columns 1"/>
<w:lsdException w:name="Table Columns 2"/>
<w:lsdException w:name="Table Columns 3"/>
<w:lsdException w:name="Table Columns 4"/>
<w:lsdException w:name="Table Columns 5"/>
<w:lsdException w:name="Table Grid 1"/>
<w:lsdException w:name="Table Grid 2"/>
<w:lsdException w:name="Table Grid 3"/>
<w:lsdException w:name="Table Grid 4"/>
<w:lsdException w:name="Table Grid 5"/>
<w:lsdException w:name="Table Grid 6"/>
<w:lsdException w:name="Table Grid 7"/>
<w:lsdException w:name="Table Grid 8"/>
<w:lsdException w:name="Table List 1"/>
<w:lsdException w:name="Table List 2"/>
<w:lsdException w:name="Table List 3"/>
<w:lsdException w:name="Table List 4"/>
<w:lsdException w:name="Table List 5"/>
<w:lsdException w:name="Table List 6"/>
<w:lsdException w:name="Table List 7"/>
<w:lsdException w:name="Table List 8"/>
<w:lsdException w:name="Table 3D effects 1"/>
<w:lsdException w:name="Table 3D effects 2"/>
<w:lsdException w:name="Table 3D effects 3"/>
<w:lsdException w:name="Table Contemporary"/>
<w:lsdException w:name="Table Elegant"/>
<w:lsdException w:name="Table Professional"/>
<w:lsdException w:name="Table Subtle 1"/>
<w:lsdException w:name="Table Subtle 2"/>
<w:lsdException w:name="Table Web 1"/>
<w:lsdException w:name="Table Web 2"/>
<w:lsdException w:name="Table Web 3"/>
<w:lsdException w:name="Balloon Text"/>
<w:lsdException w:name="Table Grid"/>
<w:lsdException w:name="Table Theme"/>
<w:lsdException w:name="Placeholder Text"/>
<w:lsdException w:name="No Spacing"/>
<w:lsdException w:name="Light Shading"/>
<w:lsdException w:name="Light List"/>
<w:lsdException w:name="Light Grid"/>
<w:lsdException w:name="Medium Shading 1"/>
<w:lsdException w:name="Medium Shading 2"/>
<w:lsdException w:name="Medium List 1"/>
<w:lsdException w:name="Medium List 2"/>
<w:lsdException w:name="Medium Grid 1"/>
<w:lsdException w:name="Medium Grid 2"/>
<w:lsdException w:name="Medium Grid 3"/>
<w:lsdException w:name="Dark List"/>
<w:lsdException w:name="Colorful Shading"/>
<w:lsdException w:name="Colorful List"/>
<w:lsdException w:name="Colorful Grid"/>
<w:lsdException w:name="Light Shading Accent 1"/>
<w:lsdException w:name="Light List Accent 1"/>
<w:lsdException w:name="Light Grid Accent 1"/>
<w:lsdException w:name="Medium Shading 1 Accent 1"/>
<w:lsdException w:name="Medium Shading 2 Accent 1"/>
<w:lsdException w:name="Medium List 1 Accent 1"/>
<w:lsdException w:name="Revision"/>
<w:lsdException w:name="List Paragraph"/>
<w:lsdException w:name="Quote"/>
<w:lsdException w:name="Intense Quote"/>
<w:lsdException w:name="Medium List 2 Accent 1"/>
<w:lsdException w:name="Medium Grid 1 Accent 1"/>
<w:lsdException w:name="Medium Grid 2 Accent 1"/>
<w:lsdException w:name="Medium Grid 3 Accent 1"/>
<w:lsdException w:name="Dark List Accent 1"/>
<w:lsdException w:name="Colorful Shading Accent 1"/>
<w:lsdException w:name="Colorful List Accent 1"/>
<w:lsdException w:name="Colorful Grid Accent 1"/>
<w:lsdException w:name="Light Shading Accent 2"/>
<w:lsdException w:name="Light List Accent 2"/>
<w:lsdException w:name="Light Grid Accent 2"/>
<w:lsdException w:name="Medium Shading 1 Accent 2"/>
<w:lsdException w:name="Medium Shading 2 Accent 2"/>
<w:lsdException w:name="Medium List 1 Accent 2"/>
<w:lsdException w:name="Medium List 2 Accent 2"/>
<w:lsdException w:name="Medium Grid 1 Accent 2"/>
<w:lsdException w:name="Medium Grid 2 Accent 2"/>
<w:lsdException w:name="Medium Grid 3 Accent 2"/>
<w:lsdException w:name="Dark List Accent 2"/>
<w:lsdException w:name="Colorful Shading Accent 2"/>
<w:lsdException w:name="Colorful List Accent 2"/>
<w:lsdException w:name="Colorful Grid Accent 2"/>
<w:lsdException w:name="Light Shading Accent 3"/>
<w:lsdException w:name="Light List Accent 3"/>
<w:lsdException w:name="Light Grid Accent 3"/>
<w:lsdException w:name="Medium Shading 1 Accent 3"/>
<w:lsdException w:name="Medium Shading 2 Accent 3"/>
<w:lsdException w:name="Medium List 1 Accent 3"/>
<w:lsdException w:name="Medium List 2 Accent 3"/>
<w:lsdException w:name="Medium Grid 1 Accent 3"/>
<w:lsdException w:name="Medium Grid 2 Accent 3"/>
<w:lsdException w:name="Medium Grid 3 Accent 3"/>
<w:lsdException w:name="Dark List Accent 3"/>
<w:lsdException w:name="Colorful Shading Accent 3"/>
<w:lsdException w:name="Colorful List Accent 3"/>
<w:lsdException w:name="Colorful Grid Accent 3"/>
<w:lsdException w:name="Light Shading Accent 4"/>
<w:lsdException w:name="Light List Accent 4"/>
<w:lsdException w:name="Light Grid Accent 4"/>
<w:lsdException w:name="Medium Shading 1 Accent 4"/>
<w:lsdException w:name="Medium Shading 2 Accent 4"/>
<w:lsdException w:name="Medium List 1 Accent 4"/>
<w:lsdException w:name="Medium List 2 Accent 4"/>
<w:lsdException w:name="Medium Grid 1 Accent 4"/>
<w:lsdException w:name="Medium Grid 2 Accent 4"/>
<w:lsdException w:name="Medium Grid 3 Accent 4"/>
<w:lsdException w:name="Dark List Accent 4"/>
<w:lsdException w:name="Colorful Shading Accent 4"/>
<w:lsdException w:name="Colorful List Accent 4"/>
<w:lsdException w:name="Colorful Grid Accent 4"/>
<w:lsdException w:name="Light Shading Accent 5"/>
<w:lsdException w:name="Light List Accent 5"/>
<w:lsdException w:name="Light Grid Accent 5"/>
<w:lsdException w:name="Medium Shading 1 Accent 5"/>
<w:lsdException w:name="Medium Shading 2 Accent 5"/>
<w:lsdException w:name="Medium List 1 Accent 5"/>
<w:lsdException w:name="Medium List 2 Accent 5"/>
<w:lsdException w:name="Medium Grid 1 Accent 5"/>
<w:lsdException w:name="Medium Grid 2 Accent 5"/>
<w:lsdException w:name="Medium Grid 3 Accent 5"/>
<w:lsdException w:name="Dark List Accent 5"/>
<w:lsdException w:name="Colorful Shading Accent 5"/>
<w:lsdException w:name="Colorful List Accent 5"/>
<w:lsdException w:name="Colorful Grid Accent 5"/>
<w:lsdException w:name="Light Shading Accent 6"/>
<w:lsdException w:name="Light List Accent 6"/>
<w:lsdException w:name="Light Grid Accent 6"/>
<w:lsdException w:name="Medium Shading 1 Accent 6"/>
<w:lsdException w:name="Medium Shading 2 Accent 6"/>
<w:lsdException w:name="Medium List 1 Accent 6"/>
<w:lsdException w:name="Medium List 2 Accent 6"/>
<w:lsdException w:name="Medium Grid 1 Accent 6"/>
<w:lsdException w:name="Medium Grid 2 Accent 6"/>
<w:lsdException w:name="Medium Grid 3 Accent 6"/>
<w:lsdException w:name="Dark List Accent 6"/>
<w:lsdException w:name="Colorful Shading Accent 6"/>
<w:lsdException w:name="Colorful List Accent 6"/>
<w:lsdException w:name="Colorful Grid Accent 6"/>
<w:lsdException w:name="Subtle Emphasis"/>
<w:lsdException w:name="Intense Emphasis"/>
<w:lsdException w:name="Subtle Reference"/>
<w:lsdException w:name="Intense Reference"/>
<w:lsdException w:name="Book Title"/>
<w:lsdException w:name="Bibliography"/>
<w:lsdException w:name="TOC Heading"/>
<w:lsdException w:name="Plain Table 1"/>
<w:lsdException w:name="Plain Table 2"/>
<w:lsdException w:name="Plain Table 3"/>
<w:lsdException w:name="Plain Table 4"/>
<w:lsdException w:name="Plain Table 5"/>
<w:lsdException w:name="Grid Table Light"/>
<w:lsdException w:name="Grid Table 1 Light"/>
<w:lsdException w:name="Grid Table 2"/>
<w:lsdException w:name="Grid Table 3"/>
<w:lsdException w:name="Grid Table 4"/>
<w:lsdException w:name="Grid Table 5 Dark"/>
<w:lsdException w:name="Grid Table 6 Colorful"/>
<w:lsdException w:name="Grid Table 7 Colorful"/>
<w:lsdException w:name="Grid Table 1 Light Accent 1"/>
<w:lsdException w:name="Grid Table 2 Accent 1"/>
<w:lsdException w:name="Grid Table 3 Accent 1"/>
<w:lsdException w:name="Grid Table 4 Accent 1"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 1"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 1"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 1"/>
<w:lsdException w:name="Grid Table 1 Light Accent 2"/>
<w:lsdException w:name="Grid Table 2 Accent 2"/>
<w:lsdException w:name="Grid Table 3 Accent 2"/>
<w:lsdException w:name="Grid Table 4 Accent 2"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 2"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 2"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 2"/>
<w:lsdException w:name="Grid Table 1 Light Accent 3"/>
<w:lsdException w:name="Grid Table 2 Accent 3"/>
<w:lsdException w:name="Grid Table 3 Accent 3"/>
<w:lsdException w:name="Grid Table 4 Accent 3"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 3"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 3"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 3"/>
<w:lsdException w:name="Grid Table 1 Light Accent 4"/>
<w:lsdException w:name="Grid Table 2 Accent 4"/>
<w:lsdException w:name="Grid Table 3 Accent 4"/>
<w:lsdException w:name="Grid Table 4 Accent 4"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 4"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 4"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 4"/>
<w:lsdException w:name="Grid Table 1 Light Accent 5"/>
<w:lsdException w:name="Grid Table 2 Accent 5"/>
<w:lsdException w:name="Grid Table 3 Accent 5"/>
<w:lsdException w:name="Grid Table 4 Accent 5"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 5"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 5"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 5"/>
<w:lsdException w:name="Grid Table 1 Light Accent 6"/>
<w:lsdException w:name="Grid Table 2 Accent 6"/>
<w:lsdException w:name="Grid Table 3 Accent 6"/>
<w:lsdException w:name="Grid Table 4 Accent 6"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 6"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 6"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 6"/>
<w:lsdException w:name="List Table 1 Light"/>
<w:lsdException w:name="List Table 2"/>
<w:lsdException w:name="List Table 3"/>
<w:lsdException w:name="List Table 4"/>
<w:lsdException w:name="List Table 5 Dark"/>
<w:lsdException w:name="List Table 6 Colorful"/>
<w:lsdException w:name="List Table 7 Colorful"/>
<w:lsdException w:name="List Table 1 Light Accent 1"/>
<w:lsdException w:name="List Table 2 Accent 1"/>
<w:lsdException w:name="List Table 3 Accent 1"/>
<w:lsdException w:name="List Table 4 Accent 1"/>
<w:lsdException w:name="List Table 5 Dark Accent 1"/>
<w:lsdException w:name="List Table 6 Colorful Accent 1"/>
<w:lsdException w:name="List Table 7 Colorful Accent 1"/>
<w:lsdException w:name="List Table 1 Light Accent 2"/>
<w:lsdException w:name="List Table 2 Accent 2"/>
<w:lsdException w:name="List Table 3 Accent 2"/>
<w:lsdException w:name="List Table 4 Accent 2"/>
<w:lsdException w:name="List Table 5 Dark Accent 2"/>
<w:lsdException w:name="List Table 6 Colorful Accent 2"/>
<w:lsdException w:name="List Table 7 Colorful Accent 2"/>
<w:lsdException w:name="List Table 1 Light Accent 3"/>
<w:lsdException w:name="List Table 2 Accent 3"/>
<w:lsdException w:name="List Table 3 Accent 3"/>
<w:lsdException w:name="List Table 4 Accent 3"/>
<w:lsdException w:name="List Table 5 Dark Accent 3"/>
<w:lsdException w:name="List Table 6 Colorful Accent 3"/>
<w:lsdException w:name="List Table 7 Colorful Accent 3"/>
<w:lsdException w:name="List Table 1 Light Accent 4"/>
<w:lsdException w:name="List Table 2 Accent 4"/>
<w:lsdException w:name="List Table 3 Accent 4"/>
<w:lsdException w:name="List Table 4 Accent 4"/>
<w:lsdException w:name="List Table 5 Dark Accent 4"/>
<w:lsdException w:name="List Table 6 Colorful Accent 4"/>
<w:lsdException w:name="List Table 7 Colorful Accent 4"/>
<w:lsdException w:name="List Table 1 Light Accent 5"/>
<w:lsdException w:name="List Table 2 Accent 5"/>
<w:lsdException w:name="List Table 3 Accent 5"/>
<w:lsdException w:name="List Table 4 Accent 5"/>
<w:lsdException w:name="List Table 5 Dark Accent 5"/>
<w:lsdException w:name="List Table 6 Colorful Accent 5"/>
<w:lsdException w:name="List Table 7 Colorful Accent 5"/>
<w:lsdException w:name="List Table 1 Light Accent 6"/>
<w:lsdException w:name="List Table 2 Accent 6"/>
<w:lsdException w:name="List Table 3 Accent 6"/>
<w:lsdException w:name="List Table 4 Accent 6"/>
<w:lsdException w:name="List Table 5 Dark Accent 6"/>
<w:lsdException w:name="List Table 6 Colorful Accent 6"/>
<w:lsdException w:name="List Table 7 Colorful Accent 6"/>
</w:latentStyles>
<w:style w:type="paragraph" w:default="on" w:styleId="a">
<w:name w:val="Normal"/>
<wx:uiName wx:val="正文"/>
<w:pPr>
<w:widowControl w:val="off"/>
<w:jc w:val="both"/>
</w:pPr>
<w:rPr>
<wx:font wx:val="等线"/>
<w:kern w:val="2"/>
<w:sz w:val="21"/>
<w:sz-cs w:val="22"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
</w:style>
<w:style w:type="character" w:default="on" w:styleId="a0">
<w:name w:val="Default Paragraph Font"/>
<wx:uiName wx:val="默认段落字体"/>
</w:style>
<w:style w:type="table" w:default="on" w:styleId="a1">
<w:name w:val="Normal Table"/>
<wx:uiName wx:val="普通表格"/>
<w:rPr>
<wx:font wx:val="等线"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:tblPr>
<w:tblInd w:w="0" w:type="dxa"/>
<w:tblCellMar>
<w:top w:w="0" w:type="dxa"/>
<w:left w:w="108" w:type="dxa"/>
<w:bottom w:w="0" w:type="dxa"/>
<w:right w:w="108" w:type="dxa"/>
</w:tblCellMar>
</w:tblPr>
</w:style>
<w:style w:type="list" w:default="on" w:styleId="a2">
<w:name w:val="No List"/>
<wx:uiName wx:val="无列表"/>
</w:style>
</w:styles>
<w:shapeDefaults>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout>
</w:shapeDefaults>
<w:docPr>
<w:view w:val="print"/>
<w:zoom w:percent="100"/>
<w:doNotEmbedSystemFonts/>
<w:bordersDontSurroundHeader/>
<w:bordersDontSurroundFooter/>
<w:proofState w:grammar="clean"/>
<w:defaultTabStop w:val="420"/>
<w:drawingGridVerticalSpacing w:val="156"/>
<w:displayHorizontalDrawingGridEvery w:val="0"/>
<w:displayVerticalDrawingGridEvery w:val="2"/>
<w:punctuationKerning/>
<w:characterSpacingControl w:val="CompressPunctuation"/>
<w:optimizeForBrowser/>
<w:allowPNG/>
<w:validateAgainstSchema/>
<w:saveInvalidXML w:val="off"/>
<w:ignoreMixedContent w:val="off"/>
<w:alwaysShowPlaceholderText w:val="off"/>
<w:compat>
<w:spaceForUL/>
<w:balanceSingleByteDoubleByteWidth/>
<w:doNotLeaveBackslashAlone/>
<w:ulTrailSpace/>
<w:doNotExpandShiftReturn/>
<w:adjustLineHeightInTable/>
<w:breakWrappedTables/>
<w:snapToGridInCell/>
<w:wrapTextWithPunct/>
<w:useAsianBreakRules/>
<w:dontGrowAutofit/>
<w:useFELayout/>
</w:compat>
<wsp:rsids>
<wsp:rsidRoot wsp:val="009F529F"/>
<wsp:rsid wsp:val="009F529F"/>
<wsp:rsid wsp:val="00FE3676"/>
</wsp:rsids>
</w:docPr>
<w:body>
<wx:sect>
<#-- 数据遍历 start-->
<#list data as d>
<#-- 问题图片 start-->
<w:p wsp:rsidR="00FE3676" wsp:rsidRDefault="009F529F">
<#list d.image as img>
<w:r>
<w:pict>
<w:binData w:name="${"wordml://img_"+img_index+".jpg"}" xml:space="preserve">${img.picture}</w:binData>
<v:shape id="_x0000_i1026" o:spid="_x0000_i1025" type="#_x0000_t75"
style="width:384pt;height:216pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="${"wordml://img_"+img_index+".jpg"}" o:title="2"/>
</v:shape>
</w:pict>
</w:r>
</#list>
</w:p>
<#-- 问题图片 end-->
<#-- 督查时间-->
<w:p wsp:rsidR="00FE3676" wsp:rsidRDefault="009F529F">
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
</w:rPr>
</w:r>
<w:r>
<w:t>督查时间:${d.sendTime}</w:t>
</w:r>
</w:p>
<#-- 接收单位-->
<w:p wsp:rsidR="00FE3676" wsp:rsidRDefault="009F529F">
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
</w:rPr>
</w:r>
<w:r>
<w:t>接收单位:${d.targetUnitName}</w:t>
</w:r>
</w:p>
<#-- 总体评价-->
<w:p wsp:rsidR="00FE3676" wsp:rsidRDefault="009F529F">
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
</w:rPr>
</w:r>
<w:r>
<w:t>总体评价:${d.ddType}</w:t>
</w:r>
</w:p>
<#-- 情况说明-->
<w:p wsp:rsidR="00FE3676" wsp:rsidRDefault="009F529F">
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
</w:rPr>
</w:r>
<w:r>
<w:t>情况说明:${d.content}</w:t>
</w:r>
</w:p>
<w:p></w:p>
</#list>
<#-- 数据遍历 end-->
<w:sectPr wsp:rsidR="00FE3676">
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="851" w:footer="992" w:gutter="0"/>
<w:cols w:space="425"/>
<w:docGrid w:type="lines" w:line-pitch="312"/>
</w:sectPr>
</wx:sect>
</w:body>
</w:wordDocument>