Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
b6ebac17
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,发现更多精彩内容 >>
提交
b6ebac17
编写于
2月 05, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cms发布文档允许上传其他cms文档的附件
上级
6cbd2f16
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
64 addition
and
18 deletion
+64
-18
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
...e/control/jaxrs/document/ActionPersistPublishContent.java
+64
-18
未找到文件。
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
浏览文件 @
b6ebac17
...
...
@@ -201,7 +201,7 @@ public class ActionPersistPublishContent extends BaseAction {
wi
.
setCreatorIdentity
(
userManagerService
.
getMajorIdentityWithPerson
(
wi
.
getCreatorPerson
()
)
);
}
}
if
(
!
StringUtils
.
equals
(
"cipher"
,
wi
.
getCreatorIdentity
()
)
&&
!
StringUtils
.
equals
(
"xadmin"
,
wi
.
getCreatorIdentity
()
))
{
//说明是实际的用户,并不使用cipher和xadmin代替
if
(
StringUtils
.
isNotEmpty
(
wi
.
getCreatorIdentity
()
))
{
...
...
@@ -283,8 +283,44 @@ public class ActionPersistPublishContent extends BaseAction {
}
}
//从CMS其他文档中复制所有的附件到CMS
if
(
check
)
{
try
{
if
(
wi
.
getCms_attachmentIds
()
!=
null
&&
wi
.
getCms_attachmentIds
().
length
>
0
)
{
FileInfo
fileInfo
=
null
;
FileInfo
copyFileInfo
=
null
;
StorageMapping
mapping_attachment
=
null
;
StorageMapping
mapping_fileInfo
=
null
;
byte
[]
attachment_content
=
null
;
for
(
String
attachmentId
:
wi
.
getCms_attachmentIds
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
document
=
emc
.
find
(
document
.
getId
(),
Document
.
class
,
ExceptionWhen
.
not_found
);
copyFileInfo
=
emc
.
find
(
attachmentId
,
FileInfo
.
class
,
ExceptionWhen
.
not_found
);
if
(
copyFileInfo
!=
null
)
{
emc
.
beginTransaction
(
FileInfo
.
class
);
emc
.
beginTransaction
(
Document
.
class
);
mapping_attachment
=
ThisApplication
.
context
().
storageMappings
().
get
(
FileInfo
.
class
,
copyFileInfo
.
getStorage
());
attachment_content
=
copyFileInfo
.
readContent
(
mapping_attachment
);
mapping_fileInfo
=
ThisApplication
.
context
().
storageMappings
().
random
(
FileInfo
.
class
);
fileInfo
=
concreteFileInfo
(
effectivePerson
.
getDistinguishedName
(),
document
,
mapping_fileInfo
,
copyFileInfo
.
getName
(),
copyFileInfo
.
getSite
());
fileInfo
.
saveContent
(
mapping_fileInfo
,
attachment_content
,
copyFileInfo
.
getName
());
fileInfo
.
setName
(
copyFileInfo
.
getName
());
emc
.
check
(
document
,
CheckPersistType
.
all
);
emc
.
persist
(
fileInfo
,
CheckPersistType
.
all
);
emc
.
commit
();
}
}
catch
(
Throwable
th
)
{
th
.
printStackTrace
();
result
.
error
(
th
);
}
}
}
}
if
(
check
)
{
try
{
Wo
wo
=
new
Wo
();
wo
.
setId
(
document
.
getId
()
);
result
.
setData
(
wo
);
...
...
@@ -397,7 +433,7 @@ public class ActionPersistPublishContent extends BaseAction {
if
(
categoryInfo
.
getSendNotify
()
==
null
)
{
if
(
StringUtils
.
equals
(
"信息"
,
categoryInfo
.
getDocumentType
())
)
{
notify
=
true
;
}
}
}
else
{
if
(
categoryInfo
.
getSendNotify
()
)
{
notify
=
true
;
...
...
@@ -454,40 +490,43 @@ public class ActionPersistPublishContent extends BaseAction {
}
public
static
class
Wi
{
public
static
WrapCopier
<
Wi
,
Document
>
copier
=
WrapCopierFactory
.
wi
(
Wi
.
class
,
Document
.
class
,
null
,
null
);
private
String
id
=
null
;
@FieldDescribe
(
"文档操作者身份"
)
private
String
identity
=
null
;
// @FieldDescribe( "数据的路径列表." )
// private String[] dataPaths = null;
@FieldDescribe
(
"启动流程的JobId."
)
private
String
wf_jobId
=
null
;
@FieldDescribe
(
"启动流程的WorkId."
)
private
String
wf_workId
=
null
;
@FieldDescribe
(
"启动流程的附件列表."
)
private
String
[]
wf_attachmentIds
=
null
;
private
String
[]
wf_attachmentIds
=
null
;
@FieldDescribe
(
"内容管理其他文档的附件列表,非必填"
)
private
String
[]
cms_attachmentIds
=
null
;
@FieldDescribe
(
"文档数据JSON对象."
)
private
Map
<?,
?>
docData
=
null
;
@FieldDescribe
(
"文档读者,Json数组,权限对象需要包含四个属性:<br/>permission权限类别:读者|阅读|作者|管理, <br/>permissionObjectType使用者类别:所有人|组织|人员|群组, <br/>permissionObjectCode使用者编码:所有人|组织编码|人员UID|群组编码, <br/>permissionObjectName使用者名称:所有人|组织名称|人员名称|群组名称"
)
private
List
<
PermissionInfo
>
readerList
=
null
;
@FieldDescribe
(
"文档编辑者, ,Json数组,权限对象需要包含四个属性:<br/>permission权限类别:读者|阅读|作者|管理, <br/>permissionObjectType使用者类别:所有人|组织|人员|群组, <br/>permissionObjectCode使用者编码:所有人|组织编码|人员UID|群组编码, <br/>permissionObjectName使用者名称:所有人|组织名称|人员名称|群组名称"
)
private
List
<
PermissionInfo
>
authorList
=
null
;
private
List
<
String
>
cloudPictures
=
null
;
@FieldDescribe
(
"不修改权限(跳过权限设置,保留原来的设置), True|False."
)
private
Boolean
skipPermission
=
false
;
@FieldDescribe
(
"文档摘要,70字以内"
)
private
String
summary
;
...
...
@@ -538,7 +577,7 @@ public class ActionPersistPublishContent extends BaseAction {
private
Long
commendCount
=
0L
;
private
Long
commentCount
=
0L
;
private
Date
publishTime
;
private
Date
modifyTime
;
...
...
@@ -1033,9 +1072,16 @@ public class ActionPersistPublishContent extends BaseAction {
this
.
authorList
=
authorList
;
}
public
String
[]
getCms_attachmentIds
()
{
return
cms_attachmentIds
;
}
public
void
setCms_attachmentIds
(
String
[]
cms_attachmentIds
)
{
this
.
cms_attachmentIds
=
cms_attachmentIds
;
}
}
public
static
class
Wo
extends
WoId
{
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录