|
|
@@ -222,8 +222,43 @@ public class WorkFlowUtil {
|
|
|
public static String generatorProcessName(WorkflowSchema workflowSchema, WorkflowSchemaConfig workflowSchemaConfig, Long workflowSerialNumber, LaunchDto dto) {
|
|
|
|
|
|
if (workflowSchemaConfig.getProcessConfig().getNameRuleConfigs().size() == 0) {
|
|
|
+ if(dto.getFormData() != null){
|
|
|
+ Map<String, Map<String, Object>> formData = dto.getFormData();
|
|
|
+ String title_last = null;
|
|
|
+ for (Map<String, Object> value : formData.values()) {
|
|
|
+ if(title_last != null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ //物品申购特殊处理
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ title_last = o.toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "【" + workflowSchema.getName() + "】" + title_last;
|
|
|
+ }
|
|
|
return workflowSchema.getName();
|
|
|
}
|
|
|
+
|
|
|
+ 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){
|
|
|
Map<String, Map<String, Object>> formData = dto.getFormData();
|
|
|
String title_last = null;
|
|
|
@@ -254,12 +289,9 @@ public class WorkFlowUtil {
|
|
|
title_last = o.toString();
|
|
|
}
|
|
|
}
|
|
|
- return "【" + workflowSchema.getName() + "】" + title_last;
|
|
|
+ return "【" + replacePlaceHolder + "】" + title_last;
|
|
|
}
|
|
|
-
|
|
|
- String nameTemplate = workflowSchemaConfig.getProcessConfig().getNameRuleConfigs().stream().map(NameRuleConfig::getKey).map(String::valueOf).collect(Collectors.joining(StringPool.SPACE));
|
|
|
-
|
|
|
- return WorkFlowUtil.replacePlaceHolder(nameTemplate, workflowSchema, workflowSerialNumber, workflowSerialNumber);
|
|
|
+ return replacePlaceHolder;
|
|
|
}
|
|
|
|
|
|
/**
|