|
@@ -3,6 +3,8 @@ package com.tianhu.system.utils;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.tianhu.common.core.utils.CommonUtil;
|
|
|
import com.tianhu.system.api.domain.SysDept;
|
|
|
+import com.tianhu.system.service.ISysConfigService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.BufferedReader;
|
|
@@ -20,17 +22,25 @@ public class FlowableService {
|
|
|
public final static String ADD_USER = "api/addUser";
|
|
|
// 删除用户
|
|
|
public final static String DELETE_USER = "api/deleteUser";
|
|
|
+ // 删除用户与分组关系
|
|
|
+ public final static String DELETE_USER_GROUP = "api/deleteUserGroup";
|
|
|
// 新增分组
|
|
|
public final static String ADD_GROUP = "api/addGroup";
|
|
|
// 删除分组
|
|
|
public final static String DELETE_GROUP = "api/deleteGroup";
|
|
|
+ //查询是否配置审批流程
|
|
|
+ public final static String FLOWABLE_URL = "flowable_url";
|
|
|
+ @Autowired
|
|
|
+ private ISysConfigService configService;
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> apiPost(String url, Map<String, Object> param) {
|
|
|
Map<String, Object> resMap = null;
|
|
|
try {
|
|
|
- resMap = invokeCapp(SysConstant.FLOWABLE_URL + url, param);
|
|
|
+ String flowable_url = configService.selectConfigByKey(FLOWABLE_URL);
|
|
|
+ resMap = invokeCapp(flowable_url + url, param);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -57,6 +67,13 @@ public class FlowableService {
|
|
|
m.put("id", id);
|
|
|
return apiPost(DELETE_USER, m);
|
|
|
}
|
|
|
+
|
|
|
+ public Map<String, Object> deleteFlowableUserGroup(String userId, String groupId) {
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
+ m.put("userId", userId);
|
|
|
+ m.put("groupId", groupId);
|
|
|
+ return apiPost(DELETE_USER_GROUP, m);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 新增部门
|