|
|
@@ -260,36 +260,24 @@ public class WorkFlowUtil {
|
|
|
String nameTemplate = workflowSchemaConfig.getProcessConfig().getNameRuleConfigs().stream().map(NameRuleConfig::getKey).map(String::valueOf).collect(Collectors.joining(StringPool.SPACE));
|
|
|
String replacePlaceHolder = WorkFlowUtil.replacePlaceHolder(nameTemplate, workflowSchema, workflowSerialNumber, workflowSerialNumber);
|
|
|
if(dto.getFormData() != null){
|
|
|
+ String nameStr = "";
|
|
|
Map<String, Map<String, Object>> formData = dto.getFormData();
|
|
|
- String title_last = null;
|
|
|
- for (Map<String, Object> value : formData.values()) {
|
|
|
- if(title_last != null){
|
|
|
- continue;
|
|
|
+ String[] names = replacePlaceHolder.split(" ");
|
|
|
+ for(int i = 0; i < names.length; i ++){
|
|
|
+ String name = names[i];
|
|
|
+ if(i == 0){
|
|
|
+ nameStr += "【" + name + "】";
|
|
|
+ }else{
|
|
|
+ nameStr += name;
|
|
|
}
|
|
|
- //物品申购特殊处理
|
|
|
- if(value.containsKey("wf_subscription_listList")){
|
|
|
- ArrayList<Map<String, Object>> list = (ArrayList<Map<String, Object>>) value.get("wf_subscription_listList");
|
|
|
- if(list.size() > 0){
|
|
|
- Map<String, Object> objectMap = list.get(0);
|
|
|
-// Set<String> keys = objectMap.keySet();
|
|
|
- String firstKey = "name_of_the_purchased_item";
|
|
|
-// for (String key : keys) {
|
|
|
-// if(firstKey != null){
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// firstKey = key;
|
|
|
-// }
|
|
|
- title_last = objectMap.get(firstKey).toString();
|
|
|
- }
|
|
|
- }
|
|
|
- for (Object o : value.values()) {
|
|
|
- if(title_last != null){
|
|
|
- continue;
|
|
|
+ for (Map<String, Object> value : formData.values()) {
|
|
|
+ if(value.containsKey(name)){
|
|
|
+ nameStr = nameStr.replace(name, value.get(name).toString());
|
|
|
}
|
|
|
- title_last = o.toString();
|
|
|
}
|
|
|
}
|
|
|
- return "【" + replacePlaceHolder + "】" + title_last;
|
|
|
+
|
|
|
+ return nameStr;
|
|
|
}
|
|
|
return replacePlaceHolder;
|
|
|
}
|