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/resources/config/application-prod.yml | 4 ++++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java | 14 +++++++++-----
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java | 3 +++
eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml | 4 ++++
eladmin-web-master/src/views/business/expenseFlowable/report.vue | 5 ++---
5 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java
index f89a781..4128baf 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java
@@ -62,4 +62,7 @@
/** 流程实例ID */
private String processInstanceId;
+
+ /** 审批状态 */
+ private String approve;
}
\ No newline at end of file
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
diff --git a/eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml b/eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml
index 1031bec..48706a1 100644
--- a/eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml
+++ b/eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml
@@ -126,3 +126,7 @@
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
+
+# Flowable
+flowable:
+ url: http://localhost:8888
diff --git a/eladmin-master/eladmin-system/src/main/resources/config/application-prod.yml b/eladmin-master/eladmin-system/src/main/resources/config/application-prod.yml
index 2239ecf..d5a0609 100644
--- a/eladmin-master/eladmin-system/src/main/resources/config/application-prod.yml
+++ b/eladmin-master/eladmin-system/src/main/resources/config/application-prod.yml
@@ -135,3 +135,7 @@
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
+
+# Flowable
+flowable:
+ url: http://localhost:8888
diff --git a/eladmin-web-master/src/views/business/expenseFlowable/report.vue b/eladmin-web-master/src/views/business/expenseFlowable/report.vue
index 74d2629..ad71b0e 100644
--- a/eladmin-web-master/src/views/business/expenseFlowable/report.vue
+++ b/eladmin-web-master/src/views/business/expenseFlowable/report.vue
@@ -122,10 +122,9 @@
</template>
</el-table-column>
<el-table-column prop="remarks" label="备注" />
- <el-table-column prop="createTime" label="创建时间" />
- <el-table-column label="操作" width="150px" align="center">
+ <el-table-column prop="createTime" label="审批状态">
<template slot-scope="scope">
- {{ scope.row.id }}
+ {{ scope.row.approve == 'true' ? '同意' : scope.row.approve == 'false' ? '拒绝' : '审核中' }}
</template>
</el-table-column>
</el-table>
--
Gitblit v1.9.3