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
29a24377
Commit
29a24377
authored
Nov 29, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 完成待办
parent
7a1a85dc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
27 deletions
+41
-27
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+3
-18
TodoService.java
...ease/mail/yanxuan/change/biz/service/rpc/TodoService.java
+29
-4
TodoTaskTypeEnum.java
...se/mail/yanxuan/change/common/enums/TodoTaskTypeEnum.java
+2
-2
ChangeRecord.java
.../netease/mail/yanxuan/change/dal/entity/ChangeRecord.java
+1
-1
TaskCreateDTO.java
...e/mail/yanxuan/change/integration/todo/TaskCreateDTO.java
+1
-1
TaskProcessParamVO.java
...l/yanxuan/change/integration/todo/TaskProcessParamVO.java
+3
-0
TestController.java
...se/mail/yanxuan/change/web/controller/TestController.java
+2
-1
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
29a24377
...
@@ -192,20 +192,6 @@ public class ChangeFlowBiz {
...
@@ -192,20 +192,6 @@ public class ChangeFlowBiz {
return
flowId
;
return
flowId
;
}
}
/**
* 完成代办
* @param entity
*/
public
void
finishSupplierTodoTask
(
ChangeRecord
entity
)
{
String
changeCommander
=
entity
.
getChangeCommander
();
String
flowId
=
String
.
valueOf
(
entity
.
getFlowId
());
log
.
info
(
"[finishSupplierTodoTask] taskFlowId={}, supplierId={}"
,
flowId
,
changeCommander
);
if
(
StringUtils
.
isNotEmpty
(
changeCommander
))
{
}
}
private
List
<
ChangeFile
>
buildChangeFileRecord
(
Long
changeRecordId
,
List
<
ChangeFlowFile
>
files
)
{
private
List
<
ChangeFile
>
buildChangeFileRecord
(
Long
changeRecordId
,
List
<
ChangeFlowFile
>
files
)
{
return
files
.
stream
().
map
(
f
->
{
return
files
.
stream
().
map
(
f
->
{
ChangeFile
changeFile
=
new
ChangeFile
();
ChangeFile
changeFile
=
new
ChangeFile
();
...
@@ -498,8 +484,7 @@ public class ChangeFlowBiz {
...
@@ -498,8 +484,7 @@ public class ChangeFlowBiz {
changeRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
changeRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
changeFlowService
.
updateRecord
(
changeRecord
);
changeFlowService
.
updateRecord
(
changeRecord
);
changeExecRecordList
.
forEach
(
exec
->
changeFlowExecService
.
update
(
exec
));
changeExecRecordList
.
forEach
(
exec
->
changeFlowExecService
.
update
(
exec
));
// todo: 完成代办
todoService
.
finishTodoTask
(
changeRecord
);
finishSupplierTodoTask
(
changeRecord
);
// todo:完结工单,发送邮件
// todo:完结工单,发送邮件
return
confirmNode
;
return
confirmNode
;
case
CANCEL:
case
CANCEL:
...
@@ -513,7 +498,7 @@ public class ChangeFlowBiz {
...
@@ -513,7 +498,7 @@ public class ChangeFlowBiz {
changeRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
changeRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
changeFlowService
.
updateRecord
(
changeRecord
);
changeFlowService
.
updateRecord
(
changeRecord
);
// todo: 完成代办
// todo: 完成代办
finishSupplier
TodoTask
(
changeRecord
);
todoService
.
finish
TodoTask
(
changeRecord
);
// todo:完结工单,发送邮件
// todo:完结工单,发送邮件
return
cancelNode
;
return
cancelNode
;
case
DELAY:
case
DELAY:
...
@@ -599,7 +584,7 @@ public class ChangeFlowBiz {
...
@@ -599,7 +584,7 @@ public class ChangeFlowBiz {
changeRecord
.
setCancelReason
(
req
.
getCancelReason
());
changeRecord
.
setCancelReason
(
req
.
getCancelReason
());
changeRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
changeRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
// todo: 完成代办
// todo: 完成代办
finishSupplier
TodoTask
(
changeRecord
);
todoService
.
finish
TodoTask
(
changeRecord
);
// todo:取消501节点,取消工单,发送邮件
// todo:取消501节点,取消工单,发送邮件
return
changeFlowService
.
updateRecord
(
changeRecord
);
return
changeFlowService
.
updateRecord
(
changeRecord
);
}
}
...
...
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/service/rpc/TodoService.java
View file @
29a24377
...
@@ -18,10 +18,12 @@ import com.netease.mail.yanxuan.change.biz.meta.exception.ExceptionFactory;
...
@@ -18,10 +18,12 @@ import com.netease.mail.yanxuan.change.biz.meta.exception.ExceptionFactory;
import
com.netease.mail.yanxuan.change.common.bean.CommonConstants
;
import
com.netease.mail.yanxuan.change.common.bean.CommonConstants
;
import
com.netease.mail.yanxuan.change.common.bean.ResponseCode
;
import
com.netease.mail.yanxuan.change.common.bean.ResponseCode
;
import
com.netease.mail.yanxuan.change.common.bean.ResponseCodeEnum
;
import
com.netease.mail.yanxuan.change.common.bean.ResponseCodeEnum
;
import
com.netease.mail.yanxuan.change.common.enums.SupplierTodoTaskTypeEnum
;
import
com.netease.mail.yanxuan.change.common.enums.OperateTypeEnum
;
import
com.netease.mail.yanxuan.change.common.enums.TodoTaskTypeEnum
;
import
com.netease.mail.yanxuan.change.dal.entity.ChangeRecord
;
import
com.netease.mail.yanxuan.change.dal.entity.ChangeRecord
;
import
com.netease.mail.yanxuan.change.integration.todo.TaskCreateDTO
;
import
com.netease.mail.yanxuan.change.integration.todo.TaskCreateDTO
;
import
com.netease.mail.yanxuan.change.integration.todo.TaskCreateParamVO
;
import
com.netease.mail.yanxuan.change.integration.todo.TaskCreateParamVO
;
import
com.netease.mail.yanxuan.change.integration.todo.TaskProcessParamVO
;
import
com.netease.mail.yanxuan.change.integration.todo.TodoRpcService
;
import
com.netease.mail.yanxuan.change.integration.todo.TodoRpcService
;
import
com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse
;
import
com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse
;
...
@@ -44,6 +46,7 @@ public class TodoService {
...
@@ -44,6 +46,7 @@ public class TodoService {
*/
*/
public
TaskCreateDTO
createTodoTask
(
ChangeRecord
entity
)
{
public
TaskCreateDTO
createTodoTask
(
ChangeRecord
entity
)
{
String
changeCommander
=
entity
.
getChangeCommander
();
String
changeCommander
=
entity
.
getChangeCommander
();
TaskCreateDTO
taskCreateDTO
=
new
TaskCreateDTO
();
if
(
StringUtils
.
isNotEmpty
(
changeCommander
))
{
if
(
StringUtils
.
isNotEmpty
(
changeCommander
))
{
String
flowId
=
String
.
valueOf
(
entity
.
getFlowId
());
String
flowId
=
String
.
valueOf
(
entity
.
getFlowId
());
Map
<
String
,
Object
>
businessContent
=
new
HashMap
<>();
Map
<
String
,
Object
>
businessContent
=
new
HashMap
<>();
...
@@ -58,18 +61,39 @@ public class TodoService {
...
@@ -58,18 +61,39 @@ public class TodoService {
taskCreateParamVO
.
setTaskHandler
(
changeCommander
);
taskCreateParamVO
.
setTaskHandler
(
changeCommander
);
taskCreateParamVO
.
setTaskHandlerName
(
changeCommander
);
taskCreateParamVO
.
setTaskHandlerName
(
changeCommander
);
taskCreateParamVO
.
setTaskTitle
(
"测试"
);
taskCreateParamVO
.
setTaskTitle
(
"测试"
);
taskCreateParamVO
.
setTaskTypeKey
(
SupplierTodoTaskTypeEnum
.
QC_CHANGE
.
getValue
());
taskCreateParamVO
.
setTaskTypeKey
(
TodoTaskTypeEnum
.
QC_CHANGE
.
getValue
());
TaskCreateDTO
taskCreateDTO
;
AjaxResponse
<
TaskCreateDTO
>
taskCreateResponse
=
todoRpcService
.
create
(
taskCreateParamVO
);
AjaxResponse
<
TaskCreateDTO
>
taskCreateResponse
=
todoRpcService
.
create
(
taskCreateParamVO
);
if
(
ResponseCodeEnum
.
SUCCESS
.
getCode
()
==
taskCreateResponse
.
getCode
())
{
if
(
ResponseCodeEnum
.
SUCCESS
.
getCode
()
==
taskCreateResponse
.
getCode
())
{
taskCreateDTO
=
taskCreateResponse
.
getData
();
taskCreateDTO
=
taskCreateResponse
.
getData
();
log
.
info
(
"[createTodoTask] taskCreateDTO={}"
,
JSON
.
toJSONString
(
taskCreateDTO
));
log
.
info
(
"[createTodoTask] taskCreateDTO={}"
,
JSON
.
toJSONString
(
taskCreateDTO
));
return
taskCreateDTO
;
}
else
{
}
else
{
log
.
error
(
"[createTodoTask] create todo failed, param={}, errMsg={}"
,
JSON
.
toJSONString
(
taskCreateParamVO
),
log
.
error
(
"[createTodoTask] create todo failed, param={}, errMsg={}"
,
JSON
.
toJSONString
(
taskCreateParamVO
),
JSON
.
toJSONString
(
taskCreateResponse
));
JSON
.
toJSONString
(
taskCreateResponse
));
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
CREATE_TODO_ERROR
,
"查询工单详情错误"
);
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
CREATE_TODO_ERROR
,
"查询工单详情错误"
);
}
}
}
return
taskCreateDTO
;
}
/**
* 完成代办
* @param entity
*/
public
void
finishTodoTask
(
ChangeRecord
entity
)
{
String
changeCommander
=
entity
.
getChangeCommander
();
String
flowId
=
String
.
valueOf
(
entity
.
getFlowId
());
log
.
info
(
"[finishSupplierTodoTask] taskFlowId={}, supplierId={}"
,
flowId
,
changeCommander
);
if
(
StringUtils
.
isNotEmpty
(
changeCommander
))
{
TaskProcessParamVO
taskProcessParamVO
=
new
TaskProcessParamVO
();
taskProcessParamVO
.
setBusinessKey
(
flowId
);
taskProcessParamVO
.
setOperateType
(
OperateTypeEnum
.
FINISH
.
getType
());
taskProcessParamVO
.
setOperator
(
changeCommander
);
taskProcessParamVO
.
setOperatorName
(
changeCommander
);
taskProcessParamVO
.
setProduct
(
CommonConstants
.
FLOWX_PRODUCT
);
taskProcessParamVO
.
setTaskId
(
entity
.
getTodoId
());
todoRpcService
.
progress
(
taskProcessParamVO
);
}
}
}
}
}
}
\ No newline at end of file
yanxuan-qc-change-system-common/src/main/java/com/netease/mail/yanxuan/change/common/enums/
Supplier
TodoTaskTypeEnum.java
→
yanxuan-qc-change-system-common/src/main/java/com/netease/mail/yanxuan/change/common/enums/TodoTaskTypeEnum.java
View file @
29a24377
...
@@ -5,10 +5,10 @@ package com.netease.mail.yanxuan.change.common.enums;
...
@@ -5,10 +5,10 @@ package com.netease.mail.yanxuan.change.common.enums;
*
*
* @author dmx
* @author dmx
*/
*/
public
enum
Supplier
TodoTaskTypeEnum
{
public
enum
TodoTaskTypeEnum
{
QC_CHANGE
(
"101"
,
"变更工单处理"
);
QC_CHANGE
(
"101"
,
"变更工单处理"
);
Supplier
TodoTaskTypeEnum
(
String
value
,
String
desc
)
{
TodoTaskTypeEnum
(
String
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
value
=
value
;
this
.
desc
=
desc
;
this
.
desc
=
desc
;
}
}
...
...
yanxuan-qc-change-system-dal/src/main/java/com/netease/mail/yanxuan/change/dal/entity/ChangeRecord.java
View file @
29a24377
...
@@ -165,7 +165,7 @@ public class ChangeRecord {
...
@@ -165,7 +165,7 @@ public class ChangeRecord {
/**
/**
* 待办id
* 待办id
*/
*/
private
Long
todoId
;
private
Integer
todoId
;
/**
/**
* 创建时间
* 创建时间
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/todo/TaskCreateDTO.java
View file @
29a24377
...
@@ -20,7 +20,7 @@ public class TaskCreateDTO {
...
@@ -20,7 +20,7 @@ public class TaskCreateDTO {
/**
/**
* 待办id
* 待办id
*/
*/
private
Long
id
;
private
Integer
id
;
/**
/**
* 废弃
* 废弃
*/
*/
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/todo/TaskProcessParamVO.java
View file @
29a24377
...
@@ -8,10 +8,13 @@ package com.netease.mail.yanxuan.change.integration.todo;
...
@@ -8,10 +8,13 @@ package com.netease.mail.yanxuan.change.integration.todo;
import
com.netease.mail.yanxuan.change.common.enums.OperateTypeEnum
;
import
com.netease.mail.yanxuan.change.common.enums.OperateTypeEnum
;
import
lombok.Data
;
/**
/**
* @Author zcwang
* @Author zcwang
* @Date 2022/11/28
* @Date 2022/11/28
*/
*/
@Data
public
class
TaskProcessParamVO
{
public
class
TaskProcessParamVO
{
/**
/**
...
...
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/controller/TestController.java
View file @
29a24377
...
@@ -41,7 +41,7 @@ public class TestController {
...
@@ -41,7 +41,7 @@ public class TestController {
@PostMapping
(
"/finishToDo"
)
@PostMapping
(
"/finishToDo"
)
public
AjaxResult
<
Void
>
finishTodoTask
(
ChangeRecord
entity
)
{
public
AjaxResult
<
Void
>
finishTodoTask
(
ChangeRecord
entity
)
{
log
.
info
(
"[createToDoTask] entity:{}"
,
JSON
.
toJSONString
(
entity
));
log
.
info
(
"[createToDoTask] entity:{}"
,
JSON
.
toJSONString
(
entity
));
todoService
.
create
TodoTask
(
entity
);
todoService
.
finish
TodoTask
(
entity
);
return
AjaxResult
.
success
();
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