提交 ac30b1c2 编写于 作者: O o2null

Merge branch 'fix/视图创建不能保存事件信息' into 'wrdp'

[数据中心]修复视图创建不能保存事件信息的问题

See merge request o2oa/o2oa!3018
......@@ -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 {
}
}
\ No newline at end of file
}
......@@ -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);
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册