Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
77553fa2
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
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,发现更多精彩内容 >>
提交
77553fa2
编写于
3月 08, 2022
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
流程正文签批接口
上级
e1d590ce
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
785 addition
and
237 deletion
+785
-237
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_surface.java
...base/core/project/x_processplatform_assemble_surface.java
+3
-2
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_service_processing.java
...se/core/project/x_processplatform_service_processing.java
+1
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ActionApplication.java
...essplatform/assemble/surface/jaxrs/ActionApplication.java
+2
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/SignJaxrsFilter.java
...ocessplatform/assemble/surface/jaxrs/SignJaxrsFilter.java
+10
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionDelete.java
...essplatform/assemble/surface/jaxrs/sign/ActionDelete.java
+66
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionDeleteByTask.java
...tform/assemble/surface/jaxrs/sign/ActionDeleteByTask.java
+65
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionDownload.java
...splatform/assemble/surface/jaxrs/sign/ActionDownload.java
+53
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionGet.java
...rocessplatform/assemble/surface/jaxrs/sign/ActionGet.java
+46
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionGetByTask.java
...platform/assemble/surface/jaxrs/sign/ActionGetByTask.java
+49
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionListWithJob.java
...atform/assemble/surface/jaxrs/sign/ActionListWithJob.java
+107
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionSave.java
...ocessplatform/assemble/surface/jaxrs/sign/ActionSave.java
+219
-180
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/SignAction.java
...ocessplatform/assemble/surface/jaxrs/sign/SignAction.java
+87
-20
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
+8
-11
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignScrawl.java
.../x/processplatform/core/entity/content/DocSignScrawl.java
+37
-24
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignStatus.java
.../x/processplatform/core/entity/content/DocSignStatus.java
+32
-0
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_surface.java
浏览文件 @
77553fa2
...
@@ -13,7 +13,8 @@ import com.x.base.core.project.annotation.ModuleType;
...
@@ -13,7 +13,8 @@ import com.x.base.core.project.annotation.ModuleType;
"com.x.processplatform.core.entity.content.Task"
,
"com.x.processplatform.core.entity.content.TaskCompleted"
,
"com.x.processplatform.core.entity.content.Task"
,
"com.x.processplatform.core.entity.content.TaskCompleted"
,
"com.x.processplatform.core.entity.content.Work"
,
"com.x.processplatform.core.entity.content.WorkCompleted"
,
"com.x.processplatform.core.entity.content.Work"
,
"com.x.processplatform.core.entity.content.WorkCompleted"
,
"com.x.processplatform.core.entity.content.WorkLog"
,
"com.x.processplatform.core.entity.content.Record"
,
"com.x.processplatform.core.entity.content.WorkLog"
,
"com.x.processplatform.core.entity.content.Record"
,
"com.x.processplatform.core.entity.content.KeyLock"
,
"com.x.processplatform.core.entity.content.KeyLock"
,
"com.x.processplatform.core.entity.content.DocSign"
,
"com.x.processplatform.core.entity.content.DocSignScrawl"
,
"com.x.processplatform.core.entity.content.DocumentVersion"
,
"com.x.processplatform.core.entity.element.Agent"
,
"com.x.processplatform.core.entity.content.DocumentVersion"
,
"com.x.processplatform.core.entity.element.Agent"
,
"com.x.processplatform.core.entity.element.Application"
,
"com.x.processplatform.core.entity.element.Application"
,
"com.x.processplatform.core.entity.element.ApplicationDict"
,
"com.x.processplatform.core.entity.element.ApplicationDict"
,
...
@@ -30,7 +31,7 @@ import com.x.base.core.project.annotation.ModuleType;
...
@@ -30,7 +31,7 @@ import com.x.base.core.project.annotation.ModuleType;
"com.x.processplatform.core.entity.element.QueryView"
,
"com.x.processplatform.core.entity.element.QueryStat"
,
"com.x.processplatform.core.entity.element.QueryView"
,
"com.x.processplatform.core.entity.element.QueryStat"
,
"com.x.processplatform.core.entity.element.Mapping"
,
"com.x.query.core.entity.Item"
,
"com.x.processplatform.core.entity.element.Mapping"
,
"com.x.query.core.entity.Item"
,
"com.x.cms.core.entity.element.Script"
,
"com.x.portal.core.entity.Script"
,
"com.x.cms.core.entity.element.Script"
,
"com.x.portal.core.entity.Script"
,
"com.x.general.core.entity.GeneralFile"
},
storageTypes
=
{
StorageType
.
processPlatform
,
"com.x.general.core.entity.GeneralFile"
},
storageTypes
=
{
StorageType
.
processPlatform
,
StorageType
.
general
},
storeJars
=
{
"x_organization_core_entity"
,
"x_organization_core_express"
,
StorageType
.
general
},
storeJars
=
{
"x_organization_core_entity"
,
"x_organization_core_express"
,
"x_processplatform_core_entity"
,
"x_processplatform_core_express"
,
"x_query_core_entity"
,
"x_processplatform_core_entity"
,
"x_processplatform_core_express"
,
"x_query_core_entity"
,
"x_cms_core_entity"
,
"x_portal_core_entity"
,
"x_general_core_entity"
})
"x_cms_core_entity"
,
"x_portal_core_entity"
,
"x_general_core_entity"
})
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_service_processing.java
浏览文件 @
77553fa2
...
@@ -15,6 +15,7 @@ import com.x.base.core.project.annotation.ModuleType;
...
@@ -15,6 +15,7 @@ import com.x.base.core.project.annotation.ModuleType;
"com.x.processplatform.core.entity.content.Task"
,
"com.x.processplatform.core.entity.content.Work"
,
"com.x.processplatform.core.entity.content.Task"
,
"com.x.processplatform.core.entity.content.Work"
,
"com.x.processplatform.core.entity.content.Read"
,
"com.x.processplatform.core.entity.content.DocumentVersion"
,
"com.x.processplatform.core.entity.content.Read"
,
"com.x.processplatform.core.entity.content.DocumentVersion"
,
"com.x.processplatform.core.entity.content.SerialNumber"
,
"com.x.processplatform.core.entity.element.End"
,
"com.x.processplatform.core.entity.content.SerialNumber"
,
"com.x.processplatform.core.entity.element.End"
,
"com.x.processplatform.core.entity.content.DocSign"
,
"com.x.processplatform.core.entity.content.DocSignScrawl"
,
"com.x.processplatform.core.entity.element.Application"
,
"com.x.processplatform.core.entity.element.Application"
,
"com.x.processplatform.core.entity.element.ApplicationDict"
,
"com.x.processplatform.core.entity.element.ApplicationDict"
,
"com.x.processplatform.core.entity.element.ApplicationDictItem"
,
"com.x.processplatform.core.entity.element.ApplicationDictItem"
,
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ActionApplication.java
浏览文件 @
77553fa2
...
@@ -27,6 +27,7 @@ import com.x.processplatform.assemble.surface.jaxrs.route.RouteAction;
...
@@ -27,6 +27,7 @@ import com.x.processplatform.assemble.surface.jaxrs.route.RouteAction;
import
com.x.processplatform.assemble.surface.jaxrs.script.ScriptAction
;
import
com.x.processplatform.assemble.surface.jaxrs.script.ScriptAction
;
import
com.x.processplatform.assemble.surface.jaxrs.serialnumber.SerialNumberAction
;
import
com.x.processplatform.assemble.surface.jaxrs.serialnumber.SerialNumberAction
;
import
com.x.processplatform.assemble.surface.jaxrs.service.ServiceAction
;
import
com.x.processplatform.assemble.surface.jaxrs.service.ServiceAction
;
import
com.x.processplatform.assemble.surface.jaxrs.sign.SignAction
;
import
com.x.processplatform.assemble.surface.jaxrs.snap.SnapAction
;
import
com.x.processplatform.assemble.surface.jaxrs.snap.SnapAction
;
import
com.x.processplatform.assemble.surface.jaxrs.task.TaskAction
;
import
com.x.processplatform.assemble.surface.jaxrs.task.TaskAction
;
import
com.x.processplatform.assemble.surface.jaxrs.taskcompleted.TaskCompletedAction
;
import
com.x.processplatform.assemble.surface.jaxrs.taskcompleted.TaskCompletedAction
;
...
@@ -67,6 +68,7 @@ public class ActionApplication extends AbstractActionApplication {
...
@@ -67,6 +68,7 @@ public class ActionApplication extends AbstractActionApplication {
classes
.
add
(
DraftAction
.
class
);
classes
.
add
(
DraftAction
.
class
);
classes
.
add
(
SnapAction
.
class
);
classes
.
add
(
SnapAction
.
class
);
classes
.
add
(
AnonymousAction
.
class
);
classes
.
add
(
AnonymousAction
.
class
);
classes
.
add
(
SignAction
.
class
);
return
classes
;
return
classes
;
}
}
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/SignJaxrsFilter.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs
;
import
com.x.base.core.project.jaxrs.CipherManagerUserJaxrsFilter
;
import
javax.servlet.annotation.WebFilter
;
@WebFilter
(
urlPatterns
=
"/jaxrs/sign/*"
,
asyncSupported
=
true
)
public
class
SignJaxrsFilter
extends
CipherManagerUserJaxrsFilter
{
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionDelete.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.annotation.ActionLogger
;
import
com.x.base.core.project.config.StorageMapping
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
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.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.core.entity.content.DocSign
;
import
com.x.processplatform.core.entity.content.DocSignScrawl
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.List
;
class
ActionDelete
extends
BaseAction
{
@ActionLogger
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionDelete
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
logger
.
debug
(
effectivePerson
.
getDistinguishedName
());
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
DocSign
docSign
=
emc
.
find
(
id
,
DocSign
.
class
);
if
(
null
==
docSign
)
{
throw
new
ExceptionEntityNotExist
(
id
,
DocSign
.
class
);
}
if
(!
business
.
canManageApplication
(
effectivePerson
,
null
)
&&
!
docSign
.
getPerson
().
equals
(
effectivePerson
.
getDistinguishedName
())){
throw
new
ExceptionAccessDenied
(
effectivePerson
,
id
);
}
List
<
DocSignScrawl
>
signScrawlList
=
emc
.
listEqual
(
DocSignScrawl
.
class
,
DocSignScrawl
.
signId_FIELDNAME
,
docSign
.
getId
());
if
(
ListTools
.
isNotEmpty
(
signScrawlList
))
{
emc
.
beginTransaction
(
DocSignScrawl
.
class
);
for
(
DocSignScrawl
signScrawl
:
signScrawlList
)
{
if
(
StringUtils
.
isNotBlank
(
signScrawl
.
getStorage
()))
{
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
get
(
DocSignScrawl
.
class
,
signScrawl
.
getStorage
());
signScrawl
.
deleteContent
(
mapping
);
}
emc
.
remove
(
signScrawl
);
}
}
emc
.
beginTransaction
(
DocSign
.
class
);
emc
.
remove
(
docSign
);
emc
.
commit
();
Wo
wo
=
new
Wo
();
wo
.
setValue
(
true
);
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
WrapBoolean
{
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionDeleteByTask.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.annotation.ActionLogger
;
import
com.x.base.core.project.config.StorageMapping
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
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.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.core.entity.content.DocSign
;
import
com.x.processplatform.core.entity.content.DocSignScrawl
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.List
;
class
ActionDeleteByTask
extends
BaseAction
{
@ActionLogger
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionDeleteByTask
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
taskId
)
throws
Exception
{
logger
.
debug
(
effectivePerson
.
getDistinguishedName
());
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Wo
wo
=
new
Wo
();
Business
business
=
new
Business
(
emc
);
wo
.
setValue
(
true
);
DocSign
docSign
=
emc
.
firstEqual
(
DocSign
.
class
,
DocSign
.
taskId_FIELDNAME
,
taskId
);
if
(
null
!=
docSign
)
{
if
(!
business
.
canManageApplication
(
effectivePerson
,
null
)
&&
!
docSign
.
getPerson
().
equals
(
effectivePerson
.
getDistinguishedName
())){
throw
new
ExceptionAccessDenied
(
effectivePerson
,
taskId
);
}
List
<
DocSignScrawl
>
signScrawlList
=
emc
.
listEqual
(
DocSignScrawl
.
class
,
DocSignScrawl
.
signId_FIELDNAME
,
docSign
.
getId
());
if
(
ListTools
.
isNotEmpty
(
signScrawlList
))
{
emc
.
beginTransaction
(
DocSignScrawl
.
class
);
for
(
DocSignScrawl
signScrawl
:
signScrawlList
)
{
if
(
StringUtils
.
isNotBlank
(
signScrawl
.
getStorage
()))
{
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
get
(
DocSignScrawl
.
class
,
signScrawl
.
getStorage
());
signScrawl
.
deleteContent
(
mapping
);
}
emc
.
remove
(
signScrawl
);
}
}
emc
.
beginTransaction
(
DocSign
.
class
);
emc
.
remove
(
docSign
);
emc
.
commit
();
}
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
WrapBoolean
{
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionDownload.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.config.StorageMapping
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WoFile
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.core.entity.content.DocSignScrawl
;
import
org.apache.commons.lang3.StringUtils
;
class
ActionDownload
extends
BaseAction
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
scrawlId
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
DocSignScrawl
signScrawl
=
null
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
signScrawl
=
emc
.
find
(
scrawlId
,
DocSignScrawl
.
class
);
if
(
null
==
signScrawl
)
{
throw
new
ExceptionEntityNotExist
(
scrawlId
,
DocSignScrawl
.
class
);
}
if
(
StringUtils
.
isBlank
(
signScrawl
.
getStorage
())){
throw
new
IllegalStateException
(
scrawlId
+
"附件不存在!"
);
}
if
(!
business
.
readableWithJob
(
effectivePerson
,
signScrawl
.
getJob
())){
throw
new
ExceptionAccessDenied
(
effectivePerson
,
scrawlId
);
}
}
String
fileName
=
signScrawl
.
getName
();
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
get
(
DocSignScrawl
.
class
,
signScrawl
.
getStorage
());
byte
[]
bytes
=
signScrawl
.
readContent
(
mapping
);
Wo
wo
=
new
Wo
(
bytes
,
this
.
contentType
(
false
,
fileName
),
this
.
contentDisposition
(
false
,
fileName
));
result
.
setData
(
wo
);
return
result
;
}
public
static
class
Wo
extends
WoFile
{
public
Wo
(
byte
[]
bytes
,
String
contentType
,
String
contentDisposition
)
{
super
(
bytes
,
contentType
,
contentDisposition
);
}
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionGet.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
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.processplatform.assemble.surface.Business
;
import
com.x.processplatform.core.entity.content.DocSign
;
class
ActionGet
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionGet
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
logger
.
debug
(
effectivePerson
.
getDistinguishedName
());
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
DocSign
docSign
=
emc
.
find
(
id
,
DocSign
.
class
);
if
(
null
==
docSign
)
{
throw
new
ExceptionEntityNotExist
(
id
,
DocSign
.
class
);
}
if
(!
business
.
readableWithJob
(
effectivePerson
,
docSign
.
getJob
())){
throw
new
ExceptionAccessDenied
(
effectivePerson
,
id
);
}
Wo
wo
=
Wo
.
copier
.
copy
(
docSign
);
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
DocSign
{
static
WrapCopier
<
DocSign
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
DocSign
.
class
,
Wo
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionGetByTask.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.project.annotation.ActionLogger
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
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.processplatform.assemble.surface.Business
;
import
com.x.processplatform.core.entity.content.Attachment
;
import
com.x.processplatform.core.entity.content.DocSign
;
class
ActionGetByTask
extends
BaseAction
{
@ActionLogger
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionGetByTask
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
taskId
)
throws
Exception
{
logger
.
debug
(
effectivePerson
.
getDistinguishedName
());
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
DocSign
docSign
=
emc
.
firstEqual
(
DocSign
.
class
,
DocSign
.
taskId_FIELDNAME
,
taskId
);
if
(
null
==
docSign
)
{
throw
new
ExceptionEntityNotExist
(
taskId
,
DocSign
.
class
);
}
if
(!
business
.
readableWithJob
(
effectivePerson
,
docSign
.
getJob
())){
throw
new
ExceptionAccessDenied
(
effectivePerson
,
taskId
);
}
Wo
wo
=
Wo
.
copier
.
copy
(
docSign
);
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
DocSign
{
static
WrapCopier
<
DocSign
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
DocSign
.
class
,
Wo
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionListWithJob.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
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.SortTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.core.entity.content.DocSign
;
import
com.x.processplatform.core.entity.content.DocSignStatus
;
import
org.apache.commons.lang3.BooleanUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
class
ActionListWithJob
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionListWithJob
.
class
);
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
,
String
job
)
throws
Exception
{
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
CompletableFuture
<
List
<
Wo
>>
listFuture
=
listFuture
(
job
);
CompletableFuture
<
Boolean
>
checkControlFuture
=
checkJobControlFuture
(
effectivePerson
,
job
);
result
.
setData
(
listFuture
.
get
(
Config
.
processPlatform
().
getAsynchronousTimeout
(),
TimeUnit
.
SECONDS
));
if
(
BooleanUtils
.
isFalse
(
checkControlFuture
.
get
(
Config
.
processPlatform
().
getAsynchronousTimeout
(),
TimeUnit
.
SECONDS
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
,
job
);
}
return
result
;
}
private
CompletableFuture
<
List
<
Wo
>>
listFuture
(
String
flag
)
{
return
CompletableFuture
.
supplyAsync
(()
->
{
List
<
Wo
>
wos
=
new
ArrayList
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
final
String
job
=
flag
;
List
<
DocSign
>
docSignList
=
emc
.
listEqualAndNotEqual
(
DocSign
.
class
,
DocSign
.
job_FIELDNAME
,
job
,
DocSign
.
status_FIELDNAME
,
DocSignStatus
.
STATUS_1
.
getValue
());
for
(
DocSign
docSign
:
docSignList
)
{
Wo
wo
=
Wo
.
copier
.
copy
(
docSign
);
wo
.
setInputList
(
wo
.
getProperties
().
getInputList
());
wo
.
setScrawlList
(
wo
.
getProperties
().
getScrawlList
());
wo
.
setProperties
(
null
);
wos
.
add
(
wo
);
}
SortTools
.
asc
(
wos
,
DocSign
.
createTime_FIELDNAME
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
return
wos
;
});
}
private
CompletableFuture
<
Boolean
>
checkJobControlFuture
(
EffectivePerson
effectivePerson
,
String
job
)
{
return
CompletableFuture
.
supplyAsync
(()
->
{
Boolean
value
=
false
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
value
=
business
.
readableWithJob
(
effectivePerson
,
job
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
return
value
;
});
}
public
static
class
Wo
extends
DocSign
{
static
WrapCopier
<
DocSign
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
DocSign
.
class
,
Wo
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
@FieldDescribe
(
"输入框列表."
)
private
List
<
String
>
inputList
=
new
ArrayList
<>();
@FieldDescribe
(
"涂鸦列表."
)
private
List
<
String
>
scrawlList
=
new
ArrayList
<>();
public
List
<
String
>
getInputList
()
{
return
inputList
;
}
public
void
setInputList
(
List
<
String
>
inputList
)
{
this
.
inputList
=
inputList
;
}
public
List
<
String
>
getScrawlList
()
{
return
scrawlList
;
}
public
void
setScrawlList
(
List
<
String
>
scrawlList
)
{
this
.
scrawlList
=
scrawlList
;
}
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionSave.java
浏览文件 @
77553fa2
...
@@ -5,8 +5,10 @@ import com.google.gson.JsonObject;
...
@@ -5,8 +5,10 @@ import com.google.gson.JsonObject;
import
com.microsoft.playwright.*
;
import
com.microsoft.playwright.*
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.annotation.CheckPersistType
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.StorageMapping
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.exception.ExceptionFieldEmpty
;
import
com.x.base.core.project.exception.ExceptionFieldEmpty
;
...
@@ -16,16 +18,16 @@ import com.x.base.core.project.http.EffectivePerson;
...
@@ -16,16 +18,16 @@ import com.x.base.core.project.http.EffectivePerson;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.DateTools
;
import
com.x.base.core.project.tools.FileTools
;
import
com.x.base.core.project.tools.FileTools
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.assemble.surface.
Business
;
import
com.x.processplatform.assemble.surface.
ThisApplication
;
import
com.x.processplatform.core.entity.content.DocSign
;
import
com.x.processplatform.core.entity.content.DocSign
;
import
com.x.processplatform.core.entity.content.DocSignScrawl
;
import
com.x.processplatform.core.entity.content.DocSignScrawl
;
import
com.x.processplatform.core.entity.content.DocSignStatus
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.Task
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.omg.CORBA.ExceptionDefPOA
;
import
java.io.File
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -37,76 +39,111 @@ class ActionSave extends BaseAction {
...
@@ -37,76 +39,111 @@ class ActionSave extends BaseAction {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionSave
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionSave
.
class
);
private
static
final
String
SCRAWL_SRC
=
"src"
;
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
taskId
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
taskId
,
JsonElement
jsonElement
)
throws
Exception
{
String
job
=
null
;
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
if
(
wi
.
getStatus
()
==
null
)
{
if
(
wi
.
getStatus
()
==
null
)
{
throw
new
ExceptionFieldEmpty
(
DocSign
.
status_FIELDNAME
);
throw
new
ExceptionFieldEmpty
(
DocSign
.
status_FIELDNAME
);
}
}
if
(
wi
.
getStatus
().
equals
(
DocSign
.
STATUS_3
)
&&
StringUtils
.
isBlank
(
wi
.
getHtmlContent
()))
{
if
(
wi
.
getStatus
().
equals
(
DocSignStatus
.
STATUS_3
.
getValue
())
&&
StringUtils
.
isBlank
(
wi
.
getHtmlContent
()))
{
throw
new
ExceptionFieldEmpty
(
"htmlContent"
);
throw
new
ExceptionFieldEmpty
(
"htmlContent"
);
}
}
Task
task
=
null
;
Task
task
=
null
;
Wo
wo
=
new
Wo
();
Wo
wo
=
new
Wo
();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
task
=
emc
.
fetch
(
taskId
,
Task
.
class
);
task
=
emc
.
fetch
(
taskId
,
Task
.
class
);
if
(
task
==
null
)
{
if
(
task
==
null
)
{
throw
new
ExceptionEntityNotExist
(
taskId
,
Task
.
class
);
throw
new
ExceptionEntityNotExist
(
taskId
,
Task
.
class
);
}
}
if
(!
task
.
getPerson
().
equals
(
effectivePerson
.
getDistinguishedName
()))
{
if
(!
task
.
getPerson
().
equals
(
effectivePerson
.
getDistinguishedName
()))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
}
}
}
this
.
saveDocSign
(
wi
,
task
);
wo
.
setId
(
this
.
saveDocSign
(
wi
,
task
)
);
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
result
.
setData
(
wo
);
result
.
setData
(
wo
);
return
result
;
return
result
;
}
}
private
String
saveDocSign
(
Wi
wi
,
Task
task
)
throws
Exception
{
private
String
saveDocSign
(
Wi
wi
,
Task
task
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
boolean
flag
=
fals
e
;
boolean
flag
=
tru
e
;
emc
.
beginTransaction
(
DocSign
.
class
);
emc
.
beginTransaction
(
DocSign
.
class
);
DocSign
docSign
=
emc
.
firstEqual
(
DocSign
.
class
,
DocSign
.
taskId_FIELDNAME
,
task
.
getId
());
DocSign
docSign
=
emc
.
firstEqual
(
DocSign
.
class
,
DocSign
.
taskId_FIELDNAME
,
task
.
getId
());
if
(
docSign
==
null
)
{
if
(
docSign
==
null
)
{
flag
=
tru
e
;
flag
=
fals
e
;
docSign
=
new
DocSign
(
task
);
docSign
=
new
DocSign
(
task
);
docSign
.
setStatus
(
wi
.
getStatus
());
}
}
docSign
.
setStatus
(
wi
.
getStatus
());
docSign
.
getProperties
().
setInputList
(
wi
.
getInputList
());
docSign
.
getProperties
().
setInputList
(
wi
.
getInputList
());
docSign
.
getProperties
().
setScrawlList
(
wi
.
getScrawlList
());
docSign
.
getProperties
().
setScrawlList
(
wi
.
getScrawlList
());
if
(
wi
.
getStatus
().
equals
(
DocSign
.
STATUS_2
)){
docSign
.
setCommitTime
(
new
Date
());
emc
.
beginTransaction
(
DocSignScrawl
.
class
);
emc
.
beginTransaction
(
DocSignScrawl
.
class
);
emc
.
deleteEqual
(
DocSignScrawl
.
class
,
DocSignScrawl
.
signId_FIELDNAME
,
docSign
.
getId
());
if
(
flag
)
{
if
(
ListTools
.
isNotEmpty
(
wi
.
getScrawlList
())){
List
<
DocSignScrawl
>
signScrawlList
=
emc
.
listEqual
(
DocSignScrawl
.
class
,
DocSignScrawl
.
signId_FIELDNAME
,
docSign
.
getId
());
for
(
String
data
:
wi
.
getScrawlList
()){
for
(
DocSignScrawl
signScrawl
:
signScrawlList
)
{
JsonObject
jsonObject
=
gson
.
fromJson
(
data
,
JsonObject
.
class
);
if
(
StringUtils
.
isNotBlank
(
signScrawl
.
getStorage
()))
{
DocSignScrawl
signScrawl
=
new
DocSignScrawl
(
docSign
,
data
,
null
);
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
get
(
DocSignScrawl
.
class
,
signScrawl
.
getStorage
());
if
(
jsonObject
.
has
(
"src"
)){
signScrawl
.
deleteContent
(
mapping
);
signScrawl
.
setType
(
DocSignScrawl
.
SCRAWL_TYPE_BASE64
);
}
}
emc
.
persist
(
signScrawl
);
emc
.
remove
(
signScrawl
);
}
}
}
}
}
else
if
(
wi
.
getStatus
().
equals
(
DocSign
.
STATUS_3
)){
if
(
wi
.
getStatus
().
equals
(
DocSignStatus
.
STATUS_2
.
getValue
()))
{
List
<
String
>
list
=
new
ArrayList
<>();
docSign
.
setCommitTime
(
new
Date
());
docSign
.
setCommitTime
(
new
Date
());
if
(
ListTools
.
isNotEmpty
(
wi
.
getScrawlList
()))
{
for
(
String
data
:
wi
.
getScrawlList
())
{
DocSignScrawl
signScrawl
=
this
.
base642Img
(
docSign
,
data
);
list
.
add
(
gson
.
toJson
(
signScrawl
));
emc
.
persist
(
signScrawl
,
CheckPersistType
.
all
);
}
}
docSign
.
getProperties
().
setScrawlList
(
list
);
}
else
if
(
wi
.
getStatus
().
equals
(
DocSignStatus
.
STATUS_3
.
getValue
()))
{
docSign
.
setCommitTime
(
new
Date
());
DocSignScrawl
signScrawl
=
this
.
html2Img
(
docSign
,
wi
,
emc
);
emc
.
persist
(
signScrawl
,
CheckPersistType
.
all
);
docSign
.
setSignScrawlId
(
signScrawl
.
getId
());
}
}
if
(
flag
)
{
if
(!
flag
)
{
emc
.
persist
(
docSign
);
emc
.
persist
(
docSign
,
CheckPersistType
.
all
);
}
}
emc
.
commit
();
emc
.
commit
();
return
docSign
.
getId
();
return
docSign
.
getId
();
}
}
}
}
private
void
html2Img
(
DocSign
docSign
,
Wi
wi
,
EntityManagerContainer
emc
)
throws
Exception
{
private
DocSignScrawl
base642Img
(
DocSign
docSign
,
String
data
)
throws
Exception
{
JsonObject
jsonObject
=
gson
.
fromJson
(
data
,
JsonObject
.
class
);
DocSignScrawl
signScrawl
=
new
DocSignScrawl
(
docSign
,
null
);
if
(
jsonObject
.
has
(
SCRAWL_SRC
))
{
String
base64String
=
jsonObject
.
get
(
SCRAWL_SRC
).
getAsString
();
if
(
StringUtils
.
isNotBlank
(
base64String
))
{
byte
[]
bytes
=
Base64
.
decodeBase64
(
base64String
);
String
name
=
StringUtils
.
split
(
docSign
.
getPerson
(),
"@"
)[
0
]
+
signScrawl
.
getId
()
+
".png"
;
signScrawl
.
setType
(
DocSignScrawl
.
SCRAWL_TYPE_BASE64
);
signScrawl
.
setName
(
name
);
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
random
(
DocSignScrawl
.
class
);
signScrawl
.
saveContent
(
mapping
,
bytes
,
name
);
}
}
if
(
jsonObject
.
has
(
DocSignScrawl
.
width_FIELDNAME
))
{
signScrawl
.
setWidth
(
jsonObject
.
get
(
DocSignScrawl
.
width_FIELDNAME
).
getAsString
());
}
if
(
jsonObject
.
has
(
DocSignScrawl
.
height_FIELDNAME
))
{
signScrawl
.
setHeight
(
jsonObject
.
get
(
DocSignScrawl
.
height_FIELDNAME
).
getAsString
());
}
return
signScrawl
;
}
private
DocSignScrawl
html2Img
(
DocSign
docSign
,
Wi
wi
,
EntityManagerContainer
emc
)
throws
Exception
{
String
html
=
wi
.
getHtmlContent
();
String
html
=
wi
.
getHtmlContent
();
if
(
html
.
toLowerCase
().
indexOf
(
"<html"
)
==
-
1
)
{
if
(
html
.
toLowerCase
().
indexOf
(
"<html"
)
==
-
1
)
{
html
=
"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>"
+
html
+
"</body></html>"
;
html
=
"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>"
+
html
+
"</body></html>"
;
}
}
String
name
=
StringUtils
.
split
(
docSign
.
getPerson
(),
"@"
)[
0
]
+
docSign
.
getTaskId
()
+
".png"
;
String
name
=
StringUtils
.
split
(
docSign
.
getPerson
(),
"@"
)[
0
]
+
docSign
.
getTaskId
()
+
".png"
;
byte
[]
bytes
=
null
;
byte
[]
bytes
=
null
;
try
(
Playwright
playwright
=
Playwright
.
create
())
{
try
(
Playwright
playwright
=
Playwright
.
create
())
{
List
<
BrowserType
>
browserTypes
=
Arrays
.
asList
(
List
<
BrowserType
>
browserTypes
=
Arrays
.
asList
(
...
@@ -123,7 +160,7 @@ class ActionSave extends BaseAction {
...
@@ -123,7 +160,7 @@ class ActionSave extends BaseAction {
page
.
setContent
(
html
);
page
.
setContent
(
html
);
Page
.
ScreenshotOptions
screenshotOptions
=
new
Page
.
ScreenshotOptions
();
Page
.
ScreenshotOptions
screenshotOptions
=
new
Page
.
ScreenshotOptions
();
screenshotOptions
.
setFullPage
(
true
);
screenshotOptions
.
setFullPage
(
true
);
if
(
wi
.
getHtmlWidth
()!=
null
&&
wi
.
getHtmlHeight
()!=
null
)
{
if
(
wi
.
getHtmlWidth
()
!=
null
&&
wi
.
getHtmlHeight
()
!=
null
)
{
screenshotOptions
.
setClip
(
0
,
0
,
wi
.
getHtmlWidth
(),
wi
.
getHtmlHeight
());
screenshotOptions
.
setClip
(
0
,
0
,
wi
.
getHtmlWidth
(),
wi
.
getHtmlHeight
());
}
}
File
tempDir
=
Config
.
dir_local_temp
();
File
tempDir
=
Config
.
dir_local_temp
();
...
@@ -134,14 +171,18 @@ class ActionSave extends BaseAction {
...
@@ -134,14 +171,18 @@ class ActionSave extends BaseAction {
bytes
=
FileUtils
.
readFileToByteArray
(
file
);
bytes
=
FileUtils
.
readFileToByteArray
(
file
);
break
;
break
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
warn
(
"Playwright user browser:{} error:{}"
,
browserType
.
name
(),
e
.
getMessage
());
logger
.
warn
(
"Playwright user browser:{} error:{}"
,
browserType
.
name
(),
e
.
getMessage
());
}
}
}
}
}
}
if
(
bytes
==
null
)
{
if
(
bytes
==
null
)
{
throw
new
IllegalStateException
(
"签批转图片异常!"
);
throw
new
IllegalStateException
(
"签批转图片异常!"
);
}
}
DocSignScrawl
signScrawl
=
new
DocSignScrawl
(
docSign
,
name
);
signScrawl
.
setType
(
DocSignScrawl
.
SCRAWL_TYPE_IMAGE
);
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
random
(
DocSignScrawl
.
class
);
signScrawl
.
saveContent
(
mapping
,
bytes
,
name
);
return
signScrawl
;
}
}
public
static
class
Wi
extends
GsonPropertyObject
{
public
static
class
Wi
extends
GsonPropertyObject
{
...
@@ -149,13 +190,13 @@ class ActionSave extends BaseAction {
...
@@ -149,13 +190,13 @@ class ActionSave extends BaseAction {
private
Integer
status
;
private
Integer
status
;
@FieldDescribe
(
"包含签批的html正文后内容,状态为3时必传."
)
@FieldDescribe
(
"包含签批的html正文后内容,状态为3时必传."
)
private
String
htmlContent
;
private
String
htmlContent
;
@FieldDescribe
(
"html
宽度,允许为空."
)
@FieldDescribe
(
"html正文
宽度,允许为空."
)
private
Double
htmlWidth
;
private
Double
htmlWidth
;
@FieldDescribe
(
"html宽度长
度,允许为空."
)
@FieldDescribe
(
"html正文高
度,允许为空."
)
private
Double
htmlHeight
;
private
Double
htmlHeight
;
@FieldDescribe
(
"输入框列表."
)
@FieldDescribe
(
"输入框列表."
)
private
List
<
String
>
inputList
=
new
ArrayList
<>();
private
List
<
String
>
inputList
=
new
ArrayList
<>();
@FieldDescribe
(
"涂鸦列表
."
)
@FieldDescribe
(
"涂鸦列表,示例[\"{'src':'base64图片','width':'100','height':'100'}\"]
."
)
private
List
<
String
>
scrawlList
=
new
ArrayList
<>();
private
List
<
String
>
scrawlList
=
new
ArrayList
<>();
public
Integer
getStatus
()
{
public
Integer
getStatus
()
{
...
@@ -209,8 +250,6 @@ class ActionSave extends BaseAction {
...
@@ -209,8 +250,6 @@ class ActionSave extends BaseAction {
public
static
class
Wo
extends
WoId
{
public
static
class
Wo
extends
WoId
{
private
static
final
long
serialVersionUID
=
-
2577413577740827608L
;
}
}
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/SignAction.java
浏览文件 @
77553fa2
...
@@ -11,9 +11,6 @@ import com.x.base.core.project.jaxrs.ResponseFactory;
...
@@ -11,9 +11,6 @@ import com.x.base.core.project.jaxrs.ResponseFactory;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.processplatform.assemble.surface.jaxrs.snap.*
;
import
org.glassfish.jersey.media.multipart.FormDataContentDisposition
;
import
org.glassfish.jersey.media.multipart.FormDataParam
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.*
;
import
javax.ws.rs.*
;
...
@@ -32,7 +29,7 @@ public class SignAction extends StandardJaxrsAction {
...
@@ -32,7 +29,7 @@ public class SignAction extends StandardJaxrsAction {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
SignAction
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
SignAction
.
class
);
/*@JaxrsMethodDescribe(value = "获取快照对象
.", action = ActionGet.class)
@JaxrsMethodDescribe
(
value
=
"获取签批信息
."
,
action
=
ActionGet
.
class
)
@GET
@GET
@Path
(
"{id}"
)
@Path
(
"{id}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
...
@@ -50,7 +47,43 @@ public class SignAction extends StandardJaxrsAction {
...
@@ -50,7 +47,43 @@ public class SignAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
}
@JaxrsMethodDescribe(value = "删除快照", action = ActionDelete.class)
@JaxrsMethodDescribe
(
value
=
"根据task获取签批信息."
,
action
=
ActionGetByTask
.
class
)
@GET
@Path
(
"task/{taskId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
getByTask
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"任务ID"
)
@PathParam
(
"taskId"
)
String
taskId
)
{
ActionResult
<
ActionGetByTask
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionGetByTask
().
execute
(
effectivePerson
,
taskId
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"根据工作的job获取签批列表."
,
action
=
ActionListWithJob
.
class
)
@GET
@Path
(
"list/job/{job}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
listWithJob
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"工作的job"
)
@PathParam
(
"job"
)
String
job
)
{
ActionResult
<
List
<
ActionListWithJob
.
Wo
>>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionListWithJob
().
execute
(
effectivePerson
,
job
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"删除签批"
,
action
=
ActionDelete
.
class
)
@DELETE
@DELETE
@Path
(
"{id}"
)
@Path
(
"{id}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
...
@@ -68,7 +101,7 @@ public class SignAction extends StandardJaxrsAction {
...
@@ -68,7 +101,7 @@ public class SignAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
}
@JaxrsMethodDescribe(value = "删除
快照
", action = ActionDelete.class)
@JaxrsMethodDescribe
(
value
=
"删除
签批
"
,
action
=
ActionDelete
.
class
)
@GET
@GET
@Path
(
"{id}/mockdeletetoget"
)
@Path
(
"{id}/mockdeletetoget"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
...
@@ -84,13 +117,49 @@ public class SignAction extends StandardJaxrsAction {
...
@@ -84,13 +117,49 @@ public class SignAction extends StandardJaxrsAction {
result
.
error
(
e
);
result
.
error
(
e
);
}
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}*/
}
@JaxrsMethodDescribe
(
value
=
"根据task删除签批"
,
action
=
ActionDeleteByTask
.
class
)
@DELETE
@Path
(
"task/{taskId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
deleteByTask
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"待办标识"
)
@PathParam
(
"taskId"
)
String
taskId
)
{
ActionResult
<
ActionDeleteByTask
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionDeleteByTask
().
execute
(
effectivePerson
,
taskId
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"根据task删除签批mockdeletetoget"
,
action
=
ActionDeleteByTask
.
class
)
@GET
@Path
(
"task/{taskId}/mockdeletetoget"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
deleteByTaskMockGet2Delete
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"待办标识"
)
@PathParam
(
"taskId"
)
String
taskId
)
{
ActionResult
<
ActionDeleteByTask
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionDeleteByTask
().
execute
(
effectivePerson
,
taskId
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"保存签批."
,
action
=
ActionSave
.
class
)
@JaxrsMethodDescribe
(
value
=
"保存签批."
,
action
=
ActionSave
.
class
)
@POST
@POST
@Path
(
"save/task/{taskId}"
)
@Path
(
"save/task/{taskId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
MULTIPART_FORM_DATA
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
save
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
public
void
save
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"待办ID"
)
@PathParam
(
"taskId"
)
String
taskId
,
JsonElement
jsonElement
)
{
@JaxrsParameterDescribe
(
"待办ID"
)
@PathParam
(
"taskId"
)
String
taskId
,
JsonElement
jsonElement
)
{
ActionResult
<
ActionSave
.
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
ActionSave
.
Wo
>
result
=
new
ActionResult
<>();
...
@@ -104,23 +173,21 @@ public class SignAction extends StandardJaxrsAction {
...
@@ -104,23 +173,21 @@ public class SignAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
}
/*@JaxrsMethodDescribe(value = "按条件对快照分页显示.", action = ActionManageListFilterPaging.class)
@JaxrsMethodDescribe
(
value
=
"下载签批涂鸦附件"
,
action
=
ActionDownload
.
class
)
@POST
@GET
@Path("list/filter/{page}/size/{size}/manage")
@Path
(
"download/{scrawlId}"
)
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public void manageListFilterPaging(@Suspended final AsyncResponse asyncResponse,
public
void
download
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
@JaxrsParameterDescribe
(
"签批涂鸦附件标志"
)
@PathParam
(
"scrawlId"
)
String
scrawlId
)
{
@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
ActionResult
<
ActionDownload
.
Wo
>
result
=
new
ActionResult
<>();
ActionResult<List<ActionManageListFilterPaging.Wo>> result = new ActionResult<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
try
{
result = new Action
ManageListFilterPaging().execute(effectivePerson, page, size, jsonElement
);
result
=
new
Action
Download
().
execute
(
effectivePerson
,
scrawlId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger.error(e, effectivePerson, request,
jsonElement
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
result
.
error
(
e
);
}
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result
, jsonElement
));
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
*/
}
}
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSign.java
浏览文件 @
77553fa2
...
@@ -32,10 +32,6 @@ public class DocSign extends SliceJpaObject {
...
@@ -32,10 +32,6 @@ public class DocSign extends SliceJpaObject {
private
static
final
String
TABLE
=
PersistenceProperties
.
Content
.
DocSign
.
table
;
private
static
final
String
TABLE
=
PersistenceProperties
.
Content
.
DocSign
.
table
;
public
static
final
Integer
STATUS_1
=
1
;
public
static
final
Integer
STATUS_2
=
3
;
public
static
final
Integer
STATUS_3
=
3
;
@Override
@Override
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
...
@@ -89,6 +85,7 @@ public class DocSign extends SliceJpaObject {
...
@@ -89,6 +85,7 @@ public class DocSign extends SliceJpaObject {
this
.
activity
=
task
.
getActivity
();
this
.
activity
=
task
.
getActivity
();
this
.
activityName
=
task
.
getActivityName
();
this
.
activityName
=
task
.
getActivityName
();
this
.
person
=
task
.
getPerson
();
this
.
person
=
task
.
getPerson
();
this
.
taskId
=
task
.
getId
();
}
}
public
DocSignProperties
getProperties
()
{
public
DocSignProperties
getProperties
()
{
...
@@ -155,11 +152,11 @@ public class DocSign extends SliceJpaObject {
...
@@ -155,11 +152,11 @@ public class DocSign extends SliceJpaObject {
@CheckPersist
(
allowEmpty
=
false
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
person
;
private
String
person
;
public
static
final
String
sign
PicAttId_FIELDNAME
=
"signPicAtt
Id"
;
public
static
final
String
sign
ScrawlId_FIELDNAME
=
"signScrawl
Id"
;
@FieldDescribe
(
"正文签批转存为图片的ID."
)
@FieldDescribe
(
"正文签批转存为图片的ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
sign
PicAtt
Id_FIELDNAME
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
sign
Scrawl
Id_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
sign
PicAtt
Id
;
private
String
sign
Scrawl
Id
;
public
static
final
String
status_FIELDNAME
=
"status"
;
public
static
final
String
status_FIELDNAME
=
"status"
;
@FieldDescribe
(
"状态:1(暂存)|2(签批正文不可以修改)|3(签批正文可以修改)."
)
@FieldDescribe
(
"状态:1(暂存)|2(签批正文不可以修改)|3(签批正文可以修改)."
)
...
@@ -243,12 +240,12 @@ public class DocSign extends SliceJpaObject {
...
@@ -243,12 +240,12 @@ public class DocSign extends SliceJpaObject {
this
.
commitTime
=
commitTime
;
this
.
commitTime
=
commitTime
;
}
}
public
String
getSign
PicAtt
Id
()
{
public
String
getSign
Scrawl
Id
()
{
return
sign
PicAtt
Id
;
return
sign
Scrawl
Id
;
}
}
public
void
setSign
PicAttId
(
String
signPicAtt
Id
)
{
public
void
setSign
ScrawlId
(
String
signScrawl
Id
)
{
this
.
sign
PicAttId
=
signPicAtt
Id
;
this
.
sign
ScrawlId
=
signScrawl
Id
;
}
}
public
Integer
getStatus
()
{
public
Integer
getStatus
()
{
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignScrawl.java
浏览文件 @
77553fa2
package
com.x.processplatform.core.entity.content
;
package
com.x.processplatform.core.entity.content
;
import
com.x.base.core.entity.AbstractPersistenceProperties
;
import
com.x.base.core.entity.*
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.SliceJpaObject
;
import
com.x.base.core.entity.StorageObject
;
import
com.x.base.core.entity.annotation.CheckPersist
;
import
com.x.base.core.entity.annotation.CheckPersist
;
import
com.x.base.core.entity.annotation.ContainerEntity
;
import
com.x.base.core.entity.annotation.ContainerEntity
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.annotation.FieldDescribe
;
...
@@ -17,6 +14,8 @@ import org.apache.openjpa.persistence.jdbc.Index;
...
@@ -17,6 +14,8 @@ import org.apache.openjpa.persistence.jdbc.Index;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.Date
;
import
static
com
.
x
.
base
.
core
.
entity
.
StorageType
.
processPlatform
;
/**
/**
* 签批涂鸦信息
* 签批涂鸦信息
* @author sword
* @author sword
...
@@ -28,9 +27,10 @@ import java.util.Date;
...
@@ -28,9 +27,10 @@ import java.util.Date;
+
JpaObject
.
DefaultUniqueConstraintSuffix
,
columnNames
=
{
JpaObject
.
IDCOLUMN
,
+
JpaObject
.
DefaultUniqueConstraintSuffix
,
columnNames
=
{
JpaObject
.
IDCOLUMN
,
JpaObject
.
CREATETIMECOLUMN
,
JpaObject
.
UPDATETIMECOLUMN
,
JpaObject
.
SEQUENCECOLUMN
})
})
JpaObject
.
CREATETIMECOLUMN
,
JpaObject
.
UPDATETIMECOLUMN
,
JpaObject
.
SEQUENCECOLUMN
})
})
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
@Storage
(
type
=
processPlatform
)
public
class
DocSignScrawl
extends
StorageObject
{
public
class
DocSignScrawl
extends
StorageObject
{
private
static
final
long
serialVersionUID
=
-
8648872600208475747
L
;
private
static
final
long
serialVersionUID
=
3335030367719974674
L
;
private
static
final
String
TABLE
=
PersistenceProperties
.
Content
.
DocSignScrawl
.
table
;
private
static
final
String
TABLE
=
PersistenceProperties
.
Content
.
DocSignScrawl
.
table
;
...
@@ -57,30 +57,31 @@ public class DocSignScrawl extends StorageObject {
...
@@ -57,30 +57,31 @@ public class DocSignScrawl extends StorageObject {
@Override
@Override
public
void
onPersist
()
throws
Exception
{
public
void
onPersist
()
throws
Exception
{
if
(
StringUtils
.
isNotBlank
(
this
.
name
)){
if
(
this
.
lastUpdateTime
==
null
){
this
.
lastUpdateTime
=
new
Date
();
}
this
.
extension
=
StringUtils
.
lowerCase
(
FilenameUtils
.
getExtension
(
name
));
}
}
}
public
DocSignScrawl
()
{
public
DocSignScrawl
()
{
// nothing
// nothing
}
}
public
DocSignScrawl
(
DocSign
docSign
,
String
data
,
String
name
)
{
public
DocSignScrawl
(
DocSign
docSign
,
String
name
)
{
this
.
signId
=
docSign
.
getId
();
this
.
signId
=
docSign
.
getId
();
this
.
job
=
docSign
.
getJob
();
this
.
job
=
docSign
.
getJob
();
this
.
activity
=
docSign
.
getActivity
();
this
.
activity
=
docSign
.
getActivity
();
this
.
activityName
=
docSign
.
getActivityName
();
this
.
activityName
=
docSign
.
getActivityName
();
this
.
person
=
docSign
.
getPerson
();
this
.
person
=
docSign
.
getPerson
();
this
.
data
=
data
;
this
.
type
=
SCRAWL_TYPE_PLACEHOLDER
;
this
.
type
=
SCRAWL_TYPE_PLACEHOLDER
;
if
(
StringUtils
.
isNotBlank
(
name
)){
this
.
lastUpdateTime
=
new
Date
();
this
.
name
=
name
;
this
.
name
=
name
;
this
.
extension
=
StringUtils
.
lowerCase
(
FilenameUtils
.
getExtension
(
name
));
}
}
}
@Override
@Override
public
String
path
()
{
public
String
path
()
{
String
str
=
DateTools
.
format
(
this
.
getCreateTim
e
(),
DateTools
.
formatCompact_yyyyMMdd
);
String
str
=
DateTools
.
format
(
new
Dat
e
(),
DateTools
.
formatCompact_yyyyMMdd
);
str
+=
PATHSEPARATOR
;
str
+=
PATHSEPARATOR
;
str
+=
this
.
job
;
str
+=
this
.
job
;
str
+=
PATHSEPARATOR
;
str
+=
PATHSEPARATOR
;
...
@@ -234,17 +235,21 @@ public class DocSignScrawl extends StorageObject {
...
@@ -234,17 +235,21 @@ public class DocSignScrawl extends StorageObject {
public
static
final
String
type_FIELDNAME
=
"type"
;
public
static
final
String
type_FIELDNAME
=
"type"
;
@FieldDescribe
(
"涂鸦类型:placeholder(占位符)|base64(图片base64存储在data字段中)|image(图片存储在附件中)"
)
@FieldDescribe
(
"涂鸦类型:placeholder(占位符)|base64(图片base64存储在data字段中)|image(图片存储在附件中)"
)
@Column
(
name
=
ColumnNamePrefix
+
type_FIELDNAME
)
@Column
(
length
=
length_64B
,
name
=
ColumnNamePrefix
+
type_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
type
;
private
String
type
;
public
static
final
String
data_FIELDNAME
=
"data"
;
public
static
final
String
width_FIELDNAME
=
"width"
;
@FieldDescribe
(
"涂鸦信息."
)
@FieldDescribe
(
"宽"
)
@Lob
@Column
(
length
=
length_64B
,
name
=
ColumnNamePrefix
+
width_FIELDNAME
)
@Basic
(
fetch
=
FetchType
.
EAGER
)
@CheckPersist
(
allowEmpty
=
true
)
@Column
(
length
=
JpaObject
.
length_20M
,
name
=
ColumnNamePrefix
+
data_FIELDNAME
)
private
String
width
;
public
static
final
String
height_FIELDNAME
=
"height"
;
@FieldDescribe
(
"高"
)
@Column
(
length
=
length_64B
,
name
=
ColumnNamePrefix
+
height_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
data
;
private
String
height
;
public
String
getPerson
()
{
public
String
getPerson
()
{
return
person
;
return
person
;
...
@@ -306,11 +311,19 @@ public class DocSignScrawl extends StorageObject {
...
@@ -306,11 +311,19 @@ public class DocSignScrawl extends StorageObject {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
String
getData
()
{
public
String
getWidth
()
{
return
data
;
return
width
;
}
public
void
setWidth
(
String
width
)
{
this
.
width
=
width
;
}
public
String
getHeight
()
{
return
height
;
}
}
public
void
set
Data
(
String
data
)
{
public
void
set
Height
(
String
height
)
{
this
.
data
=
data
;
this
.
height
=
height
;
}
}
}
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignStatus.java
0 → 100644
浏览文件 @
77553fa2
package
com.x.processplatform.core.entity.content
;
public
enum
DocSignStatus
{
STATUS_1
(
1
,
"暂存"
),
STATUS_2
(
2
,
"签批正文不可以修改"
),
STATUS_3
(
3
,
"签批正文可以修改"
);
private
Integer
value
;
private
String
name
;
private
DocSignStatus
(
Integer
value
,
String
name
)
{
this
.
value
=
value
;
this
.
name
=
name
;
}
public
Integer
getValue
()
{
return
value
;
}
public
void
setValue
(
Integer
value
)
{
this
.
value
=
value
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录