提交 661b7c24 authored 作者: zhoushaopan's avatar zhoushaopan

[工作流模块]解决删除流程的bug

上级 c465c0d1
......@@ -94,7 +94,6 @@ public class FlowsInfoController {
@PostMapping("/updateByDesc")
@ApiOperation(value = "通过流程描述修改")
public ResponseEntity updateByDesc(@RequestBody FlowsInfoVo flowsInfoVo) {
FlowsInfo flowsInfo = flowInfoService.findByDesc(flowsInfoVo);
return ResultUtil.success(flowsInfo.getFlowDescribe(),"流程修改成功");
}
......
......@@ -95,7 +95,6 @@ public class WorkFlowController {
@DeleteMapping("/deleteFlow")
@ApiOperation("是否删除")
public ResponseEntity deleteFlow(Long id){
workFlowService.deleteFlow(id);
return ResultUtil.success("该流程已被删除");
}
......
......@@ -69,7 +69,6 @@ public class FormPageServiceImpl implements FormPageService {
@Override
public Page<FormPage> getAllPages(PageFormPageVo pageFormPageVo) {
ArrayList<OutFormPageVo> formPageVos = new ArrayList<>();
PredicateBuilder<FormPage> and = Specifications.and();
and.eq(pageFormPageVo.getPageName()!=null,"pageName",pageFormPageVo.getPageName());
and.eq(pageFormPageVo.getPageDesc()!=null,"pageDesc",pageFormPageVo.getPageDesc());
......
......@@ -357,8 +357,11 @@ public class WorkFlowServiceImpl implements WorkFlowService {
public void deleteFlow(Long id) {
//通过流程id查询出flowsInfo
FlowsInfo flowsInfo = flowsInfoMapper.findById(id).get();
flowsInfo.setState(1);
flowsInfoMapper.save(flowsInfo);
if(flowsInfo.getState() == 0){
flowsInfo.setState(1);
flowsInfoMapper.save(flowsInfo);
}
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论