Commit 3721a707 authored by chenhao's avatar chenhao

修改获取工作流流程图片的方法

parent 11115a66
package com.yeejoin.amos.boot.biz.common.workflow.feign; package com.yeejoin.amos.boot.biz.common.workflow.feign;
import java.awt.*;
import java.util.HashMap; import java.util.HashMap;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -14,10 +11,9 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -14,10 +11,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import javax.print.attribute.standard.MediaTray; import feign.Response;
import javax.servlet.http.HttpServletResponse;
@FeignClient(name = "AMOS-API-WORKFLOW", path = "workflow", configuration = { CommonMultipartSupportConfig.class }) @FeignClient(name = "AMOS-API-WORKFLOW-CHENZHAO", path = "workflow", configuration = { CommonMultipartSupportConfig.class })
public interface WorkflowFeignService { public interface WorkflowFeignService {
/** /**
* 发起流程 * 发起流程
...@@ -113,8 +109,8 @@ public interface WorkflowFeignService { ...@@ -113,8 +109,8 @@ public interface WorkflowFeignService {
/** /**
* 流程图高亮 * 流程图高亮
* */ * */
@RequestMapping(value = "/activitiHistory/gethighLineImg/{processInstanceId}",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, method = RequestMethod.POST) @RequestMapping(value = "/activitiHistory/gethighLineImg/{processInstanceId}", method = RequestMethod.GET)
Response thighLineImg(@PathVariable("processInstanceId") String processInstanceId, HttpServletResponse resp) ; Response thighLineImg(@PathVariable("processInstanceId") String processInstanceId) ;
/** /**
* 流程图高亮图片 * 流程图高亮图片
* */ * */
......
...@@ -223,13 +223,13 @@ public class FailureDetailsController extends BaseController { ...@@ -223,13 +223,13 @@ public class FailureDetailsController extends BaseController {
return ResponseHelper.buildResponse(workflowFeignService.thighLine(instanceId)); return ResponseHelper.buildResponse(workflowFeignService.thighLine(instanceId));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) // @TycloudOperation(ApiLevel = UserType.AGENCY)
//
@GetMapping(value = "/activityHistory/gettingLineImg/{sequenceNbr}") // @GetMapping(value = "/activityHistory/gettingLineImg/{sequenceNbr}")
public ResponseModel<Object> gothLineImg(@PathVariable Long sequenceNbr, HttpServletResponse resp) { // public ResponseModel<Object> gothLineImg(@PathVariable Long sequenceNbr, HttpServletResponse resp) {
String processId = failureDetailsServiceImpl.queryBySeq(sequenceNbr).getProcessId(); // String processId = failureDetailsServiceImpl.queryBySeq(sequenceNbr).getProcessId();
return ResponseHelper.buildResponse(workflowFeignService.thighLineImg(processId, resp)); // return ResponseHelper.buildResponse(workflowFeignService.thighLineImg(processId, resp));
} // }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询状态枚举", notes = "查询状态枚举") @ApiOperation(httpMethod = "GET", value = "查询状态枚举", notes = "查询状态枚举")
...@@ -239,11 +239,11 @@ public class FailureDetailsController extends BaseController { ...@@ -239,11 +239,11 @@ public class FailureDetailsController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping (value = "/downloadFile/{sequenceNbr}") @GetMapping (value = "/downloadFile/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "流程图高亮图片", notes = "流程图高亮图片") @ApiOperation(httpMethod = "GET", value = "流程图高亮图片", notes = "流程图高亮图片")
public void downloadFile(@PathVariable Long sequenceNbr, HttpServletRequest request, HttpServletResponse response) throws Exception { public void downloadFile(@PathVariable Long sequenceNbr, HttpServletRequest request, HttpServletResponse response) throws Exception {
String processId = failureDetailsServiceImpl.queryBySeq(sequenceNbr).getProcessId(); String processId = failureDetailsServiceImpl.queryBySeq(sequenceNbr).getProcessId();
Response feignResponse = workflowFeignService.thighLineImg(processId, response); Response feignResponse = workflowFeignService.thighLineImg(processId);
OutputStream out = null; OutputStream out = null;
try { try {
out = response.getOutputStream(); out = response.getOutputStream();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment