|
@@ -92,8 +92,9 @@ public class FreemarkerUtil {
|
|
ClassifyEnum classifyEnum = (ClassifyEnum) dataMap.get("printType");
|
|
ClassifyEnum classifyEnum = (ClassifyEnum) dataMap.get("printType");
|
|
JSONObject jsonObject = JSONObject.parseObject(basicAttachment.getPath());
|
|
JSONObject jsonObject = JSONObject.parseObject(basicAttachment.getPath());
|
|
String path = (String) jsonObject.get(SystemConstant.PATH);
|
|
String path = (String) jsonObject.get(SystemConstant.PATH);
|
|
- String ftlPath = path.substring(0, path.lastIndexOf("/"));
|
|
|
|
- String ftlName = path.substring(path.lastIndexOf("/") + 1, path.lastIndexOf("."));
|
|
|
|
|
|
+ int last = path.lastIndexOf("/") == -1 ? path.lastIndexOf("\\") : path.lastIndexOf("/");
|
|
|
|
+ String ftlPath = path.substring(0, last);
|
|
|
|
+ String ftlName = path.substring(last + 1, path.lastIndexOf("."));
|
|
|
|
|
|
Configuration configuration = new Configuration(Configuration.VERSION_2_3_29);
|
|
Configuration configuration = new Configuration(Configuration.VERSION_2_3_29);
|
|
File templates = null;
|
|
File templates = null;
|