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
d297c1dc
Commit
d297c1dc
authored
Nov 05, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监听移交单状态已完成,更新数据
parent
826e4d18
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
10 deletions
+119
-10
SignConstants.java
...a/com/inet/dcs/document/core/constants/SignConstants.java
+1
-0
ExtTransferDocumentEvent.java
...net/dcs/document/core/event/ExtTransferDocumentEvent.java
+53
-0
ExtTransferDocumentService.java
...dcs/document/core/service/ExtTransferDocumentService.java
+9
-0
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+56
-10
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/constants/SignConstants.java
View file @
d297c1dc
...
...
@@ -14,6 +14,7 @@ public final class SignConstants {
//签名取值
public
static
final
String
SIGN_KEY_PREPARED
=
"编制"
;
public
static
final
String
SIGN_KEY_DAZSH
=
"档案组审核"
;
public
static
final
String
SIGN_KEY_TSSH
=
"同室审核"
;
public
static
final
String
SIGN_KEY_FXTZSSH
=
"分系统总师审核"
;
public
static
final
String
SIGN_KEY_GY
=
"工艺"
;
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/event/ExtTransferDocumentEvent.java
0 → 100644
View file @
d297c1dc
package
com
.
inet
.
dcs
.
document
.
core
.
event
;
import
com.inet.dcs.document.common.vo.ExtTransferDocumentVO
;
import
com.inet.dcs.document.core.constants.SignConstants
;
import
com.inet.dcs.document.core.service.ExtTransferDocumentService
;
import
com.inet.dcs.document.core.util.WorkFlowUtil
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @author whd
* @date 2024-11-05 10:17
* @describe
*/
@Slf4j
@Component
public
class
ExtTransferDocumentEvent
{
@Autowired
private
WorkFlowUtil
workFlowUtil
;
@Autowired
private
ExtTransferDocumentService
extTransferDocumentService
;
public
void
postUpdate
(
ExtTransferDocumentVO
extTransferDocumentVO
)
{
// 获取档案组流程审批人信息
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
.
getId
());
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
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtTransferDocumentService.java
View file @
d297c1dc
...
...
@@ -5,6 +5,11 @@ import com.inet.dcs.document.common.vo.archivesOtherVO.ExtTransferDocProjectVO;
import
com.inet.dcs.document.core.service.shadow.ExtTransferDocumentServiceShadow
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description: ExtTransferDocument-service
...
...
@@ -21,4 +26,8 @@ public interface ExtTransferDocumentService<V extends ExtTransferDocumentVO> ext
ExtTransferDocProjectVO
getTransferDocProjectById
(
Long
id
);
DxPageImpl
getDxDocumentList
(
SearchQueryCondition
searchQueryCondition
);
DxUserInfoVO
getSignInfo
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
LocalDateTime
getEndDate
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
d297c1dc
...
...
@@ -5,6 +5,8 @@ import com.inet.dcs.document.common.vo.ExtTransferDocumentVO;
import
com.inet.dcs.document.common.vo.archivesOtherVO.ExtFilesUpdateVO
;
import
com.inet.dcs.document.common.vo.archivesOtherVO.ExtTransferDocProjectVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.inet.dcs.document.core.constants.SignConstants
;
import
com.inet.dcs.document.core.event.ExtTransferDocumentEvent
;
import
com.inet.dcs.document.core.repository.ExtTransferDocumentRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
...
...
@@ -21,15 +23,22 @@ import com.yonde.dex.basedata.exception.DxBusinessException;
import
com.yonde.dex.basic.feign.expand.ExtDxContextProjectServiceFeign
;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
import
com.yonde.dex.dao.service.DxDaoPluginExpander
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.wfc.common.enums.TaskStateEnum
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
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
org.springframework.util.ObjectUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -68,13 +77,21 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
@Autowired
private
ExtDxDocumentService
extDxDocumentService
;
/* @Override
public void beforeSave(Collection<V> target) {
// 校验是否存在归档中文件
@Autowired
private
ExtTransferDocumentEvent
extTransferDocumentEvent
;
@Autowired
private
DxUserInfoFeign
userService
;
@Override
public
void
postUpdate
(
Collection
<
V
>
target
,
Collection
<
V
>
origin
)
{
for
(
V
v
:
target
)
{
target
// 单据状态已完成,只更新一次
if
(
Constants
.
COMPLETE
.
equals
(
v
.
getState
())
&&
ObjectUtils
.
isEmpty
(
v
.
getHandoverTime
()))
{
extTransferDocumentEvent
.
postUpdate
(
v
);
}
}
}
}*/
@Override
public
ExtTransferDocumentVO
startWorkflow
(
Long
id
)
{
...
...
@@ -131,13 +148,13 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
DxContextProjectVO
dxContextProjectVO
=
(
DxContextProjectVO
)
programDxPage
.
getContent
().
get
(
0
);
//project_class = 项目群:program 项目:project 子项:childProject
if
(
"program"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setProjectCode
(
dxContextProjectVO
.
getN
ame
());
extTransferDocProjectVO
.
setProjectCode
(
dxContextProjectVO
.
getN
umber
());
extTransferDocProjectVO
.
setProjectGroupName
(
dxContextProjectVO
.
getName
());
return
extTransferDocProjectVO
;
}
else
if
(
"project"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setTopicTitle
(
dxContextProjectVO
.
getName
());
}
else
if
(
"childProject"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setProjectName
(
dxContextProjectVO
.
getName
());
}
else
if
(
"childProject"
.
equals
(
dxContextProjectVO
.
getProjectClass
()))
{
extTransferDocProjectVO
.
setTopicTitle
(
dxContextProjectVO
.
getName
());
}
id
=
dxContextProjectVO
.
getParentId
();
}
...
...
@@ -164,6 +181,35 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
return
extDxDocumentService
.
findRecursion
(
searchQueryCondition
);
}
@Override
public
LocalDateTime
getEndDate
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
)
{
for
(
DxWfProcessTaskVO
wf
:
activities
)
{
if
(
wf
.
getName
().
equals
(
activityName
))
{
if
(
wf
.
getState
().
equals
(
TaskStateEnum
.
COMPLETE
.
name
())
&&
(
SignConstants
.
WfResultList
.
contains
(
wf
.
getResult
())))
{
Date
endTime
=
wf
.
getEndTime
();
return
endTime
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
();
}
}
}
return
null
;
}
@Override
public
DxUserInfoVO
getSignInfo
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
)
{
for
(
DxWfProcessTaskVO
wf
:
activities
)
{
if
(
wf
.
getName
().
equals
(
activityName
))
{
if
(
wf
.
getState
().
equals
(
TaskStateEnum
.
COMPLETE
.
name
())
&&
(
SignConstants
.
WfResultList
.
contains
(
wf
.
getResult
())))
{
//获取用户名称和id
String
userName
=
wf
.
getAssigneeName
();
String
userId
=
wf
.
getAssignee
();
return
(
DxUserInfoVO
)
userService
.
get
(
Long
.
parseLong
(
userId
));
}
}
}
return
null
;
}
private
void
saveFilesDocLink
(
List
<
ExtTransferDocLinkVO
>
transferDocLinkVOList
)
{
List
<
ExtFilesUpdateVO
>
extFilesUpdateVOList
=
Lists
.
newArrayList
();
for
(
ExtTransferDocLinkVO
extTransferDocLinkVO
:
transferDocLinkVOList
)
{
...
...
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