Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
此号慢热型
o2oa
提交
194e33c5
o2oa
项目概览
此号慢热型
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
5
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,体验更适合开发者的 AI 搜索 >>
提交
194e33c5
编写于
6月 23, 2020
作者:
L
luojing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
teamwok扩展属性服务
上级
f6d5a5a2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
68 addition
and
2 deletion
+68
-2
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/CustomExtFieldReleFactory.java
...k/assemble/control/factory/CustomExtFieldReleFactory.java
+19
-1
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/CustomExtFieldReleAction.java
...mble/control/jaxrs/extfield/CustomExtFieldReleAction.java
+20
-1
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleQueryService.java
...emble/control/service/CustomExtFieldReleQueryService.java
+17
-0
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleService.java
...k/assemble/control/service/CustomExtFieldReleService.java
+12
-0
未找到文件。
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/CustomExtFieldReleFactory.java
浏览文件 @
194e33c5
...
...
@@ -69,7 +69,7 @@ public class CustomExtFieldReleFactory extends AbstractFactory {
}
/**
* 根据关联ID列示扩展属性
ID
信息列表
* 根据关联ID列示扩展属性信息列表
* @param correlationId
* @return
* @throws Exception
...
...
@@ -86,6 +86,24 @@ public class CustomExtFieldReleFactory extends AbstractFactory {
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
();
}
/**
* 根据扩展属性类型列示扩展属性信息列表
* @param type
* @return
* @throws Exception
*/
public
List
<
CustomExtFieldRele
>
listFieldReleObjByType
(
String
type
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
type
)
){
throw
new
Exception
(
"type can not be empty!"
);
}
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
CustomExtFieldRele
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
CustomExtFieldRele
>
cq
=
cb
.
createQuery
(
CustomExtFieldRele
.
class
);
Root
<
CustomExtFieldRele
>
root
=
cq
.
from
(
CustomExtFieldRele
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
CustomExtFieldRele_
.
type
),
type
);
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
();
}
/**
* 根据关联ID列示扩展属性ID信息列表
* @param correlationId
...
...
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/CustomExtFieldReleAction.java
浏览文件 @
194e33c5
...
...
@@ -94,7 +94,7 @@ public class CustomExtFieldReleAction extends StandardJaxrsAction {
@Path
(
"list/{correlationId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
listFieldsWith
Project
(
@Suspended
final
AsyncResponse
asyncResponse
,
public
void
listFieldsWith
Correlation
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"关联ID"
)
@PathParam
(
"correlationId"
)
String
correlationId
)
{
ActionResult
<
List
<
ActionListWithCorrelation
.
Wo
>>
result
=
new
ActionResult
<>();
...
...
@@ -108,6 +108,25 @@ public class CustomExtFieldReleAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"根据扩展属性类型查询扩展属性信息列表."
,
action
=
ActionListWithType
.
class
)
@GET
@Path
(
"listPublicFields/{type}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
listFieldsWithType
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"扩展属性类型"
)
@PathParam
(
"type"
)
String
type
)
{
ActionResult
<
List
<
ActionListWithType
.
Wo
>>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionListWithType
().
execute
(
request
,
effectivePerson
,
type
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"创建或者更新一个扩展属性关联信息."
,
action
=
ActionSave
.
class
)
@POST
@Path
(
"relevance"
)
...
...
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleQueryService.java
浏览文件 @
194e33c5
...
...
@@ -65,6 +65,23 @@ public class CustomExtFieldReleQueryService {
throw
e
;
}
}
/**
* 根据扩展属性类型查询扩展属性关联信息
* @param type
* @return
* @throws Exception
*/
public
List
<
CustomExtFieldRele
>
listReleWithType
(
String
type
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
type
))
{
return
new
ArrayList
<>();
}
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
return
customExtFieldReleService
.
listReleWithType
(
emc
,
type
);
}
catch
(
Exception
e
)
{
throw
e
;
}
}
public
String
getExtFieldDisplayName
(
String
projectId
,
String
extFieldName
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
projectId
)
){
...
...
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleService.java
浏览文件 @
194e33c5
...
...
@@ -51,6 +51,18 @@ class CustomExtFieldReleService {
}
}
/**
* 根据扩展属性类型查询扩展属性关联信息
* @param emc
* @param type
* @return
* @throws Exception
*/
protected
List
<
CustomExtFieldRele
>
listReleWithType
(
EntityManagerContainer
emc
,
String
type
)
throws
Exception
{
Business
business
=
new
Business
(
emc
);
return
business
.
customExtFieldReleFactory
().
listFieldReleObjByType
(
type
);
}
/**
* 根据扩展属性ID删除项目扩展属性信息
* @param emc
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录