Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
1a0f5d4b
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,发现更多精彩内容 >>
提交
1a0f5d4b
编写于
3月 03, 2022
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
签批3
上级
a2980248
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
638 addition
and
18 deletion
+638
-18
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionSave.java
...ocessplatform/assemble/surface/jaxrs/sign/ActionSave.java
+122
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/BaseAction.java
...ocessplatform/assemble/surface/jaxrs/sign/BaseAction.java
+149
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/SignAction.java
...ocessplatform/assemble/surface/jaxrs/sign/SignAction.java
+126
-0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/PersistenceProperties.java
.../x/processplatform/core/entity/PersistenceProperties.java
+4
-0
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
+48
-18
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignProperties.java
...rocessplatform/core/entity/content/DocSignProperties.java
+3
-0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignScrawl.java
.../x/processplatform/core/entity/content/DocSignScrawl.java
+186
-0
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/ActionSave.java
0 → 100644
浏览文件 @
1a0f5d4b
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.exception.ExceptionFieldEmpty
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WoId
;
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
;
import
com.x.processplatform.core.entity.content.Task
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
class
ActionSave
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionSave
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
taskId
,
JsonElement
jsonElement
)
throws
Exception
{
String
job
=
null
;
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
if
(
wi
.
getStatus
()
==
null
){
throw
new
ExceptionFieldEmpty
(
DocSign
.
status_FIELDNAME
);
}
if
(
wi
.
getStatus
().
equals
(
DocSign
.
STATUS_3
)
&&
StringUtils
.
isBlank
(
wi
.
getContent
())){
throw
new
ExceptionFieldEmpty
(
"content"
);
}
Task
task
=
null
;
Wo
wo
=
new
Wo
();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
task
=
emc
.
fetch
(
taskId
,
Task
.
class
);
if
(
task
==
null
){
throw
new
ExceptionEntityNotExist
(
taskId
,
Task
.
class
);
}
if
(!
task
.
getPerson
().
equals
(
effectivePerson
.
getDistinguishedName
())){
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
}
this
.
saveDocSign
(
wi
,
task
);
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
result
.
setData
(
wo
);
return
result
;
}
private
String
saveDocSign
(
Wi
wi
,
Task
task
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
boolean
flag
=
false
;
DocSign
docSign
=
emc
.
firstEqual
(
DocSign
.
class
,
DocSign
.
taskId_FIELDNAME
,
task
.
getId
());
if
(
docSign
==
null
)
{
flag
=
true
;
docSign
=
new
DocSign
(
task
);
docSign
.
setStatus
(
wi
.
getStatus
());
}
docSign
.
getProperties
().
setInputList
(
wi
.
getInputList
());
docSign
.
getProperties
().
setScrawlList
(
wi
.
getScrawlList
());
if
(!
wi
.
getStatus
().
equals
(
DocSign
.
STATUS_1
)){
docSign
.
setCommitTime
(
new
Date
());
}
}
return
""
;
}
public
static
class
Wi
extends
GsonPropertyObject
{
@FieldDescribe
(
"状态:1(暂存)|2(签批正文不可以修改)|3(签批正文可以修改,正文保存为图片)."
)
private
Integer
status
;
@FieldDescribe
(
"包含签批的html正文后内容,状态为3时必传."
)
private
String
content
;
@FieldDescribe
(
"输入框列表."
)
private
List
<
String
>
inputList
=
new
ArrayList
<>();
@FieldDescribe
(
"涂鸦列表."
)
private
List
<
String
>
scrawlList
=
new
ArrayList
<>();
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
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
;
}
}
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/BaseAction.java
0 → 100644
浏览文件 @
1a0f5d4b
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.core.entity.content.Snap
;
import
com.x.processplatform.core.entity.content.Snap_
;
import
com.x.processplatform.core.entity.element.Application
;
import
com.x.processplatform.core.entity.element.Process
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
java.util.List
;
abstract
class
BaseAction
extends
StandardJaxrsAction
{
protected
Predicate
manageFilter
(
Business
business
,
FilterWi
wi
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Snap
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
Snap
>
cq
=
cb
.
createQuery
(
Snap
.
class
);
Root
<
Snap
>
root
=
cq
.
from
(
Snap
.
class
);
Predicate
p
=
cb
.
conjunction
();
if
(
ListTools
.
isNotEmpty
(
wi
.
getApplicationList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Snap_
.
application
).
in
(
wi
.
getApplicationList
()));
}
if
(
ListTools
.
isNotEmpty
(
wi
.
getProcessList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Snap_
.
process
).
in
(
business
.
process
().
listEditionProcess
(
wi
.
getProcessList
())));
}
if
(
ListTools
.
isNotEmpty
(
wi
.
getPersonList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Snap_
.
person
).
in
(
business
.
organization
().
person
().
list
(
wi
.
getPersonList
())));
}
if
(
StringUtils
.
isNoneBlank
(
wi
.
getKey
()))
{
String
key
=
StringTools
.
escapeSqlLikeKey
(
wi
.
getKey
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
like
(
root
.
get
(
Snap_
.
title
),
"%"
+
key
+
"%"
,
StringTools
.
SQL_ESCAPE_CHAR
),
cb
.
like
(
root
.
get
(
Snap_
.
creatorPerson
),
"%"
+
key
+
"%"
,
StringTools
.
SQL_ESCAPE_CHAR
),
cb
.
like
(
root
.
get
(
Snap_
.
creatorUnit
),
"%"
+
key
+
"%"
,
StringTools
.
SQL_ESCAPE_CHAR
)));
}
return
p
;
}
protected
Predicate
filter
(
EffectivePerson
effectivePerson
,
Business
business
,
FilterWi
wi
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Snap
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
Snap
>
cq
=
cb
.
createQuery
(
Snap
.
class
);
Root
<
Snap
>
root
=
cq
.
from
(
Snap
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Snap_
.
person
),
effectivePerson
.
getDistinguishedName
());
if
(
ListTools
.
isNotEmpty
(
wi
.
getApplicationList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Snap_
.
application
).
in
(
wi
.
getApplicationList
()));
}
if
(
ListTools
.
isNotEmpty
(
wi
.
getProcessList
()))
{
p
=
cb
.
and
(
p
,
root
.
get
(
Snap_
.
process
).
in
(
business
.
process
().
listEditionProcess
(
wi
.
getProcessList
())));
}
if
(
StringUtils
.
isNoneBlank
(
wi
.
getKey
()))
{
String
key
=
StringTools
.
escapeSqlLikeKey
(
wi
.
getKey
());
p
=
cb
.
and
(
p
,
cb
.
or
(
cb
.
like
(
root
.
get
(
Snap_
.
title
),
"%"
+
key
+
"%"
,
StringTools
.
SQL_ESCAPE_CHAR
),
cb
.
like
(
root
.
get
(
Snap_
.
creatorPerson
),
"%"
+
key
+
"%"
,
StringTools
.
SQL_ESCAPE_CHAR
),
cb
.
like
(
root
.
get
(
Snap_
.
creatorUnit
),
"%"
+
key
+
"%"
,
StringTools
.
SQL_ESCAPE_CHAR
)));
}
return
p
;
}
protected
Predicate
myFilter
(
EffectivePerson
effectivePerson
,
Business
business
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Snap
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
Snap
>
cq
=
cb
.
createQuery
(
Snap
.
class
);
Root
<
Snap
>
root
=
cq
.
from
(
Snap
.
class
);
return
cb
.
equal
(
root
.
get
(
Snap_
.
person
),
effectivePerson
.
getDistinguishedName
());
}
protected
Predicate
myApplicationFilter
(
EffectivePerson
effectivePerson
,
Business
business
,
Application
application
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Snap
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
Snap
>
cq
=
cb
.
createQuery
(
Snap
.
class
);
Root
<
Snap
>
root
=
cq
.
from
(
Snap
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Snap_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Snap_
.
application
),
application
.
getId
()));
return
p
;
}
protected
Predicate
myProcessFilter
(
EffectivePerson
effectivePerson
,
Business
business
,
Process
process
)
throws
Exception
{
EntityManager
em
=
business
.
entityManagerContainer
().
get
(
Snap
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
Snap
>
cq
=
cb
.
createQuery
(
Snap
.
class
);
Root
<
Snap
>
root
=
cq
.
from
(
Snap
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Snap_
.
person
),
effectivePerson
.
getDistinguishedName
());
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Snap_
.
process
),
process
.
getId
()));
return
p
;
}
protected
class
FilterWi
{
@FieldDescribe
(
"应用id"
)
private
List
<
String
>
applicationList
;
@FieldDescribe
(
"流程"
)
private
List
<
String
>
processList
;
@FieldDescribe
(
"创建人"
)
private
List
<
String
>
personList
;
@FieldDescribe
(
"匹配关键字"
)
private
String
key
;
public
List
<
String
>
getApplicationList
()
{
return
applicationList
;
}
public
void
setApplicationList
(
List
<
String
>
applicationList
)
{
this
.
applicationList
=
applicationList
;
}
public
List
<
String
>
getProcessList
()
{
return
processList
;
}
public
void
setProcessList
(
List
<
String
>
processList
)
{
this
.
processList
=
processList
;
}
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
List
<
String
>
getPersonList
()
{
return
personList
;
}
public
void
setPersonList
(
List
<
String
>
personList
)
{
this
.
personList
=
personList
;
}
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/sign/SignAction.java
0 → 100644
浏览文件 @
1a0f5d4b
package
com.x.processplatform.assemble.surface.jaxrs.sign
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.project.annotation.JaxrsDescribe
;
import
com.x.base.core.project.annotation.JaxrsMethodDescribe
;
import
com.x.base.core.project.annotation.JaxrsParameterDescribe
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.HttpMediaType
;
import
com.x.base.core.project.jaxrs.ResponseFactory
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.logger.Logger
;
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.ws.rs.*
;
import
javax.ws.rs.container.AsyncResponse
;
import
javax.ws.rs.container.Suspended
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.MediaType
;
import
java.util.List
;
/**
* @author sword
*/
@Path
(
"sign"
)
@JaxrsDescribe
(
"文档签批"
)
public
class
SignAction
extends
StandardJaxrsAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
SignAction
.
class
);
/*@JaxrsMethodDescribe(value = "获取快照对象.", action = ActionGet.class)
@GET
@Path("{id}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
ActionResult<ActionGet.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionGet().execute(effectivePerson, id);
} catch (Exception e) {
logger.error(e, effectivePerson, request, null);
result.error(e);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "删除快照", action = ActionDelete.class)
@DELETE
@Path("{id}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
ActionResult<ActionDelete.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionDelete().execute(effectivePerson, id);
} catch (Exception e) {
logger.error(e, effectivePerson, request, null);
result.error(e);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "删除快照", action = ActionDelete.class)
@GET
@Path("{id}/mockdeletetoget")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void deleteMockGet2Delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
ActionResult<ActionDelete.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionDelete().execute(effectivePerson, id);
} catch (Exception e) {
logger.error(e, effectivePerson, request, null);
result.error(e);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}*/
@JaxrsMethodDescribe
(
value
=
"保存签批."
,
action
=
ActionSave
.
class
)
@POST
@Path
(
"save/task/{taskId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
MULTIPART_FORM_DATA
)
public
void
save
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"待办ID"
)
@PathParam
(
"taskId"
)
String
taskId
,
JsonElement
jsonElement
)
{
ActionResult
<
ActionSave
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionSave
().
execute
(
effectivePerson
,
taskId
,
jsonElement
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
/*@JaxrsMethodDescribe(value = "按条件对快照分页显示.", action = ActionManageListFilterPaging.class)
@POST
@Path("list/filter/{page}/size/{size}/manage")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void manageListFilterPaging(@Suspended final AsyncResponse asyncResponse,
@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
ActionResult<List<ActionManageListFilterPaging.Wo>> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionManageListFilterPaging().execute(effectivePerson, page, size, jsonElement);
} catch (Exception e) {
logger.error(e, effectivePerson, request, jsonElement);
result.error(e);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result, jsonElement));
}*/
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/PersistenceProperties.java
浏览文件 @
1a0f5d4b
...
...
@@ -21,6 +21,10 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
public
static
final
String
table
=
"PP_C_DOC_SIGN"
;
}
public
static
class
DocSignScrawl
{
public
static
final
String
table
=
"PP_C_DOC_SIGN_SCRAWL"
;
}
public
static
class
TaskCompleted
{
public
static
final
String
table
=
"PP_C_TASKCOMPLETED"
;
}
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSign.java
浏览文件 @
1a0f5d4b
...
...
@@ -15,6 +15,10 @@ import org.apache.openjpa.persistence.jdbc.Strategy;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* 签批信息
* @author sword
*/
@Entity
@ContainerEntity
(
dumpSize
=
5
,
type
=
ContainerEntity
.
Type
.
content
,
reference
=
ContainerEntity
.
Reference
.
strong
)
@Table
(
name
=
PersistenceProperties
.
Content
.
DocSign
.
table
,
uniqueConstraints
=
{
...
...
@@ -28,6 +32,10 @@ public class DocSign extends SliceJpaObject {
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
public
String
getId
()
{
return
id
;
...
...
@@ -71,7 +79,16 @@ public class DocSign extends SliceJpaObject {
}
public
DocSign
()
{
// nothing
}
public
DocSign
(
Task
task
)
{
this
.
setTitle
(
task
.
getTitle
());
this
.
application
=
task
.
getApplication
();
this
.
process
=
task
.
getProcess
();
this
.
job
=
task
.
getJob
();
this
.
activity
=
task
.
getActivity
();
this
.
activityName
=
task
.
getActivityName
();
this
.
person
=
task
.
getPerson
();
}
public
DocSignProperties
getProperties
()
{
...
...
@@ -88,7 +105,6 @@ public class DocSign extends SliceJpaObject {
public
static
final
String
title_FIELDNAME
=
"title"
;
@FieldDescribe
(
"标题."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
title_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
title_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
title
;
...
...
@@ -107,30 +123,28 @@ public class DocSign extends SliceJpaObject {
private
String
process
;
public
static
final
String
job_FIELDNAME
=
"job"
;
@FieldDescribe
(
"
任务
."
)
@FieldDescribe
(
"
工单ID
."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
job_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
job_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
job
;
public
static
final
String
work_FIELDNAME
=
"work
"
;
@FieldDescribe
(
"
工作
ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
work
_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
work_FIELDNAME
)
public
static
final
String
taskId_FIELDNAME
=
"taskId
"
;
@FieldDescribe
(
"
待办
ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
taskId
_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
taskId_FIELDNAME
,
unique
=
true
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
work
;
private
String
taskId
;
public
static
final
String
activity_FIELDNAME
=
"activity"
;
@FieldDescribe
(
"活动ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
activity_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
activity_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
activity
;
public
static
final
String
activityName_FIELDNAME
=
"activityName"
;
@FieldDescribe
(
"活动名称."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
activityName_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
activityName_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
activityName
;
...
...
@@ -205,14 +219,6 @@ public class DocSign extends SliceJpaObject {
this
.
job
=
job
;
}
public
String
getWork
()
{
return
work
;
}
public
void
setWork
(
String
work
)
{
this
.
work
=
work
;
}
public
String
getActivity
()
{
return
activity
;
}
...
...
@@ -236,4 +242,28 @@ public class DocSign extends SliceJpaObject {
public
void
setCommitTime
(
Date
commitTime
)
{
this
.
commitTime
=
commitTime
;
}
public
String
getSignPicAttId
()
{
return
signPicAttId
;
}
public
void
setSignPicAttId
(
String
signPicAttId
)
{
this
.
signPicAttId
=
signPicAttId
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getTaskId
()
{
return
taskId
;
}
public
void
setTaskId
(
String
taskId
)
{
this
.
taskId
=
taskId
;
}
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignProperties.java
浏览文件 @
1a0f5d4b
package
com.x.processplatform.core.entity.content
;
import
com.x.base.core.entity.JsonProperties
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -15,8 +16,10 @@ public class DocSignProperties extends JsonProperties {
private
String
title
;
@FieldDescribe
(
"输入框列表."
)
private
List
<
String
>
inputList
=
new
ArrayList
<>();
@FieldDescribe
(
"涂鸦列表."
)
private
List
<
String
>
scrawlList
=
new
ArrayList
<>();
public
Data
getData
()
{
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DocSignScrawl.java
0 → 100644
浏览文件 @
1a0f5d4b
package
com.x.processplatform.core.entity.content
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.SliceJpaObject
;
import
com.x.base.core.entity.annotation.CheckPersist
;
import
com.x.base.core.entity.annotation.ContainerEntity
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
import
org.apache.openjpa.persistence.jdbc.Index
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* 签批涂鸦列表
* @author sword
*/
@Entity
@ContainerEntity
(
dumpSize
=
5
,
type
=
ContainerEntity
.
Type
.
content
,
reference
=
ContainerEntity
.
Reference
.
strong
)
@Table
(
name
=
PersistenceProperties
.
Content
.
DocSignScrawl
.
table
,
uniqueConstraints
=
{
@UniqueConstraint
(
name
=
PersistenceProperties
.
Content
.
DocSignScrawl
.
table
+
JpaObject
.
IndexNameMiddle
+
JpaObject
.
DefaultUniqueConstraintSuffix
,
columnNames
=
{
JpaObject
.
IDCOLUMN
,
JpaObject
.
CREATETIMECOLUMN
,
JpaObject
.
UPDATETIMECOLUMN
,
JpaObject
.
SEQUENCECOLUMN
})
})
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
public
class
DocSignScrawl
extends
SliceJpaObject
{
private
static
final
long
serialVersionUID
=
-
8648872600208475747L
;
private
static
final
String
TABLE
=
PersistenceProperties
.
Content
.
DocSignScrawl
.
table
;
@Override
public
String
getId
()
{
return
id
;
}
@Override
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
@FieldDescribe
(
"数据库主键,自动生成."
)
@Id
@Column
(
length
=
length_id
,
name
=
ColumnNamePrefix
+
id_FIELDNAME
)
private
String
id
=
createId
();
@Override
public
void
onPersist
()
throws
Exception
{
}
public
DocSignScrawl
()
{
// nothing
}
public
DocSignScrawl
(
DocSign
docSign
,
String
data
)
{
this
.
signId
=
docSign
.
getId
();
this
.
job
=
docSign
.
getJob
();
this
.
activity
=
docSign
.
getActivity
();
this
.
activityName
=
docSign
.
getActivityName
();
this
.
person
=
docSign
.
getPerson
();
this
.
commitTime
=
new
Date
();
this
.
data
=
data
;
}
public
static
final
String
signId_FIELDNAME
=
"signId"
;
@FieldDescribe
(
"签批ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
signId_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
signId_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
signId
;
public
static
final
String
job_FIELDNAME
=
"job"
;
@FieldDescribe
(
"任务."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
job_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
job_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
job
;
public
static
final
String
activity_FIELDNAME
=
"activity"
;
@FieldDescribe
(
"活动ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
activity_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
activity
;
public
static
final
String
activityName_FIELDNAME
=
"activityName"
;
@FieldDescribe
(
"活动名称."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
activityName_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
activityName
;
public
static
final
String
person_FIELDNAME
=
"person"
;
@FieldDescribe
(
"签批人"
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
person_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
person_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
person
;
public
static
final
String
commitTime_FIELDNAME
=
"commitTime"
;
@Temporal
(
TemporalType
.
TIME
)
@FieldDescribe
(
"提交时间."
)
@Column
(
name
=
ColumnNamePrefix
+
commitTime_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
commitTime_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
Date
commitTime
;
public
static
final
String
hasScrawlPic_FIELDNAME
=
"hasScrawlPic"
;
@FieldDescribe
(
"是否有涂鸦图片"
)
@Column
(
name
=
ColumnNamePrefix
+
hasScrawlPic_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
Boolean
hasScrawlPic
=
false
;
public
static
final
String
data_FIELDNAME
=
"data"
;
@FieldDescribe
(
"涂鸦信息."
)
@Lob
@Basic
(
fetch
=
FetchType
.
EAGER
)
@Column
(
length
=
JpaObject
.
length_10M
,
name
=
ColumnNamePrefix
+
data_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
data
;
public
String
getPerson
()
{
return
person
;
}
public
void
setPerson
(
String
person
)
{
this
.
person
=
person
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getJob
()
{
return
job
;
}
public
void
setJob
(
String
job
)
{
this
.
job
=
job
;
}
public
String
getActivity
()
{
return
activity
;
}
public
void
setActivity
(
String
activity
)
{
this
.
activity
=
activity
;
}
public
String
getActivityName
()
{
return
activityName
;
}
public
void
setActivityName
(
String
activityName
)
{
this
.
activityName
=
activityName
;
}
public
Date
getCommitTime
()
{
return
commitTime
;
}
public
void
setCommitTime
(
Date
commitTime
)
{
this
.
commitTime
=
commitTime
;
}
public
String
getSignId
()
{
return
signId
;
}
public
void
setSignId
(
String
signId
)
{
this
.
signId
=
signId
;
}
public
Boolean
getHasScrawlPic
()
{
return
hasScrawlPic
;
}
public
void
setHasScrawlPic
(
Boolean
hasScrawlPic
)
{
this
.
hasScrawlPic
=
hasScrawlPic
;
}
public
String
getData
()
{
return
data
;
}
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录