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
781170ce
Commit
781170ce
authored
Nov 02, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验文件档号是否重复,
parent
cb1ebf44
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
7 deletions
+63
-7
ExtFilesDocLinkServiceImpl.java
...ocument/core/service/impl/ExtFilesDocLinkServiceImpl.java
+3
-1
ExtFilesServiceImpl.java
...t/dcs/document/core/service/impl/ExtFilesServiceImpl.java
+46
-4
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+14
-2
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesDocLinkServiceImpl.java
View file @
781170ce
...
@@ -67,8 +67,10 @@ public class ExtFilesDocLinkServiceImpl<V extends ExtFilesDocLinkVO> implements
...
@@ -67,8 +67,10 @@ public class ExtFilesDocLinkServiceImpl<V extends ExtFilesDocLinkVO> implements
extFilesDocLinkVOList
.
add
(
extFilesDocLinkVO
);
extFilesDocLinkVOList
.
add
(
extFilesDocLinkVO
);
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
extFilesDocLinkVOList
))
{
this
.
saveRecursion
((
V
)
extFilesDocLinkVOList
);
this
.
saveRecursion
((
V
)
extFilesDocLinkVOList
);
}
}
}
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesServiceImpl.java
View file @
781170ce
...
@@ -3,6 +3,7 @@ package com.inet.dcs.document.core.service.impl;
...
@@ -3,6 +3,7 @@ package com.inet.dcs.document.core.service.impl;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesUpdateVO
;
import
com.inet.dcs.document.common.vo.ExtFilesUpdateVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.inet.dcs.document.core.repository.ExtFilesRepository
;
import
com.inet.dcs.document.core.repository.ExtFilesRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
...
@@ -18,9 +19,13 @@ import com.yonde.dex.basic.feign.expand.ExtDxContextProjectServiceFeign;
...
@@ -18,9 +19,13 @@ import com.yonde.dex.basic.feign.expand.ExtDxContextProjectServiceFeign;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.dao.service.DxDaoPluginExpander
;
import
com.yonde.dex.dao.service.DxDaoPluginExpander
;
import
com.yonde.dex.dict.feign.DictDataFeignService
;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -52,6 +57,9 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
...
@@ -52,6 +57,9 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
@Autowired
@Autowired
private
ExtFilesDocLinkService
extFilesDocLinkService
;
private
ExtFilesDocLinkService
extFilesDocLinkService
;
@Autowired
private
DictDataFeignService
dictDataService
;
@Override
@Override
public
void
beforeSave
(
Collection
<
V
>
target
)
{
public
void
beforeSave
(
Collection
<
V
>
target
)
{
// 全宗号+项目号+项目代号+类别代号+盒号(三位流水号)+后缀“-(两位数字流水号)例如:2-20114272031-QH03-JS01-001-(01)
// 全宗号+项目号+项目代号+类别代号+盒号(三位流水号)+后缀“-(两位数字流水号)例如:2-20114272031-QH03-JS01-001-(01)
...
@@ -160,14 +168,48 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
...
@@ -160,14 +168,48 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
@Override
@Override
public
void
updateExtFiles
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
)
{
public
void
updateExtFiles
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
)
{
List
<
ExtFilesVO
>
extFilesVOList
=
Lists
.
newArrayList
();
List
<
ExtFilesVO
>
extFilesVOList
=
Lists
.
newArrayList
();
List
<
DictDataVO
>
secretCodeDictList
=
dictDataService
.
getDictDatas
(
Constants
.
SECRET_CODE
);
for
(
ExtFilesUpdateVO
extFilesUpdateVO
:
extFilesUpdateVOList
)
{
for
(
ExtFilesUpdateVO
extFilesUpdateVO
:
extFilesUpdateVOList
)
{
List
<
ExtFilesVO
>
filesVOS
=
this
.
findRecursionByVolumeNumber
(
extFilesUpdateVO
.
getBelongingCaseFile
());
List
<
ExtFilesVO
>
filesVOS
=
this
.
findRecursionByVolumeNumber
(
extFilesUpdateVO
.
getBelongingCaseFile
());
if
(
CollectionUtils
.
isNotEmpty
(
filesVOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
filesVOS
))
{
ExtFilesVO
extFilesVO
=
filesVOS
.
get
(
0
);
ExtFilesVO
extFilesVO
=
filesVOS
.
get
(
0
);
extFilesVO
.
setSecretCode
(
extFilesUpdateVO
.
getSecretCode
());
// 密级
extFilesVO
.
setStoragePeriod
(
extFilesUpdateVO
.
getStoragePeriod
());
String
secretCode
=
extFilesVO
.
getSecretCode
();
extFilesVO
.
setFileNumber
(
extFilesUpdateVO
.
getFileNumber
());
if
(
StringUtils
.
isBlank
(
secretCode
))
{
extFilesVO
.
setPageNumber
(
extFilesUpdateVO
.
getPageNumber
());
secretCode
=
extFilesUpdateVO
.
getSecretCode
();
}
else
{
}
extFilesVO
.
setSecretCode
(
secretCode
);
// 年限
String
storagePeriod
=
extFilesVO
.
getStoragePeriod
();
if
(
StringUtils
.
isBlank
(
storagePeriod
))
{
storagePeriod
=
extFilesUpdateVO
.
getStoragePeriod
();
}
else
{
}
extFilesVO
.
setStoragePeriod
(
storagePeriod
);
// 文件数
Integer
fileNumber
=
extFilesVO
.
getFileNumber
();
if
(
ObjectUtils
.
isEmpty
(
fileNumber
))
{
fileNumber
=
extFilesUpdateVO
.
getFileNumber
();
}
else
{
}
extFilesVO
.
setFileNumber
(
fileNumber
);
// 总文件页数
Integer
pageNumber
=
extFilesVO
.
getPageNumber
();
if
(
ObjectUtils
.
isEmpty
(
pageNumber
))
{
pageNumber
=
extFilesUpdateVO
.
getPageNumber
();
}
else
{
}
extFilesVO
.
setPageNumber
(
pageNumber
);
extFilesVO
.
setOperator
(
OperatorType
.
MODIFY
);
extFilesVO
.
setOperator
(
OperatorType
.
MODIFY
);
extFilesVOList
.
add
(
extFilesVO
);
extFilesVOList
.
add
(
extFilesVO
);
}
}
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
781170ce
...
@@ -81,10 +81,22 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
...
@@ -81,10 +81,22 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
if
(
CollectionUtils
.
isEmpty
(
transferDocLinkVOList
))
{
if
(
CollectionUtils
.
isEmpty
(
transferDocLinkVOList
))
{
return
;
return
;
}
}
// todo 2.校验文件档号是否重复
List
<
String
>
distinct
=
transferDocLinkVOList
.
stream
()
.
map
(
ExtTransferDocLinkVO:
:
getArchiveNumber
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
distinct
.
size
()
!=
transferDocLinkVOList
.
size
())
{
throw
new
DxBusinessException
(
"500"
,
"文件清单中:文件归档号寸在重复"
);
}
for
(
ExtTransferDocLinkVO
extTransferDocLinkVO
:
transferDocLinkVOList
)
{
String
archiveNumber
=
extTransferDocLinkVO
.
getArchiveNumber
();
// TODO 查询linK判断是否数据库存在
}
log
.
info
(
"=================开始=绑定案卷关系同时反更新案卷信息================"
);
log
.
info
(
"=================开始=绑定案卷关系同时反更新案卷信息================"
);
//
2
.绑定案卷文件关联关系
//
3
.绑定案卷文件关联关系
this
.
saveFilesDocLink
(
transferDocLinkVOList
);
this
.
saveFilesDocLink
(
transferDocLinkVOList
);
//
3
.更新案卷下部分信息
//
4
.更新案卷下部分信息
this
.
updateExtFilesByBelongingCaseFile
(
transferDocLinkVOList
);
this
.
updateExtFilesByBelongingCaseFile
(
transferDocLinkVOList
);
log
.
info
(
"=================结束=绑定案卷关系同时反更新案卷信息================"
);
log
.
info
(
"=================结束=绑定案卷关系同时反更新案卷信息================"
);
}
}
...
...
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