Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
53df3288
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,发现更多精彩内容 >>
提交
53df3288
编写于
4月 28, 2021
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加待办已办Anonymous接口
上级
23c6ad6e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
178 addition
and
163 deletion
+178
-163
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ActionApplication.java
...essplatform/assemble/surface/jaxrs/ActionApplication.java
+2
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/AnonymousJaxrsFilter.java
...platform/assemble/surface/jaxrs/AnonymousJaxrsFilter.java
+10
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionReadCountWithPerson.java
...le/surface/jaxrs/anonymous/ActionReadCountWithPerson.java
+46
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java
...le/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java
+46
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/AnonymousAction.java
...orm/assemble/surface/jaxrs/anonymous/AnonymousAction.java
+67
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/BaseAction.java
...platform/assemble/surface/jaxrs/anonymous/BaseAction.java
+7
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/BaseAction.java
...ocessplatform/assemble/surface/jaxrs/task/BaseAction.java
+0
-163
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ActionApplication.java
浏览文件 @
53df3288
...
...
@@ -5,6 +5,7 @@ import java.util.Set;
import
javax.ws.rs.ApplicationPath
;
import
com.x.base.core.project.jaxrs.AbstractActionApplication
;
import
com.x.processplatform.assemble.surface.jaxrs.anonymous.AnonymousAction
;
import
com.x.processplatform.assemble.surface.jaxrs.application.ApplicationAction
;
import
com.x.processplatform.assemble.surface.jaxrs.applicationdict.ApplicationDictAction
;
import
com.x.processplatform.assemble.surface.jaxrs.attachment.AttachmentAction
;
...
...
@@ -63,6 +64,7 @@ public class ActionApplication extends AbstractActionApplication {
classes
.
add
(
ServiceAction
.
class
);
classes
.
add
(
DraftAction
.
class
);
classes
.
add
(
SnapAction
.
class
);
classes
.
add
(
AnonymousAction
.
class
);
return
classes
;
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/AnonymousJaxrsFilter.java
0 → 100644
浏览文件 @
53df3288
package
com.x.processplatform.assemble.surface.jaxrs
;
import
javax.servlet.annotation.WebFilter
;
import
com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter
;
@WebFilter
(
urlPatterns
=
"/jaxrs/anonymous/*"
,
asyncSupported
=
true
)
public
class
AnonymousJaxrsFilter
extends
AnonymousCipherManagerUserJaxrsFilter
{
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionReadCountWithPerson.java
0 → 100644
浏览文件 @
53df3288
package
com.x.processplatform.assemble.surface.jaxrs.anonymous
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.processplatform.assemble.surface.Business
;
class
ActionReadCountWithPerson
extends
BaseAction
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
credential
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Wo
wrap
=
new
Wo
();
Business
business
=
new
Business
(
emc
);
String
person
=
business
.
organization
().
person
().
get
(
credential
);
if
(
StringUtils
.
isNotEmpty
(
person
))
{
Long
count
=
business
.
read
().
countWithPerson
(
person
);
wrap
.
setCount
(
count
);
}
result
.
setData
(
wrap
);
return
result
;
}
}
public
static
class
Wo
extends
GsonPropertyObject
{
private
static
final
long
serialVersionUID
=
-
6282434800524535886L
;
@FieldDescribe
(
"待阅数量"
)
private
Long
count
=
0L
;
public
Long
getCount
()
{
return
count
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java
0 → 100644
浏览文件 @
53df3288
package
com.x.processplatform.assemble.surface.jaxrs.anonymous
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.processplatform.assemble.surface.Business
;
class
ActionTaskCountWithPerson
extends
BaseAction
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
credential
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Wo
wo
=
new
Wo
();
Business
business
=
new
Business
(
emc
);
String
person
=
business
.
organization
().
person
().
get
(
credential
);
if
(
StringUtils
.
isNotEmpty
(
person
))
{
Long
count
=
business
.
task
().
countWithPerson
(
person
);
wo
.
setCount
(
count
);
}
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
GsonPropertyObject
{
private
static
final
long
serialVersionUID
=
8792811593252273112L
;
@FieldDescribe
(
"待办数量"
)
private
Long
count
=
0L
;
public
Long
getCount
()
{
return
count
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/AnonymousAction.java
0 → 100644
浏览文件 @
53df3288
package
com.x.processplatform.assemble.surface.jaxrs.anonymous
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.PathParam
;
import
javax.ws.rs.Produces
;
import
javax.ws.rs.container.AsyncResponse
;
import
javax.ws.rs.container.Suspended
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.MediaType
;
import
com.x.base.core.project.annotation.JaxrsDescribe
;
import
com.x.base.core.project.annotation.JaxrsMethodDescribe
;
import
com.x.base.core.project.annotation.JaxrsParameterDescribe
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.HttpMediaType
;
import
com.x.base.core.project.jaxrs.ResponseFactory
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
@Path
(
"anonymous"
)
@JaxrsDescribe
(
"匿名访问"
)
public
class
AnonymousAction
extends
StandardJaxrsAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
AnonymousAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"获取指定人员的待办数量,没有权限限制."
,
action
=
ActionTaskCountWithPerson
.
class
)
@GET
@Path
(
"task/count/{credential}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
taskCountWithPerson
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"个人标识"
)
@PathParam
(
"credential"
)
String
credential
)
{
ActionResult
<
ActionTaskCountWithPerson
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionTaskCountWithPerson
().
execute
(
effectivePerson
,
credential
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"获取指定人员的待阅数量,没有权限限制."
,
action
=
ActionReadCountWithPerson
.
class
)
@GET
@Path
(
"read/count/{credential}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
readCountWithPerson
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"个人标识"
)
@PathParam
(
"credential"
)
String
credential
)
{
ActionResult
<
ActionReadCountWithPerson
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionReadCountWithPerson
().
execute
(
effectivePerson
,
credential
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/BaseAction.java
0 → 100644
浏览文件 @
53df3288
package
com.x.processplatform.assemble.surface.jaxrs.anonymous
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
abstract
class
BaseAction
extends
StandardJaxrsAction
{
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/BaseAction.java
浏览文件 @
53df3288
...
...
@@ -4,167 +4,4 @@ import com.x.base.core.project.jaxrs.StandardJaxrsAction;
abstract
class
BaseAction
extends
StandardJaxrsAction
{
// public static abstract class FilterWi extends GsonPropertyObject {
//
// @FieldDescribe("应用")
// private List<String> applicationList;
//
// @FieldDescribe("流程")
// private List<String> processList;
//
// @FieldDescribe("开始时间yyyy-MM-dd HH:mm:ss")
// private String startTime;
//
// @FieldDescribe("结束时间yyyy-MM-dd HH:mm:ss")
// private String endTime;
//
// @FieldDescribe("创建用户")
// private List<String> creatorPersonList;
//
// @FieldDescribe("创建组织")
// private List<String> creatorUnitList;
//
// @FieldDescribe("开始时间")
// private List<String> startTimeMonthList;
//
// @FieldDescribe("结束时间")
// private List<String> completedTimeMonthList;
//
// @FieldDescribe("是否已经结束")
// private Boolean completed;
//
// public Boolean getCompleted() {
// return completed;
// }
//
// public void setCompleted(Boolean completed) {
// this.completed = completed;
// }
//
// @FieldDescribe("关键字")
// private String key;
//
// public List<String> getApplicationList() {
// return applicationList;
// }
//
// public void setApplicationList(List<String> applicationList) {
// this.applicationList = applicationList;
// }
//
// public List<String> getProcessList() {
// return processList;
// }
//
// public void setProcessList(List<String> processList) {
// this.processList = processList;
// }
//
// public List<String> getStartTimeMonthList() {
// return startTimeMonthList;
// }
//
// public void setStartTimeMonthList(List<String> startTimeMonthList) {
// this.startTimeMonthList = startTimeMonthList;
// }
//
// public String getKey() {
// return key;
// }
//
// public void setKey(String key) {
// this.key = key;
// }
//
// public List<String> getCreatorUnitList() {
// return creatorUnitList;
// }
//
// public void setCreatorUnitList(List<String> creatorUnitList) {
// this.creatorUnitList = creatorUnitList;
// }
//
// public String getStartTime() {
// return startTime;
// }
//
// public void setStartTime(String startTime) {
// this.startTime = startTime;
// }
//
// public String getEndTime() {
// return endTime;
// }
//
// public void setEndTime(String endTime) {
// this.endTime = endTime;
// }
//
// public List<String> getCreatorPersonList() {
// return creatorPersonList;
// }
//
// public void setCreatorPersonList(List<String> creatorPersonList) {
// this.creatorPersonList = creatorPersonList;
// }
//
// public List<String> getCompletedTimeMonthList() {
// return completedTimeMonthList;
// }
//
// public void setCompletedTimeMonthList(List<String> completedTimeMonthList) {
// this.completedTimeMonthList = completedTimeMonthList;
// }
// }
//
// Predicate toFilterPredicate(EffectivePerson effectivePerson, Business business, FilterWi wi) throws Exception {
// EntityManager em = business.entityManagerContainer().get(Review.class);
// CriteriaBuilder cb = em.getCriteriaBuilder();
// CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);
// Root<Review> root = cq.from(Review.class);
// Predicate p = cb.equal(root.get(Review_.person), effectivePerson.getDistinguishedName());
// if (ListTools.isNotEmpty(wi.getApplicationList())) {
// p = cb.and(p, root.get(Review_.application).in(wi.getApplicationList()));
// }
// if (ListTools.isNotEmpty(wi.getProcessList())) {
// p = cb.and(p, root.get(Review_.process).in(wi.getProcessList()));
// }
// if (DateTools.isDateTimeOrDate(wi.getStartTime())) {
// p = cb.and(p, cb.greaterThan(root.get(Review_.startTime), DateTools.parse(wi.getStartTime())));
// }
// if (DateTools.isDateTimeOrDate(wi.getEndTime())) {
// p = cb.and(p, cb.lessThan(root.get(Review_.startTime), DateTools.parse(wi.getEndTime())));
// }
// if (ListTools.isNotEmpty(wi.getProcessList())) {
// List<String> person_ids = business.organization().person().list(wi.getCreatorPersonList());
// p = cb.and(p, root.get(Review_.creatorPerson).in(person_ids));
// }
// if (ListTools.isNotEmpty(wi.getCreatorUnitList())) {
// List<String> unit_ids = business.organization().unit().list(wi.getCreatorUnitList());
// p = cb.and(p, root.get(Review_.creatorUnit).in(unit_ids));
// }
// if (ListTools.isNotEmpty(wi.getStartTimeMonthList())) {
// p = cb.and(p, root.get(Review_.startTimeMonth).in(wi.getStartTimeMonthList()));
// }
// if (ListTools.isNotEmpty(wi.getCompletedTimeMonthList())) {
// p = cb.and(p, root.get(Review_.completedTimeMonth).in(wi.getCompletedTimeMonthList()));
// }
// if (null != wi.getCompleted()) {
// if (BooleanUtils.isTrue(wi.getCompleted())) {
// p = cb.and(p, cb.equal(root.get(Review_.completed), true));
// } else {
// p = cb.and(p,
// cb.or(cb.isNull(root.get(Review_.completed)), cb.equal(root.get(Review_.completed), false)));
// }
// }
// String key = StringTools.escapeSqlLikeKey(wi.getKey());
// if (StringUtils.isNotEmpty(key)) {
// key = "%" + key + "%";
// p = cb.and(p, cb.or(cb.like(root.get(Review_.title), key), cb.like(root.get(Review_.serial), key),
// cb.like(root.get(Review_.creatorPerson), key), cb.like(root.get(Review_.creatorUnit), key)));
// }
// return p;
// }
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录