From b6172d4506c9cd13864bfa9c710a9d7aab7646a2 Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Tue, 25 Apr 2023 02:33:02 +0000
Subject: [PATCH] 营业费用(Flowable)
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java
index 505ca03..ef47c78 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java
@@ -27,6 +27,7 @@
import me.zhengjie.modules.project.service.dto.ProjectDto;
import me.zhengjie.utils.ObjectUtil;
import me.zhengjie.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -45,6 +46,9 @@
@RequiredArgsConstructor
public class BusinessExpenseServiceFlowableImpl implements BusinessExpenseFlowableService {
+ @Value("${flowable.url}")
+ private String flowableUrl;
+
private final Api api;
private final BusinessPlanService businessPlanService;
private final ProjectService projectService;
@@ -57,7 +61,7 @@
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> report() throws Exception {
// 发起通信
- Object returnObject = api.post("http://localhost:8888/api/common/report?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), new HashMap<>());
+ Object returnObject = api.post(flowableUrl + "/api/common/report?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), new HashMap<>());
// 查询处理
return queryHandle(returnObject);
}
@@ -70,7 +74,7 @@
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> approve() throws Exception {
// 发起通信
- Object returnObject = api.post("http://localhost:8888/api/common/approve?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), new HashMap<>());
+ Object returnObject = api.post(flowableUrl + "/api/common/approve?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), new HashMap<>());
// 查询处理
return queryHandle(returnObject);
}
@@ -121,7 +125,7 @@
Map<String, Object> params = ObjectUtil.toObjectMap(resources);
params.put("approver", "1,2,3,4,5");
// 发起通信
- api.post("http://localhost:8888/api/common/run?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), params);
+ api.post(flowableUrl + "/api/common/run?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), params);
}
/**
@@ -135,7 +139,7 @@
Map<String, Object> paramsMap = new HashMap<>();
paramsMap.put("approve", "true");
// 发起通信
- api.post("http://localhost:8888/api/common/next?processInstanceId=" + processInstanceId, paramsMap);
+ api.post(flowableUrl + "/api/common/next?processInstanceId=" + processInstanceId, paramsMap);
}
/**
@@ -149,6 +153,6 @@
Map<String, Object> paramsMap = new HashMap<>();
paramsMap.put("approve", "false");
// 发起通信
- api.post("http://localhost:8888/api/common/next?processInstanceId=" + processInstanceId, paramsMap);
+ api.post(flowableUrl + "/api/common/next?processInstanceId=" + processInstanceId, paramsMap);
}
}
\ No newline at end of file
--
Gitblit v1.9.3