提交 7ca1f467 authored 作者: zhoushaopan's avatar zhoushaopan

[工作流模块]解决判断是否是最后一个节点的bug

上级 6d4c747a
...@@ -32,8 +32,6 @@ public class FormPageController { ...@@ -32,8 +32,6 @@ public class FormPageController {
@Autowired @Autowired
private FormPageService formPageService; private FormPageService formPageService;
// @Autowired
// private PageEntityService pageEntityService;
@ApiOperation("保存页面") @ApiOperation("保存页面")
@PostMapping("/savePage") @PostMapping("/savePage")
......
...@@ -30,6 +30,7 @@ import javax.persistence.Entity; ...@@ -30,6 +30,7 @@ import javax.persistence.Entity;
@Api("流程表") @Api("流程表")
public class FlowsInfo extends BaseEntity { public class FlowsInfo extends BaseEntity {
@ApiModelProperty("发起人的Id") @ApiModelProperty("发起人的Id")
private Integer userId; private Integer userId;
......
...@@ -52,11 +52,11 @@ public class FormPage extends BaseEntity { ...@@ -52,11 +52,11 @@ public class FormPage extends BaseEntity {
@Lob @Lob
private String css; private String css;
@ApiModelProperty("创建的时间") // @ApiModelProperty("创建的时间")
private Date createTime; // private Date createTime;
//
@ApiModelProperty("修改的时间") // @ApiModelProperty("修改的时间")
private Date updateTime; // private Date updateTime;
@ApiModelProperty("json描述文件") @ApiModelProperty("json描述文件")
private String descFile; private String descFile;
......
...@@ -28,7 +28,7 @@ public interface FormPageService { ...@@ -28,7 +28,7 @@ public interface FormPageService {
Integer savePage(@RequestBody InFormPageVo inFormPageVo); Integer savePage(@RequestBody InFormPageVo inFormPageVo);
/** /**
* 保存页面 * 更新页面
* @param formPage 页面实体 * @param formPage 页面实体
* @return 主键id * @return 主键id
*/ */
...@@ -38,7 +38,7 @@ public interface FormPageService { ...@@ -38,7 +38,7 @@ public interface FormPageService {
* @param id 页面id * @param id 页面id
* @return 页面信息 * @return 页面信息
*/ */
FormPage getPage(@PathVariable("id") Integer id); FormPage getPage(Integer id);
/** /**
* 根据页面id删除页面 * 根据页面id删除页面
......
...@@ -50,7 +50,7 @@ public class FormPageServiceImpl implements FormPageService { ...@@ -50,7 +50,7 @@ public class FormPageServiceImpl implements FormPageService {
} }
@Override @Override
public FormPage getPage(@PathVariable("id") Integer id) { public FormPage getPage(Integer id) {
FormPage formPage = formPageMapper.findById(id).get(); FormPage formPage = formPageMapper.findById(id).get();
//时间排序 //时间排序
......
...@@ -286,11 +286,29 @@ public class WorkFlowServiceImpl implements WorkFlowService { ...@@ -286,11 +286,29 @@ public class WorkFlowServiceImpl implements WorkFlowService {
if (taskVo.getConditionalExpression() != null) { if (taskVo.getConditionalExpression() != null) {
claimTask(task.getId(), userService.getCurrentUser().getId()); claimTask(task.getId(), userService.getCurrentUser().getId());
taskService.complete(task.getId()); taskService.complete(task.getId());
} else { } else {
map.put("handlingOpinion", taskVo.getHandlingOpinion()); map.put("handlingOpinion", taskVo.getHandlingOpinion());
claimTask(task.getId(), userService.getCurrentUser().getId()); claimTask(task.getId(), userService.getCurrentUser().getId());
taskService.complete(task.getId(), map); taskService.complete(task.getId(), map);
} }
// 流程结束了
ProcessInstance processInstance =
runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (processInstance == null){
//通过processInstanceId查询出flowKey
FlowsInfo flowsInfo = flowsInfoMapper.findByProcessInstanceId(processInstanceId);
//查询调用接口的配置
List<VariableStorage> variableStorageList = variableStorageService.searchVariableStorageList(new
SearchVariableStorageVo(flowsInfo.getFlowKey()));
for (VariableStorage variableStorage : variableStorageList) {
InvokeRequestVo variableInfo = variableStorage.getInvokeRequest();
//调用服务接口
getApiInvokeParam(variableInfo);
}
}
//查询是否为最后一个节点 //查询是否为最后一个节点
// ExecutionEntity ee = (ExecutionEntity) processEngine.getRuntimeService().createExecutionQuery() // ExecutionEntity ee = (ExecutionEntity) processEngine.getRuntimeService().createExecutionQuery()
// .executionId(task.getExecutionId()).singleResult(); // .executionId(task.getExecutionId()).singleResult();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论