提交 1afd2d0c 编写于 作者: sq3536's avatar sq3536

待办跳转

上级 837e413c
......@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
......@@ -145,15 +146,14 @@ public class WFCoreResource
}
@RequestMapping(value = "/mytasks/{processDefinitionKey}/{type}/{businessKey}/usertasks/{taskDefinitionKey}", method = RequestMethod.GET )
@ResponseStatus(HttpStatus.FOUND)
public void openTask(@PathVariable("processDefinitionKey") final String processDefinitionKey,@PathVariable("type") final String type,
public ResponseEntity openTask(@PathVariable("processDefinitionKey") final String processDefinitionKey,@PathVariable("type") final String type,
@PathVariable("businessKey") final String businessKey, @PathVariable("taskDefinitionKey") final String taskDefinitionKey,
HttpServletRequest request, HttpServletResponse response) throws Exception {
String path = wfCoreService.getTaskUrl(type,processDefinitionKey,"",businessKey,taskDefinitionKey);
if(StringUtils.isEmpty(path))
throw new BadRequestAlertException("未找到待办任务处理页","","");
response.setHeader("Location", path);
return ResponseEntity.status(HttpStatus.MOVED_PERMANENTLY).header(HttpHeaders.LOCATION, path).build();
}
@RequestMapping(method = RequestMethod.POST, value = "/deploybpmn")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册