|
@@ -84,10 +84,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
try {
|
|
|
// 解析得到当前文件中的内容
|
|
|
byte[] bytes = fileXML.getBytes();
|
|
|
- String xmlContent = new String(bytes, "UTF-8"); // 使用UTF-8编码处理文件内容
|
|
|
- System.err.println("流程文件内容!!!!!!!!!!!!!!!!!!!!!!!");
|
|
|
- System.err.println(xmlContent);
|
|
|
- System.err.println("流程文件内容!!!!!!!!!!!!!!!!!!!!!!!");
|
|
|
+ String xmlContent = new String(bytes, StandardCharsets.UTF_8); // 使用UTF-8编码处理文件内容
|
|
|
// 存储标签内容
|
|
|
bpmProcess.setProcessXmlContent(xmlContent);
|
|
|
// 指定文件路径上传
|
|
@@ -103,7 +100,8 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
bpmProcess.setProcessVersion(0L);
|
|
|
bpmProcess.setProcessType(0L);
|
|
|
bpmProcess.setStartEventType(0L);
|
|
|
- return bpmProcessMapper.insertBpmProcess(bpmProcess); }
|
|
|
+ return bpmProcessMapper.insertBpmProcess(bpmProcess);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 修改流程定义
|
|
@@ -120,10 +118,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
try {
|
|
|
// 解析得到当前文件中的内容
|
|
|
byte[] bytes = fileXML.getBytes();
|
|
|
- String xmlContent = new String(bytes, "UTF-8"); // 使用UTF-8编码处理文件内容
|
|
|
- System.err.println("流程文件内容!!!!!!!!!!!!!!!!!!!!!!!");
|
|
|
- System.err.println(xmlContent);
|
|
|
- System.err.println("流程文件内容!!!!!!!!!!!!!!!!!!!!!!!");
|
|
|
+ String xmlContent = new String(bytes, StandardCharsets.UTF_8); // 使用UTF-8编码处理文件内容
|
|
|
// 存储标签内容
|
|
|
bpmProcess.setProcessXmlContent(xmlContent);
|
|
|
// 指定文件路径上传
|
|
@@ -200,6 +195,8 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
bpmProcessList.forEach(item -> {
|
|
|
list.add(localPath + StringUtils.substringAfter(item.getProcessXmlPath(), Constants.RESOURCE_PREFIX));
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
throw new Exception("请选择要下载文件/图片");
|
|
|
}
|
|
@@ -225,14 +222,14 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
log.error("系统异常", e);
|
|
|
}
|
|
|
|
|
|
- if (list.size() > 1) {
|
|
|
- //多文件/图压缩下载
|
|
|
- batchFileDownLoad(list, downloadName, response);
|
|
|
- } else {
|
|
|
- //单文件/图直接下载
|
|
|
- singleFileDownLoad(list, bpmProcessList.get(0).getProcessName(), response);
|
|
|
-
|
|
|
- }
|
|
|
+// if (list.size() > 1) {
|
|
|
+ //多文件/图压缩下载
|
|
|
+ batchFileDownLoad(list, downloadName, response);
|
|
|
+// } else {
|
|
|
+// //单文件/图直接下载
|
|
|
+// singleFileDownLoad(list, bpmProcessList.get(0).getProcessName(), response);
|
|
|
+//
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -277,8 +274,9 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
}
|
|
|
FileInputStream fs = null;
|
|
|
try {
|
|
|
+ String[] filename = name.split("/");
|
|
|
//添加ZipEntry,并将ZipEntry中写入文件流
|
|
|
- zipOs.putNextEntry(new ZipEntry(URLEncoder.encode(name, StandardCharsets.UTF_8.toString()) + ".bpmn"));
|
|
|
+ zipOs.putNextEntry(new ZipEntry(URLEncoder.encode(filename[filename.length - 1], StandardCharsets.UTF_8.toString())));
|
|
|
os = new DataOutputStream(zipOs);
|
|
|
fs = new FileInputStream(file);
|
|
|
byte[] b = new byte[100];
|