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

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

上级 6d4c747a
......@@ -32,8 +32,6 @@ public class FormPageController {
@Autowired
private FormPageService formPageService;
// @Autowired
// private PageEntityService pageEntityService;
@ApiOperation("保存页面")
@PostMapping("/savePage")
......
......@@ -30,6 +30,7 @@ import javax.persistence.Entity;
@Api("流程表")
public class FlowsInfo extends BaseEntity {
@ApiModelProperty("发起人的Id")
private Integer userId;
......
......@@ -52,11 +52,11 @@ public class FormPage extends BaseEntity {
@Lob
private String css;
@ApiModelProperty("创建的时间")
private Date createTime;
@ApiModelProperty("修改的时间")
private Date updateTime;
// @ApiModelProperty("创建的时间")
// private Date createTime;
//
// @ApiModelProperty("修改的时间")
// private Date updateTime;
@ApiModelProperty("json描述文件")
private String descFile;
......
......@@ -28,7 +28,7 @@ public interface FormPageService {
Integer savePage(@RequestBody InFormPageVo inFormPageVo);
/**
* 保存页面
* 更新页面
* @param formPage 页面实体
* @return 主键id
*/
......@@ -38,7 +38,7 @@ public interface FormPageService {
* @param id 页面id
* @return 页面信息
*/
FormPage getPage(@PathVariable("id") Integer id);
FormPage getPage(Integer id);
/**
* 根据页面id删除页面
......
......@@ -50,7 +50,7 @@ public class FormPageServiceImpl implements FormPageService {
}
@Override
public FormPage getPage(@PathVariable("id") Integer id) {
public FormPage getPage(Integer id) {
FormPage formPage = formPageMapper.findById(id).get();
//时间排序
......
......@@ -286,11 +286,29 @@ public class WorkFlowServiceImpl implements WorkFlowService {
if (taskVo.getConditionalExpression() != null) {
claimTask(task.getId(), userService.getCurrentUser().getId());
taskService.complete(task.getId());
} else {
map.put("handlingOpinion", taskVo.getHandlingOpinion());
claimTask(task.getId(), userService.getCurrentUser().getId());
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()
// .executionId(task.getExecutionId()).singleResult();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论