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
a46e17c8
Commit
a46e17c8
authored
Nov 15, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
借阅单创建
parent
622961f8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
43 deletions
+39
-43
ExtBorrowingFormController.java
.../document/core/controller/ExtBorrowingFormController.java
+1
-1
ExtBorrowingFormEvent.java
...m/inet/dcs/document/core/event/ExtBorrowingFormEvent.java
+33
-25
ExtBorrowingFormServiceImpl.java
...cument/core/service/impl/ExtBorrowingFormServiceImpl.java
+0
-8
ExtFilesServiceImpl.java
...t/dcs/document/core/service/impl/ExtFilesServiceImpl.java
+4
-8
ExtDxDocumentServiceImpl.java
...nt/core/service/impl/expand/ExtDxDocumentServiceImpl.java
+1
-1
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/controller/ExtBorrowingFormController.java
View file @
a46e17c8
...
@@ -44,7 +44,7 @@ public class ExtBorrowingFormController<V extends ExtBorrowingFormVO, S extends
...
@@ -44,7 +44,7 @@ public class ExtBorrowingFormController<V extends ExtBorrowingFormVO, S extends
return
ApiResult
.
ok
(
extBorrowingFormService
.
borrowCount
(
searchVo
));
return
ApiResult
.
ok
(
extBorrowingFormService
.
borrowCount
(
searchVo
));
}
}
@ApiOperation
(
"
借阅统计
"
)
@ApiOperation
(
"
创建借阅单
"
)
@PostMapping
({
"borrow"
})
@PostMapping
({
"borrow"
})
public
ApiResult
borrow
(
@RequestBody
ExtBorrowingFormVO
extBorrowingFormVO
,
@RequestParam
(
"docId"
)
Long
docId
)
{
public
ApiResult
borrow
(
@RequestBody
ExtBorrowingFormVO
extBorrowingFormVO
,
@RequestParam
(
"docId"
)
Long
docId
)
{
extBorrowingFormService
.
borrow
(
extBorrowingFormVO
,
docId
);
extBorrowingFormService
.
borrow
(
extBorrowingFormVO
,
docId
);
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/event/ExtBorrowingFormEvent.java
View file @
a46e17c8
...
@@ -2,6 +2,7 @@ package com.inet.dcs.document.core.event;
...
@@ -2,6 +2,7 @@ package com.inet.dcs.document.core.event;
import
com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtBorrowingFormVO
;
import
com.inet.dcs.document.common.vo.ExtBorrowingFormVO
;
import
com.inet.dcs.document.common.vo.ExtTransferDocumentVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.inet.dcs.document.core.constants.SignConstants
;
import
com.inet.dcs.document.core.constants.SignConstants
;
import
com.inet.dcs.document.core.service.ExtBorrowingDocLinkService
;
import
com.inet.dcs.document.core.service.ExtBorrowingDocLinkService
;
...
@@ -14,6 +15,10 @@ import com.inet.dcs.document.core.util.WorkFlowUtil;
...
@@ -14,6 +15,10 @@ import com.inet.dcs.document.core.util.WorkFlowUtil;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.dao.events.BusinessEventType
;
import
com.yonde.dex.dao.events.DxEvent
;
import
com.yonde.dex.dao.events.DxEventListener
;
import
com.yonde.dex.dao.events.DxEventWrap
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
...
@@ -33,6 +38,7 @@ import java.util.List;
...
@@ -33,6 +38,7 @@ import java.util.List;
*/
*/
@Slf4j
@Slf4j
@Component
@Component
@DxEvent
public
class
ExtBorrowingFormEvent
{
public
class
ExtBorrowingFormEvent
{
@Autowired
@Autowired
...
@@ -47,33 +53,35 @@ public class ExtBorrowingFormEvent {
...
@@ -47,33 +53,35 @@ public class ExtBorrowingFormEvent {
@Autowired
@Autowired
private
ExtDxDocumentService
extDxDocumentService
;
private
ExtDxDocumentService
extDxDocumentService
;
@Autowired
private
ExtTransferDocLinkService
extTransferDocLinkService
;
public
void
postUpdate
(
ExtBorrowingFormVO
extBorrowingFormVO
)
{
@DxEventListener
(
value
=
ExtBorrowingFormVO
.
class
,
eventType
=
BusinessEventType
.
POST_LIFECYCLE_CHANGE_STATUS
,
order
=
1
)
if
(
Constants
.
RETURNED
.
equals
(
extBorrowingFormVO
.
getState
()))
{
public
void
postUpdate
(
List
<
DxEventWrap
<
ExtBorrowingFormVO
>>
eventWrapList
)
{
// 获取档案组流程审批人信息
for
(
DxEventWrap
<
ExtBorrowingFormVO
>
e
:
eventWrapList
)
{
DxWfProcessVO
wfProcessInstVO
=
workFlowUtil
.
getWfProcessInst
(
extBorrowingFormVO
);
ExtBorrowingFormVO
extBorrowingFormVO
=
e
.
getTarget
();
DxWfProcessInfoVO
wfProcessInfoVO
=
workFlowUtil
.
getProcessInstDetail
(
wfProcessInstVO
);
if
(
Constants
.
RETURNED
.
equals
(
extBorrowingFormVO
.
getState
()))
{
List
<
DxWfProcessTaskVO
>
activities
=
wfProcessInfoVO
.
getHistoryInfo
();
// 获取档案组流程审批人信息
DxUserInfoVO
dxHandlerUserInfo
=
extBorrowingFormService
.
getSignInfo
(
activities
,
SignConstants
.
SIGN_KEY_DAZGHQR
);
DxWfProcessVO
wfProcessInstVO
=
workFlowUtil
.
getWfProcessInst
(
extBorrowingFormVO
);
if
(
ObjectUtils
.
isNotEmpty
(
dxHandlerUserInfo
))
{
DxWfProcessInfoVO
wfProcessInfoVO
=
workFlowUtil
.
getProcessInstDetail
(
wfProcessInstVO
);
extBorrowingFormVO
.
setDxHandlerUserInfo
(
dxHandlerUserInfo
);
List
<
DxWfProcessTaskVO
>
activities
=
wfProcessInfoVO
.
getHistoryInfo
();
extBorrowingFormVO
.
setDxHandlerUserInfoId
(
dxHandlerUserInfo
.
getUserId
());
DxUserInfoVO
dxHandlerUserInfo
=
extBorrowingFormService
.
getSignInfo
(
activities
,
SignConstants
.
SIGN_KEY_DAZGHQR
);
extBorrowingFormVO
.
setDxHandlerUserInfoIdType
(
"DxUser"
);
if
(
ObjectUtils
.
isNotEmpty
(
dxHandlerUserInfo
))
{
}
extBorrowingFormVO
.
setDxHandlerUserInfo
(
dxHandlerUserInfo
);
// 实际归还时间
extBorrowingFormVO
.
setDxHandlerUserInfoId
(
dxHandlerUserInfo
.
getUserId
());
LocalDateTime
actualReturnTime
=
extBorrowingFormService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_DAZGHQR
);
extBorrowingFormVO
.
setDxHandlerUserInfoIdType
(
"DxUser"
);
extBorrowingFormVO
.
setActualReturnTime
(
actualReturnTime
);
}
extBorrowingFormVO
.
setOperator
(
OperatorType
.
MODIFY
);
// 实际归还时间
extBorrowingFormService
.
saveRecursion
(
extBorrowingFormVO
);
LocalDateTime
actualReturnTime
=
extBorrowingFormService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_DAZGHQR
);
extBorrowingFormVO
.
setActualReturnTime
(
actualReturnTime
);
extBorrowingFormVO
.
setOperator
(
OperatorType
.
MODIFY
);
extBorrowingFormService
.
saveRecursion
(
extBorrowingFormVO
);
// 更新文档状态为可借阅
// 更新文档状态为可借阅
Long
id
=
extBorrowingFormVO
.
getId
();
Long
id
=
extBorrowingFormVO
.
getId
();
SearchQueryCondition
queryCondition
=
SearchUtil
.
buildQuery
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
id
);
SearchQueryCondition
queryCondition
=
SearchUtil
.
buildQuery
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
id
);
List
<
ExtBorrowingDocLinkVO
>
extBorrowingDocLinkVOList
=
extBorrowingDocLinkService
.
findRecursion
(
queryCondition
).
getContent
();
List
<
ExtBorrowingDocLinkVO
>
extBorrowingDocLinkVOList
=
extBorrowingDocLinkService
.
findRecursion
(
queryCondition
).
getContent
();
Long
sourceId
=
extBorrowingDocLinkVOList
.
get
(
0
).
getSourceId
();
Long
sourceId
=
extBorrowingDocLinkVOList
.
get
(
0
).
getSourceId
();
extDxDocumentService
.
updateBorrowingStatus
(
sourceId
,
ExtBorrowingFormServiceImpl
.
CAN_BE_BORROWED
);
extDxDocumentService
.
updateBorrowingStatus
(
sourceId
,
ExtBorrowingFormServiceImpl
.
CAN_BE_BORROWED
);
}
}
}
}
}
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtBorrowingFormServiceImpl.java
View file @
a46e17c8
...
@@ -63,8 +63,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
...
@@ -63,8 +63,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
@Resource
@Resource
private
EntityManager
entityManager
;
private
EntityManager
entityManager
;
@Autowired
private
ExtBorrowingFormEvent
extBorrowingFormEvent
;
@Autowired
@Autowired
private
DxUserInfoFeign
userService
;
private
DxUserInfoFeign
userService
;
...
@@ -72,12 +70,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
...
@@ -72,12 +70,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
@Autowired
@Autowired
private
ExtDxDocumentService
extDxDocumentService
;
private
ExtDxDocumentService
extDxDocumentService
;
@Override
public
void
postUpdate
(
Collection
<
V
>
target
,
Collection
<
V
>
origin
)
{
for
(
V
v
:
target
)
{
extBorrowingFormEvent
.
postUpdate
(
v
);
}
}
@Override
@Override
public
ExtBorrowingFormVO
startWorkflow
(
Long
id
)
{
public
ExtBorrowingFormVO
startWorkflow
(
Long
id
)
{
ExtBorrowingFormVO
extBorrowingFormVO
=
this
.
get
(
id
);
ExtBorrowingFormVO
extBorrowingFormVO
=
this
.
get
(
id
);
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesServiceImpl.java
View file @
a46e17c8
...
@@ -271,23 +271,19 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
...
@@ -271,23 +271,19 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
public
String
categoryNumber
(
String
categoryNumber
,
int
zhNumber
,
int
jjNumber
,
int
sbNumber
,
int
jsNumber
,
int
countNumber
){
public
String
categoryNumber
(
String
categoryNumber
,
int
zhNumber
,
int
jjNumber
,
int
sbNumber
,
int
jsNumber
,
int
countNumber
){
if
(
categoryNumber
.
contains
(
"ZH"
)){
if
(
categoryNumber
.
contains
(
"ZH"
)){
categoryNumber
=
"综合"
;
categoryNumber
=
"综合"
;
zhNumber
++;
countNumber
=
zhNumber
+
1
;
countNumber
=
zhNumber
;
}
}
if
(
categoryNumber
.
contains
(
"JJ"
)){
if
(
categoryNumber
.
contains
(
"JJ"
)){
categoryNumber
=
"基建"
;
categoryNumber
=
"基建"
;
jjNumber
++;
countNumber
=
jjNumber
+
1
;
countNumber
=
jjNumber
;
}
}
if
(
categoryNumber
.
contains
(
"SB"
)){
if
(
categoryNumber
.
contains
(
"SB"
)){
categoryNumber
=
"设备"
;
categoryNumber
=
"设备"
;
sbNumber
++;
countNumber
=
sbNumber
+
1
;
countNumber
=
sbNumber
;
}
}
if
(
categoryNumber
.
contains
(
"JS"
)){
if
(
categoryNumber
.
contains
(
"JS"
)){
categoryNumber
=
"技术"
;
categoryNumber
=
"技术"
;
jsNumber
++;
countNumber
=
jsNumber
+
1
;
countNumber
=
jsNumber
;
}
}
return
categoryNumber
;
return
categoryNumber
;
}
}
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/expand/ExtDxDocumentServiceImpl.java
View file @
a46e17c8
...
@@ -172,7 +172,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
...
@@ -172,7 +172,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
// 更新文档借阅状态
// 更新文档借阅状态
dxDocumentVO
.
setBorrowingStatus
(
borrowingInProgress
);
dxDocumentVO
.
setBorrowingStatus
(
borrowingInProgress
);
dxDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
dxDocumentVO
.
setOperator
(
OperatorType
.
MODIFY
);
this
.
save
((
V
)
dxDocumentVO
);
this
.
save
Recursion
((
V
)
dxDocumentVO
);
}
}
private
String
getProcessDefKey
(
String
subTypeName
)
{
private
String
getProcessDefKey
(
String
subTypeName
)
{
...
...
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