Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
0f2b395f
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,发现更多精彩内容 >>
提交
0f2b395f
编写于
7月 28, 2022
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、新增内容管理获取用户有权限发布(关联流程的分类)的所有信息栏目信息列表接口;
2、流程发布数据表允许映射数字类型的string字段到Integer、Double等字段
上级
926a9a43
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
267 addition
and
38 deletion
+267
-38
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/AppInfoFactory.java
...va/com/x/cms/assemble/control/factory/AppInfoFactory.java
+40
-14
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/CategoryInfoFactory.java
...m/x/cms/assemble/control/factory/CategoryInfoFactory.java
+74
-21
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionListPublishWithProcess.java
...e/control/jaxrs/appinfo/ActionListPublishWithProcess.java
+80
-0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java
...m/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java
+17
-0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/BaseAction.java
.../com/x/cms/assemble/control/jaxrs/appinfo/BaseAction.java
+7
-1
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSign.java
...va/com/x/processplatform/core/entity/content/DocSign.java
+1
-2
o2server/x_query_service_processing/src/main/java/com/x/query/service/processing/jaxrs/table/BaseAction.java
...om/x/query/service/processing/jaxrs/table/BaseAction.java
+48
-0
未找到文件。
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/AppInfoFactory.java
浏览文件 @
0f2b395f
...
...
@@ -10,6 +10,7 @@ import javax.persistence.criteria.CriteriaQuery;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.project.exception.ExceptionWhen
;
...
...
@@ -23,7 +24,7 @@ import com.x.cms.core.express.tools.CriteriaBuilderTools;
/**
* 应用信息表基础功能服务类
*
*
* @author O2LEE
*/
public
class
AppInfoFactory
extends
AbstractFactory
{
...
...
@@ -31,11 +32,11 @@ public class AppInfoFactory extends AbstractFactory {
public
AppInfoFactory
(
Business
business
)
throws
Exception
{
super
(
business
);
}
public
AppInfo
get
(
String
id
)
throws
Exception
{
return
this
.
entityManagerContainer
().
find
(
id
,
AppInfo
.
class
,
ExceptionWhen
.
none
);
}
public
AppInfo
flag
(
String
flag
)
throws
Exception
{
return
this
.
entityManagerContainer
().
flag
(
flag
,
AppInfo
.
class
);
}
...
...
@@ -52,7 +53,7 @@ public class AppInfoFactory extends AbstractFactory {
}
return
em
.
createQuery
(
cq
).
getResultList
();
}
public
List
<
AppInfo
>
listAll
(
String
appType
,
String
documentType
)
throws
Exception
{
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
AppInfo
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
...
...
@@ -66,11 +67,11 @@ public class AppInfoFactory extends AbstractFactory {
p
=
CriteriaBuilderTools
.
predicate_and
(
cb
,
p
,
cb
.
equal
(
root
.
get
(
AppInfo_
.
appType
),
appType
)
);
}
if
(
StringUtils
.
isNotEmpty
(
appType
)
&&
StringUtils
.
equals
(
"未分类"
,
appType
))
{
p
=
CriteriaBuilderTools
.
predicate_and
(
cb
,
p
,
p
=
CriteriaBuilderTools
.
predicate_and
(
cb
,
p
,
CriteriaBuilderTools
.
predicate_or
(
cb
,
cb
.
isNull
(
root
.
get
(
AppInfo_
.
appType
)),
cb
,
cb
.
isNull
(
root
.
get
(
AppInfo_
.
appType
)),
CriteriaBuilderTools
.
predicate_or
(
cb
,
cb
.
equal
(
root
.
get
(
AppInfo_
.
appType
),
""
),
cb
,
cb
.
equal
(
root
.
get
(
AppInfo_
.
appType
),
""
),
cb
.
equal
(
root
.
get
(
AppInfo_
.
appType
),
"未分类"
)
)
)
...
...
@@ -106,10 +107,35 @@ public class AppInfoFactory extends AbstractFactory {
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
();
}
public
List
<
String
>
listPeoplePublishAppInfoIds
(
String
personName
,
List
<
String
>
unitNames
,
List
<
String
>
groupNames
,
Boolean
isManager
)
throws
Exception
{
if
(
BooleanUtils
.
isTrue
(
isManager
)){
return
listAllIds
(
"全部"
);
}
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
AppInfo
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
AppInfo
>
root
=
cq
.
from
(
AppInfo
.
class
);
cq
.
select
(
root
.
get
(
AppInfo_
.
id
));
Predicate
p
=
cb
.
isTrue
(
root
.
get
(
AppInfo_
.
allPeoplePublish
));
if
(
StringUtils
.
isNotEmpty
(
personName
))
{
p
=
cb
.
or
(
p
,
cb
.
isMember
(
personName
,
root
.
get
(
AppInfo_
.
publishablePersonList
)));
p
=
cb
.
or
(
p
,
cb
.
isMember
(
personName
,
root
.
get
(
AppInfo_
.
manageablePersonList
)));
}
if
(
ListTools
.
isNotEmpty
(
unitNames
)){
p
=
cb
.
or
(
p
,
root
.
get
(
AppInfo_
.
publishableUnitList
).
in
(
unitNames
));
p
=
cb
.
or
(
p
,
root
.
get
(
AppInfo_
.
manageableUnitList
).
in
(
unitNames
));
}
if
(
ListTools
.
isNotEmpty
(
groupNames
)){
p
=
cb
.
or
(
p
,
root
.
get
(
AppInfo_
.
publishableGroupList
).
in
(
groupNames
));
p
=
cb
.
or
(
p
,
root
.
get
(
AppInfo_
.
manageableGroupList
).
in
(
groupNames
));
}
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
/**
* 查询所有未设置可见权限的AppInfo的ID列表( with List copy ) 全员可发布的栏目也包含在内:判断allPeopleView or
* allPeoplePublish
*
*
* @return
* @throws Exception
*/
...
...
@@ -167,7 +193,7 @@ public class AppInfoFactory extends AbstractFactory {
/**
* 查询指定用户可以管理的所有栏目ID列表
*
*
* @param personName
* @param groupNames
* @param unitNames
...
...
@@ -200,7 +226,7 @@ public class AppInfoFactory extends AbstractFactory {
/**
* 根据权限查询用户可以发布文档的栏目ID列表(检测allPeoplePublish )
*
*
* @param personName
* @param unitNames
* @param groupNames
...
...
@@ -271,7 +297,7 @@ public class AppInfoFactory extends AbstractFactory {
/**
* 根据权限查询用户可以发布文档的栏目ID列表(不检测allPeopleView 和 allPeoplePublish )
*
*
* @param personName
* @param unitNames
* @param groupNames
...
...
@@ -340,7 +366,7 @@ public class AppInfoFactory extends AbstractFactory {
/**
* 查询用户有权限访问的所有栏目ID列表(检测allPeopleView 和 allPeoplePublish )
*
*
* @param personName
* @param unitNames
* @param groupNames
...
...
@@ -412,7 +438,7 @@ public class AppInfoFactory extends AbstractFactory {
/**
* 查询用户有权限访问的所有栏目ID列表(不检测allPeopleView)
*
*
* @param personName
* @param unitNames
* @param groupNames
...
...
@@ -541,4 +567,4 @@ public class AppInfoFactory extends AbstractFactory {
cq
.
select
(
root
.
get
(
AppInfo_
.
id
));
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
();
}
}
\ No newline at end of file
}
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/CategoryInfoFactory.java
浏览文件 @
0f2b395f
package
com.x.cms.assemble.control.factory
;
import
java.util.List
;
import
com.x.base.core.project.exception.ExceptionWhen
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.cms.assemble.control.Business
;
import
com.x.cms.core.entity.CategoryInfo
;
import
com.x.cms.core.entity.CategoryInfo_
;
import
com.x.cms.core.express.tools.CriteriaBuilderTools
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.persistence.EntityManager
;
import
javax.persistence.TypedQuery
;
...
...
@@ -8,15 +15,8 @@ import javax.persistence.criteria.CriteriaBuilder;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.project.exception.ExceptionWhen
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.cms.assemble.control.Business
;
import
com.x.cms.core.entity.CategoryInfo
;
import
com.x.cms.core.entity.CategoryInfo_
;
import
com.x.cms.core.express.tools.CriteriaBuilderTools
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 分类信息基础功能服务类
...
...
@@ -63,17 +63,6 @@ public class CategoryInfoFactory extends ElementFactory {
return
em
.
createQuery
(
cq
).
getResultList
();
}
//@MethodDescribe("列示指定Id的CategoryInfo分类信息列表")
// public List<CategoryInfo> list(List<String> ids) throws Exception {
// EntityManager em = this.entityManagerContainer().get( CategoryInfo.class );
// CriteriaBuilder cb = em.getCriteriaBuilder();
// CriteriaQuery<CategoryInfo> cq = cb.createQuery( CategoryInfo.class );
// Root<CategoryInfo> root = cq.from( CategoryInfo.class );
// Predicate p = root.get( CategoryInfo_.id).in(ids);
// return em.createQuery(cq.where(p)).getResultList();
// }
//@MethodDescribe("根据应用ID列示所有的CategoryInfo分类信息列表")
public
List
<
String
>
listByAppId
(
String
appId
)
throws
Exception
{
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
CategoryInfo
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
...
...
@@ -84,6 +73,23 @@ public class CategoryInfoFactory extends ElementFactory {
return
em
.
createQuery
(
cq
.
where
(
p
)
).
setMaxResults
(
1000
).
getResultList
();
}
public
List
<
String
>
listByAppIds
(
List
<
String
>
appIds
,
Boolean
hasProcess
)
throws
Exception
{
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
CategoryInfo
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
CategoryInfo
>
root
=
cq
.
from
(
CategoryInfo
.
class
);
Predicate
p
=
cb
.
conjunction
();
if
(
ListTools
.
isNotEmpty
(
appIds
))
{
p
=
root
.
get
(
CategoryInfo_
.
appId
).
in
(
appIds
);
}
if
(
BooleanUtils
.
isTrue
(
hasProcess
)){
p
=
cb
.
and
(
p
,
cb
.
isNotNull
(
root
.
get
(
CategoryInfo_
.
workflowFlag
)));
p
=
cb
.
and
(
p
,
cb
.
notEqual
(
root
.
get
(
CategoryInfo_
.
workflowFlag
),
""
));
}
cq
.
select
(
root
.
get
(
CategoryInfo_
.
id
));
return
em
.
createQuery
(
cq
.
where
(
p
)
).
getResultList
();
}
/**
* 根据需要过滤的栏目列表和信息类型以及返回最大条目数量列示栏目信息ID列表
* @param appIds
...
...
@@ -213,6 +219,53 @@ public class CategoryInfoFactory extends ElementFactory {
return
em
.
createQuery
(
cq
.
where
(
p
)).
getResultList
();
}
/**
* 查询用户在限定应用内有权限发布的分类
* @param inAppInfoIds
* @param personName
* @param unitNames
* @param groupNames
* @param isManager
* @param hasProcess
* @return
* @throws Exception
*/
public
List
<
String
>
listPeoplePublishCategoryInfoIds
(
List
<
String
>
inAppInfoIds
,
String
personName
,
List
<
String
>
unitNames
,
List
<
String
>
groupNames
,
Boolean
isManager
,
Boolean
hasProcess
)
throws
Exception
{
if
(
BooleanUtils
.
isTrue
(
isManager
)){
return
this
.
listByAppIds
(
inAppInfoIds
,
hasProcess
);
}
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
CategoryInfo
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
CategoryInfo
>
root
=
cq
.
from
(
CategoryInfo
.
class
);
Predicate
p
=
cb
.
conjunction
();
if
(
ListTools
.
isNotEmpty
(
inAppInfoIds
))
{
p
=
root
.
get
(
CategoryInfo_
.
appId
).
in
(
p
);
}
if
(
BooleanUtils
.
isTrue
(
hasProcess
)){
p
=
cb
.
and
(
p
,
cb
.
isNotNull
(
root
.
get
(
CategoryInfo_
.
workflowFlag
)));
p
=
cb
.
and
(
p
,
cb
.
notEqual
(
root
.
get
(
CategoryInfo_
.
workflowFlag
),
""
));
}
Predicate
p_permission
=
cb
.
isTrue
(
root
.
get
(
CategoryInfo_
.
allPeoplePublish
));
if
(
StringUtils
.
isNotEmpty
(
personName
))
{
p_permission
=
cb
.
or
(
p_permission
,
cb
.
isMember
(
personName
,
root
.
get
(
CategoryInfo_
.
manageablePersonList
)));
p_permission
=
cb
.
or
(
p_permission
,
cb
.
isMember
(
personName
,
root
.
get
(
CategoryInfo_
.
publishablePersonList
)));
}
if
(
ListTools
.
isNotEmpty
(
unitNames
))
{
p_permission
=
cb
.
or
(
p_permission
,
root
.
get
(
CategoryInfo_
.
publishableUnitList
).
in
(
unitNames
));
p_permission
=
cb
.
or
(
p_permission
,
root
.
get
(
CategoryInfo_
.
manageableUnitList
).
in
(
unitNames
));
}
if
(
ListTools
.
isNotEmpty
(
groupNames
))
{
p_permission
=
cb
.
or
(
p_permission
,
root
.
get
(
CategoryInfo_
.
publishableGroupList
).
in
(
groupNames
));
p_permission
=
cb
.
or
(
p_permission
,
root
.
get
(
CategoryInfo_
.
manageableGroupList
).
in
(
groupNames
));
}
p
=
cb
.
and
(
p
,
p_permission
);
cq
.
select
(
root
.
get
(
CategoryInfo_
.
id
));
return
em
.
createQuery
(
cq
.
where
(
p
)
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
/**
* 根据权限查询用户可以发布文档的分类ID列表(根据权限, 不检测allPeopleView和allPeoplePublish)
* 可管理的分类也属于可发布的分类
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionListPublishWithProcess.java
0 → 100644
浏览文件 @
0f2b395f
package
com.x.cms.assemble.control.jaxrs.appinfo
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.cache.Cache
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.tools.SortTools
;
import
com.x.cms.assemble.control.Business
;
import
com.x.cms.core.entity.AppInfo
;
import
com.x.cms.core.entity.CategoryInfo
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* 查询当前用可以发布的分类(分类需绑定流程)
* @author sword
*/
public
class
ActionListPublishWithProcess
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionListPublishWithProcess
.
class
);
protected
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
)
throws
Exception
{
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
List
<
Wo
>
wos
=
new
ArrayList
<>();
Boolean
isAnonymous
=
effectivePerson
.
isAnonymous
();
Business
business
=
new
Business
(
null
);
Boolean
isManager
=
isAnonymous
?
false
:
business
.
isManager
(
effectivePerson
);
String
personName
=
effectivePerson
.
getDistinguishedName
();
Cache
.
CacheKey
cacheKey
=
new
Cache
.
CacheKey
(
this
.
getClass
(),
personName
,
isManager
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
result
.
setData
((
List
<
Wo
>)
optional
.
get
());
}
else
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
business
=
new
Business
(
emc
);
List
<
String
>
unitNames
=
null
;
List
<
String
>
groupNames
=
null
;
if
(!
isManager
&&
!
isAnonymous
)
{
unitNames
=
userManagerService
.
listUnitNamesWithPerson
(
personName
);
groupNames
=
userManagerService
.
listGroupNamesByPerson
(
personName
);
}
List
<
String
>
appIds
=
new
ArrayList
<>();
if
(!
isManager
)
{
appIds
=
business
.
getAppInfoFactory
().
listPeoplePublishAppInfoIds
(
personName
,
unitNames
,
groupNames
,
false
);
}
List
<
String
>
categoryIds
=
business
.
getCategoryInfoFactory
().
listPeoplePublishCategoryInfoIds
(
appIds
,
personName
,
unitNames
,
groupNames
,
isManager
,
true
);
if
(
ListTools
.
isNotEmpty
(
categoryIds
)){
List
<
WoCategory
>
categoryList
=
emc
.
fetch
(
categoryIds
,
WoCategory
.
copier2
);
final
Map
<
String
,
List
<
WoCategory
>>
map
=
categoryList
.
stream
().
collect
(
Collectors
.
groupingBy
(
WoCategory:
:
getAppId
));
appIds
=
ListTools
.
extractProperty
(
categoryList
,
CategoryInfo
.
appId_FIELDNAME
,
String
.
class
,
true
,
true
);
wos
=
emc
.
fetch
(
appIds
,
Wo
.
copier2
);
wos
.
stream
().
forEach
(
wo
->
{
try
{
wo
.
setConfig
(
appInfoServiceAdv
.
getConfigJson
(
wo
.
getId
()
)
);
}
catch
(
Exception
e
)
{
logger
.
debug
(
e
.
getMessage
());
}
wo
.
setWrapOutCategoryList
(
map
.
get
(
wo
.
getId
()));
});
SortTools
.
asc
(
wos
,
AppInfo
.
appInfoSeq_FIELDNAME
);
CacheManager
.
put
(
cacheCategory
,
cacheKey
,
wos
);
}
result
.
setData
(
wos
);
}
}
return
result
;
}
}
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java
浏览文件 @
0f2b395f
...
...
@@ -360,6 +360,23 @@ public class AppInfoAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"获取用户有权限发布(关联流程的分类)的所有信息栏目信息列表."
,
action
=
ActionListPublishWithProcess
.
class
)
@GET
@Path
(
"list/user/publish/with/process"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
listPublishWithProcess
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
BaseAction
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
new
ActionListPublishWithProcess
().
execute
(
effectivePerson
);
}
catch
(
Exception
e
)
{
result
.
error
(
e
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"获取用户有权限发布的所有信息栏目信息列表."
,
action
=
ActionListWhatICanPublish_WithAppType
.
class
)
@GET
@Path
(
"list/user/publish/type/{appType}"
)
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/BaseAction.java
浏览文件 @
0f2b395f
...
...
@@ -252,6 +252,9 @@ public class BaseAction extends StandardJaxrsAction {
static
WrapCopier
<
AppInfo
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
AppInfo
.
class
,
Wo
.
class
,
null
,
ListTools
.
toList
(
JpaObject
.
FieldsInvisible
));
static
WrapCopier
<
AppInfo
,
Wo
>
copier2
=
WrapCopierFactory
.
wo
(
AppInfo
.
class
,
Wo
.
class
,
JpaObject
.
singularAttributeField
(
CategoryInfo
.
class
,
true
,
true
),
null
);
}
public
static
class
WoCategory
extends
CategoryInfo
{
...
...
@@ -260,7 +263,10 @@ public class BaseAction extends StandardJaxrsAction {
public
static
List
<
String
>
Excludes
=
new
ArrayList
<
String
>();
static
WrapCopier
<
CategoryInfo
,
WoCategory
>
copier
=
WrapCopierFactory
.
wo
(
CategoryInfo
.
class
,
WoCategory
.
class
,
null
,
ListTools
.
toList
(
JpaObject
.
FieldsInvisible
));
static
WrapCopier
<
CategoryInfo
,
WoCategory
>
copier
=
WrapCopierFactory
.
wo
(
CategoryInfo
.
class
,
WoCategory
.
class
,
null
,
ListTools
.
toList
(
JpaObject
.
FieldsInvisible
));
static
WrapCopier
<
CategoryInfo
,
WoCategory
>
copier2
=
WrapCopierFactory
.
wo
(
CategoryInfo
.
class
,
WoCategory
.
class
,
JpaObject
.
singularAttributeField
(
CategoryInfo
.
class
,
true
,
true
),
null
);
}
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSign.java
浏览文件 @
0f2b395f
...
...
@@ -171,12 +171,11 @@ public class DocSign extends SliceJpaObject {
public
static
final
String
status_FIELDNAME
=
"status"
;
@FieldDescribe
(
"状态:1(暂存)|2(签批正文不可以修改)|3(签批正文可以修改)."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
status_FIELDNAME
)
@Column
(
name
=
ColumnNamePrefix
+
status_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
Integer
status
;
public
static
final
String
commitTime_FIELDNAME
=
"commitTime"
;
@Temporal
(
TemporalType
.
TIME
)
@FieldDescribe
(
"提交时间."
)
@Column
(
name
=
ColumnNamePrefix
+
commitTime_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
commitTime_FIELDNAME
)
...
...
o2server/x_query_service_processing/src/main/java/com/x/query/service/processing/jaxrs/table/BaseAction.java
浏览文件 @
0f2b395f
...
...
@@ -205,6 +205,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
value
=
jsonPrimitive
.
getAsInt
();
}
else
{
try
{
value
=
Integer
.
valueOf
(
jsonPrimitive
.
getAsString
());
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -223,6 +229,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
values
.
add
(
jsonPrimitive
.
getAsInt
());
}
else
{
try
{
values
.
add
(
Integer
.
valueOf
(
jsonPrimitive
.
getAsString
()));
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -241,6 +253,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
value
=
jsonPrimitive
.
getAsLong
();
}
else
{
try
{
value
=
Long
.
valueOf
(
jsonPrimitive
.
getAsString
());
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -259,6 +277,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
values
.
add
(
jsonPrimitive
.
getAsLong
());
}
else
{
try
{
values
.
add
(
Long
.
valueOf
(
jsonPrimitive
.
getAsString
()));
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -277,6 +301,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
value
=
jsonPrimitive
.
getAsFloat
();
}
else
{
try
{
value
=
Float
.
valueOf
(
jsonPrimitive
.
getAsString
());
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -295,6 +325,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
values
.
add
(
jsonPrimitive
.
getAsFloat
());
}
else
{
try
{
values
.
add
(
Float
.
valueOf
(
jsonPrimitive
.
getAsString
()));
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -313,6 +349,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
value
=
jsonPrimitive
.
getAsDouble
();
}
else
{
try
{
value
=
Double
.
valueOf
(
jsonPrimitive
.
getAsString
());
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
@@ -331,6 +373,12 @@ abstract class BaseAction extends StandardJaxrsAction {
JsonPrimitive
jsonPrimitive
=
jsonElement
.
getAsJsonPrimitive
();
if
(
jsonPrimitive
.
isNumber
())
{
values
.
add
(
jsonPrimitive
.
getAsDouble
());
}
else
{
try
{
values
.
add
(
Double
.
valueOf
(
jsonPrimitive
.
getAsString
()));
}
catch
(
NumberFormatException
e
)
{
LOGGER
.
debug
(
e
.
getMessage
());
}
}
}
else
if
(
jsonElement
.
isJsonArray
())
{
JsonArray
os
=
jsonElement
.
getAsJsonArray
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录