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
622961f8
Commit
622961f8
authored
Nov 14, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
借阅单创建
parent
2cbd18b7
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
48 deletions
+33
-48
ExtBorrowingDocLinkVO.java
...om/inet/dcs/document/common/vo/ExtBorrowingDocLinkVO.java
+0
-1
ExtBorrowingFormController.java
.../document/core/controller/ExtBorrowingFormController.java
+7
-0
ExtBorrowingFormEvent.java
...m/inet/dcs/document/core/event/ExtBorrowingFormEvent.java
+0
-25
ExtTransferDocumentEvent.java
...net/dcs/document/core/event/ExtTransferDocumentEvent.java
+2
-2
ExtBorrowingFormService.java
...et/dcs/document/core/service/ExtBorrowingFormService.java
+2
-0
ExtTransferDocumentService.java
...dcs/document/core/service/ExtTransferDocumentService.java
+1
-1
ExtBorrowingFormServiceImpl.java
...cument/core/service/impl/ExtBorrowingFormServiceImpl.java
+15
-15
ExtTransferDocumentServiceImpl.java
...ent/core/service/impl/ExtTransferDocumentServiceImpl.java
+3
-3
ExtDxDocumentServiceImpl.java
...nt/core/service/impl/expand/ExtDxDocumentServiceImpl.java
+3
-1
No files found.
inet-doc-expand-common/src/main/java/com/inet/dcs/document/common/vo/ExtBorrowingDocLinkVO.java
View file @
622961f8
...
...
@@ -27,7 +27,6 @@ import lombok.ToString;
@Data
@ToString
(
callSuper
=
true
)
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
ITERATION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
ITERATION
))
public
class
ExtBorrowingDocLinkVO
extends
IdOnlyVO
implements
DxLinkDataVOHolder
<
DxDocumentVO
,
ExtBorrowingFormVO
>,
IdVO
{
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/controller/ExtBorrowingFormController.java
View file @
622961f8
...
...
@@ -44,6 +44,13 @@ public class ExtBorrowingFormController<V extends ExtBorrowingFormVO, S extends
return
ApiResult
.
ok
(
extBorrowingFormService
.
borrowCount
(
searchVo
));
}
@ApiOperation
(
"借阅统计"
)
@PostMapping
({
"borrow"
})
public
ApiResult
borrow
(
@RequestBody
ExtBorrowingFormVO
extBorrowingFormVO
,
@RequestParam
(
"docId"
)
Long
docId
)
{
extBorrowingFormService
.
borrow
(
extBorrowingFormVO
,
docId
);
return
ApiResult
.
ok
(
"借阅成功"
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/event/ExtBorrowingFormEvent.java
View file @
622961f8
...
...
@@ -76,29 +76,4 @@ public class ExtBorrowingFormEvent {
extDxDocumentService
.
updateBorrowingStatus
(
sourceId
,
ExtBorrowingFormServiceImpl
.
CAN_BE_BORROWED
);
}
}
public
void
beforeSave
(
ExtBorrowingFormVO
extBorrowingFormVO
)
{
// 保存之前不展开下面属性
/*ExtBorrowingDocLinkVO extBorrowingDocLinkVO = extBorrowingFormVO.getExtBorrowingDocLinks().get(0);
DxDocumentVO source = extBorrowingDocLinkVO.getSource();
String borrowingStatus = source.getBorrowingStatus();
if (borrowingStatus.equals(ExtBorrowingFormServiceImpl.BORROWING_IN_PROGRESS)) {
throw new DxBusinessException("500", "文档正在借阅中");
}*/
}
public
void
postSave
(
ExtBorrowingFormVO
extBorrowingFormVO
)
{
// 待审阅占用文档,改为借阅中
if
(
extBorrowingFormVO
.
getState
().
equals
(
Constants
.
PENDING_REVIEW
))
{
Long
id
=
extBorrowingFormVO
.
getId
();
SearchQueryCondition
queryCondition
=
SearchUtil
.
buildQuery
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
id
);
List
<
ExtBorrowingDocLinkVO
>
extBorrowingDocLinkVOList
=
extBorrowingDocLinkService
.
findRecursion
(
queryCondition
).
getContent
();
Long
sourceId
=
extBorrowingDocLinkVOList
.
get
(
0
).
getSourceId
();
extDxDocumentService
.
updateBorrowingStatus
(
sourceId
,
ExtBorrowingFormServiceImpl
.
BORROWING_IN_PROGRESS
);
// 获取文档档号和文件名称
}
// 更新借阅人,借阅日期,借阅部门
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/event/ExtTransferDocumentEvent.java
View file @
622961f8
...
...
@@ -44,7 +44,7 @@ public class ExtTransferDocumentEvent {
for
(
DxEventWrap
<
ExtTransferDocumentVO
>
e
:
eventWrapList
)
{
ExtTransferDocumentVO
extTransferDocumentVO
=
e
.
getTarget
();
// 单据状态已完成,只更新一次
if
(
Constants
.
COMPLETE
.
equals
(
extTransferDocumentVO
.
getState
())
&&
ObjectUtils
.
isEmpty
(
extTransferDocumentVO
.
getHandoverTime
())
)
{
if
(
Constants
.
COMPLETE
.
equals
(
extTransferDocumentVO
.
getState
()))
{
// 获取档案组流程审批人信息
DxWfProcessVO
wfProcessInstVO
=
workFlowUtil
.
getWfProcessInst
(
extTransferDocumentVO
);
DxWfProcessInfoVO
wfProcessInfoVO
=
workFlowUtil
.
getProcessInstDetail
(
wfProcessInstVO
);
...
...
@@ -63,7 +63,7 @@ public class ExtTransferDocumentEvent {
extTransferDocumentService
.
saveRecursion
(
extTransferDocumentVO
);
// 更新文档状态为已归档
extTransferDocumentService
.
updateArchivingStatus
(
extTransferDocumentVO
.
getId
()
);
extTransferDocumentService
.
updateArchivingStatus
(
extTransferDocumentVO
);
}
}
}
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtBorrowingFormService.java
View file @
622961f8
...
...
@@ -31,4 +31,6 @@ public interface ExtBorrowingFormService<V extends ExtBorrowingFormVO> extends E
DxUserInfoVO
getSignInfo
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
LocalDateTime
getEndDate
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
void
borrow
(
ExtBorrowingFormVO
extBorrowingFormVO
,
Long
docId
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtTransferDocumentService.java
View file @
622961f8
...
...
@@ -32,7 +32,7 @@ public interface ExtTransferDocumentService<V extends ExtTransferDocumentVO> ext
LocalDateTime
getEndDate
(
List
<
DxWfProcessTaskVO
>
activities
,
String
activityName
);
void
updateArchivingStatus
(
Long
id
);
void
updateArchivingStatus
(
ExtTransferDocumentVO
extTransferDocumentVO
);
void
returnDocument
(
Long
transferDocLinkId
);
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtBorrowingFormServiceImpl.java
View file @
622961f8
...
...
@@ -11,7 +11,10 @@ import com.inet.dcs.document.core.constants.SqlConstants;
import
com.inet.dcs.document.core.event.ExtBorrowingFormEvent
;
import
com.inet.dcs.document.core.repository.ExtBorrowingFormRepository
;
import
com.inet.dcs.document.core.service.ExtBorrowingFormService
;
import
com.inet.dcs.document.core.service.expand.ExtDxDocumentService
;
import
com.inet.dcs.document.entity.po.ExtBorrowingForm
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.dao.service.DxDaoPluginExpander
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
...
...
@@ -66,27 +69,15 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
@Autowired
private
DxUserInfoFeign
userService
;
@Autowired
private
ExtDxDocumentService
extDxDocumentService
;
@Override
public
void
postUpdate
(
Collection
<
V
>
target
,
Collection
<
V
>
origin
)
{
for
(
V
v
:
target
)
{
extBorrowingFormEvent
.
postUpdate
(
v
);
}
}
@Override
public
void
beforeSave
(
Collection
<
V
>
target
)
{
for
(
V
v
:
target
)
{
//extBorrowingFormEvent.beforeSave(v);
}
}
@Override
public
void
postSave
(
Collection
<
V
>
target
)
{
for
(
V
v
:
target
)
{
extBorrowingFormEvent
.
postSave
(
v
);
}
}
@Override
public
ExtBorrowingFormVO
startWorkflow
(
Long
id
)
{
ExtBorrowingFormVO
extBorrowingFormVO
=
this
.
get
(
id
);
...
...
@@ -218,6 +209,15 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
return
null
;
}
@Override
public
void
borrow
(
ExtBorrowingFormVO
extBorrowingFormVO
,
Long
docId
)
{
this
.
saveRecursion
((
V
)
extBorrowingFormVO
);
DxDocumentVO
dxDocumentVO
=
(
DxDocumentVO
)
extDxDocumentService
.
get
(
docId
);
dxDocumentVO
.
setBorrowingStatus
(
BORROWING_IN_PROGRESS
);
dxDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
extDxDocumentService
.
saveRecursion
(
dxDocumentVO
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtTransferDocumentServiceImpl.java
View file @
622961f8
...
...
@@ -202,17 +202,17 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
}
@Override
public
void
updateArchivingStatus
(
Long
id
)
{
public
void
updateArchivingStatus
(
ExtTransferDocumentVO
extTransferDocumentVO
)
{
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
id
,
null
))
.
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
.
isNotEmpty
(
transferDocLinkVOList
))
{
for
(
ExtTransferDocLinkVO
extTransferDocLinkVO
:
transferDocLinkVOList
)
{
Long
sourceId
=
extTransferDocLinkVO
.
getSourceId
();
extDxDocumentService
.
updateArchivingStatus
(
sourceId
,
ExtDxDocumentServiceImpl
.
ARCHIVED
,
""
);
extDxDocumentService
.
updateArchivingStatus
(
sourceId
,
ExtDxDocumentServiceImpl
.
ARCHIVED
,
extTransferDocumentVO
.
getNumber
()
);
}
}
}
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/expand/ExtDxDocumentServiceImpl.java
View file @
622961f8
...
...
@@ -140,7 +140,8 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
}
// 无前置状态,直接已归档。置空退档人,和退档时间,移交单号
if
(
ARCHIVED
.
equals
(
archivingStatus
))
{
dxDocumentVO
.
setTransferDocumentId
(
null
);
dxDocumentVO
.
setTransferDocumentId
(
transferDocumentCode
);
dxDocumentVO
.
setBorrowingStatus
(
"可借阅"
);
dxDocumentVO
.
setDxRefundPersonUser
(
null
);
dxDocumentVO
.
setDxRefundPersonUserId
(
null
);
dxDocumentVO
.
setDxRefundPersonUserIdType
(
null
);
...
...
@@ -152,6 +153,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
if
(!
dxDocumentVO
.
getArchivingStatus
().
equals
(
ARCHIVED
))
{
throw
new
DxBusinessException
(
"500"
,
"不是已归档状态"
);
}
dxDocumentVO
.
setTransferDocumentId
(
transferDocumentCode
);
dxDocumentVO
.
setDxRefundPersonUser
(
dxUserInfoVO
);
dxDocumentVO
.
setDxRefundPersonUserId
(
dxUserInfoVO
.
getUserId
());
dxDocumentVO
.
setDxRefundPersonUserIdType
(
"DxUser"
);
...
...
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