Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
6a50aba2
o2oa
项目概览
weixin_42566577
/
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,发现更多精彩内容 >>
提交
6a50aba2
编写于
6月 17, 2020
作者:
L
luojing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
teamwork扩展字段服务
上级
f6efe937
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
39 addition
and
7 deletion
+39
-7
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/CustomExtFieldReleFactory.java
...k/assemble/control/factory/CustomExtFieldReleFactory.java
+15
-0
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/ActionSave.java
.../teamwork/assemble/control/jaxrs/extfield/ActionSave.java
+16
-3
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleQueryService.java
...emble/control/service/CustomExtFieldReleQueryService.java
+2
-2
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleService.java
...k/assemble/control/service/CustomExtFieldReleService.java
+5
-1
o2server/x_teamwork_core_entity/src/main/java/com/x/teamwork/core/entity/Review.java
...tity/src/main/java/com/x/teamwork/core/entity/Review.java
+1
-1
未找到文件。
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/CustomExtFieldReleFactory.java
浏览文件 @
6a50aba2
...
...
@@ -53,6 +53,21 @@ public class CustomExtFieldReleFactory extends AbstractFactory {
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
();
}
/**
* 列示所有扩展属性信息列表
* @return
* @throws Exception
*/
public
List
<
CustomExtFieldRele
>
listAllFieldReleObj
()
throws
Exception
{
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
);
cq
.
orderBy
(
cb
.
asc
(
root
.
get
(
CustomExtFieldRele_
.
order
)
)
);
return
em
.
createQuery
(
cq
).
getResultList
();
}
/**
* 根据关联ID列示扩展属性ID信息列表
* @param correlationId
...
...
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/ActionSave.java
浏览文件 @
6a50aba2
...
...
@@ -118,13 +118,15 @@ public class ActionSave extends BaseAction {
if
(
StringUtils
.
isEmpty
(
fieldName
))
{
//备用属性已经用完了,无法再添加新的属性
check
=
false
;
Exception
exception
=
new
CustomExtFieldRelePersistException
(
"扩展属性不足(备用属性已用完),系统无法为该对象分配["
+
customExtFieldRele
.
getDisplayType
()
+
"]。"
);
result
.
error
(
exception
);
wo
.
setUseable
(
false
);
/*Exception exception = new CustomExtFieldRelePersistException( "扩展属性不足(备用属性已用完),系统无法为该对象分配["+ customExtFieldRele.getDisplayType() +"]。" );
result.error(exception);*/
}
else
{
customExtFieldRele
.
setExtFieldName
(
fieldName
);
}
}
if
(
Boolean
.
TRUE
.
equals
(
check
)
){
try
{
...
...
@@ -247,6 +249,17 @@ public class ActionSave extends BaseAction {
@FieldDescribe
(
"操作引起的动态内容"
)
List
<
WoDynamic
>
dynamics
=
new
ArrayList
<>();
@FieldDescribe
(
"备用属性是否可用"
)
Boolean
useable
=
true
;
public
Boolean
getUseable
(){
return
useable
;
}
public
void
setUseable
(
Boolean
useable
){
this
.
useable
=
useable
;
}
public
List
<
WoDynamic
>
getDynamics
()
{
return
dynamics
;
}
...
...
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleQueryService.java
浏览文件 @
6a50aba2
...
...
@@ -56,9 +56,9 @@ public class CustomExtFieldReleQueryService {
* @throws Exception
*/
public
List
<
CustomExtFieldRele
>
listReleWithCorrelation
(
String
correlationId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
correlationId
))
{
/*
if (StringUtils.isEmpty(correlationId)) {
return new ArrayList<>();
}
}
*/
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
return
customExtFieldReleService
.
listReleWithCorrelation
(
emc
,
correlationId
);
}
catch
(
Exception
e
)
{
...
...
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/service/CustomExtFieldReleService.java
浏览文件 @
6a50aba2
...
...
@@ -44,8 +44,12 @@ class CustomExtFieldReleService {
*/
protected
List
<
CustomExtFieldRele
>
listReleWithCorrelation
(
EntityManagerContainer
emc
,
String
correlationId
)
throws
Exception
{
Business
business
=
new
Business
(
emc
);
if
(
StringUtils
.
isEmpty
(
correlationId
)){
return
business
.
customExtFieldReleFactory
().
listAllFieldReleObj
();
}
else
{
return
business
.
customExtFieldReleFactory
().
listFieldReleObjByCorrelation
(
correlationId
);
}
}
/**
* 根据扩展属性ID删除项目扩展属性信息
...
...
o2server/x_teamwork_core_entity/src/main/java/com/x/teamwork/core/entity/Review.java
浏览文件 @
6a50aba2
...
...
@@ -126,7 +126,7 @@ public class Review extends SliceJpaObject {
public
static
final
String
priority_FIELDNAME
=
"priority"
;
@FieldDescribe
(
"工作等级:普通、紧急、特急"
)
@Column
(
length
=
JpaObject
.
length_
32
B
,
name
=
ColumnNamePrefix
+
priority_FIELDNAME
)
@Column
(
length
=
JpaObject
.
length_
255
B
,
name
=
ColumnNamePrefix
+
priority_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
priority_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
priority
=
"普通"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录