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
c7c4a42d
Commit
c7c4a42d
authored
Nov 14, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新移交单
parent
9cb3780a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
49 deletions
+77
-49
ExtTransferDocumentController.java
...cument/core/controller/ExtTransferDocumentController.java
+2
-2
ExtTransferDocumentEvent.java
...net/dcs/document/core/event/ExtTransferDocumentEvent.java
+30
-21
ExtFilesService.java
...a/com/inet/dcs/document/core/service/ExtFilesService.java
+3
-0
ExtTransferDocumentService.java
...dcs/document/core/service/ExtTransferDocumentService.java
+1
-1
ExtFilesServiceImpl.java
...t/dcs/document/core/service/impl/ExtFilesServiceImpl.java
+1
-0
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+36
-23
ExtDxDocumentServiceImpl.java
...nt/core/service/impl/expand/ExtDxDocumentServiceImpl.java
+3
-1
pom.xml
inet-doc-expand-feign/pom.xml
+1
-1
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/controller/ExtTransferDocumentController.java
View file @
c7c4a42d
...
...
@@ -47,8 +47,8 @@ public class ExtTransferDocumentController<V extends ExtTransferDocumentVO, S ex
@ApiOperation
(
value
=
"获取要归档的文档列表"
,
notes
=
"获取要归档的文档列表"
)
@PostMapping
(
value
=
"/getDxDocumentList"
)
public
ApiResult
getDxDocumentList
(
@RequestBody
SearchQueryCondition
searchQueryCondition
)
{
return
ApiResult
.
ok
(
extTransferDocumentService
.
getDxDocumentList
(
searchQueryCondition
));
public
ApiResult
getDxDocumentList
(
@RequestBody
SearchQueryCondition
searchQueryCondition
,
@RequestParam
(
"id"
)
Long
id
)
{
return
ApiResult
.
ok
(
extTransferDocumentService
.
getDxDocumentList
(
searchQueryCondition
,
id
));
}
@ApiOperation
(
value
=
"保存文档案卷关联关系"
,
notes
=
"保存文档案卷关联关系"
)
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/event/ExtTransferDocumentEvent.java
View file @
c7c4a42d
...
...
@@ -7,6 +7,10 @@ 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.dao.events.BusinessEventType
;
import
com.yonde.dex.dao.events.DxEvent
;
import
com.yonde.dex.dao.events.DxEventListener
;
import
com.yonde.dex.dao.events.DxEventWrap
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
...
...
@@ -26,6 +30,7 @@ import java.util.List;
*/
@Slf4j
@Component
@DxEvent
public
class
ExtTransferDocumentEvent
{
@Autowired
...
...
@@ -34,28 +39,32 @@ public class ExtTransferDocumentEvent {
@Autowired
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
);
List
<
DxWfProcessTaskVO
>
activities
=
wfProcessInfoVO
.
getHistoryInfo
();
DxUserInfoVO
dxRecipientUserInfo
=
extTransferDocumentService
.
getSignInfo
(
activities
,
SignConstants
.
SIGN_KEY_DAZSH
);
if
(
ObjectUtils
.
isNotEmpty
(
dxRecipientUserInfo
))
{
extTransferDocumentVO
.
setDxRecipientUserInfo
(
dxRecipientUserInfo
);
extTransferDocumentVO
.
setDxRecipientUserInfoId
(
dxRecipientUserInfo
.
getUserId
());
extTransferDocumentVO
.
setDxRecipientUserInfoIdType
(
"DxUser"
);
}
LocalDateTime
handoverTime
=
extTransferDocumentService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_DAZSH
);
if
(
ObjectUtils
.
isNotEmpty
(
handoverTime
))
{
extTransferDocumentVO
.
setHandoverTime
(
handoverTime
);
}
extTransferDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
extTransferDocumentService
.
saveRecursion
(
extTransferDocumentVO
);
@DxEventListener
(
value
=
ExtTransferDocumentVO
.
class
,
eventType
=
BusinessEventType
.
POST_LIFECYCLE_CHANGE_STATUS
,
order
=
1
)
public
void
postUpdate
(
List
<
DxEventWrap
<
ExtTransferDocumentVO
>>
eventWrapList
)
{
for
(
DxEventWrap
<
ExtTransferDocumentVO
>
e
:
eventWrapList
)
{
ExtTransferDocumentVO
extTransferDocumentVO
=
e
.
getTarget
();
// 单据状态已完成,只更新一次
if
(
Constants
.
COMPLETE
.
equals
(
extTransferDocumentVO
.
getState
())
&&
ObjectUtils
.
isEmpty
(
extTransferDocumentVO
.
getHandoverTime
()))
{
// 获取档案组流程审批人信息
DxWfProcessVO
wfProcessInstVO
=
workFlowUtil
.
getWfProcessInst
(
extTransferDocumentVO
);
DxWfProcessInfoVO
wfProcessInfoVO
=
workFlowUtil
.
getProcessInstDetail
(
wfProcessInstVO
);
List
<
DxWfProcessTaskVO
>
activities
=
wfProcessInfoVO
.
getHistoryInfo
();
DxUserInfoVO
dxRecipientUserInfo
=
extTransferDocumentService
.
getSignInfo
(
activities
,
SignConstants
.
SIGN_KEY_DAZSH
);
if
(
ObjectUtils
.
isNotEmpty
(
dxRecipientUserInfo
))
{
extTransferDocumentVO
.
setDxRecipientUserInfo
(
dxRecipientUserInfo
);
extTransferDocumentVO
.
setDxRecipientUserInfoId
(
dxRecipientUserInfo
.
getUserId
());
extTransferDocumentVO
.
setDxRecipientUserInfoIdType
(
"DxUser"
);
}
LocalDateTime
handoverTime
=
extTransferDocumentService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_DAZSH
);
if
(
ObjectUtils
.
isNotEmpty
(
handoverTime
))
{
extTransferDocumentVO
.
setHandoverTime
(
handoverTime
);
}
extTransferDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
extTransferDocumentService
.
saveRecursion
(
extTransferDocumentVO
);
// 更新文档状态为已归档
extTransferDocumentService
.
updateArchivingStatus
(
extTransferDocumentVO
.
getId
());
// 更新文档状态为已归档
extTransferDocumentService
.
updateArchivingStatus
(
extTransferDocumentVO
.
getId
());
}
}
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtFilesService.java
View file @
c7c4a42d
...
...
@@ -41,4 +41,7 @@ public interface ExtFilesService<V extends ExtFilesVO> extends ExtFilesServiceSh
void
generatFilesDirectory
(
Long
id
);
List
<
Long
>
getChildList
(
Long
partId
,
List
<
Long
>
list
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtTransferDocumentService.java
View file @
c7c4a42d
...
...
@@ -26,7 +26,7 @@ public interface ExtTransferDocumentService<V extends ExtTransferDocumentVO> ext
ExtTransferDocProjectVO
getTransferDocProjectById
(
Long
id
);
DxPageImpl
getDxDocumentList
(
SearchQueryCondition
searchQueryCondition
);
DxPageImpl
getDxDocumentList
(
SearchQueryCondition
searchQueryCondition
,
Long
id
);
DxUserInfoVO
getSignInfo
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesServiceImpl.java
View file @
c7c4a42d
...
...
@@ -312,6 +312,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
//递归根据项目群查询项目子项
@Override
public
List
<
Long
>
getChildList
(
Long
partId
,
List
<
Long
>
list
)
{
SearchQueryCondition
build
=
SearchQueryBuilder
.
openBuild
().
openFilterBuilder
().
setEq
(
"parentId"
,
partId
).
closeFilterBuilder
().
build
();
List
<
DxContextProjectVO
>
dxContextProjectVOS
=
extDxContextProjectServiceFeign
.
findRecursion
(
build
).
getContent
();
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
c7c4a42d
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.common.vo.ExtTransferDocLinkVO
;
...
...
@@ -56,10 +57,7 @@ import java.io.FileInputStream;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -113,12 +111,7 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
@Autowired
DxApplicationFeignService
feignService
;
@Override
public
void
postUpdate
(
Collection
<
V
>
target
,
Collection
<
V
>
origin
)
{
for
(
V
v
:
target
)
{
extTransferDocumentEvent
.
postUpdate
(
v
);
}
}
@Override
public
ExtTransferDocumentVO
startWorkflow
(
Long
id
)
{
...
...
@@ -144,35 +137,55 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
if
(
"program"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setProjectCode
(
dxContextProjectVO
.
getNumber
());
extTransferDocProjectVO
.
setProjectGroupName
(
dxContextProjectVO
.
getName
());
extTransferDocProjectVO
.
setProjectId
(
dxContextProjectVO
.
get
Parent
Id
());
extTransferDocProjectVO
.
setProjectId
(
dxContextProjectVO
.
getId
());
return
extTransferDocProjectVO
;
}
else
if
(
"project"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setProjectName
(
dxContextProjectVO
.
getName
());
}
else
if
(
"childProject"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setTopicTitle
(
dxContextProjectVO
.
getName
());
}
id
=
dxContextProjectVO
.
getParentId
();
}
}
@Override
public
DxPageImpl
getDxDocumentList
(
SearchQueryCondition
searchQueryCondition
)
{
// 查询不是已完成状态的移交单文档
public
DxPageImpl
getDxDocumentList
(
SearchQueryCondition
searchQueryCondition
,
Long
id
)
{
//查询当前项目群下文档
List
<
Long
>
childList
=
extFilesService
.
getChildList
(
id
,
new
ArrayList
<>());
childList
.
add
(
id
);
//查询当前项目群下所有文档
SearchItem
dxContextIdSearchItem
=
new
SearchItem
(
"dxContextId"
,
SearchItem
.
Operator
.
IN
,
childList
,
null
);
SearchItem
stateSearchItem
=
new
SearchItem
(
"state"
,
SearchItem
.
Operator
.
EQ
,
Constants
.
DOC_RELEASE
,
null
);
searchQueryCondition
.
getSearchItems
().
addItem
(
dxContextIdSearchItem
);
searchQueryCondition
.
getSearchItems
().
addItem
(
stateSearchItem
);
List
<
DxDocumentVO
>
extDxDocList
=
extDxDocumentService
.
findRecursion
(
searchQueryCondition
).
getContent
();
//查询当前项目群下所有移交单
SearchQueryCondition
searchTransfer
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"dxContextId"
,
SearchItem
.
Operator
.
IN
,
childList
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
List
<
ExtTransferDocumentVO
>
transferDocumentList
=
(
List
<
ExtTransferDocumentVO
>)
this
.
findRecursion
(
searchTransfer
).
getContent
();
//查询移交单下所有文档
List
<
Long
>
extTransferDocId
=
transferDocumentList
.
stream
().
map
(
ExtTransferDocumentVO:
:
getId
).
collect
(
Collectors
.
toList
());
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"source"
).
build
())
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"target
.state"
,
SearchItem
.
Operator
.
NEQ
,
Constants
.
COMPLETE
,
null
))
.
item
(
new
SearchItem
(
"target
Id"
,
SearchItem
.
Operator
.
IN
,
extTransferDocId
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
List
<
ExtTransferDocLinkVO
>
transferDocLinkVOList
=
extTransferDocLinkService
.
findRecursion
(
queryDoc
).
getContent
();
// 从文档里面排除
if
(
CollectionUtils
.
isNotEmpty
(
transferDocLinkVOList
))
{
log
.
info
(
"transferDocLinkVOList.size={}"
,
transferDocLinkVOList
.
size
());
List
<
Long
>
sourceIds
=
transferDocLinkVOList
.
stream
().
map
(
ExtTransferDocLinkVO:
:
getSourceId
).
collect
(
Collectors
.
toList
());
SearchItem
searchItem
=
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
NOTIN
,
sourceIds
,
null
);
searchQueryCondition
.
getSearchItems
().
addItem
(
searchItem
);
List
<
DxDocumentVO
>
dxDocumentVOSList
=
transferDocLinkVOList
.
stream
().
map
(
ExtTransferDocLinkVO:
:
getSource
).
collect
(
Collectors
.
toList
());
List
<
DxDocumentVO
>
resultDocList
=
extDxDocList
.
stream
().
filter
(
dxDocumentVO
->
!
dxDocumentVOSList
.
contains
(
dxDocumentVO
)).
collect
(
Collectors
.
toList
());
Integer
pageSize
=
searchQueryCondition
.
getPageSize
();
Integer
pageFrom
=
searchQueryCondition
.
getPageFrom
();
if
(
CollectionUtil
.
isNotEmpty
(
resultDocList
))
{
List
<
DxDocumentVO
>
content1
=
resultDocList
.
stream
().
skip
((
long
)
(
pageFrom
-
1
)
*
pageSize
).
limit
(
pageSize
).
collect
(
Collectors
.
toList
());
return
new
DxPageImpl
<>(
content1
,
pageFrom
-
1
,
pageSize
,
resultDocList
.
size
(),
(
resultDocList
.
size
()
%
pageSize
==
0
)
?
resultDocList
.
size
()
/
pageSize
:
resultDocList
.
size
()
/
pageSize
+
1
);
}
return
extDxDocumentService
.
findRecursion
(
searchQueryCondition
);
return
null
;
}
@Override
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/expand/ExtDxDocumentServiceImpl.java
View file @
c7c4a42d
...
...
@@ -82,6 +82,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
@Autowired
private
DxUserInfoFeign
userService
;
@Override
public
void
beforeSave
(
Collection
<
V
>
target
)
{
for
(
V
v
:
target
)
{
...
...
@@ -144,6 +145,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
dxDocumentVO
.
setDxRefundPersonUserId
(
null
);
dxDocumentVO
.
setDxRefundPersonUserIdType
(
null
);
dxDocumentVO
.
setWithdrawalTime
(
null
);
}
// 列表上退档-归档已作废
if
(
ARCHIVE_INVALIDATED
.
equals
(
archivingStatus
))
{
...
...
@@ -159,7 +161,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
// 更新文档归档状态
dxDocumentVO
.
setArchivingStatus
(
archivingStatus
);
dxDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
this
.
save
((
V
)
dxDocumentVO
);
this
.
save
Recursion
((
V
)
dxDocumentVO
);
}
@Override
...
...
inet-doc-expand-feign/pom.xml
View file @
c7c4a42d
...
...
@@ -73,7 +73,7 @@
</dependency>
<dependency>
<groupId>
com.yonde.dex
</groupId>
<artifactId>
dex-basic-service-feign
</artifactId>
<artifactId>
dex-basic-service-
expand-
feign
</artifactId>
<version>
4.1-20241024-RELEASE
</version>
</dependency>
<dependency>
...
...
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