Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
04dead06
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
04dead06
编写于
1月 05, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改视图执行过程事务嵌套的问题
上级
8f42bac0
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
88 addition
and
65 deletion
+88
-65
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionBundle.java
...com/x/query/assemble/surface/jaxrs/view/ActionBundle.java
+13
-10
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionBundleWithQuery.java
...ry/assemble/surface/jaxrs/view/ActionBundleWithQuery.java
+12
-9
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExcel.java
.../com/x/query/assemble/surface/jaxrs/view/ActionExcel.java
+14
-11
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExcelWithQuery.java
...ery/assemble/surface/jaxrs/view/ActionExcelWithQuery.java
+14
-11
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExecute.java
...om/x/query/assemble/surface/jaxrs/view/ActionExecute.java
+11
-9
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExecuteWithQuery.java
...y/assemble/surface/jaxrs/view/ActionExecuteWithQuery.java
+11
-8
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/BaseAction.java
...a/com/x/query/assemble/surface/jaxrs/view/BaseAction.java
+13
-7
未找到文件。
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionBundle.java
浏览文件 @
04dead06
...
...
@@ -31,10 +31,13 @@ class ActionBundle extends BaseAction {
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
logger
.
debug
(
"jsonElement:{}."
,
jsonElement
);
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
View
view
;
Runtime
runtime
;
Business
business
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
View
view
=
business
.
pick
(
id
,
View
.
class
);
business
=
new
Business
(
emc
);
view
=
business
.
pick
(
id
,
View
.
class
);
if
(
null
==
view
)
{
throw
new
ExceptionEntityNotExist
(
id
,
View
.
class
);
}
...
...
@@ -52,14 +55,14 @@ class ActionBundle extends BaseAction {
if
(
null
==
wi
)
{
wi
=
new
Wi
();
}
Runtime
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
wi
.
getCount
(),
true
);
List
<
String
>
os
=
this
.
fetchBundle
(
business
,
view
,
runtime
);
Wo
wo
=
new
Wo
();
wo
.
setValueList
(
os
);
result
.
setData
(
wo
);
return
result
;
}
List
<
String
>
os
=
this
.
fetchBundle
(
business
,
view
,
runtime
);
Wo
wo
=
new
Wo
();
wo
.
setValueList
(
os
);
result
.
setData
(
wo
);
return
result
;
}
public
static
class
Wi
extends
GsonPropertyObject
{
...
...
@@ -107,4 +110,4 @@ class ActionBundle extends BaseAction {
}
}
\ No newline at end of file
}
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionBundleWithQuery.java
浏览文件 @
04dead06
...
...
@@ -27,9 +27,12 @@ class ActionBundleWithQuery extends BaseAction {
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
flag
,
String
queryFlag
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
View
view
;
Runtime
runtime
;
Business
business
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
business
=
new
Business
(
emc
);
Query
query
=
business
.
pick
(
queryFlag
,
Query
.
class
);
if
(
null
==
query
)
{
throw
new
ExceptionEntityNotExist
(
queryFlag
,
Query
.
class
);
...
...
@@ -38,7 +41,7 @@ class ActionBundleWithQuery extends BaseAction {
throw
new
ExceptionAccessDenied
(
effectivePerson
,
query
);
}
String
id
=
business
.
view
().
getWithQuery
(
flag
,
query
);
View
view
=
business
.
pick
(
id
,
View
.
class
);
view
=
business
.
pick
(
id
,
View
.
class
);
if
(
null
==
view
)
{
throw
new
ExceptionEntityNotExist
(
flag
,
View
.
class
);
}
...
...
@@ -49,13 +52,13 @@ class ActionBundleWithQuery extends BaseAction {
if
(
null
==
wi
)
{
wi
=
new
Wi
();
}
Runtime
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
wi
.
getCount
(),
true
);
Wo
wo
=
new
Wo
();
wo
.
setValueList
(
this
.
fetchBundle
(
business
,
view
,
runtime
));
result
.
setData
(
wo
);
return
result
;
}
Wo
wo
=
new
Wo
();
wo
.
setValueList
(
this
.
fetchBundle
(
business
,
view
,
runtime
));
result
.
setData
(
wo
);
return
result
;
}
public
static
class
Wo
extends
WrapStringList
{
...
...
@@ -102,4 +105,4 @@ class ActionBundleWithQuery extends BaseAction {
}
}
\ No newline at end of file
}
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExcel.java
浏览文件 @
04dead06
...
...
@@ -31,10 +31,13 @@ class ActionExcel extends BaseAction {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionExcel
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
View
view
;
Runtime
runtime
;
Business
business
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
View
view
=
business
.
pick
(
id
,
View
.
class
);
business
=
new
Business
(
emc
);
view
=
business
.
pick
(
id
,
View
.
class
);
if
(
null
==
view
)
{
throw
new
ExceptionEntityNotExist
(
id
,
View
.
class
);
}
...
...
@@ -49,16 +52,16 @@ class ActionExcel extends BaseAction {
throw
new
ExceptionAccessDenied
(
effectivePerson
,
view
);
}
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
Runtime
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
wi
.
getCount
(),
false
);
runtime
.
bundleList
=
wi
.
getBundleList
();
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
String
excelFlag
=
this
.
girdWriteToExcel
(
effectivePerson
,
business
,
plan
,
view
);
Wo
wo
=
new
Wo
();
wo
.
setId
(
excelFlag
);
result
.
setData
(
wo
);
return
result
;
}
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
String
excelFlag
=
this
.
girdWriteToExcel
(
effectivePerson
,
business
,
plan
,
view
);
Wo
wo
=
new
Wo
();
wo
.
setId
(
excelFlag
);
result
.
setData
(
wo
);
return
result
;
}
public
static
class
Wo
extends
WoId
{
...
...
@@ -112,4 +115,4 @@ class ActionExcel extends BaseAction {
}
}
}
\ No newline at end of file
}
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExcelWithQuery.java
浏览文件 @
04dead06
...
...
@@ -28,9 +28,12 @@ class ActionExcelWithQuery extends BaseAction {
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
flag
,
String
queryFlag
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
View
view
;
Runtime
runtime
;
Business
business
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
business
=
new
Business
(
emc
);
Query
query
=
business
.
pick
(
queryFlag
,
Query
.
class
);
if
(
null
==
query
)
{
throw
new
ExceptionEntityNotExist
(
queryFlag
,
Query
.
class
);
...
...
@@ -39,7 +42,7 @@ class ActionExcelWithQuery extends BaseAction {
throw
new
ExceptionAccessDenied
(
effectivePerson
,
query
);
}
String
id
=
business
.
view
().
getWithQuery
(
flag
,
query
);
View
view
=
business
.
pick
(
id
,
View
.
class
);
view
=
business
.
pick
(
id
,
View
.
class
);
if
(
null
==
view
)
{
throw
new
ExceptionEntityNotExist
(
flag
,
View
.
class
);
}
...
...
@@ -47,16 +50,16 @@ class ActionExcelWithQuery extends BaseAction {
throw
new
ExceptionAccessDenied
(
effectivePerson
,
view
);
}
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
Runtime
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
wi
.
getCount
(),
false
);
runtime
.
bundleList
=
wi
.
getBundleList
();
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
String
excelFlag
=
this
.
girdWriteToExcel
(
effectivePerson
,
business
,
plan
,
view
);
Wo
wo
=
new
Wo
();
wo
.
setId
(
excelFlag
);
result
.
setData
(
wo
);
return
result
;
}
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
String
excelFlag
=
this
.
girdWriteToExcel
(
effectivePerson
,
business
,
plan
,
view
);
Wo
wo
=
new
Wo
();
wo
.
setId
(
excelFlag
);
result
.
setData
(
wo
);
return
result
;
}
public
static
class
Wo
extends
WoId
{
...
...
@@ -113,4 +116,4 @@ class ActionExcelWithQuery extends BaseAction {
}
}
\ No newline at end of file
}
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExecute.java
浏览文件 @
04dead06
...
...
@@ -31,11 +31,13 @@ class ActionExecute extends BaseAction {
ActionResult
<
Plan
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
logger
.
debug
(
"jsonElement:{}."
,
jsonElement
);
ActionResult
<
Plan
>
result
=
new
ActionResult
<>();
View
view
;
Runtime
runtime
;
Business
business
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Plan
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
View
view
=
business
.
pick
(
id
,
View
.
class
);
business
=
new
Business
(
emc
);
view
=
business
.
pick
(
id
,
View
.
class
);
if
(
null
==
view
)
{
throw
new
ExceptionEntityNotExist
(
id
,
View
.
class
);
}
...
...
@@ -53,13 +55,13 @@ class ActionExecute extends BaseAction {
if
(
null
==
wi
)
{
wi
=
new
Wi
();
}
Runtime
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
wi
.
getCount
(),
false
);
runtime
.
bundleList
=
wi
.
getBundleList
();
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
result
.
setData
(
plan
);
return
result
;
}
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
result
.
setData
(
plan
);
return
result
;
}
public
static
class
Wi
extends
GsonPropertyObject
{
...
...
@@ -112,4 +114,4 @@ class ActionExecute extends BaseAction {
}
}
}
\ No newline at end of file
}
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/ActionExecuteWithQuery.java
浏览文件 @
04dead06
...
...
@@ -28,9 +28,12 @@ class ActionExecuteWithQuery extends BaseAction {
ActionResult
<
Plan
>
execute
(
EffectivePerson
effectivePerson
,
String
flag
,
String
queryFlag
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Plan
>
result
=
new
ActionResult
<>();
View
view
;
Runtime
runtime
;
Business
business
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Plan
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
business
=
new
Business
(
emc
);
Query
query
=
business
.
pick
(
queryFlag
,
Query
.
class
);
if
(
null
==
query
)
{
throw
new
ExceptionEntityNotExist
(
queryFlag
,
Query
.
class
);
...
...
@@ -39,7 +42,7 @@ class ActionExecuteWithQuery extends BaseAction {
throw
new
ExceptionAccessDenied
(
effectivePerson
,
query
);
}
String
id
=
business
.
view
().
getWithQuery
(
flag
,
query
);
View
view
=
business
.
pick
(
id
,
View
.
class
);
view
=
business
.
pick
(
id
,
View
.
class
);
if
(
null
==
view
)
{
throw
new
ExceptionEntityNotExist
(
flag
,
View
.
class
);
}
...
...
@@ -50,13 +53,13 @@ class ActionExecuteWithQuery extends BaseAction {
if
(
null
==
wi
)
{
wi
=
new
Wi
();
}
Runtime
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
runtime
=
this
.
runtime
(
effectivePerson
,
business
,
view
,
wi
.
getFilterList
(),
wi
.
getParameter
(),
wi
.
getCount
(),
false
);
runtime
.
bundleList
=
wi
.
getBundleList
();
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
result
.
setData
(
plan
);
return
result
;
}
Plan
plan
=
this
.
accessPlan
(
business
,
view
,
runtime
);
result
.
setData
(
plan
);
return
result
;
}
public
static
class
Wo
extends
WoId
{
...
...
@@ -112,4 +115,4 @@ class ActionExecuteWithQuery extends BaseAction {
}
}
}
\ No newline at end of file
}
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/view/BaseAction.java
浏览文件 @
04dead06
...
...
@@ -9,6 +9,8 @@ import java.util.Map;
import
java.util.Objects
;
import
com.google.gson.reflect.TypeToken
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.processplatform.core.entity.element.Process
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -47,16 +49,16 @@ abstract class BaseAction extends StandardJaxrsAction {
if
(
optional
.
isPresent
())
{
plan
=
(
Plan
)
optional
.
get
();
}
else
{
plan
=
this
.
dealPlan
(
business
,
view
,
runtime
);
plan
=
this
.
dealPlan
(
view
,
runtime
);
CacheManager
.
put
(
business
.
cache
(),
cacheKey
,
plan
);
}
}
else
{
plan
=
this
.
dealPlan
(
business
,
view
,
runtime
);
plan
=
this
.
dealPlan
(
view
,
runtime
);
}
return
plan
;
}
private
Plan
dealPlan
(
Business
business
,
View
view
,
Runtime
runtime
)
throws
Exception
{
private
Plan
dealPlan
(
View
view
,
Runtime
runtime
)
throws
Exception
{
Plan
plan
=
null
;
switch
(
StringUtils
.
trimToEmpty
(
view
.
getType
()))
{
case
View
.
TYPE_CMS
:
...
...
@@ -67,7 +69,7 @@ abstract class BaseAction extends StandardJaxrsAction {
break
;
default
:
ProcessPlatformPlan
processPlatformPlan
=
gson
.
fromJson
(
view
.
getData
(),
ProcessPlatformPlan
.
class
);
this
.
setProcessEdition
(
business
,
processPlatformPlan
);
this
.
setProcessEdition
(
processPlatformPlan
);
processPlatformPlan
.
runtime
=
runtime
;
processPlatformPlan
.
access
();
plan
=
processPlatformPlan
;
...
...
@@ -79,11 +81,15 @@ abstract class BaseAction extends StandardJaxrsAction {
return
plan
;
}
private
void
setProcessEdition
(
Business
business
,
ProcessPlatformPlan
processPlatformPlan
)
throws
Exception
{
private
void
setProcessEdition
(
ProcessPlatformPlan
processPlatformPlan
)
throws
Exception
{
if
(!
processPlatformPlan
.
where
.
processList
.
isEmpty
()){
List
<
String
>
_process_ids
=
ListTools
.
extractField
(
processPlatformPlan
.
where
.
processList
,
Process
.
id_FIELDNAME
,
String
.
class
,
true
,
true
);
List
<
Process
>
processList
=
business
.
process
().
listObjectWithProcess
(
_process_ids
,
true
);
List
<
Process
>
processList
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
processList
=
business
.
process
().
listObjectWithProcess
(
_process_ids
,
true
);
}
List
<
ProcessPlatformPlan
.
WhereEntry
.
ProcessEntry
>
listProcessEntry
=
gson
.
fromJson
(
gson
.
toJson
(
processList
),
new
TypeToken
<
List
<
ProcessPlatformPlan
.
WhereEntry
.
ProcessEntry
>>(){}.
getType
());
if
(!
listProcessEntry
.
isEmpty
())
{
...
...
@@ -102,7 +108,7 @@ abstract class BaseAction extends StandardJaxrsAction {
break
;
default
:
ProcessPlatformPlan
processPlatformPlan
=
gson
.
fromJson
(
view
.
getData
(),
ProcessPlatformPlan
.
class
);
this
.
setProcessEdition
(
business
,
processPlatformPlan
);
this
.
setProcessEdition
(
processPlatformPlan
);
processPlatformPlan
.
runtime
=
runtime
;
os
=
processPlatformPlan
.
fetchBundles
();
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录