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
eaddd302
Commit
eaddd302
authored
Nov 01, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移交单档案组 审批反写案卷部分信息
parent
6a00e86f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
155 additions
and
20 deletions
+155
-20
ExtFilesUpdateVO.java
...ava/com/inet/dcs/document/common/vo/ExtFilesUpdateVO.java
+37
-0
ExtTransferDocumentController.java
...cument/core/controller/ExtTransferDocumentController.java
+17
-15
ExtFilesService.java
...a/com/inet/dcs/document/core/service/ExtFilesService.java
+15
-5
ExtTransferDocumentService.java
...dcs/document/core/service/ExtTransferDocumentService.java
+2
-0
ExtFilesServiceImpl.java
...t/dcs/document/core/service/impl/ExtFilesServiceImpl.java
+23
-0
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+61
-0
No files found.
inet-doc-expand-common/src/main/java/com/inet/dcs/document/common/vo/ExtFilesUpdateVO.java
0 → 100644
View file @
eaddd302
package
com
.
inet
.
dcs
.
document
.
common
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author weihongda
* @Date 2024/11/1 16:39
* @Description: TODO
*/
@Data
public
class
ExtFilesUpdateVO
implements
Serializable
{
/**
* 所属案卷
*/
private
String
belongingCaseFile
;
/**
* 密级
*/
private
String
secretCode
;
/**
* 保管年限
*/
private
String
storagePeriod
;
/**
* 文件数
*/
private
int
fileNumber
;
/**
* 页数
*/
private
int
pageNumber
;
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/controller/ExtTransferDocumentController.java
View file @
eaddd302
package
com
.
inet
.
dcs
.
document
.
core
.
controller
;
import
org.springframework.stereotype.Controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
import
com.inet.dcs.document.common.vo.ExtTransferDocumentVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.*
;
import
com.inet.dcs.document.core.controller.shadow.ExtTransferDocumentControllerShadow
;
import
com.inet.dcs.document.core.service.ExtTransferDocumentService
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.inet.dcs.document.core.controller.shadow.ExtTransferDocumentControllerShadow
;
import
javax.annotation.Resource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
/**
* @description: ExtTransferDocument-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:50
**/
* @description: ExtTransferDocument-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:50
**/
@Api
(
tags
=
"ExtTransferDocument管理服务"
)
@RequestMapping
(
"/ExtTransferDocument"
)
@ResponseBody
()
...
...
@@ -36,6 +31,13 @@ public class ExtTransferDocumentController<V extends ExtTransferDocumentVO, S ex
public
ApiResult
startWorkflow
(
@RequestParam
(
"id"
)
Long
id
)
{
return
ApiResult
.
ok
(
extTransferDocumentService
.
startWorkflow
(
id
),
"流程启动成功"
);
}
@ApiOperation
(
value
=
"更新案卷部分字段信息"
,
notes
=
"更新案卷部分字段信息"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/updateExtFiles"
)
public
ApiResult
updateExtFiles
(
@RequestBody
ExtTransferDocumentVO
extTransferDocumentVO
)
{
extTransferDocumentService
.
updateExtFiles
(
extTransferDocumentVO
);
return
ApiResult
.
ok
(
ApiResult
.
SUCCESS
,
"更新案卷部分信息成功"
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtFilesService.java
View file @
eaddd302
package
com
.
inet
.
dcs
.
document
.
core
.
service
;
import
com.inet.dcs.document.common.vo.ExtFilesUpdateVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.core.service.shadow.ExtFilesServiceShadow
;
import
java.util.List
;
/**
* @description: ExtFiles-service
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:49
**/
* @description: ExtFiles-service
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:49
**/
public
interface
ExtFilesService
<
V
extends
ExtFilesVO
>
extends
ExtFilesServiceShadow
<
V
>
{
/**
* 批量更新案卷部分信息
*
* @param extFilesUpdateVOList
*/
void
updateExtFiles
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtTransferDocumentService.java
View file @
eaddd302
...
...
@@ -11,4 +11,6 @@ import com.inet.dcs.document.core.service.shadow.ExtTransferDocumentServiceShado
public
interface
ExtTransferDocumentService
<
V
extends
ExtTransferDocumentVO
>
extends
ExtTransferDocumentServiceShadow
<
V
>
{
ExtTransferDocumentVO
startWorkflow
(
Long
id
);
void
updateExtFiles
(
ExtTransferDocumentVO
extTransferDocumentVO
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesServiceImpl.java
View file @
eaddd302
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.ExtFilesRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
...
...
@@ -11,6 +12,7 @@ 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.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basic.feign.expand.ExtDxContextProjectServiceFeign
;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
...
...
@@ -18,6 +20,7 @@ import com.yonde.dex.context.common.vo.DxContextVO;
import
com.yonde.dex.dao.service.DxDaoPluginExpander
;
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
;
...
...
@@ -152,6 +155,26 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
}
return
caseNumberBuilder
.
append
(
caseNumber
).
toString
();
}
@Override
public
void
updateExtFiles
(
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
)
{
List
<
ExtFilesVO
>
extFilesVOList
=
Lists
.
newArrayList
();
for
(
ExtFilesUpdateVO
extFilesUpdateVO
:
extFilesUpdateVOList
)
{
List
<
ExtFilesVO
>
filesVOS
=
this
.
findRecursionByVolumeNumber
(
extFilesUpdateVO
.
getBelongingCaseFile
());
if
(
CollectionUtils
.
isNotEmpty
(
filesVOS
))
{
ExtFilesVO
extFilesVO
=
filesVOS
.
get
(
0
);
extFilesVO
.
setSecretCode
(
extFilesUpdateVO
.
getSecretCode
());
extFilesVO
.
setStoragePeriod
(
extFilesUpdateVO
.
getStoragePeriod
());
extFilesVO
.
setFileNumber
(
extFilesUpdateVO
.
getFileNumber
());
extFilesVO
.
setPageNumber
(
extFilesUpdateVO
.
getPageNumber
());
extFilesVO
.
setOperator
(
OperatorType
.
MODIFY
);
extFilesVOList
.
add
(
extFilesVO
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
extFilesVOList
))
{
this
.
saveRecursion
((
V
)
extFilesVOList
);
}
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
eaddd302
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
com.inet.dcs.document.common.vo.ExtFilesUpdateVO
;
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.ExtFilesService
;
import
com.inet.dcs.document.core.service.ExtTransferDocLinkService
;
import
com.inet.dcs.document.core.service.ExtTransferDocumentService
;
import
com.inet.dcs.document.entity.po.ExtTransferDocument
;
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.exception.DxBusinessException
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
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
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @description: ExtTransferDocument-ServiceImpl
* @author: dexadmin
...
...
@@ -32,6 +45,12 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
private
static
final
String
START_PROCESS_BY_KEY
=
"ExtTransferDocWF"
;
@Autowired
private
ExtTransferDocLinkService
extTransferDocLinkService
;
@Autowired
private
ExtFilesService
extFilesService
;
@Override
public
ExtTransferDocumentVO
startWorkflow
(
Long
id
)
{
ExtTransferDocumentVO
extTransferDocumentVO
=
this
.
get
(
id
);
...
...
@@ -44,6 +63,48 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
wfcProcessFeign
.
startProcessByKey
(
START_PROCESS_BY_KEY
,
extTransferDocumentVO
);
return
this
.
changeStatus
(
extTransferDocumentVO
.
getId
(),
Constants
.
SUBMIT_REVIEWING
,
true
);
}
@Override
public
void
updateExtFiles
(
ExtTransferDocumentVO
extTransferDocumentVO
)
{
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"source"
).
build
())
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
extTransferDocumentVO
.
getId
(),
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
List
<
ExtTransferDocLinkVO
>
transferDocLinkVOList
=
extTransferDocLinkService
.
findRecursion
(
queryDoc
).
getContent
();
if
(
CollectionUtils
.
isEmpty
(
transferDocLinkVOList
))
{
return
;
}
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
();
String
secretCode
=
""
;
//最大密级
String
storagePeriod
=
""
;
//最大年限
int
fileNumber
=
0
;
int
pageNumber
=
value
.
size
();
for
(
ExtTransferDocLinkVO
extTransferDocLinkVO
:
value
)
{
// TODO 密级
extTransferDocLinkVO
.
getSource
().
getSecretCode
();
// TODO 保存年限
extTransferDocLinkVO
.
getStoragePeriod
();
// 文件页数
fileNumber
+=
extTransferDocLinkVO
.
getPageNumber
();
}
extFilesUpdateVO
.
setBelongingCaseFile
(
key
);
extFilesUpdateVO
.
setSecretCode
(
secretCode
);
extFilesUpdateVO
.
setStoragePeriod
(
storagePeriod
);
extFilesUpdateVO
.
setFileNumber
(
fileNumber
);
extFilesUpdateVO
.
setPageNumber
(
pageNumber
);
extFilesUpdateVOList
.
add
(
extFilesUpdateVO
);
});
extFilesService
.
updateExtFiles
(
extFilesUpdateVOList
);
}
}
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