|
|
@@ -93,7 +93,14 @@ public class BpmClientFlowListForProcessAction extends RequestAbs {
|
|
|
List<Map<String, String>> filelist = new ArrayList<Map<String, String>>();
|
|
|
map.put("tmodelName", tacheInstance.getTmodelId().getTmodelName());
|
|
|
map.put("name", tacheInstance.getUser().getUsername());
|
|
|
- map.put("remark", tacheInstance.getRemark());
|
|
|
+ // 处理 remark 中的特殊字符(注意顺序:先单独字符,再组合字符)
|
|
|
+ String remark = tacheInstance.getRemark();
|
|
|
+ if (remark != null) {
|
|
|
+ remark = remark.replace("\r", "\\r")
|
|
|
+ .replace("\n", "\\n")
|
|
|
+ .replace("\t", "\\t");
|
|
|
+ }
|
|
|
+ map.put("remark", remark);
|
|
|
map.put("createdate", tacheInstance.getCreatedate());
|
|
|
map.put("finishdate", tacheInstance.getFinishdate());
|
|
|
map.put("dataName", tacheInstance.getState().getDataName());
|
|
|
@@ -124,9 +131,9 @@ public class BpmClientFlowListForProcessAction extends RequestAbs {
|
|
|
map.put("assistCount", assistList.size());
|
|
|
list.add(map);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
String result = JsonUtil.getJson(list, true);
|
|
|
- return ("{\"list\":" + result + "}").replaceAll(":null", ":\"\"").replaceAll(":\",\"", ":\"\"");
|
|
|
+ return ("{\"list\":" + result + "}").replaceAll(":null", ":\"\"");
|
|
|
} else {
|
|
|
FlowService flowService = (FlowService) cxt.getBean("bpmFlowService");
|
|
|
FlowDao bpmFlowDao = (FlowDao) cxt.getBean("bpmFlowDao");
|
|
|
@@ -172,7 +179,17 @@ public class BpmClientFlowListForProcessAction extends RequestAbs {
|
|
|
map.put("dataName", tacheList.get(num).get("v_data_name"));
|
|
|
map.put("state", tacheList.get(num).get("state"));
|
|
|
map.put("name", tacheList.get(num).get("username"));
|
|
|
- map.put("remark", tacheList.get(num).get("remark"));
|
|
|
+ // 处理 remark 中的特殊字符(注意顺序:先单独字符,再组合字符)
|
|
|
+ Object remarkObj = tacheList.get(num).get("remark");
|
|
|
+ if (remarkObj != null) {
|
|
|
+ String remark = remarkObj.toString();
|
|
|
+ remark = remark.replace("\r", "\\r")
|
|
|
+ .replace("\n", "\\n")
|
|
|
+ .replace("\t", "\\t");
|
|
|
+ map.put("remark", remark);
|
|
|
+ } else {
|
|
|
+ map.put("remark", remarkObj);
|
|
|
+ }
|
|
|
map.put("createdate", tacheList.get(num).get("start_time"));
|
|
|
map.put("finishdate", tacheList.get(num).get("end_time"));
|
|
|
|
|
|
@@ -201,9 +218,9 @@ public class BpmClientFlowListForProcessAction extends RequestAbs {
|
|
|
list.add(map);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
String result = JsonUtil.getJson(list, true);
|
|
|
- return ("{\"list\":" + result + "}").replaceAll(":null", ":\"\"").replaceAll(":\",\"", ":\"\"");
|
|
|
+ return ("{\"list\":" + result + "}").replaceAll(":null", ":\"\"");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|