commit
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.budwk</groupId>
|
||||
<artifactId>zhgh-whcp</artifactId>
|
||||
<artifactId>zhgh_hdc</artifactId>
|
||||
<version>5.6.0-plus</version>
|
||||
<build>
|
||||
<resources>
|
||||
|
||||
@@ -316,6 +316,7 @@ public class SysUnitController {
|
||||
parentId = "";
|
||||
}
|
||||
unit.setCreatedBy(SecurityUtil.getUserId());
|
||||
unit.setUnitTypeCode(1);
|
||||
sysUnitService.save(unit, parentId);
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
|
||||
);
|
||||
|
||||
String params = URLUtil.buildQuery(tokenParams, StandardCharsets.UTF_8);
|
||||
String tokenUrl = "https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/oauth/token" + (StrUtil.isBlank(params) ? "" : "?" + params);
|
||||
String tokenUrl = "https://bd.hdc.edu.cn/sjjkfwpt/api/bd-api/oauth/token" + (StrUtil.isBlank(params) ? "" : "?" + params);
|
||||
HttpRequest tokenHttpRequest = HttpUtil.createPost(tokenUrl);
|
||||
tokenHttpRequest.header("Content-Type", "application/json");
|
||||
tokenHttpRequest.header("Authorization", "Basic MTE0OjU5M2UwNGI4YTE4NWRlMzkyNjY4ZmY0ZDJhZGMyZTEw");
|
||||
@@ -85,7 +85,7 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
|
||||
JSONObject tokenJsonBody = JSONUtil.parseObj(tokenResBody);
|
||||
|
||||
// 请求数据
|
||||
HttpRequest httpRequest = HttpUtil.createGet("https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/get/YXSDWJBSJZLB");
|
||||
HttpRequest httpRequest = HttpUtil.createGet("https://bd.hdc.edu.cn/sjjkfwpt/api/bd-api/get/YXSDWJBSJZLB");
|
||||
httpRequest.form(Map.of("access_token", tokenJsonBody.getStr("access_token"), "pageSize", 100, "page", 1));
|
||||
log.info("请求单位数据: {}", httpRequest);
|
||||
String resBody = httpRequest.execute().body();
|
||||
|
||||
@@ -124,7 +124,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
|
||||
);
|
||||
|
||||
String params = URLUtil.buildQuery(tokenParams, StandardCharsets.UTF_8);
|
||||
String tokenUrl = "https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/oauth/token" + (StrUtil.isBlank(params) ? "" : "?" + params);
|
||||
String tokenUrl = "https://bd.hdc.edu.cn/sjjkfwpt/api/bd-api/oauth/token" + (StrUtil.isBlank(params) ? "" : "?" + params);
|
||||
HttpRequest tokenHttpRequest = HttpUtil.createPost(tokenUrl);
|
||||
tokenHttpRequest.header("Content-Type", "application/json");
|
||||
tokenHttpRequest.header("Authorization", "Basic MTE0OjU5M2UwNGI4YTE4NWRlMzkyNjY4ZmY0ZDJhZGMyZTEw");
|
||||
@@ -136,7 +136,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
|
||||
JSONObject tokenJsonBody = JSONUtil.parseObj(tokenResBody);
|
||||
|
||||
// 请求数据
|
||||
HttpRequest httpRequest = HttpUtil.createGet("https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/get/JZGJCSJZLB");
|
||||
HttpRequest httpRequest = HttpUtil.createGet("https://bd.hdc.edu.cn/sjjkfwpt/api/bd-api/get/JZGJCSJZLB");
|
||||
httpRequest.form(Map.of("access_token", tokenJsonBody.getStr("access_token"), "pageSize", 5000, "page", 1));
|
||||
|
||||
log.info("请求人员数据: {}", httpRequest);
|
||||
|
||||
@@ -136,6 +136,9 @@ const UNIT_MANAGE_TEMPLATE = {
|
||||
openAdd() {
|
||||
this.dialogVisible = true
|
||||
this.formData = {} //打开新增窗口,表单先清空
|
||||
if (this.currentData && this.currentData.id) {
|
||||
this.formData.parentId = this.currentData.id;
|
||||
}
|
||||
this.parentUnit = []
|
||||
this.options = []
|
||||
},
|
||||
|
||||
@@ -293,11 +293,9 @@ layout("/layouts/platform.html"){
|
||||
const url = base + "/platform/sys/unit/tree"
|
||||
self.$axios.post(url, { pid: node.value }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
let filteredData = res.data;
|
||||
if (node.level === 0 && res.data && res.data.length > 0) {
|
||||
filteredData = res.data.slice(1); // 移除第一个元素
|
||||
}
|
||||
resolve(filteredData);
|
||||
resolve(res.data || []);
|
||||
} else {
|
||||
resolve([]);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user