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
9beea6e7
Commit
9beea6e7
authored
Oct 30, 2024
by
wangyangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设计评审:通知+意见 手动启流程接口
parent
d3e10e30
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
0 deletions
+83
-0
ExtDesignReviewNoticeController.java
...ment/core/controller/ExtDesignReviewNoticeController.java
+9
-0
ExtReviewFeedbackController.java
...document/core/controller/ExtReviewFeedbackController.java
+9
-0
ExtDesignReviewNoticeService.java
...s/document/core/service/ExtDesignReviewNoticeService.java
+1
-0
ExtReviewFeedbackService.java
...t/dcs/document/core/service/ExtReviewFeedbackService.java
+1
-0
ExtDesignReviewNoticeServiceImpl.java
...t/core/service/impl/ExtDesignReviewNoticeServiceImpl.java
+32
-0
ExtReviewFeedbackServiceImpl.java
...ument/core/service/impl/ExtReviewFeedbackServiceImpl.java
+31
-0
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/controller/ExtDesignReviewNoticeController.java
View file @
9beea6e7
...
...
@@ -29,6 +29,15 @@ import org.springframework.stereotype.Controller;
@BasePermission
(
"DCS-REVIEW:ExtDesignReviewNotice"
)
public
class
ExtDesignReviewNoticeController
<
V
extends
ExtDesignReviewNoticeVO
,
S
extends
ExtDesignReviewNoticeService
<
V
>>
extends
ExtDesignReviewNoticeControllerShadow
<
V
,
S
>
{
@Autowired
private
ExtDesignReviewNoticeService
extDesignReviewNoticeService
;
@ApiOperation
(
"发起审批流程"
)
@PostMapping
({
"startWorkflow"
})
public
ApiResult
startWorkflow
(
@RequestParam
(
"id"
)
Long
id
)
{
return
ApiResult
.
ok
(
extDesignReviewNoticeService
.
startWorkflow
(
id
),
"流程启动成功"
);
}
}
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/controller/ExtReviewFeedbackController.java
View file @
9beea6e7
package
com
.
inet
.
dcs
.
document
.
core
.
controller
;
import
com.inet.dcs.document.core.service.ExtDesignReviewNoticeService
;
import
org.springframework.stereotype.Controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -27,6 +28,14 @@ import org.springframework.stereotype.Controller;
@Controller
(
ExtReviewFeedbackController
.
BEAN_NAME
)
public
class
ExtReviewFeedbackController
<
V
extends
ExtReviewFeedbackVO
,
S
extends
ExtReviewFeedbackService
<
V
>>
extends
ExtReviewFeedbackControllerShadow
<
V
,
S
>
{
@Autowired
private
ExtReviewFeedbackService
extReviewFeedbackService
;
@ApiOperation
(
"发起审批流程"
)
@PostMapping
({
"startWorkflow"
})
public
ApiResult
startWorkflow
(
@RequestParam
(
"id"
)
Long
id
)
{
return
ApiResult
.
ok
(
extReviewFeedbackService
.
startWorkflow
(
id
),
"流程启动成功"
);
}
}
...
...
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtDesignReviewNoticeService.java
View file @
9beea6e7
...
...
@@ -10,4 +10,5 @@ import com.inet.dcs.document.core.service.shadow.ExtDesignReviewNoticeServiceSha
**/
public
interface
ExtDesignReviewNoticeService
<
V
extends
ExtDesignReviewNoticeVO
>
extends
ExtDesignReviewNoticeServiceShadow
<
V
>
{
ExtDesignReviewNoticeVO
startWorkflow
(
Long
id
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtReviewFeedbackService.java
View file @
9beea6e7
...
...
@@ -10,4 +10,5 @@ import com.inet.dcs.document.core.service.shadow.ExtReviewFeedbackServiceShadow;
**/
public
interface
ExtReviewFeedbackService
<
V
extends
ExtReviewFeedbackVO
>
extends
ExtReviewFeedbackServiceShadow
<
V
>
{
ExtReviewFeedbackVO
startWorkflow
(
Long
id
);
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtDesignReviewNoticeServiceImpl.java
View file @
9beea6e7
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
com.inet.dcs.document.common.vo.ExtTransferDocumentVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
...
...
@@ -7,6 +11,7 @@ import com.inet.dcs.document.common.vo.ExtDesignReviewNoticeVO;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
com.inet.dcs.document.core.service.ExtDesignReviewNoticeService
;
import
com.inet.dcs.document.core.repository.ExtDesignReviewNoticeRepository
;
...
...
@@ -29,6 +34,33 @@ public class ExtDesignReviewNoticeServiceImpl<V extends ExtDesignReviewNoticeVO>
@Autowired
ExtDesignReviewNoticeRepository
<
ExtDesignReviewNotice
>
extDesignReviewNoticeRepository
;
@Autowired
private
WfcProcessFeign
wfcProcessFeign
;
private
static
final
String
START_PROCESS_BY_KEY
=
"ExtDesignReviewNoticeWF"
;
/**
* 沟通确认后 在待审阅 pendingReview 节点启动流程(第一个节点) 先启动,后修改状态 审阅中 Reviewing
* @param id
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
ExtDesignReviewNoticeVO
startWorkflow
(
Long
id
)
{
ExtDesignReviewNoticeVO
extDesignReviewNoticeVO
=
this
.
get
(
id
);
if
(
extDesignReviewNoticeVO
==
null
)
{
throw
new
DxBusinessException
(
"500"
,
"获取不到对象"
);
}
if
(!
extDesignReviewNoticeVO
.
getState
().
equals
(
Constants
.
PENDING_REVIEW
))
{
throw
new
DxBusinessException
(
"500"
,
"该对象不是待审阅状态"
);
}
wfcProcessFeign
.
startProcessByKey
(
START_PROCESS_BY_KEY
,
extDesignReviewNoticeVO
);
return
this
.
changeStatus
(
extDesignReviewNoticeVO
.
getId
(),
Constants
.
REVIEWING
,
true
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtReviewFeedbackServiceImpl.java
View file @
9beea6e7
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
com.inet.dcs.document.common.vo.ExtDesignReviewNoticeVO
;
import
com.inet.dcs.document.core.constants.Constants
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
...
...
@@ -7,6 +11,7 @@ import com.inet.dcs.document.common.vo.ExtReviewFeedbackVO;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
com.inet.dcs.document.core.service.ExtReviewFeedbackService
;
import
com.inet.dcs.document.core.repository.ExtReviewFeedbackRepository
;
...
...
@@ -29,6 +34,32 @@ public class ExtReviewFeedbackServiceImpl<V extends ExtReviewFeedbackVO> impleme
@Autowired
ExtReviewFeedbackRepository
<
ExtReviewFeedback
>
extReviewFeedbackRepository
;
@Autowired
private
WfcProcessFeign
wfcProcessFeign
;
private
static
final
String
START_PROCESS_BY_KEY
=
"ExtReviewFeedbackWF"
;
/**
* 沟通确认后 在待审阅 pendingReview 节点启动流程(第一个节点) 先启动,后修改状态 审阅中 Reviewing
* @param id
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
ExtReviewFeedbackVO
startWorkflow
(
Long
id
)
{
ExtReviewFeedbackVO
extReviewFeedbackVO
=
this
.
get
(
id
);
if
(
extReviewFeedbackVO
==
null
)
{
throw
new
DxBusinessException
(
"500"
,
"获取不到对象"
);
}
if
(!
extReviewFeedbackVO
.
getState
().
equals
(
Constants
.
PENDING_REVIEW
))
{
throw
new
DxBusinessException
(
"500"
,
"该对象不是待审阅状态"
);
}
wfcProcessFeign
.
startProcessByKey
(
START_PROCESS_BY_KEY
,
extReviewFeedbackVO
);
return
this
.
changeStatus
(
extReviewFeedbackVO
.
getId
(),
Constants
.
REVIEWING
,
true
);
}
}
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