ljy121 1 gadu atpakaļ
vecāks
revīzija
d9e9d966a1

+ 3 - 2
zjugis-workflow/src/main/java/com/zjugis/z_workflow/controller/IEventRecordController.java

@@ -1,5 +1,6 @@
 package com.zjugis.z_workflow.controller;
 
+import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONException;
 import com.alibaba.fastjson2.JSONObject;
@@ -105,8 +106,8 @@ public class IEventRecordController extends BaseController {
             }
             IEventRecord eventRecord = iEventRecordService.findObjectById(id);
             if (!Objects.isNull(eventRecord)) {
-                String result = ServiceApiUtil.GetServiceApiResult(eventRecord.getPostUrl(),
-                        JSON.parseObject(eventRecord.getPostParam()));
+                String result = HttpUtil.post(eventRecord.getPostUrl(), JSON.parseObject(eventRecord.getPostParam()));
+                System.out.println(result);
                 try {
                     JSONObject objectResult = JSONObject.parseObject(result);
                     if (Objects.isNull(objectResult)) {

+ 1 - 1
zjugis-workflow/src/main/java/com/zjugis/z_workflow/entity/builder/IEventRecordBuilder.java

@@ -25,7 +25,7 @@ public class IEventRecordBuilder {
         if (AsyncEnum.ASYNC.getStatus().equals(conditionEvent.getiAsynchronous())) {
             iFinished = FINISHED_N.getStatus();
         } else {
-            iFinished = Boolean.valueOf(map.get("result").toString()) ? FINISHED_Y.getStatus() : FINISHED_N.getStatus();
+            iFinished = Boolean.parseBoolean(map.get("result").toString()) ? FINISHED_Y.getStatus() : FINISHED_N.getStatus();
         }
         iEventRecord.setiFinished(iFinished);
         iEventRecord.setiFlowInstanceId(flowInsId);

+ 2 - 1
zjugis-workflow/src/main/java/com/zjugis/z_workflow/service/ProcessEngineService.java

@@ -1,5 +1,6 @@
 package com.zjugis.z_workflow.service;
 
+import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONException;
@@ -1913,7 +1914,7 @@ public class ProcessEngineService {
 			try {
 				Map params = buildEventApiParam(conditionEvent, triggerPosition, apiParams);
 				retMap.put("postParam", JSON.toJSONString(params));
-				retVal = ServiceApiUtils.getDataFromServiceApi(conditionEvent.getRestfulUrl(), params);
+				retVal = HttpUtil.post(conditionEvent.getRestfulUrl(), params);
 				JSONObject retJson = JSON.parseObject(retVal);
 				if (Objects.isNull(retJson)) {
 					retMap.put("result", true);