Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
bbba6d78
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,发现更多精彩内容 >>
提交
bbba6d78
编写于
2月 03, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复已归档的工作不能修改排序号和site
上级
d5389eb5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
21 deletion
+7
-21
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeOrderNumber.java
...ble/surface/jaxrs/attachment/ActionChangeOrderNumber.java
+3
-12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeSite.java
...m/assemble/surface/jaxrs/attachment/ActionChangeSite.java
+4
-9
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeOrderNumber.java
浏览文件 @
bbba6d78
package
com.x.processplatform.assemble.surface.jaxrs.attachment
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
...
@@ -15,9 +14,6 @@ import com.x.base.core.project.logger.LoggerFactory;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.WorkControl
;
import
com.x.processplatform.core.entity.content.Attachment
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.element.Application
;
import
com.x.processplatform.core.entity.element.Process
;
import
java.util.List
;
...
...
@@ -30,18 +26,13 @@ class ActionChangeOrderNumber extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
Work
work
=
emc
.
find
(
workId
,
Work
.
class
);
/* 判断work是否存在 */
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
workId
,
Work
.
class
);
}
Attachment
attachment
=
emc
.
find
(
id
,
Attachment
.
class
);
if
(
null
==
attachment
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Attachment
.
class
);
}
WoControl
control
=
business
.
getControl
(
effectivePerson
,
work
,
WoControl
.
class
);
if
(
BooleanUtils
.
isNotTrue
(
control
.
getAllowSave
(
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
,
work
);
if
(!
business
.
readableWithWorkOrWorkCompleted
(
effectivePerson
,
workId
,
new
ExceptionEntityNotExist
(
workId
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
List
<
String
>
identities
=
business
.
organization
().
identity
().
listWithPerson
(
effectivePerson
);
List
<
String
>
units
=
business
.
organization
().
unit
().
listWithPerson
(
effectivePerson
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeSite.java
浏览文件 @
bbba6d78
...
...
@@ -21,21 +21,16 @@ class ActionChangeSite extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
/* 后面要重新保存 */
Work
work
=
emc
.
find
(
workId
,
Work
.
class
);
/** 判断work是否存在 */
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
workId
,
Work
.
class
);
}
Attachment
attachment
=
emc
.
find
(
id
,
Attachment
.
class
);
if
(
null
==
attachment
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Attachment
.
class
);
}
WoControl
control
=
business
.
getControl
(
effectivePerson
,
work
,
WoControl
.
class
);
if
(
BooleanUtils
.
isNotTrue
(
control
.
getAllowSave
(
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
,
work
);
if
(!
business
.
readableWithWorkOrWorkCompleted
(
effectivePerson
,
workId
,
new
ExceptionEntityNotExist
(
workId
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
List
<
String
>
identities
=
business
.
organization
().
identity
().
listWithPerson
(
effectivePerson
);
List
<
String
>
units
=
business
.
organization
().
unit
().
listWithPerson
(
effectivePerson
);
boolean
canEdit
=
this
.
edit
(
attachment
,
effectivePerson
,
identities
,
units
,
business
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录