Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BasicAPI
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜科
BasicAPI
Commits
7552ec3e
Commit
7552ec3e
authored
Mar 16, 2023
by
shyWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDM前端改造
流程 任务
parent
f2c66700
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
4812 additions
and
255 deletions
+4812
-255
SearchOperatorEnumUtil.java
src/com/yonde/basedata/search/SearchOperatorEnumUtil.java
+5
-0
BaseSearchService.java
src/com/yonde/basedata/service/BaseSearchService.java
+0
-1
DxMasterVO.java
src/com/yonde/basedata/vo/DxMasterVO.java
+12
-53
DxCommonUtils.java
src/com/yonde/common/DxCommonUtils.java
+14
-5
DxPartUtil.java
src/com/yonde/common/DxPartUtil.java
+160
-148
DxSearchUtil.java
src/com/yonde/common/DxSearchUtil.java
+28
-14
RfUtil.java
src/com/yonde/common/RfUtil.java
+27
-0
WTUserUtil.java
src/com/yonde/common/WTUserUtil.java
+161
-0
WorkflowUtil.java
src/com/yonde/common/WorkflowUtil.java
+2507
-0
DxDocumentVO.java
src/com/yonde/doc/vo/DxDocumentVO.java
+9
-2
DxPartService.java
src/com/yonde/part/service/DxPartService.java
+28
-27
DxPartVO.java
src/com/yonde/part/vo/DxPartVO.java
+6
-1
DxUsageLinkVO.java
src/com/yonde/part/vo/DxUsageLinkVO.java
+7
-4
WfcProcessController.java
src/com/yonde/wfc/controller/WfcProcessController.java
+122
-0
WfcProcessService.java
src/com/yonde/wfc/service/WfcProcessService.java
+263
-0
DxWfBizExtInfo.java
src/com/yonde/wfc/vo/DxWfBizExtInfo.java
+98
-0
DxWfParticipantInfoExtVO.java
src/com/yonde/wfc/vo/DxWfParticipantInfoExtVO.java
+67
-0
DxWfProcessSearchVO.java
src/com/yonde/wfc/vo/DxWfProcessSearchVO.java
+186
-0
DxWfProcessTaskSearchVO.java
src/com/yonde/wfc/vo/DxWfProcessTaskSearchVO.java
+45
-0
DxWfProcessTaskVO.java
src/com/yonde/wfc/vo/DxWfProcessTaskVO.java
+551
-0
DxWfProcessVO.java
src/com/yonde/wfc/vo/DxWfProcessVO.java
+246
-0
DxWfRouteExtInfoVO.java
src/com/yonde/wfc/vo/DxWfRouteExtInfoVO.java
+73
-0
DxWfTaskOperationArgsVO.java
src/com/yonde/wfc/vo/DxWfTaskOperationArgsVO.java
+119
-0
DxWfTaskOtherFormInfoVO.java
src/com/yonde/wfc/vo/DxWfTaskOtherFormInfoVO.java
+78
-0
No files found.
src/com/yonde/basedata/search/SearchOperatorEnumUtil.java
View file @
7552ec3e
...
...
@@ -48,6 +48,8 @@ public class SearchOperatorEnumUtil {
public
static
final
Map
<
Class
<?>,
String
>
typeItemMap
=
new
HashMap
();
// 类型映射
public
static
final
Map
<
String
,
String
>
typeStrPrefixMap
=
new
HashMap
();
// 类型映射
public
static
final
Map
<
String
,
String
>
viewMap
=
new
HashMap
();
// 视图映射
public
static
final
Map
<
Class
<?>,
String
>
typePrefixMap
=
new
HashMap
();
// 类型映射
...
...
@@ -79,6 +81,9 @@ public class SearchOperatorEnumUtil {
typePrefixMap
.
put
(
DxPartReferenceLinkVO
.
class
,
"wt.part.WTPartReferenceLink:"
);
typePrefixMap
.
put
(
DxPartDescribeLinkVO
.
class
,
"wt.part.WTPartDescribeLink:"
);
//TODO add
typeStrPrefixMap
.
put
(
"com.yonde.dcs.xbom.common.entity.vo.DxPartVO"
,
"wt.part.WTPart:"
);
typeStrPrefixMap
.
put
(
"com.yonde.dcs.document.common.entity.vo.DxDocumentVO"
,
"wt.doc.WTDocument:"
);
}
public
static
void
initTypeItemMap
()
{
...
...
src/com/yonde/basedata/service/BaseSearchService.java
View file @
7552ec3e
...
...
@@ -63,7 +63,6 @@ public class BaseSearchService <V extends IdVO> implements RemoteAccess {
new
Object
[]
{
searchQueryCondition
});
}
logger
.
error
(
"findByConfigSpecSelect===111"
+
searchQueryCondition
.
toString
());
/*boolean enforce = SessionServerHelper.manager.setAccessEnforced(false);*/
List
<
IdVO
>
partList
=
DxSearchUtil
.
findByConfigSpecSelect
(
searchQueryCondition
);;
return
partList
;
...
...
src/com/yonde/basedata/vo/DxMasterVO.java
View file @
7552ec3e
...
...
@@ -13,25 +13,26 @@ import wt.util.WTException;
import
java.io.Serializable
;
import
java.util.Locale
;
public
class
DxMasterVO
implements
Serializable
{
public
class
DxMasterVO
extends
IdVO
implements
Serializable
{
private
String
number
;
private
String
name
;
private
String
objectType
;
private
String
createTime
;
private
String
modifyTime
;
/*
private String createTime;
private String modifyTime;
*/
private
Long
creatorId
;
private
Long
modifierId
;
private
DxUserVO
creator
;
/*
private DxUserVO creator;
private DxUserVO modifier;
private
Long
id
;
private Long id;
*/
public
DxMasterVO
()
{
}
public
DxMasterVO
(
RevisionControlled
controlled
)
throws
WTException
{
super
(
controlled
);
if
(
null
!=
controlled
)
{
if
(
controlled
instanceof
WTDocument
)
{
WTDocument
doc
=
(
WTDocument
)
controlled
;
...
...
@@ -39,22 +40,19 @@ public class DxMasterVO implements Serializable {
this
.
id
=
PersistenceHelper
.
getObjectIdentifier
(
wtDocumentMaster
).
getId
();
this
.
number
=
wtDocumentMaster
.
getNumber
();
this
.
name
=
wtDocumentMaster
.
getName
();
this
.
createTime
=
DateTimeUtil
.
timeStampToString
(
wtDocumentMaster
.
getCreateTimestamp
());
this
.
modifyTime
=
DateTimeUtil
.
timeStampToString
(
wtDocumentMaster
.
getModifyTimestamp
());
}
else
if
(
controlled
instanceof
WTPart
)
{
WTPart
part
=
(
WTPart
)
controlled
;
WTPartMaster
wtPartMaster
=
(
WTPartMaster
)
part
.
getMaster
();
this
.
id
=
PersistenceHelper
.
getObjectIdentifier
(
wtPartMaster
).
getId
();
this
.
number
=
wtPartMaster
.
getNumber
();
this
.
name
=
wtPartMaster
.
getName
();
this
.
createTime
=
DateTimeUtil
.
timeStampToString
(
wtPartMaster
.
getCreateTimestamp
());
this
.
modifyTime
=
DateTimeUtil
.
timeStampToString
(
wtPartMaster
.
getModifyTimestamp
());
}
this
.
objectType
=
controlled
.
getDisplayType
().
getLocalizedMessage
(
Locale
.
SIMPLIFIED_CHINESE
);
this
.
creator
=
new
DxUserVO
(
controlled
.
getCreator
().
getPrincipal
());
this
.
modifier
=
new
DxUserVO
(
controlled
.
getModifier
().
getPrincipal
());
this
.
creatorId
=
creator
.
getUserId
();
this
.
modifierId
=
modifier
.
getUserId
();
this
.
objectType
=
controlled
.
getDisplayType
().
toString
();
this
.
setCreator
(
new
DxUserVO
(
controlled
.
getCreator
().
getPrincipal
()));
this
.
setModifier
(
new
DxUserVO
(
controlled
.
getModifier
().
getPrincipal
()));
this
.
creatorId
=
this
.
getCreator
().
getUserId
();
this
.
modifierId
=
this
.
getModifier
().
getUserId
();
this
.
subTypeName
=
"DxMaster"
;
}
}
...
...
@@ -82,22 +80,6 @@ public class DxMasterVO implements Serializable {
this
.
objectType
=
objectType
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
String
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
public
Long
getCreatorId
()
{
return
creatorId
;
}
...
...
@@ -114,27 +96,4 @@ public class DxMasterVO implements Serializable {
this
.
modifierId
=
modifierId
;
}
public
DxUserVO
getCreator
()
{
return
creator
;
}
public
void
setCreator
(
DxUserVO
creator
)
{
this
.
creator
=
creator
;
}
public
DxUserVO
getModifier
()
{
return
modifier
;
}
public
void
setModifier
(
DxUserVO
modifier
)
{
this
.
modifier
=
modifier
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
}
src/com/yonde/common/DxCommonUtils.java
View file @
7552ec3e
...
...
@@ -3,12 +3,10 @@ package com.yonde.common;
import
com.ptc.windchill.enterprise.templateutil.ActionValidator
;
import
com.yonde.basedata.vo.ObjFileLinkVO
;
import
com.yonde.basedata.vo.RepoFileVO
;
import
com.yonde.part.vo.DxPartVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
wt.access.AccessControlHelper
;
import
wt.access.AccessPermission
;
...
...
@@ -23,9 +21,7 @@ import wt.fc.WTObject;
import
wt.folder.Folder
;
import
wt.folder.FolderHelper
;
import
wt.inf.container.WTContainerRef
;
import
wt.lifecycle.LifeCycleHelper
;
import
wt.lifecycle.LifeCycleManaged
;
import
wt.lifecycle.State
;
import
wt.lifecycle.*
;
import
wt.log4j.LogR
;
import
wt.method.RemoteAccess
;
import
wt.method.RemoteMethodServer
;
...
...
@@ -408,4 +404,17 @@ public class DxCommonUtils implements RemoteAccess, Serializable {
return
folderStr
;
}
/**
* 重置对象的生命周期模板和状态
*/
public
static
void
reassignLifeCycle
(
WTContainerRef
cref
,
LifeCycleManaged
obj
,
String
LifeCycleTemplateName
,
String
state
)
throws
WTException
{
if
(
LifeCycleTemplateName
!=
null
&&
LifeCycleTemplateName
.
length
()
>
0
)
{
LifeCycleTemplate
template
=
LifeCycleHelper
.
service
.
getLifeCycleTemplate
(
LifeCycleTemplateName
,
cref
);
LifeCycleTemplateReference
templateRef
=
template
.
getLifeCycleTemplateReference
();
obj
=
LifeCycleHelper
.
service
.
reassign
(
obj
,
templateRef
);
}
if
(
state
!=
null
&&
state
.
length
()
>
0
)
{
LifeCycleHelper
.
service
.
setLifeCycleState
(
obj
,
State
.
toState
(
state
));
}
}
}
src/com/yonde/common/DxPartUtil.java
View file @
7552ec3e
...
...
@@ -10,15 +10,16 @@ import com.yonde.part.vo.*;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.apache.tools.ant.taskdefs.SQLExec
;
import
wt.doc.WTDocument
;
import
wt.doc.WTDocumentMaster
;
import
wt.enterprise.RevisionControlled
;
import
wt.fc.*
;
import
wt.fc.PersistenceHelper
;
import
wt.fc.PersistenceServerHelper
;
import
wt.fc.QueryResult
;
import
wt.fc.WTObject
;
import
wt.fc.collections.WTValuedHashMap
;
import
wt.folder.Folder
;
import
wt.folder.FolderHelper
;
import
wt.iba.value.IBAHolder
;
import
wt.inf.container.WTContainer
;
import
wt.inf.container.WTContainerRef
;
import
wt.log4j.LogR
;
...
...
@@ -26,12 +27,15 @@ import wt.method.RemoteAccess;
import
wt.method.RemoteMethodServer
;
import
wt.part.*
;
import
wt.pom.Transaction
;
import
wt.query.QuerySpec
;
import
wt.query.SearchCondition
;
import
wt.session.SessionContext
;
import
wt.
util.WTContext
;
import
wt.
session.SessionServerHelper
;
import
wt.util.WTException
;
import
wt.vc.VersionControlHelper
;
import
wt.vc.views.View
;
import
wt.vc.views.ViewHelper
;
import
wt.vc.views.ViewReference
;
import
wt.vc.wip.CheckoutLink
;
import
wt.vc.wip.WorkInProgressHelper
;
...
...
@@ -195,73 +199,52 @@ public class DxPartUtil implements RemoteAccess, Serializable {
return
workingPart
;
}
public
static
WTPart
createPart
(
DxPartVO
dxPartVO
)
{
try
{
public
static
WTPart
createPart
(
DxPartVO
dxPartVO
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
WTPart
)
RemoteMethodServer
.
getDefault
().
invoke
(
"createPart"
,
DxPartUtil
.
class
.
getName
(),
null
,
new
Class
[]{
DxPartVO
.
class
},
new
Object
[]{
dxPartVO
});
}
else
{
}
WTPart
part
=
null
;
try
{
String
partSource
=
""
;
String
partAssembly
=
""
;
String
partView
=
""
;
String
number
=
dxPartVO
.
getNumber
();
String
name
=
dxPartVO
.
getName
();
if
(
number
==
null
||
number
.
equalsIgnoreCase
(
""
))
{
number
=
PartUtil
.
getDefaultPartSeqNumber
();
}
else
{
WTPart
existPart
=
PartUtil
.
getPart
(
number
,
false
);
if
(
existPart
!=
null
)
{
existPart
=
(
WTPart
)
IBAUtil
.
forceSetIBAValues
(
existPart
,
dxPartVO
.
getDynamicAttrs
());
return
existPart
;
}
}
DxViewVO
dxView
=
dxPartVO
.
getDxView
();
logger
.
error
(
"dxView===="
+
dxView
);
if
(
ObjectsUtil
.
nonNull
(
dxView
))
{
logger
.
error
(
"dxView id===="
+
dxView
.
getId
());
if
(
ObjectsUtil
.
isNull
(
dxView
.
getName
()))
{
partView
=
SearchOperatorEnumUtil
.
viewMap
.
get
(
String
.
valueOf
(
dxView
.
getId
()));
logger
.
error
(
"dxView name===="
+
partView
);
}
else
{
partView
=
dxView
.
getName
();
}
}
if
(
number
==
null
||
number
.
equalsIgnoreCase
(
""
))
{
number
=
PartUtil
.
getDefaultPartSeqNumber
();
}
else
{
WTPart
existPart
=
getPartByNumberAndView
(
number
,
partView
,
false
);
if
(
existPart
!=
null
)
{
existPart
=
(
WTPart
)
IBAUtil
.
forceSetIBAValues
(
existPart
,
dxPartVO
.
getDynamicAttrs
());
return
existPart
;
}
}
String
partType
=
""
;
String
partFolder
=
""
;
DxContextVO
dxContext
=
dxPartVO
.
getDxContext
();
WTContainer
container
=
null
;
logger
.
error
(
"dxContext Name======"
+
dxContext
);
if
(
ObjectsUtil
.
nonNull
(
dxContext
))
{
String
contextName
=
dxContext
.
getName
();
logger
.
error
(
"container Name======"
+
contextName
);
container
=
ContainerUtil
.
getContainerByName
(
contextName
);
logger
.
error
(
"container======"
+
container
);
}
/* if (attributes != null) {
partSource = (String) attributes.get(PartUtil.SOURCE);
partAssembly = (String) attributes.get(PartUtil.ASSEMBLY);
partView = (String) attributes.get(PartUtil.VIEW);
partType = (String) attributes.get(PartUtil.TYPE);
partFolder = (String) attributes.get(PartUtil.FOLDER);
}*/
if
(
container
==
null
)
{
return
null
;
}
if
(
name
==
null
||
name
.
equalsIgnoreCase
(
""
))
{
return
null
;
}
Source
part_source
=
null
;
try
{
if
(
partSource
==
null
||
partSource
.
equals
(
""
))
{
...
...
@@ -270,7 +253,6 @@ public class DxPartUtil implements RemoteAccess, Serializable {
part_source
=
Source
.
toSource
(
partSource
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
part_source
=
Source
.
MAKE
;
}
...
...
@@ -283,7 +265,6 @@ public class DxPartUtil implements RemoteAccess, Serializable {
part_assembly
=
PartType
.
toPartType
(
partAssembly
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
part_assembly
=
PartType
.
SEPARABLE
;
}
...
...
@@ -305,7 +286,6 @@ public class DxPartUtil implements RemoteAccess, Serializable {
if
(
partType
==
null
||
partType
.
equalsIgnoreCase
(
""
))
{
partType
=
"wt.part.WTPart"
;
}
if
(
partFolder
==
null
||
partFolder
.
equalsIgnoreCase
(
""
))
{
partFolder
=
"/Default"
;
}
else
{
...
...
@@ -324,7 +304,6 @@ public class DxPartUtil implements RemoteAccess, Serializable {
part
.
setContainerReference
(
containerRef
);
Folder
location
=
null
;
try
{
location
=
FolderHelper
.
service
.
getFolder
(
partFolder
,
containerRef
);
}
catch
(
Exception
e
)
{
...
...
@@ -348,19 +327,11 @@ public class DxPartUtil implements RemoteAccess, Serializable {
part
=
(
WTPart
)
PersistenceHelper
.
manager
.
save
(
part
);
part
=
(
WTPart
)
PersistenceHelper
.
manager
.
refresh
(
part
);
if
(
ObjectsUtil
.
nonNull
(
dxPartVO
.
getDynamicAttrs
()))
{
part
=
(
WTPart
)
IBAUtil
.
forceSetIBAValues
(
part
,
dxPartVO
.
getDynamicAttrs
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
part
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
public
static
WTPartUsageLink
saveWTPartUsageLink
(
DxUsageLinkVO
usageLinkVO
)
throws
Exception
{
Transaction
ts
=
null
;
...
...
@@ -644,4 +615,45 @@ public class DxPartUtil implements RemoteAccess, Serializable {
return
docList
;
}
public
static
WTPart
getPartByNumberAndView
(
String
number
,
String
viewStr
,
boolean
accessControlled
)
throws
WTException
{
WTPart
part
=
null
;
try
{
number
=
number
.
toUpperCase
();
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
WTPart
)
RemoteMethodServer
.
getDefault
().
invoke
(
"getPartByNumberAndView"
,
DxPartUtil
.
class
.
getName
(),
null
,
new
Class
[]{
String
.
class
,
String
.
class
,
boolean
.
class
},
new
Object
[]{
number
,
viewStr
,
accessControlled
});
}
else
{
boolean
enforce
=
SessionServerHelper
.
manager
.
setAccessEnforced
(
accessControlled
);
try
{
QuerySpec
querySpec
=
new
QuerySpec
(
WTPart
.
class
);
SearchCondition
searchCondition
=
new
SearchCondition
(
WTPart
.
class
,
WTPart
.
NUMBER
,
SearchCondition
.
LIKE
,
"%"
+
number
.
toUpperCase
()
+
"%"
,
false
);
querySpec
.
appendWhere
(
searchCondition
,
new
int
[]{
0
});
querySpec
.
appendAnd
();
querySpec
.
appendWhere
(
new
SearchCondition
(
WTPart
.
class
,
WTPart
.
LATEST_ITERATION
,
SearchCondition
.
IS_TRUE
),
new
int
[]{
0
});
querySpec
.
appendAnd
();
querySpec
.
appendOpenParen
();
View
view
=
ViewHelper
.
service
.
getView
(
viewStr
);
querySpec
.
appendWhere
(
new
SearchCondition
(
WTPart
.
class
,
WTPart
.
VIEW
+
"."
+
ViewReference
.
KEY
,
SearchCondition
.
EQUAL
,
PersistenceHelper
.
getObjectIdentifier
(
view
)),
new
int
[]{
0
});
querySpec
.
appendOr
();
querySpec
.
appendWhere
(
new
SearchCondition
(
WTPart
.
class
,
WTPart
.
VIEW
,
true
),
new
int
[]{
0
});
querySpec
.
appendCloseParen
();
QueryResult
queryResult
=
PersistenceHelper
.
manager
.
find
(
querySpec
);
if
(
queryResult
.
hasMoreElements
())
{
part
=
(
WTPart
)
queryResult
.
nextElement
();
}
}
finally
{
SessionServerHelper
.
manager
.
setAccessEnforced
(
enforce
);
}
}
}
catch
(
RemoteException
e
)
{
e
.
printStackTrace
();
}
catch
(
InvocationTargetException
e
)
{
e
.
printStackTrace
();
}
return
part
;
}
}
src/com/yonde/common/DxSearchUtil.java
View file @
7552ec3e
...
...
@@ -22,16 +22,14 @@ import wt.part.WTPart;
import
wt.pds.StatementSpec
;
import
wt.query.*
;
import
wt.session.SessionServerHelper
;
import
wt.util.WTAttributeNameIfc
;
import
wt.util.WTException
;
import
wt.util.WTPropertyVetoException
;
import
wt.vc.Iterated
;
import
wt.vc.views.View
;
import
wt.vc.views.ViewHelper
;
import
wt.vc.wip.WorkInProgressHelper
;
import
java.io.Serializable
;
import
java.lang.reflect.InvocationTargetException
;
import
java.rmi.RemoteException
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -41,6 +39,7 @@ public class DxSearchUtil implements RemoteAccess, Serializable {
private
static
Logger
logger
=
LogR
.
getLogger
(
DxSearchUtil
.
class
.
getName
());
private
static
final
long
serialVersionUID
=
1L
;
@Deprecated
public
static
DxPageImpl
findByConfigSpec
(
SearchQueryCondition
searchQueryCondition
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
DxPageImpl
)
RemoteMethodServer
.
getDefault
().
invoke
(
"findByConfigSpecSelect"
,
DxSearchUtil
.
class
.
getName
(),
null
,
...
...
@@ -57,11 +56,7 @@ public class DxSearchUtil implements RemoteAccess, Serializable {
searchItems
=
searchQueryCondition
.
getSearchVersion
().
getSearchItems
();
}
QuerySpec
querySpec
=
DxSearchUtil
.
buildQuerySpec
(
searchItems
,
WTPart
.
class
);
/* LatestConfigSpec ls = new LatestConfigSpec();
querySpec = ls.appendSearchCriteria(querySpec);*/
QueryResult
qr
=
PersistenceHelper
.
manager
.
find
((
StatementSpec
)
querySpec
);
//LatestConfigSpec lcs = new LatestConfigSpec();
//qr = lcs.process(qr);
partList
=
new
ArrayList
<
DxPartVO
>();
while
(
qr
.
hasMoreElements
())
{
WTObject
o
=
(
WTObject
)
qr
.
nextElement
();
...
...
@@ -103,12 +98,28 @@ public class DxSearchUtil implements RemoteAccess, Serializable {
QuerySpec
querySpec
=
DxSearchUtil
.
buildQuerySpec
(
searchItems
,
cls
);
/* LatestConfigSpec ls = new LatestConfigSpec();
querySpec = ls.appendSearchCriteria(querySpec);*/
QueryResult
qr
=
PersistenceHelper
.
manager
.
find
((
StatementSpec
)
querySpec
);
BasicPageableQuerySpec
bpqs
=
new
BasicPageableQuerySpec
();
bpqs
.
setPrimaryStatement
(
querySpec
);
logger
.
error
(
"pageFrom===="
+
(
searchQueryCondition
.
getPageFrom
()-
1
)*
searchQueryCondition
.
getPageSize
());
logger
.
error
(
"pageSize===="
+
searchQueryCondition
.
getPageSize
());
bpqs
.
setOffset
((
searchQueryCondition
.
getPageFrom
()-
1
)*
searchQueryCondition
.
getPageSize
());
bpqs
.
setRange
(
searchQueryCondition
.
getPageSize
());
bpqs
.
setBackgroundThreadEnabled
(
false
);
QueryResult
qr
=
PersistenceHelper
.
manager
.
find
(
querySpec
);
//LatestConfigSpec lcs = new LatestConfigSpec();
//qr = lcs.process(qr);
partList
=
new
ArrayList
<
DxPartVO
>();
partList
=
new
ArrayList
();
while
(
qr
.
hasMoreElements
())
{
WTObject
o
=
(
WTObject
)
qr
.
nextElement
();
Object
element
=
qr
.
nextElement
();
WTObject
o
=
null
;
logger
.
error
(
"[]=====arrysList"
+
element
);
if
(
element
instanceof
Object
[])
{
Object
[]
objects
=
(
Object
[])
element
;
o
=
(
WTObject
)
objects
[
0
];
}
else
{
o
=
(
WTObject
)
element
;
}
buildQueryResult
(
o
,
partList
,
indices
);
}
}
finally
{
...
...
@@ -199,20 +210,23 @@ public class DxSearchUtil implements RemoteAccess, Serializable {
/* if (fieldName.equals("masterId")) {
return null;
}*/
// TODO
if
(
fieldName
.
equals
(
"checkOuted"
)
||
fieldName
.
equals
(
SearchOperatorEnumUtil
.
DX_ID
)||
fieldName
.
equals
(
"creatorId"
))
{
// TODO
fieldName.equals(SearchOperatorEnumUtil.DX_ID)||
if
(
fieldName
.
equals
(
"checkOuted"
)
||
fieldName
.
equals
(
"creatorId"
))
{
continue
;
}
//视图
if
(
fieldName
.
equals
(
SearchOperatorEnumUtil
.
DX_VIEWID
))
{
addQuerySpecOp
(
querySpec
,
operator
);
String
viewName
=
SearchOperatorEnumUtil
.
viewMap
.
get
(
String
.
valueOf
(
item
.
value
));
logger
.
error
(
"viewName========="
+
viewName
);
if
(
StringUtils
.
isEmpty
(
viewName
))
{
continue
;
}
View
view
=
ViewHelper
.
service
.
getView
(
viewName
);
logger
.
error
(
"view========="
+
view
);
if
(
view
==
null
)
{
continue
;
}
addQuerySpecOp
(
querySpec
,
operator
);
SearchCondition
sc
=
buildScd
(
clazz
,
typeSearchMap
.
get
(
fieldName
),
item
.
operator
.
name
(),
PersistenceHelper
.
getObjectIdentifier
(
view
).
getId
());
if
(
ObjectsUtil
.
nonNull
(
sc
))
{
...
...
@@ -266,7 +280,7 @@ public class DxSearchUtil implements RemoteAccess, Serializable {
op
,
scVal
);
return
sc
;
}
if
(
value
instanceof
Long
||
fieldName
.
contains
(
Iterated
.
MASTER_REFERENCE
))
{
if
(
value
instanceof
Long
||
fieldName
.
contains
(
Iterated
.
MASTER_REFERENCE
)
||
fieldName
.
equalsIgnoreCase
(
WTAttributeNameIfc
.
ID_NAME
)
)
{
sc
=
new
SearchCondition
(
clazz
,
fieldName
,
op
,
Long
.
valueOf
(
String
.
valueOf
(
value
)));
return
sc
;
...
...
src/com/yonde/common/RfUtil.java
View file @
7552ec3e
...
...
@@ -6,6 +6,7 @@ import wt.fc.ReferenceFactory;
import
wt.fc.WTObject
;
import
wt.fc.WTReference
;
import
wt.lifecycle.LifeCycleHelper
;
import
wt.method.RemoteMethodServer
;
import
wt.part.WTPart
;
import
wt.session.SessionContext
;
import
wt.session.SessionHelper
;
...
...
@@ -94,4 +95,30 @@ public class RfUtil {
}
return
p
;
}
/**
* 根据对象oid获取WTReference
*
* @param oid
* @return
*/
public
static
WTReference
getObjectRefByOid
(
String
oid
)
{
try
{
boolean
enforce
=
SessionServerHelper
.
manager
.
setAccessEnforced
(
false
);
WTReference
wtreference
=
null
;
try
{
ReferenceFactory
referencefactory
=
new
ReferenceFactory
();
wtreference
=
referencefactory
.
getReference
(
oid
);
return
wtreference
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
SessionServerHelper
.
manager
.
setAccessEnforced
(
enforce
);
}
return
wtreference
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
}
src/com/yonde/common/WTUserUtil.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
common
;
import
wt.fc.PersistenceHelper
;
import
wt.fc.QueryResult
;
import
wt.org.WTUser
;
import
wt.query.QuerySpec
;
import
wt.query.SearchCondition
;
import
wt.util.WTException
;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.List
;
public
class
WTUserUtil
{
public
static
WTUser
getUserById
(
String
s
)
throws
WTException
{
WTUser
wtuser
=
null
;
QuerySpec
queryspec
=
null
;
QueryResult
queryresult
=
null
;
queryspec
=
new
QuerySpec
(
WTUser
.
class
);
if
(
s
.
equalsIgnoreCase
(
"wcadmin"
))
{
s
=
"Administrator"
;
}
SearchCondition
searchcondition
=
new
SearchCondition
(
WTUser
.
class
,
"name"
,
"LIKE"
,
s
,
false
);
queryspec
.
appendSearchCondition
(
searchcondition
);
queryspec
.
appendAnd
();
queryspec
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
DISABLED
,
SearchCondition
.
IS_FALSE
));
queryresult
=
PersistenceHelper
.
manager
.
find
(
queryspec
);
if
(
queryresult
.
hasMoreElements
())
{
wtuser
=
(
WTUser
)
queryresult
.
nextElement
();
}
return
wtuser
;
}
public
static
WTUser
getUser
(
String
userName
)
{
WTUser
user
=
null
;
try
{
if
(
userName
!=
null
)
{
if
(
userName
.
equalsIgnoreCase
(
"wcadmin"
))
{
userName
=
"Administrator"
;
}
QuerySpec
qs
=
new
QuerySpec
(
WTUser
.
class
);
// 条件: 指定编号
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
NAME
,
SearchCondition
.
EQUAL
,
userName
));
qs
.
appendAnd
();
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
DISABLED
,
SearchCondition
.
IS_FALSE
));
QueryResult
qr
=
PersistenceHelper
.
manager
.
find
(
qs
);
if
(
qr
.
hasMoreElements
())
{
user
=
(
WTUser
)
qr
.
nextElement
();
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
user
;
}
/**
* 通过用户名称模糊查询系统中用户对象。
*
* @param userName
* @return
*/
public
static
List
<
WTUser
>
getUsers
(
String
userName
)
{
List
<
WTUser
>
userList
=
new
ArrayList
<
WTUser
>();
WTUser
user
=
null
;
try
{
if
(
userName
!=
null
)
{
QuerySpec
qs
=
new
QuerySpec
(
WTUser
.
class
);
qs
.
appendOpenParen
();
// 条件: 指定编号
//qs.appendWhere(new SearchCondition(WTUser.class, WTUser.NAME, SearchCondition.LIKE, userName, false));
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
FULL_NAME
,
SearchCondition
.
LIKE
,
"%"
+
userName
+
"%"
,
false
));
qs
.
appendOr
();
qs
.
appendSearchCondition
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
NAME
,
SearchCondition
.
LIKE
,
"%"
+
userName
+
"%"
,
false
));
qs
.
appendCloseParen
();
qs
.
appendAnd
();
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
DISABLED
,
SearchCondition
.
IS_FALSE
));
QueryResult
qr
=
PersistenceHelper
.
manager
.
find
(
qs
);
while
(
qr
.
hasMoreElements
())
{
user
=
(
WTUser
)
qr
.
nextElement
();
if
(!
user
.
isDisabled
())
{
userList
.
add
(
user
);
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
userList
;
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
QuerySpec
qs
=
new
QuerySpec
(
WTUser
.
class
);
qs
.
appendOpenParen
();
// 条件: 指定编号
//qs.appendWhere(new SearchCondition(WTUser.class, WTUser.NAME, SearchCondition.LIKE, userName, false));
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
FULL_NAME
,
SearchCondition
.
LIKE
,
"%111%"
,
false
));
qs
.
appendOr
();
qs
.
appendSearchCondition
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
NAME
,
SearchCondition
.
LIKE
,
"%555%"
,
false
));
qs
.
appendCloseParen
();
qs
.
appendAnd
();
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
DISABLED
,
SearchCondition
.
IS_FALSE
));
System
.
out
.
print
(
qs
);
}
/**
* 通过用户全名获取用户对象
*
* @param userFullName
* @return
*/
public
static
WTUser
getUserByFullName
(
String
userFullName
)
{
WTUser
user
=
null
;
try
{
if
(
userFullName
!=
null
)
{
QuerySpec
qs
=
new
QuerySpec
(
WTUser
.
class
);
// 条件: 指定编号
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
FULL_NAME
,
SearchCondition
.
EQUAL
,
userFullName
,
false
));
qs
.
appendAnd
();
qs
.
appendWhere
(
new
SearchCondition
(
WTUser
.
class
,
WTUser
.
DISABLED
,
SearchCondition
.
IS_FALSE
));
QueryResult
qr
=
PersistenceHelper
.
manager
.
find
(
qs
);
while
(
qr
.
hasMoreElements
())
{
user
=
(
WTUser
)
qr
.
nextElement
();
if
(!
user
.
isDisabled
())
{
return
user
;
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
user
;
}
public
static
Boolean
isAdministrator
(
WTUser
principal
)
throws
WTException
{
try
{
Enumeration
groupNames
=
principal
.
parentGroupNames
();
while
(
groupNames
.
hasMoreElements
())
{
if
(
"Administrators"
.
equals
(
groupNames
.
nextElement
()))
{
return
true
;
}
}
}
catch
(
WTException
e
)
{
throw
new
WTException
(
e
.
getLocalizedMessage
());
}
return
false
;
}
}
src/com/yonde/common/WorkflowUtil.java
0 → 100644
View file @
7552ec3e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/com/yonde/doc/vo/DxDocumentVO.java
View file @
7552ec3e
...
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.basedata.entity.users.DxUserVO
;
import
com.yonde.basedata.vo.*
;
import
com.yonde.common.CommonUtil
;
import
com.yonde.common.DxCommonUtils
;
import
com.yonde.common.IBAHelper
;
import
com.yonde.context.vo.DxContextVO
;
...
...
@@ -16,6 +17,7 @@ import wt.session.SessionHelper;
import
wt.type.ClientTypedUtility
;
import
wt.util.WTException
;
import
wt.vc.wip.WorkInProgressHelper
;
import
wt.vc.wip.Workable
;
import
java.io.Serializable
;
import
java.lang.reflect.InvocationTargetException
;
...
...
@@ -88,7 +90,7 @@ public class DxDocumentVO extends RevisionControlledVO implements Serializable {
this
.
number
=
wtDoc
.
getNumber
();
this
.
setModifier
(
new
DxUserVO
(
wtDoc
.
getModifier
().
getPrincipal
()));
this
.
setCreator
(
new
DxUserVO
(
wtDoc
.
getCreator
().
getPrincipal
()));
this
.
dynamicAttrs
=
IBAHelper
.
getAllIBAValues
(
wtDoc
);
this
.
state
=
wtDoc
.
getState
().
getState
().
toString
();
//this.subTypeName = ClientTypedUtility.getTypeIdentifier(wtDoc).getTypename();
this
.
subTypeName
=
"managementDoc"
;
//TODO 要映射
...
...
@@ -96,10 +98,15 @@ public class DxDocumentVO extends RevisionControlledVO implements Serializable {
this
.
latest
=
wtDoc
.
isLatestIteration
();
this
.
checkOuted
=
WorkInProgressHelper
.
isCheckedOut
(
wtDoc
);
//this.setOperator("NO_CHANGE");
this
.
lifecycleTemplateId
=
PersistenceHelper
.
getObjectIdentifier
(
wtDoc
.
getLifeCycleTemplate
().
getObject
()).
getId
();
if
(
WorkInProgressHelper
.
isCheckedOut
(
wtDoc
))
{
wtDoc
=
(
WTDocument
)
CommonUtil
.
getWorkingCopyVersion
(
wtDoc
);
}
this
.
dynamicAttrs
=
IBAHelper
.
getAllIBAValues
(
wtDoc
);
if
(
StringUtils
.
isNotEmpty
(
wtDoc
.
getDescription
()))
{
this
.
getDynamicAttrs
().
put
(
"description"
,
wtDoc
.
getDescription
());
}
this
.
lifecycleTemplateId
=
PersistenceHelper
.
getObjectIdentifier
(
wtDoc
.
getLifeCycleTemplate
().
getObject
()).
getId
();
this
.
setObjFileLinks
(
DxCommonUtils
.
buildObjFileLinks
(
wtDoc
));
}
finally
{
SessionContext
.
setContext
(
previous
);
...
...
src/com/yonde/part/service/DxPartService.java
View file @
7552ec3e
...
...
@@ -553,12 +553,9 @@ public class DxPartService implements RemoteAccess, Serializable {
new
Class
[]
{
Long
.
class
},
new
Object
[]
{
id
});
}
/*
SessionContext previous = SessionContext.newContext();
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
SessionHelper
.
manager
.
setAdministrator
();
} finally {
SessionContext.setContext(previous);
}*/
WTPart
partById
=
DxPartUtil
.
getPartById
(
id
);
String
viewName
=
partById
.
getViewName
();
if
(!
viewName
.
equalsIgnoreCase
(
"Planning"
)){
...
...
@@ -586,5 +583,9 @@ public class DxPartService implements RemoteAccess, Serializable {
throw
new
Exception
(
"无需转视图"
);
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
}
}
src/com/yonde/part/vo/DxPartVO.java
View file @
7552ec3e
...
...
@@ -9,6 +9,8 @@ import com.yonde.basedata.vo.RevisionControlledVO;
import
com.yonde.common.CommonUtil
;
import
com.yonde.common.IBAHelper
;
import
com.yonde.context.vo.DxContextVO
;
import
org.apache.commons.lang.StringUtils
;
import
wt.doc.WTDocument
;
import
wt.fc.PersistenceHelper
;
import
wt.org.WTOrganization
;
import
wt.part.WTPart
;
...
...
@@ -112,7 +114,6 @@ public class DxPartVO extends RevisionControlledVO implements Serializable {
this
.
setVersion
(
new
DxVersionVO
(
wtPart
));
this
.
setDxContext
(
new
DxContextVO
(
wtPart
.
getContainer
()));
this
.
dynamicAttrs
=
IBAHelper
.
getAllIBAValues
(
wtPart
);
this
.
state
=
wtPart
.
getState
().
getState
().
toString
();
this
.
subTypeName
=
"Component"
;
//TODO 要映射
//ClientTypedUtility.getTypeIdentifier(wtPart).getTypename();
...
...
@@ -121,6 +122,10 @@ public class DxPartVO extends RevisionControlledVO implements Serializable {
this
.
checkOuted
=
WorkInProgressHelper
.
isCheckedOut
(
wtPart
);
this
.
lifecycleTemplateId
=
PersistenceHelper
.
getObjectIdentifier
(
wtPart
.
getLifeCycleTemplate
().
getObject
()).
getId
();
if
(
this
.
checkOuted
)
{
wtPart
=
(
WTPart
)
CommonUtil
.
getWorkingCopyVersion
(
wtPart
);
}
this
.
dynamicAttrs
=
IBAHelper
.
getAllIBAValues
(
wtPart
);
this
.
defaultUnit
=
wtPart
.
getDefaultUnit
().
getDisplay
();
this
.
endItem
=
wtPart
.
isEndItem
();
...
...
src/com/yonde/part/vo/DxUsageLinkVO.java
View file @
7552ec3e
...
...
@@ -3,6 +3,7 @@ package com.yonde.part.vo;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.basedata.vo.IdVO
;
import
com.yonde.common.IBAHelper
;
import
com.yonde.common.ObjectsUtil
;
import
com.yonde.common.PartUtil
;
import
wt.fc.PersistenceHelper
;
import
wt.part.Quantity
;
...
...
@@ -51,11 +52,13 @@ public class DxUsageLinkVO extends IdVO implements Serializable {
this
.
setUnit
(
qt
.
getUnit
().
toString
());
WTPartMaster
uses
=
(
WTPartMaster
)
usageLink
.
getUses
();
WTPart
child
=
PartUtil
.
getLatestPartByNoViewWithState
(
uses
.
getNumber
(),
parent
.
getViewName
(),
null
,
false
);
if
(
ObjectsUtil
.
nonNull
(
child
))
{
this
.
setTargetId
(
PersistenceHelper
.
getObjectIdentifier
(
child
.
getMaster
()).
getId
());
this
.
setSourceId
(
PersistenceHelper
.
getObjectIdentifier
(
parent
).
getId
());
if
(
level
>
0
)
{
this
.
setTarget
(
new
DxPartVO
(
child
));
}
}
this
.
setSourceId
(
PersistenceHelper
.
getObjectIdentifier
(
parent
).
getId
());
if
(
level
<
0
)
{
this
.
setSource
(
new
DxPartVO
(
parent
));
}
...
...
src/com/yonde/wfc/controller/WfcProcessController.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
controller
;
import
com.yonde.basedata.entity.api.ApiResult
;
import
com.yonde.basedata.vo.IdVO
;
import
com.yonde.wfc.service.WfcProcessService
;
import
com.yonde.wfc.vo.*
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
value
=
"/workflow"
)
public
class
WfcProcessController
{
@PostMapping
(
"/inst"
)
//@ApiOperation("查询流程实例列表")
public
List
<
DxWfProcessVO
>
getProcessList
(
@RequestBody
DxWfProcessSearchVO
processInstSearchVO
)
{
List
<
DxWfProcessVO
>
allProcess
=
new
ArrayList
<
DxWfProcessVO
>();
try
{
allProcess
=
WfcProcessService
.
getAllProcess
(
processInstSearchVO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
allProcess
;
}
@GetMapping
({
"/task/hisTaskList"
})
//@ApiOperation("历史任务列表")
public
List
<
DxWfProcessTaskVO
>
getHisTaskList
(
@RequestParam
(
"instId"
)
String
instId
,
@RequestParam
(
value
=
"activityId"
,
required
=
false
)
String
activityId
)
{
List
<
DxWfProcessTaskVO
>
hisTaskList
=
new
ArrayList
<
DxWfProcessTaskVO
>();
try
{
hisTaskList
=
WfcProcessService
.
getHisTaskList
(
instId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
hisTaskList
;
}
@GetMapping
({
"/task/todo"
})
//@ApiOperation("查询待办任务列表")
public
List
<
DxWfProcessTaskVO
>
getTodoTaskList
(
@RequestParam
(
"userName"
)
String
userName
)
{
List
<
DxWfProcessTaskVO
>
todoTaskList
=
new
ArrayList
<
DxWfProcessTaskVO
>();
try
{
todoTaskList
=
WfcProcessService
.
getTodoTaskList
(
userName
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
todoTaskList
;
}
@GetMapping
({
"/task/countOfType"
})
public
Map
<
String
,
Integer
>
getTaskTypeAndCount
(
@RequestParam
(
"userName"
)
String
userName
)
{
Map
<
String
,
Integer
>
resultMap
=
new
HashMap
<
String
,
Integer
>();
List
<
DxWfProcessTaskVO
>
todoTaskList
=
null
;
try
{
todoTaskList
=
WfcProcessService
.
getTodoTaskList
(
userName
);
resultMap
.
put
(
"todoTask"
,
todoTaskList
.
size
());
resultMap
.
put
(
"forwardTask"
,
0
);
resultMap
.
put
(
"unClaimedTask"
,
0
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
resultMap
;
}
@GetMapping
({
"/task/finished"
})
//@ApiOperation("查询已办任务列表")
public
List
<
DxWfProcessTaskVO
>
getFinishedTaskList
(
DxWfProcessTaskSearchVO
taskSearchVO
,
@RequestParam
(
defaultValue
=
"1"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
size
)
{
return
null
;
}
@GetMapping
({
"/inst/{instId}"
})
//@ApiOperation("流程实例详情")
public
DxWfProcessVO
getProcessDetail
(
@PathVariable
(
"instId"
)
String
instId
)
{
DxWfProcessVO
processDetail
=
null
;
try
{
processDetail
=
WfcProcessService
.
getProcessDetail
(
instId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
processDetail
;
}
@GetMapping
({
"/inst/{instId}/bizPBO"
})
//@ApiOperation("查询流程业务对象PBO")
public
Object
getProcessBusinessObjectById
(
@PathVariable
(
"instId"
)
String
instId
)
{
IdVO
idVO
=
null
;
try
{
idVO
=
WfcProcessService
.
getProcessBusinessObjectById
(
instId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
idVO
;
}
@GetMapping
({
"/task/{id}"
})
//@ApiOperation("任务详情")
public
DxWfProcessTaskVO
getTaskDetail
(
@PathVariable
String
id
)
{
DxWfProcessTaskVO
taskDetail
=
null
;
try
{
taskDetail
=
WfcProcessService
.
getTaskDetail
(
id
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
taskDetail
;
}
@PostMapping
({
"/template/operation"
})
//@ApiOperation("常用操作的提交")
public
ApiResult
executeOperation
(
@RequestBody
DxWfTaskOperationArgsVO
operationArgsVO
)
{
try
{
WfcProcessService
.
executeOperation
(
operationArgsVO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ApiResult
.
error
(
"501"
,
"操作失败"
,
e
);
}
return
ApiResult
.
ok
((
Object
)
null
,
"操作成功"
);
}
}
src/com/yonde/wfc/service/WfcProcessService.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
service
;
import
com.yonde.basedata.search.SearchOperatorEnumUtil
;
import
com.yonde.basedata.vo.IdVO
;
import
com.yonde.common.ObjectsUtil
;
import
com.yonde.common.RfUtil
;
import
com.yonde.common.WTUserUtil
;
import
com.yonde.common.WorkflowUtil
;
import
com.yonde.doc.vo.DxDocumentVO
;
import
com.yonde.part.vo.DxPartVO
;
import
com.yonde.wfc.vo.DxWfProcessSearchVO
;
import
com.yonde.wfc.vo.DxWfProcessTaskVO
;
import
com.yonde.wfc.vo.DxWfProcessVO
;
import
com.yonde.wfc.vo.DxWfTaskOperationArgsVO
;
import
org.apache.commons.lang.StringUtils
;
import
wt.doc.WTDocument
;
import
wt.fc.Persistable
;
import
wt.fc.WTObject
;
import
wt.method.RemoteAccess
;
import
wt.method.RemoteMethodServer
;
import
wt.org.WTUser
;
import
wt.part.WTPart
;
import
wt.session.SessionContext
;
import
wt.session.SessionHelper
;
import
wt.util.WTException
;
import
wt.workflow.engine.WfProcess
;
import
wt.workflow.work.WorkItem
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Vector
;
public
class
WfcProcessService
implements
RemoteAccess
{
/**
* 获取对象所有流程
* @param processInstSearchVO
* @return
* @throws Exception
*/
public
static
List
<
DxWfProcessVO
>
getAllProcess
(
DxWfProcessSearchVO
processInstSearchVO
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
List
<
DxWfProcessVO
>)
RemoteMethodServer
.
getDefault
().
invoke
(
"getAllProcess"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
DxWfProcessSearchVO
.
class
},
new
Object
[]
{
processInstSearchVO
});
}
List
<
DxWfProcessVO
>
processVOList
=
new
ArrayList
<
DxWfProcessVO
>();
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
SessionHelper
.
manager
.
setAdministrator
();
String
pboClass
=
processInstSearchVO
.
getPboClass
();
String
prefix
=
SearchOperatorEnumUtil
.
typeStrPrefixMap
.
get
(
pboClass
);
Long
pboId
=
processInstSearchVO
.
getPboId
();
WTObject
wtObjectByOid
=
RfUtil
.
getWTObjectByOid
(
"OR:"
+
prefix
+
pboId
);
if
(
ObjectsUtil
.
nonNull
(
wtObjectByOid
))
{
List
<
WfProcess
>
allProcess
=
WorkflowUtil
.
getAllProcess
(
wtObjectByOid
);
for
(
WfProcess
process
:
allProcess
)
{
DxWfProcessVO
wfProcessVO
=
new
DxWfProcessVO
(
process
);
processVOList
.
add
(
wfProcessVO
);
}
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
return
processVOList
;
}
/**
* 获取流程详情
* @param instId
* @return
* @throws Exception
*/
public
static
DxWfProcessVO
getProcessDetail
(
String
instId
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
DxWfProcessVO
)
RemoteMethodServer
.
getDefault
().
invoke
(
"getProcessDetail"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
String
.
class
},
new
Object
[]
{
instId
});
}
DxWfProcessVO
wfProcessVO
=
null
;
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
SessionHelper
.
manager
.
setAdministrator
();
String
workflowOid
=
"OR:wt.workflow.engine.WfProcess:"
+
instId
;
WfProcess
process
=
(
WfProcess
)
RfUtil
.
getWTObjectByOid
(
workflowOid
);
if
(
ObjectsUtil
.
nonNull
(
process
))
{
wfProcessVO
=
new
DxWfProcessVO
(
process
);
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
return
wfProcessVO
;
}
/**
* 获取流程主对象
* @param instId
* @return
* @throws Exception
*/
public
static
IdVO
getProcessBusinessObjectById
(
String
instId
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
IdVO
)
RemoteMethodServer
.
getDefault
().
invoke
(
"getProcessBusinessObjectById"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
String
.
class
},
new
Object
[]
{
instId
});
}
IdVO
objVO
=
null
;
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
SessionHelper
.
manager
.
setAdministrator
();
String
workflowOid
=
"OR:wt.workflow.engine.WfProcess:"
+
instId
;
WfProcess
process
=
(
WfProcess
)
RfUtil
.
getWTObjectByOid
(
workflowOid
);
if
(
ObjectsUtil
.
nonNull
(
process
))
{
Persistable
pbo
=
(
Persistable
)
process
.
getContext
().
getValue
(
"primaryBusinessObject"
);
if
(
ObjectsUtil
.
nonNull
(
pbo
))
{
if
(
pbo
instanceof
WTDocument
)
{
WTDocument
document
=
(
WTDocument
)
pbo
;
objVO
=
new
DxDocumentVO
(
document
);
}
else
if
(
pbo
instanceof
WTPart
)
{
WTPart
part
=
(
WTPart
)
pbo
;
objVO
=
new
DxPartVO
(
part
);
}
else
{
// TODO 其他类型
}
}
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
return
objVO
;
}
/**
* 获取流程历史待办
* @param processId
* @return
* @throws Exception
*/
public
static
List
<
DxWfProcessTaskVO
>
getHisTaskList
(
String
processId
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
List
<
DxWfProcessTaskVO
>)
RemoteMethodServer
.
getDefault
().
invoke
(
"getHisTaskList"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
String
.
class
},
new
Object
[]
{
processId
});
}
List
<
DxWfProcessTaskVO
>
taskVOList
=
new
ArrayList
<
DxWfProcessTaskVO
>();
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
SessionHelper
.
manager
.
setAdministrator
();
String
workflowOid
=
"OR:wt.workflow.engine.WfProcess:"
+
processId
;
WfProcess
wtObjectByOid
=
(
WfProcess
)
RfUtil
.
getWTObjectByOid
(
workflowOid
);
if
(
ObjectsUtil
.
nonNull
(
wtObjectByOid
))
{
List
<
WorkItem
>
workItemList
=
WorkflowUtil
.
getWorkItemByprocess
(
wtObjectByOid
);
for
(
WorkItem
wfActivity
:
workItemList
)
{
DxWfProcessTaskVO
dxWfProcessTaskVO
=
new
DxWfProcessTaskVO
(
wfActivity
);
taskVOList
.
add
(
dxWfProcessTaskVO
);
}
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
return
taskVOList
;
}
/**
* 获取用户未完成待办
* @param userName
* @return
* @throws Exception
*/
public
static
List
<
DxWfProcessTaskVO
>
getTodoTaskList
(
String
userName
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
List
<
DxWfProcessTaskVO
>)
RemoteMethodServer
.
getDefault
().
invoke
(
"getTodoTaskList"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
String
.
class
},
new
Object
[]
{
userName
});
}
List
<
DxWfProcessTaskVO
>
taskVOList
=
new
ArrayList
<
DxWfProcessTaskVO
>();
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
SessionHelper
.
manager
.
setAdministrator
();
WTUser
user
=
WTUserUtil
.
getUser
(
userName
);
List
<
WorkItem
>
userWorks
=
WorkflowUtil
.
getUserWorks
(
user
);
for
(
WorkItem
userWork
:
userWorks
)
{
DxWfProcessTaskVO
dxWfProcessTaskVO
=
new
DxWfProcessTaskVO
(
userWork
);
taskVOList
.
add
(
dxWfProcessTaskVO
);
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
return
taskVOList
;
}
/**
* 获取待办详情
* @param id
* @return
* @throws Exception
*/
public
static
DxWfProcessTaskVO
getTaskDetail
(
String
id
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
DxWfProcessTaskVO
)
RemoteMethodServer
.
getDefault
().
invoke
(
"getTaskDetail"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
String
.
class
},
new
Object
[]
{
id
});
}
SessionContext
previous
=
SessionContext
.
newContext
();
DxWfProcessTaskVO
dxWfProcessTaskVO
=
null
;
try
{
SessionHelper
.
manager
.
setAdministrator
();
String
workItemOid
=
"OR:wt.workflow.work.WorkItem:"
+
id
;
WorkItem
workItem
=
(
WorkItem
)
RfUtil
.
getWTObjectByOid
(
workItemOid
);
if
(
ObjectsUtil
.
nonNull
(
workItem
))
{
dxWfProcessTaskVO
=
new
DxWfProcessTaskVO
(
workItem
);
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
return
dxWfProcessTaskVO
;
}
public
static
void
executeOperation
(
DxWfTaskOperationArgsVO
operationArgsVO
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
RemoteMethodServer
.
getDefault
().
invoke
(
"executeOperation"
,
WfcProcessService
.
class
.
getName
(),
null
,
new
Class
[]
{
DxWfTaskOperationArgsVO
.
class
},
new
Object
[]
{
operationArgsVO
});
return
;
}
String
operationName
=
operationArgsVO
.
getOperationName
();
SessionContext
previous
=
SessionContext
.
newContext
();
try
{
String
userName
=
operationArgsVO
.
getOperator
();
if
(
StringUtils
.
isNotEmpty
(
userName
))
{
SessionHelper
.
manager
.
setPrincipal
(
userName
);
}
else
{
SessionHelper
.
manager
.
setAdministrator
();
}
String
id
=
operationArgsVO
.
getId
();
String
workItemOid
=
"OR:wt.workflow.work.WorkItem:"
+
id
;
WorkItem
workItem
=
(
WorkItem
)
RfUtil
.
getWTObjectByOid
(
workItemOid
);
if
(
"completeTask"
.
equalsIgnoreCase
(
operationName
))
{
String
description
=
operationArgsVO
.
getDescription
();
String
routerSelect
=
operationArgsVO
.
getRouterSelect
();
Vector
vector
=
null
;
if
(
ObjectsUtil
.
nonNull
(
routerSelect
))
{
vector
=
WorkflowUtil
.
toVector
(
routerSelect
);
}
WorkflowUtil
.
completeTask
(
workItem
,
vector
,
description
);
}
if
(
"delegateTask"
.
equalsIgnoreCase
(
operationName
))
{
String
targetUserName
=
operationArgsVO
.
getTargetUserId
();
WTUser
user
=
WTUserUtil
.
getUser
(
targetUserName
);
if
(
ObjectsUtil
.
isNull
(
user
))
{
throw
new
WTException
(
targetUserName
+
"用户在PDM系统中不存在!"
);
}
WorkflowUtil
.
reAssignWorkItem
(
workItem
,
user
,
""
);
}
}
finally
{
SessionContext
.
setContext
(
previous
);
}
}
}
src/com/yonde/wfc/vo/DxWfBizExtInfo.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
com.yonde.common.WorkflowUtil
;
import
wt.doc.WTDocument
;
import
wt.fc.Persistable
;
import
wt.part.WTPart
;
import
wt.workflow.engine.WfProcess
;
import
wt.workflow.engine.WfTemplateProcessor
;
import
java.io.Serializable
;
import
java.util.Map
;
public
class
DxWfBizExtInfo
implements
Serializable
{
private
String
taskTitle
;
private
String
processTitle
;
private
String
bizObjectState
;
private
String
bizTitle
;
private
Map
<
String
,
Object
>
bizAttrValues
;
private
String
bizConfig
;
public
DxWfBizExtInfo
()
{
}
public
DxWfBizExtInfo
(
String
taskTitle
,
String
processTitle
,
String
bizObjectState
)
{
this
.
taskTitle
=
taskTitle
;
this
.
processTitle
=
processTitle
;
this
.
bizObjectState
=
bizObjectState
;
}
public
DxWfBizExtInfo
(
WfProcess
process
)
{
Persistable
pbo
=
WorkflowUtil
.
getPBO
(
process
);
String
taskTitle
=
""
;
if
(
pbo
instanceof
WTDocument
)
{
WTDocument
document
=
(
WTDocument
)
pbo
;
taskTitle
=
document
.
getName
()
+
"_"
+
document
.
getNumber
();
this
.
bizObjectState
=
document
.
getState
().
toString
();
}
else
if
(
pbo
instanceof
WTPart
)
{
WTPart
part
=
(
WTPart
)
pbo
;
taskTitle
=
part
.
getName
()
+
"_"
+
part
.
getNumber
();
this
.
bizObjectState
=
part
.
getState
().
toString
();
}
else
{
// TODO 更改单 等
}
this
.
taskTitle
=
taskTitle
;
String
processName
=
process
.
getTemplate
().
getName
();
this
.
processTitle
=
processName
+
"_"
+
taskTitle
;
}
public
String
getTaskTitle
()
{
return
taskTitle
;
}
public
void
setTaskTitle
(
String
taskTitle
)
{
this
.
taskTitle
=
taskTitle
;
}
public
String
getProcessTitle
()
{
return
processTitle
;
}
public
void
setProcessTitle
(
String
processTitle
)
{
this
.
processTitle
=
processTitle
;
}
public
String
getBizObjectState
()
{
return
bizObjectState
;
}
public
void
setBizObjectState
(
String
bizObjectState
)
{
this
.
bizObjectState
=
bizObjectState
;
}
public
String
getBizTitle
()
{
return
bizTitle
;
}
public
void
setBizTitle
(
String
bizTitle
)
{
this
.
bizTitle
=
bizTitle
;
}
public
Map
<
String
,
Object
>
getBizAttrValues
()
{
return
bizAttrValues
;
}
public
void
setBizAttrValues
(
Map
<
String
,
Object
>
bizAttrValues
)
{
this
.
bizAttrValues
=
bizAttrValues
;
}
public
String
getBizConfig
()
{
return
bizConfig
;
}
public
void
setBizConfig
(
String
bizConfig
)
{
this
.
bizConfig
=
bizConfig
;
}
}
src/com/yonde/wfc/vo/DxWfParticipantInfoExtVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
wt.project.Role
;
import
java.io.Serializable
;
import
java.util.Locale
;
public
class
DxWfParticipantInfoExtVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
dxClassname
=
"com.yonde.dex.wfc.common.vo.extension.DxWfParticipantInfoExtVO"
;
private
String
pluginName
;
private
String
pluginContent
;
private
String
pluginShowContent
;
/** @deprecated */
@Deprecated
private
Boolean
isRequired
;
public
DxWfParticipantInfoExtVO
()
{
}
public
DxWfParticipantInfoExtVO
(
Role
role
)
{
this
.
pluginShowContent
=
role
.
getDisplay
(
Locale
.
SIMPLIFIED_CHINESE
);
this
.
pluginContent
=
role
.
getDisplay
();
this
.
pluginName
=
role
.
getStringValue
();
}
public
String
getDxClassname
()
{
return
dxClassname
;
}
public
void
setDxClassname
(
String
dxClassname
)
{
this
.
dxClassname
=
dxClassname
;
}
public
String
getPluginName
()
{
return
pluginName
;
}
public
void
setPluginName
(
String
pluginName
)
{
this
.
pluginName
=
pluginName
;
}
public
String
getPluginContent
()
{
return
pluginContent
;
}
public
void
setPluginContent
(
String
pluginContent
)
{
this
.
pluginContent
=
pluginContent
;
}
public
String
getPluginShowContent
()
{
return
pluginShowContent
;
}
public
void
setPluginShowContent
(
String
pluginShowContent
)
{
this
.
pluginShowContent
=
pluginShowContent
;
}
public
Boolean
getRequired
()
{
return
isRequired
;
}
public
void
setRequired
(
Boolean
required
)
{
isRequired
=
required
;
}
}
src/com/yonde/wfc/vo/DxWfProcessSearchVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
public
class
DxWfProcessSearchVO
implements
Serializable
{
private
String
procInstId
;
//private ProcessStateEnum state;
private
String
name
;
private
String
modelName
;
private
List
<
String
>
processDefId
;
private
String
processDefKey
;
private
String
startedUserId
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
gmtCreateStart
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
gmtCreateEnd
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
gmtFinishStart
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
gmtFinishEnd
;
private
Boolean
hasTimeout
;
private
List
<
String
>
pbos
;
private
String
pbo
;
private
String
pboClass
;
private
Long
pboId
;
private
List
<
String
>
appNames
;
private
String
category
;
private
Boolean
checkOwnerSignAddFlag
=
false
;
public
String
getProcInstId
()
{
return
procInstId
;
}
public
void
setProcInstId
(
String
procInstId
)
{
this
.
procInstId
=
procInstId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getModelName
()
{
return
modelName
;
}
public
void
setModelName
(
String
modelName
)
{
this
.
modelName
=
modelName
;
}
public
List
<
String
>
getProcessDefId
()
{
return
processDefId
;
}
public
void
setProcessDefId
(
List
<
String
>
processDefId
)
{
this
.
processDefId
=
processDefId
;
}
public
String
getProcessDefKey
()
{
return
processDefKey
;
}
public
void
setProcessDefKey
(
String
processDefKey
)
{
this
.
processDefKey
=
processDefKey
;
}
public
String
getStartedUserId
()
{
return
startedUserId
;
}
public
void
setStartedUserId
(
String
startedUserId
)
{
this
.
startedUserId
=
startedUserId
;
}
public
Date
getGmtCreateStart
()
{
return
gmtCreateStart
;
}
public
void
setGmtCreateStart
(
Date
gmtCreateStart
)
{
this
.
gmtCreateStart
=
gmtCreateStart
;
}
public
Date
getGmtCreateEnd
()
{
return
gmtCreateEnd
;
}
public
void
setGmtCreateEnd
(
Date
gmtCreateEnd
)
{
this
.
gmtCreateEnd
=
gmtCreateEnd
;
}
public
Date
getGmtFinishStart
()
{
return
gmtFinishStart
;
}
public
void
setGmtFinishStart
(
Date
gmtFinishStart
)
{
this
.
gmtFinishStart
=
gmtFinishStart
;
}
public
Date
getGmtFinishEnd
()
{
return
gmtFinishEnd
;
}
public
void
setGmtFinishEnd
(
Date
gmtFinishEnd
)
{
this
.
gmtFinishEnd
=
gmtFinishEnd
;
}
public
Boolean
getHasTimeout
()
{
return
hasTimeout
;
}
public
void
setHasTimeout
(
Boolean
hasTimeout
)
{
this
.
hasTimeout
=
hasTimeout
;
}
public
List
<
String
>
getPbos
()
{
return
pbos
;
}
public
void
setPbos
(
List
<
String
>
pbos
)
{
this
.
pbos
=
pbos
;
}
public
String
getPbo
()
{
return
pbo
;
}
public
void
setPbo
(
String
pbo
)
{
this
.
pbo
=
pbo
;
}
public
String
getPboClass
()
{
return
pboClass
;
}
public
void
setPboClass
(
String
pboClass
)
{
this
.
pboClass
=
pboClass
;
}
public
Long
getPboId
()
{
return
pboId
;
}
public
void
setPboId
(
Long
pboId
)
{
this
.
pboId
=
pboId
;
}
public
List
<
String
>
getAppNames
()
{
return
appNames
;
}
public
void
setAppNames
(
List
<
String
>
appNames
)
{
this
.
appNames
=
appNames
;
}
public
String
getCategory
()
{
return
category
;
}
public
void
setCategory
(
String
category
)
{
this
.
category
=
category
;
}
public
Boolean
getCheckOwnerSignAddFlag
()
{
return
checkOwnerSignAddFlag
;
}
public
void
setCheckOwnerSignAddFlag
(
Boolean
checkOwnerSignAddFlag
)
{
this
.
checkOwnerSignAddFlag
=
checkOwnerSignAddFlag
;
}
}
src/com/yonde/wfc/vo/DxWfProcessTaskSearchVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
public
class
DxWfProcessTaskSearchVO
implements
Serializable
{
//TaskQueryTypeEnum taskQueryType;
private
String
procInstId
;
private
String
processInstName
;
private
String
taskName
;
private
String
assignee
;
//private TaskStateEnum taskState;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
receiveTime1
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
receiveTime2
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
finishTime1
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
finishTime2
;
private
Boolean
hasTimeout
;
private
List
<
String
>
pbos
;
private
String
pbo
;
private
String
pboClass
;
private
Long
pboId
;
private
String
pboStatus
;
private
String
taskDefinitionKey
;
private
List
<
String
>
taskDefinitionKeys
;
private
List
<
String
>
processDefKey
;
private
List
<
String
>
appNames
;
private
List
<
String
>
categorys
;
private
String
proxyUser
;
}
src/com/yonde/wfc/vo/DxWfProcessTaskVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
com.ptc.core.components.rendering.guicomponents.DateDisplayComponent
;
import
com.ptc.core.components.rendering.guicomponents.TextDisplayComponent
;
import
com.ptc.windchill.enterprise.workflow.WorkflowDataUtility
;
import
com.yonde.common.DateTimeUtil
;
import
com.yonde.common.ObjectsUtil
;
import
com.yonde.common.WorkflowUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
wt.fc.Persistable
;
import
wt.fc.PersistenceHelper
;
import
wt.org.WTPrincipalReference
;
import
wt.project.Role
;
import
wt.team.TeamTemplateReference
;
import
wt.util.WTException
;
import
wt.workflow.definer.WfProcessTemplate
;
import
wt.workflow.engine.WfActivity
;
import
wt.workflow.engine.WfProcess
;
import
wt.workflow.work.WorkItem
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.*
;
public
class
DxWfProcessTaskVO
implements
Serializable
{
private
String
state
;
private
String
id
;
private
String
startTime
;
private
String
endTime
;
private
String
description
;
private
String
assignee
;
private
String
assigneeName
;
private
String
resolver
;
private
String
resolverName
;
private
String
name
;
private
String
aliasName
;
private
String
owner
;
private
String
deleteReason
;
private
String
processDefinitionId
;
private
String
procDefKey
;
private
String
procDefName
;
private
DxWfProcessVO
processVO
;
private
String
taskType
=
"NORMAL"
;
private
String
dueDate
;
private
Long
expireTimeInMillis
;
private
String
taskDefinitionKey
;
private
Integer
priority
;
private
String
processInstanceId
;
private
String
processInstanceName
;
private
String
result
;
private
List
<
String
>
attachments
;
private
List
<
String
>
comments
=
new
ArrayList
<
String
>();
private
Long
costTimeInMillis
;
private
List
<
DxWfRouteExtInfoVO
>
routes
;
//private List<DxWfTaskExtFormInfoVO> formInfo;
//private NodeTypeEnum nodeType;
//private List<DxWfOperationPluginExtVO> operationInfo;
private
Object
primaryBusinessObject
;
private
String
instruction
;
private
String
layoutId
=
"defaultInfo"
;
private
List
<
String
>
lastComments
;
private
DxWfBizExtInfo
bizExtInfo
;
//private DxWfTaskExtRelationInfoVO DxWfTaskExtRelationInfoVO;
private
String
parentTaskId
;
private
boolean
forwardFlag
;
private
boolean
withdrawFlag
;
private
boolean
unClaimedFlag
=
false
;
private
String
businessKey
;
private
String
pboClass
;
private
String
pboId
;
private
DxWfParticipantInfoExtVO
participantInfo
;
//private List<DxWfTaskApprovalObjectVO> approvalObject;
private
List
<
DxWfTaskOtherFormInfoVO
>
otherFormInfo
=
new
ArrayList
<
DxWfTaskOtherFormInfoVO
>();;
private
String
delegationState
;
public
DxWfProcessTaskVO
()
{
}
public
DxWfProcessTaskVO
(
WorkItem
workItem
)
throws
Exception
{
this
.
id
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
workItem
).
getId
());
// 根据workItem获取流程对象
WfProcess
process
=
WorkflowUtil
.
getWfProcess
(
workItem
);
WfProcessTemplate
template
=
(
WfProcessTemplate
)
process
.
getTemplate
().
getObject
();
this
.
procDefName
=
template
.
getName
();
this
.
procDefKey
=
template
.
getIdentity
();
this
.
processDefinitionId
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
template
).
getId
());
this
.
processInstanceId
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
process
).
getId
());
this
.
processInstanceName
=
process
.
getName
();
WfActivity
wfActivity
=
(
WfActivity
)
workItem
.
getSource
().
getObject
();
this
.
name
=
wfActivity
.
getName
();
this
.
aliasName
=
wfActivity
.
getName
();
this
.
taskDefinitionKey
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
wfActivity
).
getId
());
this
.
state
=
wfActivity
.
getState
().
toString
();
WTPrincipalReference
owner
=
workItem
.
getOwnership
().
getOwner
();
if
(
owner
!=
null
)
{
this
.
assignee
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
owner
.
getObject
()).
getId
());
this
.
assigneeName
=
owner
.
getFullName
();
}
String
remark
=
""
;
try
{
remark
=
wfActivity
.
getContext
().
getValue
(
"remark"
).
toString
();
}
catch
(
Exception
e
)
{
remark
=
""
;
}
if
(
StringUtils
.
isEmpty
(
remark
))
{
remark
=
workItem
.
getDescription
();
remark
=
remark
==
null
?
""
:
remark
.
trim
();
comments
.
add
(
remark
);
}
this
.
startTime
=
DateTimeUtil
.
timeStampToString
(
wfActivity
.
getStartTime
());
WorkflowDataUtility
wdu
=
new
WorkflowDataUtility
();
// 处理当前任务未完成时,后台反馈给前台的结束时间未: 0000-00-00 00:00
if
(
null
==
wfActivity
.
getEndTime
())
{
Object
workCompletedDate
=
wdu
.
getDataValue
(
"workCompletedDate"
,
workItem
,
null
);
if
(
workCompletedDate
!=
null
)
{
Timestamp
endTimeStamp
=
new
Timestamp
(((
DateDisplayComponent
)
workCompletedDate
).
getValue
().
getTime
());
String
completedDate
=
DateTimeUtil
.
timeStampToString
(
endTimeStamp
);
String
workVote
=
((
TextDisplayComponent
)
wdu
.
getDataValue
(
"workVote"
,
workItem
,
null
)).
getValue
();
this
.
result
=
workVote
==
null
?
""
:
workVote
.
trim
();
this
.
endTime
=
completedDate
;
}
}
else
{
Object
workCompletedDate
=
wdu
.
getDataValue
(
"workCompletedDate"
,
workItem
,
null
);
if
(
workCompletedDate
!=
null
)
{
Timestamp
endTimeStamp
=
new
Timestamp
(((
DateDisplayComponent
)
workCompletedDate
).
getValue
().
getTime
());
String
completedDate
=
DateTimeUtil
.
timeStampToString
(
endTimeStamp
);
this
.
endTime
=
completedDate
;
}
else
{
this
.
endTime
=
DateTimeUtil
.
timeStampToString
(
wfActivity
.
getEndTime
());
}
}
Role
role
=
workItem
.
getRole
();
if
(
ObjectsUtil
.
nonNull
(
role
))
{
this
.
participantInfo
=
new
DxWfParticipantInfoExtVO
(
role
);
}
//路由
List
voteList
=
WorkflowUtil
.
getVoteList
(
workItem
);
if
(
CollectionUtils
.
isNotEmpty
(
voteList
))
{
List
<
DxWfRouteExtInfoVO
>
routeList
=
new
ArrayList
<
DxWfRouteExtInfoVO
>();
for
(
Object
o
:
voteList
)
{
DxWfRouteExtInfoVO
routeExtInfoVO
=
new
DxWfRouteExtInfoVO
((
String
)
o
);
if
(
routeList
.
size
()
==
0
)
{
routeExtInfoVO
.
setDefault
(
true
);
}
routeList
.
add
(
routeExtInfoVO
);
}
this
.
routes
=
routeList
;
}
DxWfBizExtInfo
dxWfBizExtInfo
=
new
DxWfBizExtInfo
(
process
);
this
.
bizExtInfo
=
dxWfBizExtInfo
;
//添加其他tab页
otherFormInfo
.
add
(
new
DxWfTaskOtherFormInfoVO
(
"流程历史"
,
"DxDocumentProcessHistory"
));
// TODO 流程图先隐藏
//otherFormInfo.add(new DxWfTaskOtherFormInfoVO("流程图", "processTracking"));
}
public
DxWfProcessTaskVO
(
WfActivity
wfActivity
)
throws
WTException
{
this
.
name
=
wfActivity
.
getName
();
this
.
aliasName
=
wfActivity
.
getName
();
//this.assigneeName = wfActivity.get
//List<WorkItem> workItems = WorkflowUtil.getWorkItems(wfActivity);
//List<AccsUser> accsUsers = new ArrayList<AccsUser>();
//List<AccsRole> roles = new ArrayList<>();
/*for (WorkItem workItem : workItems) {
//流程正在运行活动只处理未完成活动
WfAssignment wfAssignment = (WfAssignment) workItem.getParentWA().getObject();
if (StringUtils.equalsIgnoreCase(wfAssignment.getStatus().getDisplay(), LifeCycleState.STATE)) {
if (StringUtils.isBlank(workItem.getCompletedBy())) {
continue;
}
}
WTPrincipalReference wtPrincipalReference = workItem.getOwnership().getOwner();
if (wtPrincipalReference != null) {
// 活动负责人
WTPrincipal principal = wtPrincipalReference.getPrincipal();
//AccsUser accsUser = toEntity(principal);
//accsUserMap.put(accsUser.getOid(), accsUser);
//accsUsers.add(accsUser);
// 活动角色
Role role = workItem.getRole();
if (role != null) {
//AccsRole accsRole = toEntity(role);
//roleMap.put(accsRole.getName(), accsRole);
//roles.add(accsRole);
}
}
}*/
}
public
DxWfBizExtInfo
getBizExtInfo
()
{
return
bizExtInfo
;
}
public
void
setBizExtInfo
(
DxWfBizExtInfo
bizExtInfo
)
{
this
.
bizExtInfo
=
bizExtInfo
;
}
public
List
<
DxWfTaskOtherFormInfoVO
>
getOtherFormInfo
()
{
return
otherFormInfo
;
}
public
void
setOtherFormInfo
(
List
<
DxWfTaskOtherFormInfoVO
>
otherFormInfo
)
{
this
.
otherFormInfo
=
otherFormInfo
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
}
public
String
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getAssignee
()
{
return
assignee
;
}
public
void
setAssignee
(
String
assignee
)
{
this
.
assignee
=
assignee
;
}
public
String
getAssigneeName
()
{
return
assigneeName
;
}
public
void
setAssigneeName
(
String
assigneeName
)
{
this
.
assigneeName
=
assigneeName
;
}
public
String
getResolver
()
{
return
resolver
;
}
public
void
setResolver
(
String
resolver
)
{
this
.
resolver
=
resolver
;
}
public
String
getResolverName
()
{
return
resolverName
;
}
public
void
setResolverName
(
String
resolverName
)
{
this
.
resolverName
=
resolverName
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAliasName
()
{
return
aliasName
;
}
public
void
setAliasName
(
String
aliasName
)
{
this
.
aliasName
=
aliasName
;
}
public
String
getOwner
()
{
return
owner
;
}
public
void
setOwner
(
String
owner
)
{
this
.
owner
=
owner
;
}
public
String
getDeleteReason
()
{
return
deleteReason
;
}
public
void
setDeleteReason
(
String
deleteReason
)
{
this
.
deleteReason
=
deleteReason
;
}
public
String
getProcessDefinitionId
()
{
return
processDefinitionId
;
}
public
void
setProcessDefinitionId
(
String
processDefinitionId
)
{
this
.
processDefinitionId
=
processDefinitionId
;
}
public
String
getProcDefKey
()
{
return
procDefKey
;
}
public
void
setProcDefKey
(
String
procDefKey
)
{
this
.
procDefKey
=
procDefKey
;
}
public
String
getProcDefName
()
{
return
procDefName
;
}
public
void
setProcDefName
(
String
procDefName
)
{
this
.
procDefName
=
procDefName
;
}
public
DxWfProcessVO
getProcessVO
()
{
return
processVO
;
}
public
void
setProcessVO
(
DxWfProcessVO
processVO
)
{
this
.
processVO
=
processVO
;
}
public
String
getTaskType
()
{
return
taskType
;
}
public
void
setTaskType
(
String
taskType
)
{
this
.
taskType
=
taskType
;
}
public
String
getDueDate
()
{
return
dueDate
;
}
public
void
setDueDate
(
String
dueDate
)
{
this
.
dueDate
=
dueDate
;
}
public
Long
getExpireTimeInMillis
()
{
return
expireTimeInMillis
;
}
public
void
setExpireTimeInMillis
(
Long
expireTimeInMillis
)
{
this
.
expireTimeInMillis
=
expireTimeInMillis
;
}
public
String
getTaskDefinitionKey
()
{
return
taskDefinitionKey
;
}
public
void
setTaskDefinitionKey
(
String
taskDefinitionKey
)
{
this
.
taskDefinitionKey
=
taskDefinitionKey
;
}
public
Integer
getPriority
()
{
return
priority
;
}
public
void
setPriority
(
Integer
priority
)
{
this
.
priority
=
priority
;
}
public
String
getProcessInstanceId
()
{
return
processInstanceId
;
}
public
void
setProcessInstanceId
(
String
processInstanceId
)
{
this
.
processInstanceId
=
processInstanceId
;
}
public
String
getProcessInstanceName
()
{
return
processInstanceName
;
}
public
void
setProcessInstanceName
(
String
processInstanceName
)
{
this
.
processInstanceName
=
processInstanceName
;
}
public
String
getResult
()
{
return
result
;
}
public
void
setResult
(
String
result
)
{
this
.
result
=
result
;
}
public
List
<
String
>
getAttachments
()
{
return
attachments
;
}
public
void
setAttachments
(
List
<
String
>
attachments
)
{
this
.
attachments
=
attachments
;
}
public
List
<
String
>
getComments
()
{
return
comments
;
}
public
void
setComments
(
List
<
String
>
comments
)
{
this
.
comments
=
comments
;
}
public
Long
getCostTimeInMillis
()
{
return
costTimeInMillis
;
}
public
void
setCostTimeInMillis
(
Long
costTimeInMillis
)
{
this
.
costTimeInMillis
=
costTimeInMillis
;
}
public
List
<
DxWfRouteExtInfoVO
>
getRoutes
()
{
return
routes
;
}
public
void
setRoutes
(
List
<
DxWfRouteExtInfoVO
>
routes
)
{
this
.
routes
=
routes
;
}
public
Object
getPrimaryBusinessObject
()
{
return
primaryBusinessObject
;
}
public
void
setPrimaryBusinessObject
(
Object
primaryBusinessObject
)
{
this
.
primaryBusinessObject
=
primaryBusinessObject
;
}
public
String
getInstruction
()
{
return
instruction
;
}
public
void
setInstruction
(
String
instruction
)
{
this
.
instruction
=
instruction
;
}
public
String
getLayoutId
()
{
return
layoutId
;
}
public
void
setLayoutId
(
String
layoutId
)
{
this
.
layoutId
=
layoutId
;
}
public
List
<
String
>
getLastComments
()
{
return
lastComments
;
}
public
void
setLastComments
(
List
<
String
>
lastComments
)
{
this
.
lastComments
=
lastComments
;
}
public
String
getParentTaskId
()
{
return
parentTaskId
;
}
public
void
setParentTaskId
(
String
parentTaskId
)
{
this
.
parentTaskId
=
parentTaskId
;
}
public
boolean
isForwardFlag
()
{
return
forwardFlag
;
}
public
void
setForwardFlag
(
boolean
forwardFlag
)
{
this
.
forwardFlag
=
forwardFlag
;
}
public
boolean
isWithdrawFlag
()
{
return
withdrawFlag
;
}
public
void
setWithdrawFlag
(
boolean
withdrawFlag
)
{
this
.
withdrawFlag
=
withdrawFlag
;
}
public
boolean
isUnClaimedFlag
()
{
return
unClaimedFlag
;
}
public
void
setUnClaimedFlag
(
boolean
unClaimedFlag
)
{
this
.
unClaimedFlag
=
unClaimedFlag
;
}
public
String
getBusinessKey
()
{
return
businessKey
;
}
public
void
setBusinessKey
(
String
businessKey
)
{
this
.
businessKey
=
businessKey
;
}
public
String
getPboClass
()
{
return
pboClass
;
}
public
void
setPboClass
(
String
pboClass
)
{
this
.
pboClass
=
pboClass
;
}
public
String
getPboId
()
{
return
pboId
;
}
public
void
setPboId
(
String
pboId
)
{
this
.
pboId
=
pboId
;
}
public
DxWfParticipantInfoExtVO
getParticipantInfo
()
{
return
participantInfo
;
}
public
void
setParticipantInfo
(
DxWfParticipantInfoExtVO
participantInfo
)
{
this
.
participantInfo
=
participantInfo
;
}
public
String
getDelegationState
()
{
return
delegationState
;
}
public
void
setDelegationState
(
String
delegationState
)
{
this
.
delegationState
=
delegationState
;
}
}
src/com/yonde/wfc/vo/DxWfProcessVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
com.yonde.basedata.search.SearchOperatorEnumUtil
;
import
com.yonde.common.DateTimeUtil
;
import
com.yonde.common.ObjectsUtil
;
import
wt.fc.Persistable
;
import
wt.fc.PersistenceHelper
;
import
wt.util.WTException
;
import
wt.workflow.definer.WfProcessTemplate
;
import
wt.workflow.engine.WfProcess
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.Locale
;
public
class
DxWfProcessVO
implements
Serializable
{
private
String
id
;
private
String
name
;
private
String
businessKey
;
private
String
businessName
;
private
String
status
;
private
String
procDefId
;
private
String
procDefKey
;
private
String
procDefName
;
private
String
procDefVersion
;
private
String
owner
;
private
String
ownerName
;
private
String
gmtCreate
;
private
String
gmtFinished
;
private
Long
costTimeInMillis
;
private
Long
expireTimeInMillis
;
private
String
dueDate
;
//private DxWfBizExtInfo bizExtInfo;
private
String
pboClass
;
private
String
pboId
;
private
String
appName
;
private
String
category
;
private
boolean
ownerSignAddFlag
;
private
String
businessStatus
;
public
DxWfProcessVO
()
{
}
public
DxWfProcessVO
(
WfProcess
process
)
throws
WTException
{
if
(
process
==
null
)
{
return
;
}
this
.
id
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
process
).
getId
());
this
.
name
=
process
.
getName
();
this
.
status
=
process
.
getState
().
getDisplay
(
Locale
.
CHINA
);
this
.
businessStatus
=
process
.
getState
().
toString
();
this
.
owner
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
process
.
getCreator
().
getObject
()).
getId
());
this
.
ownerName
=
process
.
getCreator
().
getDisplayName
();
Persistable
pbo
=
(
Persistable
)
process
.
getContext
().
getValue
(
"primaryBusinessObject"
);
this
.
pboId
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
pbo
).
getId
());
this
.
pboClass
=
SearchOperatorEnumUtil
.
typeItemMap
.
get
(
pbo
.
getClass
());
WfProcessTemplate
template
=
(
WfProcessTemplate
)
process
.
getTemplate
().
getObject
();
this
.
procDefName
=
template
.
getName
();
this
.
procDefKey
=
template
.
getIdentity
();
this
.
procDefId
=
String
.
valueOf
(
PersistenceHelper
.
getObjectIdentifier
(
template
).
getId
());
this
.
gmtCreate
=
DateTimeUtil
.
timeStampToString
(
process
.
getCreateTimestamp
());
Timestamp
endTime
=
process
.
getEndTime
();
if
(
ObjectsUtil
.
nonNull
(
endTime
))
{
this
.
gmtFinished
=
DateTimeUtil
.
timeStampToString
(
endTime
);
this
.
dueDate
=
this
.
gmtFinished
;
}
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getBusinessKey
()
{
return
businessKey
;
}
public
void
setBusinessKey
(
String
businessKey
)
{
this
.
businessKey
=
businessKey
;
}
public
String
getBusinessName
()
{
return
businessName
;
}
public
void
setBusinessName
(
String
businessName
)
{
this
.
businessName
=
businessName
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getProcDefId
()
{
return
procDefId
;
}
public
void
setProcDefId
(
String
procDefId
)
{
this
.
procDefId
=
procDefId
;
}
public
String
getProcDefKey
()
{
return
procDefKey
;
}
public
void
setProcDefKey
(
String
procDefKey
)
{
this
.
procDefKey
=
procDefKey
;
}
public
String
getProcDefName
()
{
return
procDefName
;
}
public
void
setProcDefName
(
String
procDefName
)
{
this
.
procDefName
=
procDefName
;
}
public
String
getProcDefVersion
()
{
return
procDefVersion
;
}
public
void
setProcDefVersion
(
String
procDefVersion
)
{
this
.
procDefVersion
=
procDefVersion
;
}
public
String
getOwner
()
{
return
owner
;
}
public
void
setOwner
(
String
owner
)
{
this
.
owner
=
owner
;
}
public
String
getOwnerName
()
{
return
ownerName
;
}
public
void
setOwnerName
(
String
ownerName
)
{
this
.
ownerName
=
ownerName
;
}
public
Long
getCostTimeInMillis
()
{
return
costTimeInMillis
;
}
public
void
setCostTimeInMillis
(
Long
costTimeInMillis
)
{
this
.
costTimeInMillis
=
costTimeInMillis
;
}
public
Long
getExpireTimeInMillis
()
{
return
expireTimeInMillis
;
}
public
void
setExpireTimeInMillis
(
Long
expireTimeInMillis
)
{
this
.
expireTimeInMillis
=
expireTimeInMillis
;
}
public
String
getPboClass
()
{
return
pboClass
;
}
public
void
setPboClass
(
String
pboClass
)
{
this
.
pboClass
=
pboClass
;
}
public
String
getPboId
()
{
return
pboId
;
}
public
void
setPboId
(
String
pboId
)
{
this
.
pboId
=
pboId
;
}
public
String
getAppName
()
{
return
appName
;
}
public
void
setAppName
(
String
appName
)
{
this
.
appName
=
appName
;
}
public
String
getCategory
()
{
return
category
;
}
public
void
setCategory
(
String
category
)
{
this
.
category
=
category
;
}
public
boolean
isOwnerSignAddFlag
()
{
return
ownerSignAddFlag
;
}
public
void
setOwnerSignAddFlag
(
boolean
ownerSignAddFlag
)
{
this
.
ownerSignAddFlag
=
ownerSignAddFlag
;
}
public
String
getBusinessStatus
()
{
return
businessStatus
;
}
public
void
setBusinessStatus
(
String
businessStatus
)
{
this
.
businessStatus
=
businessStatus
;
}
public
String
getGmtCreate
()
{
return
gmtCreate
;
}
public
void
setGmtCreate
(
String
gmtCreate
)
{
this
.
gmtCreate
=
gmtCreate
;
}
public
String
getGmtFinished
()
{
return
gmtFinished
;
}
public
void
setGmtFinished
(
String
gmtFinished
)
{
this
.
gmtFinished
=
gmtFinished
;
}
public
String
getDueDate
()
{
return
dueDate
;
}
public
void
setDueDate
(
String
dueDate
)
{
this
.
dueDate
=
dueDate
;
}
}
src/com/yonde/wfc/vo/DxWfRouteExtInfoVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
java.io.Serializable
;
public
class
DxWfRouteExtInfoVO
implements
Serializable
{
private
String
dxClassname
=
"com.yonde.dex.wfc.common.vo.extension.DxWfRouteExtInfoVO"
;
private
String
name
;
private
String
displayName
;
//private RouteActionTypeEnum routeActionType;
private
Boolean
isDefault
=
false
;
private
Boolean
isCheckForm
=
false
;
private
Boolean
isCheckParticipant
=
false
;
//private List<DxWfTaskExtServiceMappingVO> serviceMappings;
public
DxWfRouteExtInfoVO
()
{
}
public
DxWfRouteExtInfoVO
(
String
name
)
{
this
.
name
=
name
;
this
.
displayName
=
name
;
if
(!
"驳回"
.
equals
(
name
)
&&
!
"取消"
.
equals
(
name
))
{
this
.
isCheckParticipant
=
true
;
}
}
public
String
getDxClassname
()
{
return
dxClassname
;
}
public
void
setDxClassname
(
String
dxClassname
)
{
this
.
dxClassname
=
dxClassname
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getDisplayName
()
{
return
displayName
;
}
public
void
setDisplayName
(
String
displayName
)
{
this
.
displayName
=
displayName
;
}
public
Boolean
getDefault
()
{
return
isDefault
;
}
public
void
setDefault
(
Boolean
aDefault
)
{
isDefault
=
aDefault
;
}
public
Boolean
getCheckForm
()
{
return
isCheckForm
;
}
public
void
setCheckForm
(
Boolean
checkForm
)
{
isCheckForm
=
checkForm
;
}
public
Boolean
getCheckParticipant
()
{
return
isCheckParticipant
;
}
public
void
setCheckParticipant
(
Boolean
checkParticipant
)
{
isCheckParticipant
=
checkParticipant
;
}
}
src/com/yonde/wfc/vo/DxWfTaskOperationArgsVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
java.io.Serializable
;
import
java.util.Map
;
public
class
DxWfTaskOperationArgsVO
implements
Serializable
{
private
String
operationName
;
private
String
routerSelect
;
private
String
taskDefinitionKey
;
private
String
processDefinitionId
;
private
String
processInstId
;
private
String
description
;
private
String
operator
;
private
String
targetUserId
;
private
String
id
;
private
Map
<
String
,
Object
>
participants
;
private
Map
<
String
,
Object
>
variables
;
private
Boolean
isBefore
;
public
DxWfTaskOperationArgsVO
()
{
}
public
String
getOperationName
()
{
return
operationName
;
}
public
void
setOperationName
(
String
operationName
)
{
this
.
operationName
=
operationName
;
}
public
String
getRouterSelect
()
{
return
routerSelect
;
}
public
void
setRouterSelect
(
String
routerSelect
)
{
this
.
routerSelect
=
routerSelect
;
}
public
String
getTaskDefinitionKey
()
{
return
taskDefinitionKey
;
}
public
void
setTaskDefinitionKey
(
String
taskDefinitionKey
)
{
this
.
taskDefinitionKey
=
taskDefinitionKey
;
}
public
String
getProcessDefinitionId
()
{
return
processDefinitionId
;
}
public
void
setProcessDefinitionId
(
String
processDefinitionId
)
{
this
.
processDefinitionId
=
processDefinitionId
;
}
public
String
getProcessInstId
()
{
return
processInstId
;
}
public
void
setProcessInstId
(
String
processInstId
)
{
this
.
processInstId
=
processInstId
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getOperator
()
{
return
operator
;
}
public
void
setOperator
(
String
operator
)
{
this
.
operator
=
operator
;
}
public
String
getTargetUserId
()
{
return
targetUserId
;
}
public
void
setTargetUserId
(
String
targetUserId
)
{
this
.
targetUserId
=
targetUserId
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
Map
<
String
,
Object
>
getParticipants
()
{
return
participants
;
}
public
void
setParticipants
(
Map
<
String
,
Object
>
participants
)
{
this
.
participants
=
participants
;
}
public
Map
<
String
,
Object
>
getVariables
()
{
return
variables
;
}
public
void
setVariables
(
Map
<
String
,
Object
>
variables
)
{
this
.
variables
=
variables
;
}
public
Boolean
getIsBefore
()
{
return
isBefore
;
}
public
void
setBefore
(
Boolean
before
)
{
isBefore
=
before
;
}
}
src/com/yonde/wfc/vo/DxWfTaskOtherFormInfoVO.java
0 → 100644
View file @
7552ec3e
package
com
.
yonde
.
wfc
.
vo
;
import
java.io.Serializable
;
public
class
DxWfTaskOtherFormInfoVO
implements
Serializable
{
private
String
tabName
;
private
String
configName
;
private
Boolean
isInner
=
true
;
private
Boolean
isShow
=
true
;
private
String
webServerName
;
private
String
comType
;
private
String
dxClassname
=
"com.yonde.dex.wfc.common.vo.extension.DxWfTaskOtherFormInfoVO"
;
public
DxWfTaskOtherFormInfoVO
()
{
}
public
DxWfTaskOtherFormInfoVO
(
String
tabName
,
String
configName
)
{
this
.
tabName
=
tabName
;
this
.
configName
=
configName
;
}
public
String
getTabName
()
{
return
tabName
;
}
public
void
setTabName
(
String
tabName
)
{
this
.
tabName
=
tabName
;
}
public
String
getConfigName
()
{
return
configName
;
}
public
void
setConfigName
(
String
configName
)
{
this
.
configName
=
configName
;
}
public
Boolean
getIsInner
()
{
return
isInner
;
}
public
void
setInner
(
Boolean
inner
)
{
isInner
=
inner
;
}
public
Boolean
getIsShow
()
{
return
isShow
;
}
public
void
setShow
(
Boolean
show
)
{
isShow
=
show
;
}
public
String
getWebServerName
()
{
return
webServerName
;
}
public
void
setWebServerName
(
String
webServerName
)
{
this
.
webServerName
=
webServerName
;
}
public
String
getComType
()
{
return
comType
;
}
public
void
setComType
(
String
comType
)
{
this
.
comType
=
comType
;
}
public
String
getDxClassname
()
{
return
dxClassname
;
}
public
void
setDxClassname
(
String
dxClassname
)
{
this
.
dxClassname
=
dxClassname
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment