Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
Overview
Overview
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
胡园园
yanxuan-qc-change-system
Commits
bcefa2e6
Commit
bcefa2e6
authored
Dec 07, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 运维接口
parent
85fa6c21
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
AutoSubmit.java
.../com/netease/mail/yanxuan/change/biz/task/AutoSubmit.java
+1
-1
TestController.java
...se/mail/yanxuan/change/web/controller/TestController.java
+27
-6
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/task/AutoSubmit.java
View file @
bcefa2e6
...
...
@@ -74,7 +74,7 @@ public class AutoSubmit extends IJobHandler {
return
ReturnT
.
SUCCESS
;
}
p
rivate
void
progressRecord
(
ChangeRecord
changeRecord
)
{
p
ublic
void
progressRecord
(
ChangeRecord
changeRecord
)
{
Long
flowId
=
changeRecord
.
getFlowId
();
String
flowNode
=
changeRecord
.
getFlowNode
();
String
uid
=
changeRecord
.
getChangeCommander
();
...
...
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/controller/TestController.java
View file @
bcefa2e6
...
...
@@ -6,15 +6,19 @@
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
web
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.netease.mail.yanxuan.change.biz.service.impl.InteriorChangeConfigServiceImpl
;
import
com.netease.mail.yanxuan.change.biz.meta.exception.ExceptionFactory
;
import
com.netease.mail.yanxuan.change.biz.service.ChangeFlowService
;
import
com.netease.mail.yanxuan.change.biz.task.AutoSubmit
;
import
com.netease.mail.yanxuan.change.common.bean.ResponseCode
;
import
com.netease.mail.yanxuan.change.common.enums.ChangeFlowEnum
;
import
com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierGoodsInfoReq
;
import
com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRelatedUserReq
;
import
com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierGoodsInfoRsp
;
import
com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.web.bind.annotation.*
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -40,6 +44,12 @@ public class TestController {
@Autowired
private
TodoService
todoService
;
@Autowired
private
ChangeFlowService
changeFlowService
;
@Autowired
private
AutoSubmit
autoSubmit
;
@PostMapping
(
"/createToDo"
)
public
AjaxResult
<
Void
>
createTodoTask
(
ChangeRecord
entity
)
{
log
.
info
(
"[createToDoTask] entity:{}"
,
JSON
.
toJSONString
(
entity
));
...
...
@@ -58,23 +68,33 @@ public class TestController {
private
FlowRpcSupplierSendService
supplierSendService
;
@PostMapping
(
"/test1"
)
public
String
test1
(
@RequestBody
List
<
Long
>
itemIds
){
public
String
test1
(
@RequestBody
List
<
Long
>
itemIds
)
{
return
supplierSendService
.
queryGoodsPurchase
(
itemIds
);
}
@PostMapping
(
"/test2"
)
public
AjaxResponse
<
List
<
SupplierUserRsp
>>
test2
(
@RequestBody
SupplierRelatedUserReq
req
){
public
AjaxResponse
<
List
<
SupplierUserRsp
>>
test2
(
@RequestBody
SupplierRelatedUserReq
req
)
{
return
supplierSendService
.
querySupplierRelatedUser
(
req
);
}
@PostMapping
(
"/test3"
)
public
AjaxResponse
<
List
<
SupplierSimpleRsp
>>
test3
(
@RequestBody
SupplierSearchRemoteReq
req
){
public
AjaxResponse
<
List
<
SupplierSimpleRsp
>>
test3
(
@RequestBody
SupplierSearchRemoteReq
req
)
{
return
supplierSendService
.
queryByConditionForQc
(
req
);
}
@PostMapping
(
"/test4"
)
public
AjaxResponse
<
List
<
SupplierGoodsInfoRsp
>>
test4
(
@RequestBody
SupplierGoodsInfoReq
req
){
public
AjaxResponse
<
List
<
SupplierGoodsInfoRsp
>>
test4
(
@RequestBody
SupplierGoodsInfoReq
req
)
{
return
supplierSendService
.
SupplierGoodsInfoBySupplier
(
req
);
}
@PostMapping
(
"/submit"
)
public
AjaxResult
<
Void
>
submit
(
Long
id
)
{
ChangeRecord
record
=
changeFlowService
.
getById
(
id
);
Assert
.
notNull
(
record
,
"工单不存在"
);
if
(!
record
.
getFlowNode
().
equals
(
ChangeFlowEnum
.
CHANGE_FLOW_EXE
.
getNodeId
()))
{
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
SUBMIT_FLOW_ERROR
,
"不是变更执行节点,不可运维提交"
);
}
autoSubmit
.
progressRecord
(
record
);
return
AjaxResult
.
success
();
}
}
\ No newline at end of file
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