Browse Source

物品申购台账,获取申购单第一个物品的名称

dzx 1 year ago
parent
commit
eb2d45eb44
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/main/java/com/xjrsoft/module/workflow/utils/WorkFlowUtil.java

+ 16 - 0
src/main/java/com/xjrsoft/module/workflow/utils/WorkFlowUtil.java

@@ -231,6 +231,22 @@ public class WorkFlowUtil {
                 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 = null;
+                        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;