|
@@ -391,6 +391,59 @@ public class WorkflowServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ public JSONObject getTaskData(String taskId,HttpServletRequest request) {
|
|
|
+
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
|
|
|
+ headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
|
|
|
+ headers.add("code", request.getHeader("code"));
|
|
|
+ headers.setContentType(MediaType.MULTIPART_FORM_DATA);
|
|
|
+ MultiValueMap<String, Object> map= new LinkedMultiValueMap<String, Object>();
|
|
|
+
|
|
|
+ map.add("taskId", taskId);
|
|
|
+
|
|
|
+ HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(map, headers);
|
|
|
+ // 执行HTTP请求
|
|
|
+ ResponseEntity<String> responseEntity2 = restTemplate.postForEntity(imaConfig.getFlowUrl() + "/bpm/task/getTaskData", requestEntity, String.class);
|
|
|
+ log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
|
|
|
+ //
|
|
|
+ if (200 == responseEntity2.getStatusCodeValue()) {
|
|
|
+ return JSON.parseObject(responseEntity2.getBody());
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public JSONObject getAppRoveList(int offset,int limit,HttpServletRequest request) {
|
|
|
+
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
|
|
|
+ headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
|
|
|
+ headers.add("code", request.getHeader("code"));
|
|
|
+ headers.setContentType(MediaType.MULTIPART_FORM_DATA);
|
|
|
+ MultiValueMap<String, Object> map= new LinkedMultiValueMap<String, Object>();
|
|
|
+
|
|
|
+
|
|
|
+ map.add("offset", (offset-1)*limit);
|
|
|
+ map.add("limit", limit);
|
|
|
+
|
|
|
+
|
|
|
+ HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(map, headers);
|
|
|
+ // 执行HTTP请求
|
|
|
+ ResponseEntity<String> responseEntity2 = restTemplate.postForEntity(imaConfig.getFlowUrl() + "/bpm/my/approveList", requestEntity, String.class);
|
|
|
+ log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
|
|
|
+ //
|
|
|
+ if (200 == responseEntity2.getStatusCodeValue()) {
|
|
|
+ return JSON.parseObject(responseEntity2.getBody());
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
private boolean updateWorkflowState(String instId, String defKey, String bizKey, String taskName, String destination) {
|
|
|
|
|
|
switch (defKey) {
|