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
cb1ebf44
Commit
cb1ebf44
authored
Nov 02, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移交单档案组绑定案卷关系同时反更新案卷信息
parent
eaddd302
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
4 deletions
+82
-4
ExtFilesUpdateVO.java
...ava/com/inet/dcs/document/common/vo/ExtFilesUpdateVO.java
+7
-0
ExtFilesDocLinkService.java
...net/dcs/document/core/service/ExtFilesDocLinkService.java
+8
-0
ExtFilesService.java
...a/com/inet/dcs/document/core/service/ExtFilesService.java
+8
-0
ExtFilesDocLinkServiceImpl.java
...ocument/core/service/impl/ExtFilesDocLinkServiceImpl.java
+33
-2
ExtFilesServiceImpl.java
...t/dcs/document/core/service/impl/ExtFilesServiceImpl.java
+2
-1
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+24
-1
No files found.
inet-doc-expand-common/src/main/java/com/inet/dcs/document/common/vo/ExtFilesUpdateVO.java
View file @
cb1ebf44
package
com
.
inet
.
dcs
.
document
.
common
.
vo
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
@@ -11,10 +12,16 @@ import java.io.Serializable;
*/
@Data
public
class
ExtFilesUpdateVO
implements
Serializable
{
/**
* 文件id
*/
private
DxDocumentVO
dxDocumentVO
;
/**
* 所属案卷
*/
private
String
belongingCaseFile
;
/**
* 密级
*/
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtFilesDocLinkService.java
View file @
cb1ebf44
package
com
.
inet
.
dcs
.
document
.
core
.
service
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesUpdateVO
;
import
com.inet.dcs.document.core.service.shadow.ExtFilesDocLinkServiceShadow
;
import
java.util.List
;
...
...
@@ -20,4 +21,11 @@ public interface ExtFilesDocLinkService<V extends ExtFilesDocLinkVO> extends Ext
* @return
*/
List
<
ExtFilesDocLinkVO
>
getFilesDocLinkByTargetId
(
Long
targetId
);
/**
* 保存案卷和文件关联关系
*
* @param extFilesUpdateVOList
*/
void
saveFilesDocLink
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtFilesService.java
View file @
cb1ebf44
...
...
@@ -20,4 +20,12 @@ public interface ExtFilesService<V extends ExtFilesVO> extends ExtFilesServiceSh
* @param extFilesUpdateVOList
*/
void
updateExtFiles
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
);
/**
* 根据案卷编码查询案卷
*
* @param volumeNumber
* @return
*/
List
<
ExtFilesVO
>
findRecursionByVolumeNumber
(
String
volumeNumber
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesDocLinkServiceImpl.java
View file @
cb1ebf44
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesUpdateVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.core.repository.ExtFilesDocLinkRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
import
com.inet.dcs.document.entity.po.ExtFilesDocLink
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
lombok.extern.slf4j.Slf4j
;
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
;
...
...
@@ -29,15 +36,39 @@ public class ExtFilesDocLinkServiceImpl<V extends ExtFilesDocLinkVO> implements
@Autowired
ExtFilesDocLinkRepository
<
ExtFilesDocLink
>
extFilesDocLinkRepository
;
@Autowired
private
ExtFilesService
extFilesService
;
@Override
public
List
<
ExtFilesDocLinkVO
>
getFilesDocLinkByTargetId
(
Long
targetId
)
{
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"source"
).
build
())
.
searchItems
(
SearchItems
.
builder
().
item
(
new
SearchItem
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
targetId
,
null
)).
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
targetId
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
return
(
List
<
ExtFilesDocLinkVO
>)
this
.
findRecursion
(
queryDoc
).
getContent
();
}
@Override
public
void
saveFilesDocLink
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
)
{
List
<
ExtFilesDocLinkVO
>
extFilesDocLinkVOList
=
Lists
.
newArrayList
();
for
(
ExtFilesUpdateVO
extFilesUpdateVO
:
extFilesUpdateVOList
)
{
List
<
ExtFilesVO
>
filesVOList
=
extFilesService
.
findRecursionByVolumeNumber
(
extFilesUpdateVO
.
getBelongingCaseFile
());
if
(
CollectionUtils
.
isNotEmpty
(
filesVOList
))
{
ExtFilesDocLinkVO
extFilesDocLinkVO
=
new
ExtFilesDocLinkVO
();
ExtFilesVO
extFilesVO
=
filesVOList
.
get
(
0
);
DxDocumentVO
dxDocumentVO
=
extFilesUpdateVO
.
getDxDocumentVO
();
extFilesDocLinkVO
.
setTarget
(
extFilesVO
);
extFilesDocLinkVO
.
setTargetId
(
extFilesVO
.
getId
());
extFilesDocLinkVO
.
setSource
(
dxDocumentVO
);
extFilesDocLinkVO
.
setSourceId
(
dxDocumentVO
.
getId
());
extFilesDocLinkVO
.
setOperator
(
OperatorType
.
ADD
);
extFilesDocLinkVOList
.
add
(
extFilesDocLinkVO
);
}
}
this
.
saveRecursion
((
V
)
extFilesDocLinkVOList
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesServiceImpl.java
View file @
cb1ebf44
...
...
@@ -93,7 +93,8 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
* @param volumeNumber
* @return
*/
private
List
<
ExtFilesVO
>
findRecursionByVolumeNumber
(
String
volumeNumber
)
{
@Override
public
List
<
ExtFilesVO
>
findRecursionByVolumeNumber
(
String
volumeNumber
)
{
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"volumeNumber"
,
SearchItem
.
Operator
.
EQ
,
volumeNumber
,
null
))
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
cb1ebf44
...
...
@@ -5,6 +5,7 @@ import com.inet.dcs.document.common.vo.ExtTransferDocLinkVO;
import
com.inet.dcs.document.common.vo.ExtTransferDocumentVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.inet.dcs.document.core.repository.ExtTransferDocumentRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
import
com.inet.dcs.document.core.service.ExtTransferDocLinkService
;
import
com.inet.dcs.document.core.service.ExtTransferDocumentService
;
...
...
@@ -51,6 +52,9 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
@Autowired
private
ExtFilesService
extFilesService
;
@Autowired
private
ExtFilesDocLinkService
extFilesDocLinkService
;
@Override
public
ExtTransferDocumentVO
startWorkflow
(
Long
id
)
{
ExtTransferDocumentVO
extTransferDocumentVO
=
this
.
get
(
id
);
...
...
@@ -66,6 +70,7 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
@Override
public
void
updateExtFiles
(
ExtTransferDocumentVO
extTransferDocumentVO
)
{
// 1.查出移交单文件关联关系
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"source"
).
build
())
.
searchItems
(
SearchItems
.
builder
()
...
...
@@ -76,11 +81,29 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
if
(
CollectionUtils
.
isEmpty
(
transferDocLinkVOList
))
{
return
;
}
log
.
info
(
"=================开始=绑定案卷关系同时反更新案卷信息================"
);
// 2.绑定案卷文件关联关系
this
.
saveFilesDocLink
(
transferDocLinkVOList
);
// 3.更新案卷下部分信息
this
.
updateExtFilesByBelongingCaseFile
(
transferDocLinkVOList
);
log
.
info
(
"=================结束=绑定案卷关系同时反更新案卷信息================"
);
}
private
void
saveFilesDocLink
(
List
<
ExtTransferDocLinkVO
>
transferDocLinkVOList
)
{
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
=
Lists
.
newArrayList
();
for
(
ExtTransferDocLinkVO
extTransferDocLinkVO
:
transferDocLinkVOList
)
{
ExtFilesUpdateVO
extFilesUpdateVO
=
new
ExtFilesUpdateVO
();
extFilesUpdateVO
.
setBelongingCaseFile
(
extTransferDocLinkVO
.
getBelongingCaseFile
());
extFilesUpdateVO
.
setDxDocumentVO
(
extTransferDocLinkVO
.
getSource
());
extFilesUpdateVOList
.
add
(
extFilesUpdateVO
);
}
extFilesDocLinkService
.
saveFilesDocLink
(
extFilesUpdateVOList
);
}
private
void
updateExtFilesByBelongingCaseFile
(
List
<
ExtTransferDocLinkVO
>
transferDocLinkVOList
)
{
Map
<
String
,
List
<
ExtTransferDocLinkVO
>>
belongingCaseFileMap
=
transferDocLinkVOList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
ExtTransferDocLinkVO:
:
getBelongingCaseFile
));
// 更新案卷下部分信息
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
=
Lists
.
newArrayList
();
belongingCaseFileMap
.
forEach
((
key
,
value
)
->
{
ExtFilesUpdateVO
extFilesUpdateVO
=
new
ExtFilesUpdateVO
();
...
...
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