Browse Source

清单的附加属性需要加入查询依赖中,修复bug一半

menglu 3 years ago
parent
commit
5a89b7afba

+ 5 - 0
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/data/Change.java

@@ -6,4 +6,9 @@ import java.util.Map;
 public class Change {
 	public boolean row_change = false;
 	public Map<String, Boolean> colChangeMap = new HashMap<String, Boolean>();
+
+	@Override
+	public String toString() {
+		return "" + row_change + "\t" + colChangeMap;
+	}
 }

+ 3 - 0
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/data/SceneDataValue.java

@@ -25,6 +25,9 @@ public class SceneDataValue {
 		if (this.rel_property != null) {
 			if (this.rel_property.propertyValueType.equals("query") || this.rel_property.propertyValueType.equals("static")
 					|| this.rel_property.propertyValueType.equals("deamon")) {
+				if (Repository.property2SDV.get(this.rel_property) == null) {
+					System.out.println();
+				}
 				Repository.property2SDV.get(this.rel_property).add(this);
 			}
 		}

+ 11 - 19
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/rest/RestUtil.java

@@ -202,6 +202,7 @@ public class RestUtil {
 		String result;
 		if (valueObject instanceof SceneDataValue) {
 			SceneDataValue currData = (SceneDataValue) valueObject;
+			RecursiveUtil.print_variable_set(path.toJSONString(), currData);
 			StringBuffer sb = new StringBuffer();
 			sb.append("SceneDataValue: ");
 			if (currData.parentObjectData != null) {
@@ -228,6 +229,7 @@ public class RestUtil {
 			result = sb.toString();
 		} else {
 			SceneDataObject currData = (SceneDataObject) valueObject;
+			RecursiveUtil.print_variable_set(path.toJSONString(), currData);
 			StringBuffer sb = new StringBuffer();
 			sb.append("SceneDataObject: ");
 			if (currData.parentObjectData != null) {
@@ -304,7 +306,7 @@ public class RestUtil {
 				return FastJsonUtil.toString(work_orders);
 			} else {
 				Object valueObject = ComputeUtil.getValueObject(Repository, valuePath);
-				// RecursiveUtil.refreshObject(Repository, valueObject);
+				RecursiveUtil.refreshObject(Repository, valueObject);
 				Object valueJSON = ComputeUtil.getValueJSON(valueObject);
 				return FastJsonUtil.toString(valueJSON);
 			}
@@ -695,24 +697,14 @@ public class RestUtil {
 		if (time_to.getTime() - time_from.getTime() < 1000L * 60 * 60 * 6) {
 			time_from = new Date(time_from.getTime() - (1000L * 60 * 60 * 12));
 		}
-		String result;
-		try {
-			JSONObject parseObject = JSON.parseObject(param);
-			String objId = parseObject.getString("objId");
-			String code = parseObject.getString("code");
-			String pointString = RepositoryBase.info2point.get(objId).get(code);
-			int index_ = pointString.lastIndexOf('-');
-			String meter = pointString.substring(0, index_);
-			int funcid = Integer.parseInt(pointString.substring(index_ + 1));
-			result = fjd_query_history(meter, funcid, sdf.format(time_from), sdf.format(time_to));
-		} catch (Exception e) {
-			e.printStackTrace();
-			JSONObject tmpResult = new JSONObject();
-			tmpResult.put("Result", "failure");
-			tmpResult.put("ResultMsg", LogUtil.GetExceptionStackTrace(e));
-			tmpResult.put("ResultCode", 250);
-			result = tmpResult.toJSONString();
-		}
+		JSONObject parseObject = JSON.parseObject(param);
+		String objId = parseObject.getString("objId");
+		String code = parseObject.getString("code");
+		String pointString = RepositoryBase.info2point.get(objId).get(code);
+		int index_ = pointString.lastIndexOf('-');
+		String meter = pointString.substring(0, index_);
+		int funcid = Integer.parseInt(pointString.substring(index_ + 1));
+		String result = fjd_query_history(meter, funcid, sdf.format(time_from), sdf.format(time_to));
 		return result;
 	}
 

+ 84 - 73
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/CheckUtil.java

@@ -1,7 +1,9 @@
 package com.persagy.ibms.data.sdk.util;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -71,8 +73,10 @@ public class CheckUtil {
 
 	public static void getPropertyBefore_query(Repository Repository, SceneProperty sceneProperty, List<SceneProperty> result) throws Exception {
 		JSONObject sql_json = JSON.parseObject(sceneProperty.query_sql);
-		List<String> refList = query(sql_json);
-		for (String refString : refList) {
+		Map<String, Boolean> refList = new HashMap<String, Boolean>();
+		query(sql_json, refList);
+		for (String refString : refList.keySet()) {
+			boolean refInTarget = refList.get(refString);
 			String[] splits = refString.split("'");
 			Object parentData;
 			if (splits[0].startsWith("ancestor_")) {
@@ -116,27 +120,35 @@ public class CheckUtil {
 
 			if (parentData instanceof SceneProperty) {
 				SceneProperty tmpProperty = (SceneProperty) parentData;
-				addAll(result, getProperty(tmpProperty, splits, 1));
+				addAll(result, getProperty(tmpProperty, splits, 1, refInTarget));
 			} else {
 				SceneObject tmpObject = (SceneObject) parentData;
-				addAll(result, getProperty(tmpObject, splits, 1));
+				addAll(result, getProperty(tmpObject, splits, 1, refInTarget));
 			}
 		}
 	}
 
-	private static List<SceneProperty> getProperty(SceneObject parentData, String[] splits, int splits_index) throws Exception {
+	private static List<SceneProperty> getProperty(SceneObject parentData, String[] splits, int splits_index, boolean refInTarget) throws Exception {
 		String name = splits[splits_index];
+		SceneProperty findSP = null;
 		for (SceneProperty spInner : parentData.propertyList) {
 			if (spInner.propertyName.equals(name)) {
-				return getProperty(spInner, splits, splits_index + 1);
+				findSP = spInner;
+				break;
 			}
 		}
 
-		throw new Exception();
+		if (findSP != null) {
+			return getProperty(findSP, splits, splits_index + 1, refInTarget);
+		} else {
+			throw new Exception();
+		}
 	}
 
-	private static List<SceneProperty> getProperty(SceneProperty parentData, String[] splits, int splits_index) throws Exception {
+	private static List<SceneProperty> getProperty(SceneProperty parentData, String[] splits, int splits_index, boolean refInTarget)
+			throws Exception {
 		List<SceneProperty> result = new ArrayList<SceneProperty>();
+		boolean doit = true;
 		if (parentData.propertyValueType.equals("static") && parentData.propertyValueSchema.equals("JSONArray")) {
 			String split = splits[splits_index];
 			int index_ = split.indexOf('=');
@@ -155,84 +167,95 @@ public class CheckUtil {
 						}
 					}
 					if (matchInner) {
-						List<SceneProperty> resultInner = getProperty(soInner, splits, splits_index + 1);
+						List<SceneProperty> resultInner = getProperty(soInner, splits, splits_index + 1, refInTarget);
 						result.addAll(resultInner);
 					}
 				}
 			} else {
 				for (SceneObject soInner : parentData.static_array) {
-					List<SceneProperty> resultInner = getProperty(soInner, splits, splits_index);
+					List<SceneProperty> resultInner = getProperty(soInner, splits, splits_index, refInTarget);
 					result.addAll(resultInner);
 				}
 			}
-			return result;
 		} else if (parentData.propertyValueType.equals("deamon")) {
-			return result;
-		}
-
-		if (splits_index == splits.length) {
 			result.add(parentData);
-			return result;
-		}
-
-		String name = splits[splits_index];
-		if (parentData.query_attached != null) {
-			for (SceneProperty spInner : parentData.query_attached) {
-				if (spInner.propertyName.equals(name)) {
-					return getProperty(spInner, splits, splits_index + 1);
+		} else if (splits_index == splits.length) {
+			result.add(parentData);
+		} else {
+			String name = splits[splits_index];
+			SceneProperty sp_attach = null;
+			if (parentData.query_attached != null) {
+				for (SceneProperty spInner : parentData.query_attached) {
+					if (spInner.propertyName.equals(name)) {
+						sp_attach = spInner;
+						break;
+					}
 				}
 			}
-		}
-		if (parentData.custom_object != null) {
-			for (SceneProperty spInner : parentData.custom_object.propertyList) {
-				if (spInner.propertyName.equals(name)) {
-					return getProperty(spInner, splits, splits_index + 1);
+			if (sp_attach != null) {
+				result = getProperty(sp_attach, splits, splits_index + 1, refInTarget);
+			} else {
+				SceneProperty sp_custom = null;
+				if (parentData.custom_object != null) {
+					for (SceneProperty spInner : parentData.custom_object.propertyList) {
+						if (spInner.propertyName.equals(name)) {
+							sp_custom = spInner;
+							break;
+						}
+					}
+				}
+				if (sp_custom != null) {
+					result = getProperty(sp_custom, splits, splits_index + 1, refInTarget);
+				} else if (parentData.propertyValueType.equals("query") && splits_index == splits.length - 1) {
+					doit = false;
+					result.add(parentData);
 				}
 			}
 		}
-		if (parentData.propertyValueType.equals("query") && splits_index == splits.length - 1) {
-			result.add(parentData);
-			return result;
-		}
 
 		// throw new Exception();
+		if (doit && refInTarget && splits_index + 1 == splits.length) {
+			List<SceneProperty> tmpList = new ArrayList<SceneProperty>();
+			for (SceneProperty spTmp : result) {
+				if (spTmp.query_attached != null) {
+					for (SceneProperty spTmp2 : spTmp.query_attached) {
+						if (spTmp2.propertyValueType.equals("query")
+								&& (!spTmp2.propertyValueSchema.equals("JSONObject") && !spTmp2.propertyValueSchema.equals("JSONArray"))) {
+							tmpList.add(spTmp2);
+						}
+					}
+				}
+			}
+			for (SceneProperty spTmp : tmpList) {
+				result.add(spTmp);
+			}
+		}
 		return result;
 	}
 
-	public static List<String> query(JSONObject sql_json) {
+	public static void query(JSONObject sql_json, Map<String, Boolean> result) {
 		if (sql_json.get("QueryType") != null) {
-			List<String> result = new ArrayList<String>();
 			// 扫描备选集合
 			if (sql_json.containsKey("Target")) {
-				List<String> resultTmp = parseSet(sql_json.get("Target"));
-				result.addAll(resultTmp);
+				parseSet(sql_json.get("Target"), result);
 			}
 
 			// 扫描查询条件
 			JSONObject CriteriaObject = (JSONObject) sql_json.get("Criteria");
 			{
-				List<String> resultTmp = parseCriteria(CriteriaObject);
-				result.addAll(resultTmp);
+				parseCriteria(CriteriaObject, result);
 			}
 
 			// 扫描返回列
 			if (sql_json.get("ReturnColumns") != null) {
-				List<String> resultTmp = parseSet(sql_json.get("ReturnColumns"));
-				result.addAll(resultTmp);
+				parseSet(sql_json.get("ReturnColumns"), result);
 			}
-
-			return result;
 		} else if (sql_json.get("SetOperator") != null) {
-			List<String> result = parseSet(sql_json);
-			return result;
-		} else {
-			List<String> result = new ArrayList<String>();
-			return result;
+			parseSet(sql_json, result);
 		}
 	}
 
-	private static List<String> parseCriteria(JSONObject CriteriaObject) {
-		List<String> result = new ArrayList<String>();
+	private static void parseCriteria(JSONObject CriteriaObject, Map<String, Boolean> result) {
 		Object LogicOperator = CriteriaObject.get("LogicOperator");
 		if (LogicOperator != null) {
 			String LogicOperatorString = (LogicOperator).toString();
@@ -240,13 +263,11 @@ public class CheckUtil {
 				JSONArray Criterias = (JSONArray) CriteriaObject.get("Criterias");
 				for (int i = 0; i < Criterias.size(); i++) {
 					JSONObject CriteriaObjectInner = (JSONObject) Criterias.get(i);
-					List<String> criteriaInner = parseCriteria(CriteriaObjectInner);
-					result.addAll(criteriaInner);
+					parseCriteria(CriteriaObjectInner, result);
 				}
 			} else if (LogicOperatorString.equals("not")) {
 				JSONObject CriteriaObjectInner = (JSONObject) CriteriaObject.get("Criteria");
-				List<String> criteriaInner = parseCriteria(CriteriaObjectInner);
-				result.addAll(criteriaInner);
+				parseCriteria(CriteriaObjectInner, result);
 			}
 		} else {
 			for (String itemKey : CriteriaObject.keySet()) {
@@ -257,22 +278,19 @@ public class CheckUtil {
 						Object itemValueInner = valueInner.get(itemKeyInner);
 						if (itemKeyInner.equals("ref")) {
 							String refString = (itemValueInner).toString();
-							result.add(refString);
+							result.put(refString, false);
 						} else if (itemKeyInner.equals("in") || itemKeyInner.equals("notin")) {
-							List<String> criteriaInner = parseSet(itemValueInner);
-							result.addAll(criteriaInner);
+							parseSet(itemValueInner, result);
 						}
 					}
 				}
 			}
 		}
-		return result;
 	}
 
-	private static List<String> parseSet(Object setDesc) {
-		List<String> result = new ArrayList<String>();
+	private static void parseSet(Object setDesc, Map<String, Boolean> result) {
 		if (setDesc instanceof JSONArray) {
-			return result;
+			return;
 		}
 
 		JSONObject descSet = (JSONObject) setDesc;
@@ -280,28 +298,21 @@ public class CheckUtil {
 			String Source = (descSet.get("Source")).toString();
 			if (Source.equals("ref")) {
 				String refString = (descSet.get("ref")).toString();
-				result.add(refString);
+				result.put(refString, true);
 			}
-			return result;
-		}
-
-		if (descSet.get("SetOperator") != null) {
+		} else if (descSet.get("SetOperator") != null) {
 			String SetOperator = (descSet.get("SetOperator")).toString();
 			if (SetOperator.equals("add") || SetOperator.equals("merge") || SetOperator.equals("unite")) {
 				JSONArray SetArray = (JSONArray) descSet.get("SetArray");
 				for (Object SetArrayItem : SetArray) {
-					List<String> resultItem = parseSet(SetArrayItem);
-					result.addAll(resultItem);
+					parseSet(SetArrayItem, result);
 				}
 			} else if (SetOperator.equals("sub")) {
-				result.addAll(parseSet(descSet.get("Set1")));
-				result.addAll(parseSet(descSet.get("Set2")));
+				parseSet(descSet.get("Set1"), result);
+				parseSet(descSet.get("Set2"), result);
 			}
-			return result;
 		} else {
-			List<String> resultItem = query(descSet);
-			result.addAll(resultItem);
-			return result;
+			query(descSet, result);
 		}
 	}
 }

+ 67 - 53
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/ComputeUtil.java

@@ -135,57 +135,18 @@ public class ComputeUtil {
 		for (SceneProperty spInner : spList) {
 			// 打印路径
 			{
-				Object parentData = spInner;
-				List<SceneProperty> tmpList = new ArrayList<SceneProperty>();
-				while (true) {
-					if (parentData == null) {
-						break;
-					}
-					if (parentData instanceof SceneProperty) {
-						SceneProperty tmpProperty = (SceneProperty) parentData;
-						tmpList.add(tmpProperty);
-						if (Repository.p2p.containsKey(tmpProperty)) {
-							parentData = Repository.p2p.get(tmpProperty);
-						} else if (Repository.p2o.containsKey(tmpProperty)) {
-							parentData = Repository.o2p.get(Repository.p2o.get(tmpProperty));
-						} else if (Repository.p2sai.containsKey(tmpProperty)) {
-							parentData = Repository.p2sai.get(tmpProperty);
-						} else {
-							throw new Exception();
-						}
-					} else if (parentData instanceof SceneObject) {
-						SceneObject tmpObject = (SceneObject) parentData;
-						if (Repository.sai2p.containsKey(tmpObject)) {
-							parentData = Repository.sai2p.get(tmpObject);
-						} else if (parentData == Repository.sceneObject) {
-							break;
-						} else {
-							throw new Exception();
-						}
-					}
+				String path = getPath(Repository, spInner);
+				log.info("getPropertyBefore:" + path);
+				if (path.equals("基础对象-设备-设备类型-清单-报警处理状态")) {
+					System.out.println();
 				}
-
-				StringBuffer sb = new StringBuffer();
-				for (int i = tmpList.size() - 1; i >= 0; i--) {
-					SceneProperty ss = tmpList.get(i);
-					if (sb.length() > 0) {
-						sb.append("-");
-					}
-					sb.append(ss.propertyName);
-				}
-				log.info("getPropertyBefore:" + sb.toString());
 			}
 			{
 				List<SceneProperty> beforeList = CheckUtil.getPropertyBefore(Repository, spInner);
 				Repository.beforeDic.put(spInner, beforeList);
-				StringBuffer sb = new StringBuffer();
-				sb.append(spInner.propertyName);
-				sb.append("\t\t\t\t");
 				for (SceneProperty spInner2 : beforeList) {
-					sb.append("\t");
-					sb.append(spInner2.propertyName);
+					log.info(getPath(Repository, spInner2));
 				}
-				log.info(sb.toString());
 			}
 		}
 		Map<SceneProperty, Boolean> processedDic = new HashMap<SceneProperty, Boolean>();
@@ -218,24 +179,65 @@ public class ComputeUtil {
 				processedDic.put(spInner, true);
 			}
 		}
-		log.info("****************");
+		log.info("****************************************************************");
 		for (List<SceneProperty> spInnerList : spListList) {
-			StringBuffer sb = new StringBuffer();
+			log.info("********************************");
 			for (SceneProperty spInner2 : spInnerList) {
 				Repository.property2lock.put(spInner2, new ReentrantLock(true));
-				sb.append("\t");
-				sb.append(spInner2.propertyName);
+				log.info(getPath(Repository, spInner2));
 				if (!Repository.property2SDV.containsKey(spInner2)) {
 					Repository.property2SDV.put(spInner2, new ArrayList<SceneDataValue>());
 				}
 			}
-			log.info(sb.toString());
+			log.info("********************************");
 		}
-		log.info("****************");
+		log.info("****************************************************************");
 
 		return spListList;
 	}
 
+	public static String getPath(Repository Repository, SceneProperty spInner) throws Exception {
+		Object parentData = spInner;
+		List<SceneProperty> tmpList = new ArrayList<SceneProperty>();
+		while (true) {
+			if (parentData == null) {
+				break;
+			}
+			if (parentData instanceof SceneProperty) {
+				SceneProperty tmpProperty = (SceneProperty) parentData;
+				tmpList.add(tmpProperty);
+				if (Repository.p2p.containsKey(tmpProperty)) {
+					parentData = Repository.p2p.get(tmpProperty);
+				} else if (Repository.p2o.containsKey(tmpProperty)) {
+					parentData = Repository.o2p.get(Repository.p2o.get(tmpProperty));
+				} else if (Repository.p2sai.containsKey(tmpProperty)) {
+					parentData = Repository.p2sai.get(tmpProperty);
+				} else {
+					throw new Exception();
+				}
+			} else if (parentData instanceof SceneObject) {
+				SceneObject tmpObject = (SceneObject) parentData;
+				if (Repository.sai2p.containsKey(tmpObject)) {
+					parentData = Repository.sai2p.get(tmpObject);
+				} else if (parentData == Repository.sceneObject) {
+					break;
+				} else {
+					throw new Exception();
+				}
+			}
+		}
+
+		StringBuffer sb = new StringBuffer();
+		for (int i = tmpList.size() - 1; i >= 0; i--) {
+			SceneProperty ss = tmpList.get(i);
+			if (sb.length() > 0) {
+				sb.append("-");
+			}
+			sb.append(ss.propertyName);
+		}
+		return sb.toString();
+	}
+
 	private static List<SceneProperty> getAll(SceneObject so) {
 		List<SceneProperty> result = new ArrayList<SceneProperty>();
 		for (SceneProperty sp : so.propertyList) {
@@ -328,9 +330,9 @@ public class ComputeUtil {
 						sb.append(ss.propertyName);
 					}
 					log.info("computeOnce:" + sb.toString());
-					// if (sb.toString().equals("基础对象-设备-设备类型-清单-报警处理状态")) {
-					// System.out.println();
-					// }
+					if (sb.toString().equals("基础对象-设备-清单")) {
+						System.out.println();
+					}
 				}
 				// 打印路径
 				List<SceneDataValue> sdvList = Repository.property2SDV.get(spInner2);
@@ -435,6 +437,18 @@ public class ComputeUtil {
 					sv.value_prim.value = sdp.value;
 					sv.value_prim.setRowChange(sdp.getRowChange());
 				}
+				if (sv.value_prim.getRowChange()) {
+					// 需要向上影响ColChange
+					if (sv.parentObjectData.parentArrayData != null) {
+						if (!sv.parentObjectData.parentArrayData.value_array.getRowChange()) {
+							sv.parentObjectData.parentArrayData.value_array.setColChange(sv.myPropertyName);
+						}
+					} else {
+						if (!sv.parentObjectData.getRowChange()) {
+							sv.parentObjectData.setColChange(sv.myPropertyName);
+						}
+					}
+				}
 			}
 			sv.finish = true;
 		} else if (sceneProperty.propertyValueType.equals("custom")) {

+ 53 - 21
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RecursiveUtil.java

@@ -2,6 +2,7 @@ package com.persagy.ibms.data.sdk.util;
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.locks.ReentrantLock;
@@ -299,9 +300,10 @@ public class RecursiveUtil {
 	private static void computeInner(Repository Repository, SceneDataValue sv) throws Exception {
 		SceneProperty sceneProperty = sv.rel_property;
 		JSONObject sql_json = JSON.parseObject(sceneProperty.query_sql);
-		List<String> refList = CheckUtil.query(sql_json);
+		Map<String, Boolean> refList = new HashMap<String, Boolean>();
+		CheckUtil.query(sql_json, refList);
 		List<SceneDataValue> svList = new ArrayList<SceneDataValue>();
-		for (String refString : refList) {
+		for (String refString : refList.keySet()) {
 			String[] splits = refString.split("'");
 			SceneDataObject parentData;
 			int splits_index;
@@ -329,14 +331,39 @@ public class RecursiveUtil {
 			svList.add(parentData.get(splits[splits_index]));
 			for (int i = splits_index + 1; i < splits.length; i++) {
 				List<SceneDataValue> svListInner = new ArrayList<SceneDataValue>();
-				for (SceneDataValue svInner : svList) {
-					if (svInner.value_object != null) {
-						svListInner.add(svInner.value_object.get(splits[i]));
-					} else if (svInner.value_array != null) {
-						for (SceneDataObject sdb : svInner.value_array.set) {
-							if (sdb instanceof SceneDataObject) {
-								SceneDataObject sod = (SceneDataObject) sdb;
-								svListInner.add(sod.get(splits[i]));
+				String split = splits[i];
+				int index_ = split.indexOf('=');
+				if (index_ != -1) {
+					String propertyName = split.substring(0, index_);
+					String propertyValue = split.substring(index_ + 1);
+					for (SceneDataValue svInner : svList) {
+						if (svInner.value_object != null) {
+							SceneDataObject sod = svInner.value_object;
+							if (sod.containsKey(propertyName) && propertyValue.equals(sod.get(propertyName).value_prim.value)) {
+								SceneDataValue svWrapper = new SceneDataValue(null, sod, propertyName, null);
+								svWrapper.value_object = sod;
+								svListInner.add(svWrapper);
+							}
+						} else if (svInner.value_array != null) {
+							for (SceneDataObject sod : svInner.value_array.set) {
+								if (sod.containsKey(propertyName) && propertyValue.equals(sod.get(propertyName).value_prim.value)) {
+									SceneDataValue svWrapper = new SceneDataValue(null, sod, propertyName, null);
+									svWrapper.value_object = sod;
+									svListInner.add(svWrapper);
+								}
+							}
+						}
+					}
+				} else {
+					for (SceneDataValue svInner : svList) {
+						if (svInner.value_object != null) {
+							svListInner.add(svInner.value_object.get(split));
+						} else if (svInner.value_array != null) {
+							for (SceneDataObject sdb : svInner.value_array.set) {
+								if (sdb instanceof SceneDataObject) {
+									SceneDataObject sod = (SceneDataObject) sdb;
+									svListInner.add(sod.get(split));
+								}
 							}
 						}
 					}
@@ -349,17 +376,22 @@ public class RecursiveUtil {
 			compute(Repository, sdv);
 		}
 
-		// LogUtil.info(getPath(sv));
-		ReentrantLock lock = Repository.property2lock.get(sv.rel_property);
-		try {
-			lock.lock();
-			ComputeUtil.computeProperty(Repository, sv);
-		} finally {
-			lock.unlock();
+		if (sv.rel_property != null && sv.rel_property.propertyValueType.equals("query")) {
+			if (sv.value_object != null && sv.value_object.getRowChange() || sv.value_array != null && sv.value_array.getRowChange()
+					|| sv.value_prim != null && sv.value_prim.getRowChange()) {
+				log.info(getPath(sv));
+				ReentrantLock lock = Repository.property2lock.get(sv.rel_property);
+				try {
+					lock.lock();
+					ComputeUtil.computeProperty(Repository, sv);
+				} finally {
+					lock.unlock();
+				}
+			}
 		}
 	}
 
-	public static String getPath(SceneDataValue sv) throws Exception {
+	public static String getPath(Object sv) throws Exception {
 		List<Object> list = new ArrayList<Object>();
 		{
 			Object tmp = sv;
@@ -421,12 +453,12 @@ public class RecursiveUtil {
 
 		if (sdv.rel_property.propertyValueSchema.equals("JSONObject")) {
 			if (sdv.rel_property.propertyValueType.equals("query")) {
-				log.info(path + "\t" + "variable set object" + "\t" + sdv.rel_property.propertyValueType + "\t");
+				log.info(path + "\t" + "variable set object" + "\t" + sdv.rel_property.propertyValueType + "\t" + sdv.value_object.change.toString());
 			}
 			print_variable_set(path, sdv.value_object);
 		} else if (sdv.rel_property.propertyValueSchema.equals("JSONArray")) {
 			if (sdv.rel_property.propertyValueType.equals("query")) {
-				log.info(path + "\t" + "variable set array" + "\t" + sdv.rel_property.propertyValueType + "\t");
+				log.info(path + "\t" + "variable set array" + "\t" + sdv.rel_property.propertyValueType + "\t" + sdv.value_array.change.toString());
 			}
 			for (int i = 0; i < sdv.value_array.set.size(); i++) {
 				SceneDataObject sdb = sdv.value_array.set.get(i);
@@ -438,7 +470,7 @@ public class RecursiveUtil {
 		} else {
 			if (sdv.rel_property.propertyValueType.equals("query")) {
 				{
-					log.info(path + "\t" + "variable value" + "\t");
+					log.info(path + "\t" + "variable value" + "\t" + sdv.value_prim.change);
 				}
 			}
 		}