Commit 94a1b9bc authored by tianbo's avatar tianbo

Merge branch 'develop_tzs_bugfix' into develop_tzs_register

parents 03e72d09 1635f91c
...@@ -964,11 +964,15 @@ public class CommonServiceImpl implements ICommonService { ...@@ -964,11 +964,15 @@ public class CommonServiceImpl implements ICommonService {
} }
map.put("supervisoryCode", ImageUtils.generateQRCode(Optional.ofNullable(map.get("applyNo")).orElse("").toString(), 100, 100)); map.put("supervisoryCode", ImageUtils.generateQRCode(Optional.ofNullable(map.get("applyNo")).orElse("").toString(), 100, 100));
map.put("printingType", PrintingTypeEnum.REGULAR.getCode()); map.put("printingType", PrintingTypeEnum.OVERPLAY.getCode());
String manageType = Optional.ofNullable(map.get("manageType")).orElse("").toString();
String templateFileName = "use-registration-model.ftl";
if ("unit".equals(manageType)) {
templateFileName = "unit-use-registration-model.ftl";
}
File file = null; File file = null;
try (ServletOutputStream out = response.getOutputStream()) { try (ServletOutputStream out = response.getOutputStream()) {
file = WordTemplateUtils.createDoc("/templates/use-registration-model.ftl", map, configuration.getTemplate("use-registration-model.ftl", "UTF-8")); file = WordTemplateUtils.createDoc("/templates/use-registration-model.ftl", map, configuration.getTemplate(templateFileName, "UTF-8"));
try (InputStream fin = Files.newInputStream(file.toPath())) { try (InputStream fin = Files.newInputStream(file.toPath())) {
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment