Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-doc-expand
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
INET-TWO
server
dcs-doc-expand
Commits
fdcfb444
Commit
fdcfb444
authored
Nov 05, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监听移交单状态已完成,更新文档状态为已归档
parent
d297c1dc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
26 deletions
+70
-26
ExtTransferDocumentEvent.java
...net/dcs/document/core/event/ExtTransferDocumentEvent.java
+23
-15
ExtTransferDocumentService.java
...dcs/document/core/service/ExtTransferDocumentService.java
+2
-0
ExtDxDocumentService.java
...cs/document/core/service/expand/ExtDxDocumentService.java
+2
-0
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+22
-7
ExtDxDocumentServiceImpl.java
...nt/core/service/impl/expand/ExtDxDocumentServiceImpl.java
+21
-4
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/event/ExtTransferDocumentEvent.java
View file @
fdcfb444
package
com
.
inet
.
dcs
.
document
.
core
.
event
;
import
com.inet.dcs.document.common.vo.ExtTransferDocumentVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.inet.dcs.document.core.constants.SignConstants
;
import
com.inet.dcs.document.core.service.ExtTransferDocumentService
;
import
com.inet.dcs.document.core.service.expand.ExtDxDocumentService
;
import
com.inet.dcs.document.core.util.WorkFlowUtil
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
...
...
@@ -33,6 +35,8 @@ public class ExtTransferDocumentEvent {
private
ExtTransferDocumentService
extTransferDocumentService
;
public
void
postUpdate
(
ExtTransferDocumentVO
extTransferDocumentVO
)
{
// 单据状态已完成,只更新一次
if
(
Constants
.
COMPLETE
.
equals
(
extTransferDocumentVO
.
getState
())
&&
ObjectUtils
.
isEmpty
(
extTransferDocumentVO
.
getHandoverTime
()))
{
// 获取档案组流程审批人信息
DxWfProcessVO
wfProcessInstVO
=
workFlowUtil
.
getWfProcessInst
(
extTransferDocumentVO
);
DxWfProcessInfoVO
wfProcessInfoVO
=
workFlowUtil
.
getProcessInstDetail
(
wfProcessInstVO
);
...
...
@@ -49,5 +53,9 @@ public class ExtTransferDocumentEvent {
}
extTransferDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
extTransferDocumentService
.
saveRecursion
(
extTransferDocumentVO
);
// 更新文档状态为已归档
extTransferDocumentService
.
updateArchivingStatus
(
extTransferDocumentVO
.
getId
());
}
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtTransferDocumentService.java
View file @
fdcfb444
...
...
@@ -30,4 +30,6 @@ public interface ExtTransferDocumentService<V extends ExtTransferDocumentVO> ext
DxUserInfoVO
getSignInfo
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
LocalDateTime
getEndDate
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
void
updateArchivingStatus
(
Long
id
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/expand/ExtDxDocumentService.java
View file @
fdcfb444
...
...
@@ -38,4 +38,6 @@ public interface ExtDxDocumentService<V extends DxDocumentVO> extends ExtDxDocum
* @return
*/
DxDocumentVO
startWorkflow
(
Long
id
);
void
updateArchivingStatus
(
Long
id
,
String
archivingStatus
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
fdcfb444
...
...
@@ -13,6 +13,7 @@ import com.inet.dcs.document.core.service.ExtFilesService;
import
com.inet.dcs.document.core.service.ExtTransferDocLinkService
;
import
com.inet.dcs.document.core.service.ExtTransferDocumentService
;
import
com.inet.dcs.document.core.service.expand.ExtDxDocumentService
;
import
com.inet.dcs.document.core.service.impl.expand.ExtDxDocumentServiceImpl
;
import
com.inet.dcs.document.core.util.SearchUtil
;
import
com.inet.dcs.document.entity.po.ExtTransferDocument
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
...
...
@@ -33,12 +34,13 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.apache.commons.compress.utils.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -86,12 +88,9 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
@Override
public
void
postUpdate
(
Collection
<
V
>
target
,
Collection
<
V
>
origin
)
{
for
(
V
v
:
target
)
{
// 单据状态已完成,只更新一次
if
(
Constants
.
COMPLETE
.
equals
(
v
.
getState
())
&&
ObjectUtils
.
isEmpty
(
v
.
getHandoverTime
()))
{
extTransferDocumentEvent
.
postUpdate
(
v
);
}
}
}
@Override
public
ExtTransferDocumentVO
startWorkflow
(
Long
id
)
{
...
...
@@ -195,6 +194,22 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
return
null
;
}
@Override
public
void
updateArchivingStatus
(
Long
id
)
{
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"source"
).
build
())
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
id
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
List
<
ExtTransferDocLinkVO
>
transferDocLinkVOList
=
extTransferDocLinkService
.
findRecursion
(
queryDoc
).
getContent
();
if
(
CollectionUtils
.
isNotEmpty
(
transferDocLinkVOList
))
{
ExtTransferDocLinkVO
extTransferDocLinkVO
=
transferDocLinkVOList
.
get
(
0
);
Long
sourceId
=
extTransferDocLinkVO
.
getSourceId
();
extDxDocumentService
.
updateArchivingStatus
(
sourceId
,
ExtDxDocumentServiceImpl
.
ARCHIVED
);
}
}
@Override
public
DxUserInfoVO
getSignInfo
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
)
{
for
(
DxWfProcessTaskVO
wf
:
activities
)
{
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/expand/ExtDxDocumentServiceImpl.java
View file @
fdcfb444
...
...
@@ -50,6 +50,13 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
public
static
final
String
BEAN_NAME
=
"documentServiceImpl"
;
public
static
final
String
ARCHIVED
=
"已归档"
;
public
static
final
String
ARCHIVE_INVALIDATED
=
"归档已作废"
;
public
static
final
String
ARCHIVE_NOT_RECEIVED
=
"档案未接收"
;
@Autowired
private
ExtDxDocumentFolderService
dxDocumentFolderService
;
...
...
@@ -105,6 +112,16 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
return
this
.
changeStatus
(
dxDocumentVO
.
getId
(),
Constants
.
SUBMIT_REVIEWING
,
true
);
}
@Override
public
void
updateArchivingStatus
(
Long
id
,
String
archivingStatus
)
{
DxDocumentVO
dxDocumentVO
=
this
.
get
(
id
);
if
(
StringUtils
.
isBlank
(
dxDocumentVO
.
getArchivingStatus
()))
{
dxDocumentVO
.
setArchivingStatus
(
archivingStatus
);
dxDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
this
.
save
((
V
)
dxDocumentVO
);
}
}
private
String
getProcessDefKey
(
String
subTypeName
)
{
log
.
info
(
"getProcessDefKey.subTypeName:{}"
,
subTypeName
);
if
(
Constants
.
EXT_DOC_WF_MAP
.
containsKey
(
subTypeName
))
{
...
...
@@ -163,7 +180,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
}
@Override
public
Map
<
String
,
DxPageImpl
>
getDocAndFolder
(
Long
dxContextId
,
Long
parentId
,
Long
dxDocumentFolderId
)
{
public
Map
<
String
,
DxPageImpl
>
getDocAndFolder
(
Long
dxContextId
,
Long
parentId
,
Long
dxDocumentFolderId
)
{
Map
<
String
,
DxPageImpl
>
result
=
new
HashMap
<>();
//查询目录
SearchQueryCondition
folderCondition
=
SearchQueryBuilder
.
openBuild
()
...
...
@@ -177,9 +194,9 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
//查询文档
SearchItems
searchItems
=
new
SearchItems
();
SearchItem
dxDocumentFolderIdSearchItem
;
if
(
Objects
.
nonNull
(
dxDocumentFolderId
)){
if
(
Objects
.
nonNull
(
dxDocumentFolderId
))
{
dxDocumentFolderIdSearchItem
=
new
SearchItem
(
"dxDocumentFolderId"
,
SearchItem
.
Operator
.
EQ
,
dxDocumentFolderId
,
null
);
}
else
{
}
else
{
dxDocumentFolderIdSearchItem
=
new
SearchItem
(
"dxDocumentFolderId"
,
SearchItem
.
Operator
.
ISNULL
,
null
,
null
);
}
searchItems
.
addItem
(
dxDocumentFolderIdSearchItem
);
...
...
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