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
c6e60ed9
Commit
c6e60ed9
authored
Nov 17, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:工单创建
parent
b340dcca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
181 additions
and
7 deletions
+181
-7
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+6
-6
FlowxSubmitDTO.java
.../mail/yanxuan/change/integration/flow/FlowxSubmitDTO.java
+172
-0
ChangeFlowController.java
...l/yanxuan/change/web/controller/ChangeFlowController.java
+3
-1
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
c6e60ed9
...
@@ -62,7 +62,7 @@ public class ChangeFlowBiz {
...
@@ -62,7 +62,7 @@ public class ChangeFlowBiz {
@Autowired
@Autowired
private
FlowRpcService
flowRpcService
;
private
FlowRpcService
flowRpcService
;
public
Boolean
createAndSubmit
(
ChangeFlowCreateReq
changeFlowCreateReq
)
{
public
List
<
String
>
createAndSubmit
(
ChangeFlowCreateReq
changeFlowCreateReq
)
{
// String uid = RequestLocalBean.getUid();
// String uid = RequestLocalBean.getUid();
String
uid
=
"1"
;
String
uid
=
"1"
;
// String name = RequestLocalBean.getName();
// String name = RequestLocalBean.getName();
...
@@ -98,11 +98,11 @@ public class ChangeFlowBiz {
...
@@ -98,11 +98,11 @@ public class ChangeFlowBiz {
// 查询工单详情
// 查询工单详情
FlowDataDTO
flowDataDTO
=
detailFlow
(
flowId
);
FlowDataDTO
flowDataDTO
=
detailFlow
(
flowId
);
String
nodeId
=
flowDataDTO
.
getFlowMeta
().
getCurrNodeDataList
().
get
(
0
).
getNodeId
();
String
nodeId
=
flowDataDTO
.
getFlowMeta
().
getCurrNodeDataList
().
get
(
0
).
getNodeId
();
// 提交工单
// submitFlow(flowId, nodeId, flowCreateReqDTO);
// 保存工单数据
// 保存工单数据
ChangeRecord
changeRecord
=
buildRecord
(
flowId
,
nodeId
,
changeFlowCreateReq
);
ChangeRecord
changeRecord
=
buildRecord
(
flowId
,
nodeId
,
changeFlowCreateReq
);
return
changeFlowService
.
saveRecord
(
changeRecord
);
changeFlowService
.
saveRecord
(
changeRecord
);
// 如果发起人=变更负责人
return
submitFlow
(
flowId
,
nodeId
,
flowCreateReqDTO
);
}
}
private
FlowDataDTO
detailFlow
(
String
flowId
)
{
private
FlowDataDTO
detailFlow
(
String
flowId
)
{
...
@@ -130,7 +130,7 @@ public class ChangeFlowBiz {
...
@@ -130,7 +130,7 @@ public class ChangeFlowBiz {
return
flowCreateReqDTO
;
return
flowCreateReqDTO
;
}
}
private
String
submitFlow
(
String
flowId
,
String
nodeId
,
FlowCreateReqDTO
flowCreateReqDTO
)
{
private
List
<
String
>
submitFlow
(
String
flowId
,
String
nodeId
,
FlowCreateReqDTO
flowCreateReqDTO
)
{
NodeSubmitReqDTO
nodeSubmitReqDTO
=
new
NodeSubmitReqDTO
();
NodeSubmitReqDTO
nodeSubmitReqDTO
=
new
NodeSubmitReqDTO
();
nodeSubmitReqDTO
.
setFlowId
(
flowId
);
nodeSubmitReqDTO
.
setFlowId
(
flowId
);
nodeSubmitReqDTO
.
setNodeId
(
nodeId
);
nodeSubmitReqDTO
.
setNodeId
(
nodeId
);
...
@@ -153,7 +153,7 @@ public class ChangeFlowBiz {
...
@@ -153,7 +153,7 @@ public class ChangeFlowBiz {
submitResponse
.
getErrorMsg
());
submitResponse
.
getErrorMsg
());
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
SUBMIT_FLOW_ERROR
,
submitResponse
.
getErrorMsg
());
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
SUBMIT_FLOW_ERROR
,
submitResponse
.
getErrorMsg
());
}
}
return
nextNodeIdList
.
get
(
0
)
;
return
nextNodeIdList
;
}
}
private
String
createFlow
(
FlowCreateReqDTO
flowCreateReqDTO
)
{
private
String
createFlow
(
FlowCreateReqDTO
flowCreateReqDTO
)
{
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/FlowxSubmitDTO.java
0 → 100644
View file @
c6e60ed9
/**
* @(#)WorkflowApproveDTO.java, 2021年1月19日.
*
* Copyright 2021 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
;
import
java.util.Map
;
public
class
FlowxSubmitDTO
{
private
String
topoId
;
/**
* 流程id
*/
private
String
flowId
;
/**
* 当前节点
*/
private
String
currentNodeId
;
/**
* 审核节点时是审核通过与否,自动执行节点时是执行成功与否
*/
private
boolean
approved
;
/**
* 用户id
*/
private
String
uid
;
/**
* 用户名
*/
private
String
userName
;
/**
* 业务数据
*/
private
String
content
;
/**
* 网关使用的判断条件传入
*/
private
Map
<
String
,
Object
>
paramMap
;
/**
* 审核节点时是不通过理由,自动执行节点时是执行结果描述
*/
private
String
rejectReason
;
private
String
extension
;
/**
* 操作结果
*/
private
String
operateResult
;
private
String
approveFormExtensionInfo
;
/**
* 备注
*/
private
String
remark
;
public
String
getApproveFormExtensionInfo
()
{
return
approveFormExtensionInfo
;
}
public
void
setApproveFormExtensionInfo
(
String
approveFormExtensionInfo
)
{
this
.
approveFormExtensionInfo
=
approveFormExtensionInfo
;
}
public
String
getOperateResult
()
{
return
operateResult
;
}
public
void
setOperateResult
(
String
operateResult
)
{
this
.
operateResult
=
operateResult
;
}
public
String
getTopoId
()
{
return
topoId
;
}
public
void
setTopoId
(
String
topoId
)
{
this
.
topoId
=
topoId
;
}
public
String
getFlowId
()
{
return
flowId
;
}
public
void
setFlowId
(
String
flowId
)
{
this
.
flowId
=
flowId
;
}
public
String
getCurrentNodeId
()
{
return
currentNodeId
;
}
public
void
setCurrentNodeId
(
String
currentNodeId
)
{
this
.
currentNodeId
=
currentNodeId
;
}
public
boolean
isApproved
()
{
return
approved
;
}
public
void
setApproved
(
boolean
approved
)
{
this
.
approved
=
approved
;
}
public
String
getRejectReason
()
{
return
rejectReason
;
}
public
void
setRejectReason
(
String
rejectReason
)
{
this
.
rejectReason
=
rejectReason
;
}
public
String
getExtension
()
{
return
extension
;
}
public
void
setExtension
(
String
extension
)
{
this
.
extension
=
extension
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Map
<
String
,
Object
>
getParamMap
()
{
return
paramMap
;
}
public
void
setParamMap
(
Map
<
String
,
Object
>
paramMap
)
{
this
.
paramMap
=
paramMap
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getUid
()
{
return
uid
;
}
public
void
setUid
(
String
uid
)
{
this
.
uid
=
uid
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
}
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/controller/ChangeFlowController.java
View file @
c6e60ed9
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
*/
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
web
.
controller
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
web
.
controller
;
import
java.util.List
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -73,7 +75,7 @@ public class ChangeFlowController {
...
@@ -73,7 +75,7 @@ public class ChangeFlowController {
* @return
* @return
*/
*/
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
AjaxResult
<
Boolean
>
createAndSubmit
(
@RequestBody
@Valid
ChangeFlowCreateReq
changeFlowCreateReq
)
{
public
AjaxResult
<
List
<
String
>
>
createAndSubmit
(
@RequestBody
@Valid
ChangeFlowCreateReq
changeFlowCreateReq
)
{
log
.
info
(
"[createAndSubmit] createAndSubmit req={}"
,
JSON
.
toJSONString
(
changeFlowCreateReq
));
log
.
info
(
"[createAndSubmit] createAndSubmit req={}"
,
JSON
.
toJSONString
(
changeFlowCreateReq
));
return
AjaxResult
.
success
(
changeFlowBiz
.
createAndSubmit
(
changeFlowCreateReq
));
return
AjaxResult
.
success
(
changeFlowBiz
.
createAndSubmit
(
changeFlowCreateReq
));
}
}
...
...
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