Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
97c89cdd
o2oa
项目概览
fuyue82
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
97c89cdd
编写于
9月 10, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
x_processplatform_service_processing fixed
上级
8b9ee185
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
219 addition
and
296 deletion
+219
-296
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/element/ApplicationFactory.java
.../assemble/surface/factory/element/ApplicationFactory.java
+2
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/element/FileFactory.java
...latform/assemble/surface/factory/element/FileFactory.java
+0
-20
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/element/ProcessFactory.java
...form/assemble/surface/factory/element/ProcessFactory.java
+5
-45
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPerson.java
...emble/surface/jaxrs/application/ActionListWithPerson.java
+5
-4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonComplex.java
...urface/jaxrs/application/ActionListWithPersonComplex.java
+5
-5
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonLike.java
...e/surface/jaxrs/application/ActionListWithPersonLike.java
+5
-5
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionManageListWithPersonComplex.java
.../jaxrs/application/ActionManageListWithPersonComplex.java
+12
-15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionListWithPersonWithApplicationFilter.java
...rs/process/ActionListWithPersonWithApplicationFilter.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionFilterAttribute.java
...rm/assemble/surface/jaxrs/read/ActionFilterAttribute.java
+11
-10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionFilterAttributeFilter.java
...emble/surface/jaxrs/read/ActionFilterAttributeFilter.java
+10
-10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListCountWithApplication.java
...le/surface/jaxrs/read/ActionListCountWithApplication.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListCountWithProcess.java
...semble/surface/jaxrs/read/ActionListCountWithProcess.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionFilterAttribute.java
...le/surface/jaxrs/readcompleted/ActionFilterAttribute.java
+15
-12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionFilterAttributeFilter.java
...face/jaxrs/readcompleted/ActionFilterAttributeFilter.java
+13
-12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListCountWithApplication.java
...e/jaxrs/readcompleted/ActionListCountWithApplication.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListCountWithProcess.java
...rface/jaxrs/readcompleted/ActionListCountWithProcess.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/BaseAction.java
...form/assemble/surface/jaxrs/readcompleted/BaseAction.java
+0
-31
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionFilterAttribute.java
...rm/assemble/surface/jaxrs/task/ActionFilterAttribute.java
+11
-10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionFilterAttributeFilter.java
...emble/surface/jaxrs/task/ActionFilterAttributeFilter.java
+10
-10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListCountWithApplication.java
...le/surface/jaxrs/task/ActionListCountWithApplication.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListCountWithProcess.java
...semble/surface/jaxrs/task/ActionListCountWithProcess.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessingNeural.java
...m/assemble/surface/jaxrs/task/ActionProcessingNeural.java
+2
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionFilterAttribute.java
...le/surface/jaxrs/taskcompleted/ActionFilterAttribute.java
+15
-14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionFilterAttributeFilter.java
...face/jaxrs/taskcompleted/ActionFilterAttributeFilter.java
+14
-14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListCountWithApplication.java
...e/jaxrs/taskcompleted/ActionListCountWithApplication.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListCountWithProcess.java
...rface/jaxrs/taskcompleted/ActionListCountWithProcess.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionFilterAttribute.java
...rm/assemble/surface/jaxrs/work/ActionFilterAttribute.java
+12
-11
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionManageFilterAttribute.java
...emble/surface/jaxrs/work/ActionManageFilterAttribute.java
+13
-21
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionFilterAttribute.java
...le/surface/jaxrs/workcompleted/ActionFilterAttribute.java
+7
-6
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionListCountWithApplication.java
...e/jaxrs/workcompleted/ActionListCountWithApplication.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionListCountWithProcess.java
...rface/jaxrs/workcompleted/ActionListCountWithProcess.java
+3
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageFilterAttribute.java
...face/jaxrs/workcompleted/ActionManageFilterAttribute.java
+7
-6
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageListCountWithProcess.java
...jaxrs/workcompleted/ActionManageListCountWithProcess.java
+3
-2
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/attachment/ActionCopyToWorkCompleted.java
...rocessing/jaxrs/attachment/ActionCopyToWorkCompleted.java
+6
-5
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/neural/NeuralAnalyzer.java
...essplatform/service/processing/neural/NeuralAnalyzer.java
+3
-2
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/element/ApplicationFactory.java
浏览文件 @
97c89cdd
...
...
@@ -87,7 +87,7 @@ public class ApplicationFactory extends ElementFactory {
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Application
>
root
=
cq
.
from
(
Application
.
class
);
cq
.
select
(
root
.
get
(
Application_
.
id
))
.
distinct
(
true
)
;
cq
.
select
(
root
.
get
(
Application_
.
id
));
if
(
effectivePerson
.
isNotManager
()
&&
(!
this
.
business
().
organization
().
person
().
hasRole
(
effectivePerson
,
OrganizationDefinition
.
Manager
,
OrganizationDefinition
.
ProcessPlatformManager
)))
{
Predicate
p
=
cb
.
and
(
cb
.
isEmpty
(
root
.
get
(
Application_
.
availableIdentityList
)),
...
...
@@ -102,7 +102,7 @@ public class ApplicationFactory extends ElementFactory {
}
cq
.
where
(
p
);
}
return
em
.
createQuery
(
cq
.
distinct
(
true
)).
getResultList
(
);
return
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
()
);
}
public
<
T
extends
Application
>
List
<
T
>
sort
(
List
<
T
>
list
)
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/element/FileFactory.java
浏览文件 @
97c89cdd
...
...
@@ -21,26 +21,6 @@ public class FileFactory extends ElementFactory {
return
this
.
pick
(
flag
,
File
.
class
);
}
// private File pickObject(String flag) throws Exception {
// File o = this.business().entityManagerContainer().flag(flag, File.class);
// if (o != null) {
// this.entityManagerContainer().get(File.class).detach(o);
// }
// if (null == o) {
// EntityManager em = this.entityManagerContainer().get(File.class);
// CriteriaBuilder cb = em.getCriteriaBuilder();
// CriteriaQuery<File> cq = cb.createQuery(File.class);
// Root<File> root = cq.from(File.class);
// Predicate p = cb.equal(root.get(File_.name), flag);
// List<File> os = em.createQuery(cq.select(root).where(p).distinct(true)).getResultList();
// if (os.size() == 1) {
// o = os.get(0);
// em.detach(o);
// }
// }
// return o;
// }
public
<
T
extends
File
>
List
<
T
>
sort
(
List
<
T
>
list
)
{
list
=
list
.
stream
()
.
sorted
(
Comparator
.
comparing
(
File:
:
getAlias
,
Comparator
.
nullsLast
(
String:
:
compareTo
))
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/element/ProcessFactory.java
浏览文件 @
97c89cdd
...
...
@@ -65,47 +65,7 @@ public class ProcessFactory extends ElementFactory {
return
o
;
}
// private Process pickObject(String flag) throws Exception {
// Process o = this.business().entityManagerContainer().flag(flag, Process.class);
// if (o != null) {
// this.entityManagerContainer().get(Process.class).detach(o);
// }
// if (null == o) {
// EntityManager em = this.entityManagerContainer().get(Process.class);
// CriteriaBuilder cb = em.getCriteriaBuilder();
// CriteriaQuery<Process> cq = cb.createQuery(Process.class);
// Root<Process> root = cq.from(Process.class);
// Predicate p = cb.equal(root.get(Process_.name), flag);
// List<Process> os = em.createQuery(cq.select(root).where(p).distinct(true)).getResultList();
// if (os.size() == 1) {
// o = os.get(0);
// em.detach(o);
// }
// }
// return o;
// }
// public Process pickObject(Application application, String flag) throws Exception {
// if (null == application || StringUtils.isEmpty(flag)) {
// return null;
// }
// Process o = null;
// String cacheKey = ApplicationCache.concreteCacheKey(Process.class, application.getId(), flag);
// Element element = cache.get(cacheKey);
// if (null != element) {
// if (null != element.getObjectValue()) {
// o = (Process) element.getObjectValue();
// }
// } else {
// o = this.restrictProcess(application.getId(), flag);
// if (null != o) {
// cache.put(new Element(cacheKey, o));
// }
// }
// return o;
// }
/* 获取Application下的所有流程 */
// 获取Application下的所有流程
public
List
<
String
>
listWithApplication
(
Application
application
)
throws
Exception
{
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
Process
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
...
...
@@ -113,8 +73,8 @@ public class ProcessFactory extends ElementFactory {
Root
<
Process
>
root
=
cq
.
from
(
Process
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Process_
.
application
),
application
.
getId
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
isTrue
(
root
.
get
(
Process_
.
editionEnable
)),
cb
.
isNull
(
root
.
get
(
Process_
.
editionEnable
))));
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
/* 获取用户可启动的流程,如果applicationId 为空则取到所有可启动流程 */
...
...
@@ -139,8 +99,8 @@ public class ProcessFactory extends ElementFactory {
}
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Process_
.
application
),
application
.
getId
()));
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
isTrue
(
root
.
get
(
Process_
.
editionEnable
)),
cb
.
isNull
(
root
.
get
(
Process_
.
editionEnable
))));
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
/* 获取用户可启动的流程,如果applicationId 为空则取到所有可启动流程 */
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPerson.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.application;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -98,8 +99,8 @@ class ActionListWithPerson extends BaseAction {
}
cq
.
where
(
p
);
}
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
)).
distinct
(
true
)).
getResultList
();
return
list
;
return
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
))).
getResultList
().
stream
().
distinct
()
.
collect
(
Collectors
.
toList
())
;
}
/**
...
...
@@ -126,7 +127,7 @@ class ActionListWithPerson extends BaseAction {
p
=
cb
.
or
(
p
,
root
.
get
(
Process_
.
startableUnitList
).
in
(
units
));
}
}
cq
.
select
(
root
.
get
(
Process_
.
application
)).
distinct
(
true
).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
application
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonComplex.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.application;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -108,7 +109,6 @@ class ActionListWithPersonComplex extends BaseAction {
private
List
<
String
>
listFromApplication
(
Business
business
,
EffectivePerson
effectivePerson
,
List
<
String
>
roles
,
List
<
String
>
identities
,
List
<
String
>
units
)
throws
Exception
{
List
<
String
>
list
=
new
ArrayList
<>();
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Application
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
...
...
@@ -127,8 +127,8 @@ class ActionListWithPersonComplex extends BaseAction {
}
cq
.
where
(
p
);
}
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
)).
distinct
(
true
)).
getResultList
();
return
list
;
return
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
))).
getResultList
().
stream
().
distinct
()
.
collect
(
Collectors
.
toList
())
;
}
/**
...
...
@@ -155,8 +155,8 @@ class ActionListWithPersonComplex extends BaseAction {
p
=
cb
.
or
(
p
,
root
.
get
(
Process_
.
startableUnitList
).
in
(
units
));
}
}
cq
.
select
(
root
.
get
(
Process_
.
application
)).
distinct
(
true
).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
application
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
private
List
<
WoProcess
>
referenceProcess
(
Business
business
,
EffectivePerson
effectivePerson
,
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonLike.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.application;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -66,7 +67,6 @@ class ActionListWithPersonLike extends BaseAction {
private
List
<
String
>
listFromApplication
(
Business
business
,
EffectivePerson
effectivePerson
,
List
<
String
>
roles
,
List
<
String
>
identities
,
List
<
String
>
units
)
throws
Exception
{
List
<
String
>
list
=
new
ArrayList
<>();
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Application
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
...
...
@@ -85,8 +85,8 @@ class ActionListWithPersonLike extends BaseAction {
}
cq
.
where
(
p
);
}
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
)).
distinct
(
true
)).
getResultList
();
return
list
;
return
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
))).
getResultList
().
stream
().
distinct
()
.
collect
(
Collectors
.
toList
())
;
}
/**
...
...
@@ -116,7 +116,7 @@ class ActionListWithPersonLike extends BaseAction {
p
=
cb
.
or
(
p
,
root
.
get
(
Process_
.
startableUnitList
).
in
(
units
));
}
}
cq
.
select
(
root
.
get
(
Process_
.
application
)).
distinct
(
true
).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
application
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionManageListWithPersonComplex.java
浏览文件 @
97c89cdd
...
...
@@ -24,6 +24,7 @@ import javax.persistence.criteria.Predicate;
import
javax.persistence.criteria.Root
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
class
ActionManageListWithPersonComplex
extends
BaseAction
{
...
...
@@ -33,7 +34,7 @@ class ActionManageListWithPersonComplex extends BaseAction {
List
<
Wo
>
wos
=
new
ArrayList
<>();
Business
business
=
new
Business
(
emc
);
if
(
effectivePerson
.
isManager
()){
if
(
effectivePerson
.
isManager
())
{
List
<
String
>
identities
=
business
.
organization
().
identity
().
listWithPerson
(
person
);
/** 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 */
List
<
String
>
units
=
business
.
organization
().
unit
().
listWithPersonSupNested
(
person
);
...
...
@@ -127,7 +128,8 @@ class ActionManageListWithPersonComplex extends BaseAction {
}
cq
.
where
(
p
);
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
)).
distinct
(
true
)).
getResultList
();
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Application_
.
id
))).
getResultList
().
stream
().
distinct
()
.
collect
(
Collectors
.
toList
());
return
list
;
}
...
...
@@ -153,14 +155,13 @@ class ActionManageListWithPersonComplex extends BaseAction {
p
=
cb
.
or
(
p
,
root
.
get
(
Process_
.
startableUnitList
).
in
(
units
));
}
cq
.
select
(
root
.
get
(
Process_
.
application
)).
distinct
(
true
).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
application
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
private
List
<
WoProcess
>
referenceProcess
(
Business
business
,
EffectivePerson
effectivePerson
,
List
<
String
>
identities
,
List
<
String
>
units
,
Application
application
)
throws
Exception
{
List
<
String
>
ids
=
this
.
listStartableWithApplication
(
business
,
effectivePerson
,
identities
,
units
,
application
);
List
<
String
>
ids
=
this
.
listStartableWithApplication
(
business
,
effectivePerson
,
identities
,
units
,
application
);
List
<
WoProcess
>
wos
=
new
ArrayList
<>();
for
(
String
id
:
ids
)
{
WoProcess
o
=
WoProcess
.
copier
.
copy
(
business
.
process
().
pick
(
id
));
...
...
@@ -171,9 +172,8 @@ class ActionManageListWithPersonComplex extends BaseAction {
}
/* 获取用户可启动的流程,如果applicationId 为空则取到所有可启动流程 */
private
List
<
String
>
listStartableWithApplication
(
Business
business
,
EffectivePerson
effectivePerson
,
List
<
String
>
identities
,
List
<
String
>
units
,
Application
application
)
throws
Exception
{
List
<
String
>
list
=
new
ArrayList
<>();
private
List
<
String
>
listStartableWithApplication
(
Business
business
,
EffectivePerson
effectivePerson
,
List
<
String
>
identities
,
List
<
String
>
units
,
Application
application
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Process
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
...
...
@@ -191,11 +191,8 @@ class ActionManageListWithPersonComplex extends BaseAction {
}
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Process_
.
application
),
application
.
getId
()));
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
isTrue
(
root
.
get
(
Process_
.
editionEnable
)),
cb
.
isNull
(
root
.
get
(
Process_
.
editionEnable
))));
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
).
distinct
(
true
);
list
=
em
.
createQuery
(
cq
).
getResultList
();
return
list
;
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
isTrue
(
root
.
get
(
Process_
.
editionEnable
)),
cb
.
isNull
(
root
.
get
(
Process_
.
editionEnable
))));
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionListWithPersonWithApplicationFilter.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.process;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -98,8 +99,8 @@ class ActionListWithPersonWithApplicationFilter extends BaseAction {
cb
.
equal
(
root
.
get
(
Process_
.
startableTerminal
),
Process
.
STARTABLETERMINAL_ALL
)));
}
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Process_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
public
static
class
Wo
extends
Process
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.read;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -104,8 +105,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Read_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -132,8 +133,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Read_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -160,8 +161,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Read_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -182,8 +183,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Read_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
activityName
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
list
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -204,8 +205,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Read_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionFilterAttributeFilter.java
浏览文件 @
97c89cdd
...
...
@@ -187,8 +187,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Read_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Read_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -232,8 +232,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Read_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Read_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -277,8 +277,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Read_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Read_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -316,8 +316,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Read_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Read_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
activityName
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -355,8 +355,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Read_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Read_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListCountWithApplication.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.read;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -32,8 +33,8 @@ class ActionListCountWithApplication extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Read_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
application
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
this
.
concreteNameValueCountPair
(
business
,
effectivePerson
,
str
);
wraps
.
add
(
o
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListCountWithProcess.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.read;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -40,8 +41,8 @@ class ActionListCountWithProcess extends BaseAction {
Root
<
Read
>
root
=
cq
.
from
(
Read
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Read_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Read_
.
application
),
application
.
getId
()));
cq
.
select
(
root
.
get
(
Read_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Read_
.
process
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
this
.
concreteNameValueCountPair
(
business
,
effectivePerson
,
str
);
wraps
.
add
(
o
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.readcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -115,8 +116,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -143,8 +144,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -171,8 +172,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -193,8 +194,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
activityName
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
list
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -215,8 +216,9 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
completedTimeMonth
)).
where
(
p
).
distinct
(
true
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
completedTimeMonth
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
());
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
list
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -237,8 +239,9 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
startTimeMonth
)).
where
(
p
).
distinct
(
true
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
());
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
list
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionFilterAttributeFilter.java
浏览文件 @
97c89cdd
...
...
@@ -213,8 +213,9 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
ReadCompleted_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
ReadCompleted_
.
application
)).
where
(
p
).
distinct
(
true
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
());
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -261,8 +262,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
ReadCompleted_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
ReadCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -309,8 +310,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
ReadCompleted_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
ReadCompleted_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -351,8 +352,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
ReadCompleted_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
ReadCompleted_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
activityName
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -393,8 +394,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
ReadCompleted_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
ReadCompleted_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -435,8 +436,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
ReadCompleted_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
ReadCompleted_
.
completedTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
completedTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListCountWithApplication.java
浏览文件 @
97c89cdd
...
...
@@ -3,6 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.readcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -43,8 +44,8 @@ class ActionListCountWithApplication extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
ReadCompleted_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListCountWithProcess.java
浏览文件 @
97c89cdd
...
...
@@ -3,6 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.readcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -52,8 +53,8 @@ class ActionListCountWithProcess extends BaseAction {
Root
<
ReadCompleted
>
root
=
cq
.
from
(
ReadCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
ReadCompleted_
.
application
),
application
.
getId
()));
cq
.
select
(
root
.
get
(
ReadCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
ReadCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
Process
process
=
business
.
process
().
pick
(
str
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/BaseAction.java
浏览文件 @
97c89cdd
...
...
@@ -14,16 +14,6 @@ import com.x.processplatform.core.entity.content.ReadCompleted_;
abstract
class
BaseAction
extends
StandardJaxrsAction
{
// static WrapCopier<ReadCompleted, WrapOutReadCompleted> readCompletedOutCopier = WrapCopierFactory
// .wo(ReadCompleted.class, WrapOutReadCompleted.class, null, WrapOutReadCompleted.FieldsInvisible);
//
// static WrapCopier<Work, WrapOutWork> workOutCopier = WrapCopierFactory.wo(Work.class, WrapOutWork.class, null,
// WrapOutWork.Excludes);
//
// static WrapCopier<WorkCompleted, WrapOutWorkCompleted> workCompletedOutCopier = WrapCopierFactory
// .wo(WorkCompleted.class, WrapOutWorkCompleted.class, null, WrapOutWorkCompleted.Excludes);
Long
countWithApplication
(
Business
business
,
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
ReadCompleted
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
...
...
@@ -35,27 +25,6 @@ abstract class BaseAction extends StandardJaxrsAction {
return
em
.
createQuery
(
cq
).
getSingleResult
();
}
// List<NameValueCountPair> listProcessPair(Business business, EffectivePerson effectivePerson,
// Application application) throws Exception {
// List<NameValueCountPair> wraps = new ArrayList<>();
// EntityManager em = business.entityManagerContainer().get(ReadCompleted.class);
// CriteriaBuilder cb = em.getCriteriaBuilder();
// CriteriaQuery<String> cq = cb.createQuery(String.class);
// Root<ReadCompleted> root = cq.from(ReadCompleted.class);
// Predicate p = cb.equal(root.get(ReadCompleted_.person), effectivePerson.getDistinguishedName());
// p = cb.and(p, cb.equal(root.get(ReadCompleted_.application), application.getId()));
// cq.select(root.get(ReadCompleted_.process)).where(p).distinct(true);
// List<String> list = em.createQuery(cq).getResultList();
// for (String str : list) {
// NameValueCountPair o = new NameValueCountPair();
// o.setValue(str);
// o.setName(business.process().pickName(str, ReadCompleted.class, effectivePerson.getDistinguishedName()));
// wraps.add(o);
// }
// SortTools.asc(wraps, "name");
// return wraps;
// }
Long
countWithProcess
(
Business
business
,
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
ReadCompleted
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.task;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -108,8 +109,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Task_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -136,8 +137,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Task_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -164,8 +165,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Task_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -186,8 +187,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Task_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
activityName
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -208,8 +209,8 @@ class ActionFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Task_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionFilterAttributeFilter.java
浏览文件 @
97c89cdd
...
...
@@ -187,8 +187,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Task_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Task_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -232,8 +232,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Task_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Task_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -277,8 +277,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Task_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Task_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -316,8 +316,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Task_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Task_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
activityName
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -355,8 +355,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getActivityNameList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Task_
.
activityName
).
in
(
wi
.
getActivityNameList
()));
}
cq
.
select
(
root
.
get
(
Task_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListCountWithApplication.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.task;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -32,8 +33,8 @@ class ActionListCountWithApplication extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
Task_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
application
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
this
.
addNameValueCountPair
(
business
,
effectivePerson
,
str
,
wraps
);
}
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListCountWithProcess.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.task;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -37,8 +38,8 @@ class ActionListCountWithProcess extends BaseAction {
Root
<
Task
>
root
=
cq
.
from
(
Task
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Task_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Task_
.
application
),
application
.
getId
()));
cq
.
select
(
root
.
get
(
Task_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Task_
.
process
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
this
.
addNameValueCountPair
(
business
,
effectivePerson
,
str
,
wraps
);
}
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessingNeural.java
浏览文件 @
97c89cdd
...
...
@@ -230,8 +230,8 @@ class ActionProcessingNeural extends BaseAction {
Root
<
FormField
>
root
=
cq
.
from
(
FormField
.
class
);
Predicate
p
=
root
.
get
(
FormField_
.
form
).
in
(
formIds
);
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
FormField_
.
dataType
),
"number"
));
cq
.
select
(
root
.
get
(
FormField_
.
name
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
FormField_
.
name
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
private
List
<
String
>
listForm
(
Business
business
,
Process
process
)
throws
Exception
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.taskcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -135,8 +136,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -165,8 +166,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -195,8 +196,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -219,8 +220,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
activityName
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -243,8 +244,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -267,8 +268,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completedTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completedTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -292,8 +293,8 @@ class ActionFilterAttribute extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completed
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
Boolean
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completed
)).
where
(
p
);
List
<
Boolean
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
Boolean
value
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionFilterAttributeFilter.java
浏览文件 @
97c89cdd
...
...
@@ -242,8 +242,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -295,8 +295,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -348,8 +348,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -395,8 +395,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
activityName
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -442,8 +442,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -489,8 +489,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completedTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completedTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
...
...
@@ -536,8 +536,8 @@ class ActionFilterAttributeFilter extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getCompletedList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
TaskCompleted_
.
completed
).
in
(
wi
.
getCompletedList
()));
}
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completed
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
Boolean
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
completed
)).
where
(
p
);
List
<
Boolean
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
Boolean
value
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListCountWithApplication.java
浏览文件 @
97c89cdd
...
...
@@ -3,6 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.taskcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -46,8 +47,8 @@ class ActionListCountWithApplication extends BaseAction {
Predicate
p
=
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
application
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
Application
application
=
business
.
application
().
pick
(
str
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListCountWithProcess.java
浏览文件 @
97c89cdd
...
...
@@ -3,6 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.taskcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -54,8 +55,8 @@ class ActionListCountWithProcess extends BaseAction {
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
latest
),
true
),
cb
.
isNull
(
root
.
get
(
TaskCompleted_
.
latest
))));
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
TaskCompleted_
.
application
),
application
.
getId
()));
cq
.
select
(
root
.
get
(
TaskCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
TaskCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
Process
process
=
business
.
process
().
pick
(
str
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.work;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -64,7 +65,7 @@ class ActionFilterAttribute extends BaseAction {
private
List
<
NameValueCountPair
>
activityNameList
=
new
ArrayList
<>();
@FieldDescribe
(
"可选择的工作状态"
)
@FieldTypeDescribe
(
fieldType
=
"enum"
,
fieldValue
=
"start|processing|hanging"
,
fieldTypeName
=
"com.x.processplatform.core.entity.content.WorkStatus"
)
@FieldTypeDescribe
(
fieldType
=
"enum"
,
fieldValue
=
"start|processing|hanging"
,
fieldTypeName
=
"com.x.processplatform.core.entity.content.WorkStatus"
)
private
List
<
NameValueCountPair
>
workStatusList
=
new
ArrayList
<>();
public
List
<
NameValueCountPair
>
getProcessList
()
{
...
...
@@ -118,8 +119,8 @@ class ActionFilterAttribute extends BaseAction {
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Work_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
cq
.
select
(
root
.
get
(
Work_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
Process
process
=
business
.
process
().
pick
(
str
);
...
...
@@ -144,8 +145,8 @@ class ActionFilterAttribute extends BaseAction {
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Work_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
cq
.
select
(
root
.
get
(
Work_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
@@ -166,8 +167,8 @@ class ActionFilterAttribute extends BaseAction {
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Work_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
cq
.
select
(
root
.
get
(
Work_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
activityName
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
str
);
...
...
@@ -187,8 +188,8 @@ class ActionFilterAttribute extends BaseAction {
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Work_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
cq
.
select
(
root
.
get
(
Work_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
str
);
...
...
@@ -208,8 +209,8 @@ class ActionFilterAttribute extends BaseAction {
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Work_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
cq
.
select
(
root
.
get
(
Work_
.
workStatus
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
WorkStatus
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
workStatus
)).
where
(
p
);
List
<
WorkStatus
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
WorkStatus
status
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
status
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionManageFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.work;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -68,8 +69,8 @@ class ActionManageFilterAttribute extends BaseAction {
private
List
<
NameValueCountPair
>
activityNameList
=
new
ArrayList
<>();
@FieldDescribe
(
"可选择的工作状态"
)
@FieldTypeDescribe
(
fieldType
=
"class"
,
fieldValue
=
"{name='',value='',count=0}"
,
fieldTypeName
=
"com.x.base.core.project.bean.NameValueCountPair"
)
@FieldTypeDescribe
(
fieldType
=
"class"
,
fieldValue
=
"{name='',value='',count=0}"
,
fieldTypeName
=
"com.x.base.core.project.bean.NameValueCountPair"
)
private
List
<
NameValueCountPair
>
workStatusList
=
new
ArrayList
<>();
public
List
<
NameValueCountPair
>
getProcessList
()
{
...
...
@@ -80,15 +81,6 @@ class ActionManageFilterAttribute extends BaseAction {
this
.
processList
=
processList
;
}
// public List<NameValueCountPair> getCreatorTopUnitList() {
// return creatorTopUnitList;
// }
//
// public void setCreatorTopUnitList(List<NameValueCountPair>
// creatorTopUnitList) {
// this.creatorTopUnitList = creatorTopUnitList;
// }
public
List
<
NameValueCountPair
>
getCreatorUnitList
()
{
return
creatorUnitList
;
}
...
...
@@ -130,8 +122,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
cq
.
select
(
root
.
get
(
Work_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
Process
process
=
business
.
process
().
pick
(
str
);
...
...
@@ -155,8 +147,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
cq
.
select
(
root
.
get
(
Work_
.
creatorUnit
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
creatorUnit
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
str
);
...
...
@@ -174,8 +166,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
cq
.
select
(
root
.
get
(
Work_
.
activityName
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
activityName
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
str
);
...
...
@@ -193,8 +185,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
cq
.
select
(
root
.
get
(
Work_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
str
);
...
...
@@ -212,8 +204,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
WorkStatus
>
cq
=
cb
.
createQuery
(
WorkStatus
.
class
);
Root
<
Work
>
root
=
cq
.
from
(
Work
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Work_
.
application
),
application
.
getId
());
cq
.
select
(
root
.
get
(
Work_
.
workStatus
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
WorkStatus
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Work_
.
workStatus
)).
where
(
p
);
List
<
WorkStatus
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
for
(
WorkStatus
status
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
status
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -53,8 +54,8 @@ public class ActionFilterAttribute extends BaseAction {
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
));
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
@@ -80,8 +81,8 @@ public class ActionFilterAttribute extends BaseAction {
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
));
cq
.
select
(
root
.
get
(
WorkCompleted_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wraps
=
new
ArrayList
<>();
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
@@ -100,8 +101,8 @@ public class ActionFilterAttribute extends BaseAction {
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
));
cq
.
select
(
root
.
get
(
WorkCompleted_
.
completedTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
completedTimeMonth
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wraps
=
new
ArrayList
<>();
for
(
String
str
:
list
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionListCountWithApplication.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.workcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -30,8 +31,8 @@ class ActionListCountWithApplication extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
());
cq
.
select
(
root
.
get
(
WorkCompleted_
.
application
)).
where
(
p
)
.
distinct
(
true
)
;
for
(
String
str
:
em
.
createQuery
(
cq
).
getResultList
())
{
cq
.
select
(
root
.
get
(
WorkCompleted_
.
application
)).
where
(
p
);
for
(
String
str
:
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
o
.
setValue
(
str
);
o
.
setName
(
this
.
getApplicationName
(
business
,
effectivePerson
,
str
));
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionListCountWithProcess.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.workcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -36,8 +37,8 @@ class ActionListCountWithProcess extends BaseAction {
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
));
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageFilterAttribute.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.workcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -87,8 +88,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
);
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
@@ -113,8 +114,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
);
cq
.
select
(
root
.
get
(
WorkCompleted_
.
startTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
startTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
@@ -133,8 +134,8 @@ class ActionManageFilterAttribute extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
);
cq
.
select
(
root
.
get
(
WorkCompleted_
.
completedTimeMonth
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
completedTimeMonth
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageListCountWithProcess.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.workcompleted;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -37,8 +38,8 @@ class ActionManageListCountWithProcess extends BaseAction {
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
WorkCompleted
>
root
=
cq
.
from
(
WorkCompleted
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
WorkCompleted_
.
application
),
applicationId
);
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
WorkCompleted_
.
process
)).
where
(
p
);
List
<
String
>
os
=
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
List
<
NameValueCountPair
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
os
)
{
NameValueCountPair
o
=
new
NameValueCountPair
();
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/attachment/ActionCopyToWorkCompleted.java
浏览文件 @
97c89cdd
package
com.x.processplatform.service.processing.jaxrs.attachment
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.Callable
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
...
@@ -20,10 +24,6 @@ import com.x.processplatform.core.entity.content.Attachment;
import
com.x.processplatform.core.entity.content.WorkCompleted
;
import
com.x.processplatform.service.processing.ThisApplication
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.Callable
;
/**
*
* @author zhour 复制指定的附件到work,仅拷贝内容,并清除其他附带的信息
...
...
@@ -40,7 +40,8 @@ class ActionCopyToWorkCompleted extends BaseAction {
String
executorSeed
=
null
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
WorkCompleted
work
=
emc
.
fetch
(
workCompletedId
,
WorkCompleted
.
class
,
ListTools
.
toList
(
WorkCompleted
.
job_FIELDNAME
));
WorkCompleted
work
=
emc
.
fetch
(
workCompletedId
,
WorkCompleted
.
class
,
ListTools
.
toList
(
WorkCompleted
.
job_FIELDNAME
));
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
workCompletedId
,
WorkCompleted
.
class
);
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/neural/NeuralAnalyzer.java
浏览文件 @
97c89cdd
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.neural;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -143,8 +144,8 @@ public class NeuralAnalyzer {
Root
<
FormField
>
root
=
cq
.
from
(
FormField
.
class
);
Predicate
p
=
root
.
get
(
FormField_
.
form
).
in
(
formIds
);
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
FormField_
.
dataType
),
"number"
));
cq
.
select
(
root
.
get
(
FormField_
.
name
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
FormField_
.
name
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
private
List
<
TaskCompleted
>
listTaskCompleted
(
Business
business
,
String
activity
,
String
person
)
throws
Exception
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录