Просмотр исходного кода

视图创建不能保存事件信息

o2sword 4 лет назад
Родитель
Сommit
5d40297ec9

+ 4 - 4
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/view/ActionCreate.java

@@ -35,12 +35,12 @@ class ActionCreate extends BaseAction {
 			}
 			emc.beginTransaction(View.class);
 			View view = Wi.copier.copy(wi);
-			switch (StringUtils.trimToEmpty(view.getType())) {
+			switch (StringUtils.trimToEmpty(wi.getType())) {
 			case View.TYPE_CMS:
-				view.setData(gson.toJson(gson.fromJson(view.getData(), CmsPlan.class)));
+				//view.setData(gson.toJson(gson.fromJson(view.getData(), CmsPlan.class)));
 				break;
 			case View.TYPE_PROCESSPLATFORM:
-				view.setData(gson.toJson(gson.fromJson(view.getData(), ProcessPlatformPlan.class)));
+				//view.setData(gson.toJson(gson.fromJson(view.getData(), ProcessPlatformPlan.class)));
 				break;
 			default:
 				throw new ExceptionTypeValue(wi.getType());
@@ -75,4 +75,4 @@ class ActionCreate extends BaseAction {
 
 	}
 
-}
+}

+ 4 - 5
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/view/ActionEdit.java

@@ -37,13 +37,12 @@ class ActionEdit extends BaseAction {
 			if (!business.editable(effectivePerson, query)) {
 				throw new ExceptionQueryAccessDenied(effectivePerson.getDistinguishedName(), query.getName());
 			}
-			Wi.copier.copy(wi, view);
-			switch (StringUtils.trimToEmpty(view.getType())) {
+			switch (StringUtils.trimToEmpty(wi.getType())) {
 			case View.TYPE_CMS:
-				view.setData(gson.toJson(gson.fromJson(view.getData(), CmsPlan.class)));
+				//view.setData(gson.toJson(gson.fromJson(view.getData(), CmsPlan.class)));
 				break;
 			case View.TYPE_PROCESSPLATFORM:
-				view.setData(gson.toJson(gson.fromJson(view.getData(), ProcessPlatformPlan.class)));
+				//view.setData(gson.toJson(gson.fromJson(view.getData(), ProcessPlatformPlan.class)));
 				break;
 			default:
 				throw new ExceptionTypeValue(wi.getType());
@@ -77,4 +76,4 @@ class ActionEdit extends BaseAction {
 
 		static WrapCopier<Wi, View> copier = WrapCopierFactory.wi(Wi.class, View.class, null, JpaObject.FieldsUnmodify);
 	}
-}
+}