Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
workflow-core
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄夏豪
workflow-core
Commits
415db836
提交
415db836
authored
3月 12, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[工作流模块]流程的假删除,以及流程的处理
上级
2bf38c9f
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
24 行增加
和
38 行删除
+24
-38
FlowsInfoController.java
...wcore/workflow_editer/controller/FlowsInfoController.java
+0
-11
WorkFlowController.java
...owcore/workflow_editer/controller/WorkFlowController.java
+4
-7
FlowsInfo.java
...m/tykj/workflowcore/workflow_editer/entity/FlowsInfo.java
+4
-0
FlowInfoService.java
...workflowcore/workflow_editer/service/FlowInfoService.java
+0
-6
WorkFlowService.java
...workflowcore/workflow_editer/service/WorkFlowService.java
+2
-4
FlowInfoServiceImpl.java
...ore/workflow_editer/service/impl/FlowInfoServiceImpl.java
+0
-4
WorkFlowServiceImpl.java
...ore/workflow_editer/service/impl/WorkFlowServiceImpl.java
+13
-5
SuspendVo.java
...a/com/tykj/workflowcore/workflow_editer/vo/SuspendVo.java
+1
-1
没有找到文件。
src/main/java/com/tykj/workflowcore/workflow_editer/controller/FlowsInfoController.java
浏览文件 @
415db836
...
...
@@ -53,7 +53,6 @@ public class FlowsInfoController {
@ApiOperation
(
value
=
"查询流程信息"
)
public
ResponseEntity
searchFlowInfo
(
@RequestBody
SearchFlowInfoVo
searchFlowInfoVo
){
Page
<
FlowsInfo
>
flowsInfoList
=
flowInfoService
.
searchFlowInfo
(
searchFlowInfoVo
);
return
ResultUtil
.
success
(
flowsInfoList
,
"查询成功"
);
}
...
...
@@ -61,7 +60,6 @@ public class FlowsInfoController {
@ApiOperation
(
value
=
"编辑流程"
)
public
String
editFlow
(
Long
id
){
return
flowInfoService
.
editFlow
(
id
).
getFilePath
();
}
@GetMapping
(
"/deploy"
)
@ApiOperation
(
value
=
"部署流程"
,
notes
=
"部署成功"
)
...
...
@@ -75,12 +73,6 @@ public class FlowsInfoController {
return
ResultUtil
.
success
(
flowsInfo
.
getState
(),
"流程部署成功"
);
}
@PostMapping
(
"/disableFlow"
)
@ApiOperation
(
value
=
"禁用流程"
,
notes
=
"分页查询"
)
public
ResponseEntity
disableFlow
(
@RequestBody
Long
flowId
){
flowInfoService
.
disableFlow
(
flowId
);
return
ResultUtil
.
success
(
"禁用成功"
);
}
@PostMapping
(
"/saveXml"
)
@ApiOperation
(
value
=
"保存xml以及其他流程信息"
)
...
...
@@ -92,9 +84,6 @@ public class FlowsInfoController {
return
ResultUtil
.
success
(
"文件保存成功"
);
}
//保存流程中的 节点信息和节点内容
@PostMapping
(
"/updateByProcessName"
)
@ApiOperation
(
value
=
"通过流程名称修改"
)
public
ResponseEntity
updateByProcessName
(
@RequestBody
FlowsInfoVo
flowsInfoVo
)
{
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/controller/WorkFlowController.java
浏览文件 @
415db836
...
...
@@ -89,17 +89,14 @@ public class WorkFlowController {
@ApiOperation
(
"是否挂起"
)
public
ResponseEntity
isSuspension
(
@RequestBody
SuspendVo
suspendVo
){
workFlowService
.
suspendOrActivateProcessDefinitionByKey
(
suspendVo
);
return
ResultUtil
.
success
(
"该流程已被
挂起
"
);
return
ResultUtil
.
success
(
"该流程已被
暂停
"
);
}
@DeleteMapping
(
"/deleteFlow"
)
@ApiOperation
(
"是否删除"
)
public
ResponseEntity
deleteFlow
(
String
deployId
){
//根据流程id查询出flowsInfo
FlowsInfo
flowsInfo
=
flowInfoService
.
findByDeployId
(
deployId
);
//删除flowsInfo
flowInfoService
.
deleteById
(
flowsInfo
.
getId
());
workFlowService
.
deleteFlow
(
deployId
);
public
ResponseEntity
deleteFlow
(
Long
id
){
workFlowService
.
deleteFlow
(
id
);
return
ResultUtil
.
success
(
"该流程已被删除"
);
}
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/entity/FlowsInfo.java
浏览文件 @
415db836
...
...
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.annotations.SQLDelete
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
...
...
@@ -27,6 +28,7 @@ import java.util.Date;
@NoArgsConstructor
@Entity
@WorkFlowCoreNoScan
@SQLDelete
(
sql
=
"update flows_info set deleted = 1 where id = ?"
)
@Api
(
"流程表"
)
public
class
FlowsInfo
extends
BaseEntity
{
@Id
...
...
@@ -71,4 +73,6 @@ public class FlowsInfo extends BaseEntity {
* @params: 部署id
*/
private
String
deployId
;
@ApiModelProperty
(
"是否删除"
)
private
Integer
deleted
=
0
;
}
src/main/java/com/tykj/workflowcore/workflow_editer/service/FlowInfoService.java
浏览文件 @
415db836
...
...
@@ -47,12 +47,6 @@ public interface FlowInfoService {
*/
FlowsInfo
findByDeployId
(
String
deployId
);
/**
* 根据id删除
* @param id id
*/
void
deleteById
(
Long
id
);
/**
* 根据流程主键查询
* @param flowKey 流程主键
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/service/WorkFlowService.java
浏览文件 @
415db836
...
...
@@ -88,8 +88,6 @@ public interface WorkFlowService {
*/
Map
<
String
,
Object
>
findTaskDetail
(
String
taskId
);
/**
* 任务完成
* @param taskVo taskVo
...
...
@@ -120,9 +118,9 @@ public interface WorkFlowService {
/**
* 删除流程
* @param
deployId 部署
id
* @param
id 流程
id
*/
void
deleteFlow
(
String
deployI
d
);
void
deleteFlow
(
Long
i
d
);
/**
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/service/impl/FlowInfoServiceImpl.java
浏览文件 @
415db836
...
...
@@ -66,10 +66,6 @@ public class FlowInfoServiceImpl implements FlowInfoService {
return
flowsInfoMapper
.
findByDeployId
(
deployId
);
}
@Override
public
void
deleteById
(
Long
id
)
{
flowsInfoMapper
.
deleteById
(
id
);
}
@Override
public
FlowsInfo
findByFlowKey
(
String
flowKey
)
{
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/service/impl/WorkFlowServiceImpl.java
浏览文件 @
415db836
...
...
@@ -58,7 +58,6 @@ public class WorkFlowServiceImpl implements WorkFlowService {
private
final
RuntimeService
runtimeService
;
private
final
TaskService
taskService
;
private
final
FlowsInfoMapper
flowsInfoMapper
;
private
final
UserService
userService
;
private
final
HistoryService
historyService
;
private
final
ProcessEngineConfigurationImpl
processEngineConfiguration
;
...
...
@@ -340,15 +339,24 @@ public class WorkFlowServiceImpl implements WorkFlowService {
@Override
public
void
suspendOrActivateProcessDefinitionByKey
(
SuspendVo
suspendVo
)
{
if
(
suspendVo
.
getSuspensionState
()
==
1
){
repositoryService
.
suspendProcessDefinitionByKey
(
suspendVo
.
get
ProcessDefinition
Key
(),
true
,
new
Date
());
repositoryService
.
suspendProcessDefinitionByKey
(
suspendVo
.
get
Flow
Key
(),
true
,
new
Date
());
}
else
{
repositoryService
.
activateProcessDefinitionById
(
suspendVo
.
get
ProcessDefinition
Key
(),
true
,
new
Date
());
repositoryService
.
activateProcessDefinitionById
(
suspendVo
.
get
Flow
Key
(),
true
,
new
Date
());
}
}
@Override
public
void
deleteFlow
(
String
deployId
)
{
repositoryService
.
deleteDeployment
(
deployId
);
public
void
deleteFlow
(
Long
id
)
{
//通过流程id查询出flowsInfo
FlowsInfo
flowsInfo
=
flowsInfoMapper
.
findById
(
id
).
get
();
//先判断流程是否已经部署
if
(
flowsInfo
.
getDeployId
()
!=
null
){
//已经部署了 (启用)
repositoryService
.
deleteDeployment
(
flowsInfo
.
getDeployId
(),
true
);
}
flowsInfo
.
setState
(
1
);
flowsInfoMapper
.
save
(
flowsInfo
);
}
@Override
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/vo/SuspendVo.java
浏览文件 @
415db836
...
...
@@ -20,7 +20,7 @@ public class SuspendVo {
/**
* 流程主键
*/
private
String
processDefinition
Key
;
private
String
flow
Key
;
/**
* 是否挂起 1 挂起 0 激活
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论