shichongfu
2023-04-25 ce0b49552668d3331055e2b1a1447a743dc54939
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
package com.product.admin.test;
 
import com.product.common.utils.HttpTest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * Copyright  LX-BASE
 * @Title: SelectPersonnelTest
 * @Project: LX-BASE-SERVER
 * @Date:  2020-08-27 17:45:07
 * @Author: luoxin
 * @Description: 组织架构测试测试
 */
public class SelectPersonnelTest extends HttpTest {
 
  public static void main(String[] args) {
    getOrganization();//获取组织架构树
    //getDepartment();//根据部门或公司uuid获取人员
    //getToGetJobs();//根据部门或公司uuid获取岗位
    //savePersonageTheGroup();//保存个人组
    //saveCompanyTheGroup();//保存公司组
    //listCompanyGroup();//获取公司组列表
    //listAllGroup();//弹框获取组信息
    //getCompanyGroupInfo();//获取公司组详情
    //deleteTheGroup();//删除组
    //getTheGroup();//展示组下的人员
    //saveOrganization();//保存当前已选择的组织架构
    //getAtPresentOrganization();//获取已经保存的组织架构
  }
 
  /**
   * @Date: 2020-08-27 17:46:12
   * @Description: 获取组织架构树
   */
  public static void getOrganization() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_org_levels");
    m.put("url/api", "/api/select/list-organization/v1");
    m.put("version","v1");
    m.put("uuid", "111ce77a-0d23-4516-b416-471840eb135d");
 
 
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 根据部门或公司uuid获取人员
   */
  public static void getDepartment() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_staffs");
    m.put("url/api", "/api/select/list-department/v1");
    m.put("version","v1");
    m.put("uuid", "111ce77a-0d23-4516-b416-471840eb135d");
 
 
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 根据部门或公司uuid获取岗位
   */
  public static void getToGetJobs() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_job_posts");
    m.put("url/api", "/api/select/list-department/v1");
    m.put("version","v1");
    m.put("uuid", "111ce77a-0d23-4516-b416-471840eb135d");
 
 
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 保存个人组
   */
  public static void savePersonageTheGroup() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/save-personage-the-group/v1");
    m.put("version","v1");
    m.put("group_name","个人组2");
    m.put("group_type", 4);//类型
    m.put("uuid", "");//可为空
 
    List fList = new ArrayList();
 
    Map fieldMap=new HashMap();
    fieldMap.put("organization_types", 1);//类型
    fieldMap.put("organization_uuids","fcfd0a45-267f-4119-8b1a-383162936bc4");//唯一标识
    fList.add(fieldMap);
    Map fieldMap2=new HashMap();
    fieldMap2.put("organization_types", 2);//类型
    fieldMap2.put("organization_uuids","d58b8e82-a06e-4b51-9e66-4f3878e44e89");//唯一标识
    fList.add(fieldMap2);
    Map fieldMap3=new HashMap();
    fieldMap3.put("organization_types", 3);//类型
    fieldMap3.put("organization_uuids","3990f82b-58ac-4d68-9686-3ddfde9e5f8f");//唯一标识
    fList.add(fieldMap3);
    m.put("product_sys_group_sub", fList);
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 保存公司组
   */
  public static void saveCompanyTheGroup() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/save-company-the-group/v1");
    m.put("version","v1");
    m.put("group_name","公司组3");
    m.put("group_type", 5);//类型
    m.put("company_uuid", "111ce77a-0d23-4516-b416-471840eb135d,8872c852-a47b-423b-9bae-c1022a1b8904");//单位uuid集
    m.put("uuid", "");//可为空
    m.put("sort",3);
 
    List fList = new ArrayList();
 
    Map fieldMap=new HashMap();
    fieldMap.put("organization_types", 1);//类型
    fieldMap.put("organization_uuids","83ff8990-ad89-44ba-a6a1-4d5535bee556");//唯一标识
    fList.add(fieldMap);
    Map fieldMap2=new HashMap();
    fieldMap2.put("organization_types", 2);//类型
    fieldMap2.put("organization_uuids","111ce77a-0d23-4516-b416-471840eb135d");//唯一标识
    fList.add(fieldMap2);
    Map fieldMap3=new HashMap();
    fieldMap3.put("organization_types", 3);//类型
    fieldMap3.put("organization_uuids","3990f82b-58ac-4d68-9686-3ddfde9e5f8f");//唯一标识
    fList.add(fieldMap3);
    m.put("product_sys_group_sub", fList);
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 获取公司组列表
   */
  public static void listCompanyGroup() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/list-company-group/v1");
    m.put("version","v1");
    m.put("company_uuid", "111ce77a-0d23-4516-b416-471840eb135d");
    m.put("cpage", "1");//页数
    m.put("pagesize", "10");//条数
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 获取公司组详情
   */
  public static void getCompanyGroupInfo() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/get-company-group-info/v1");
    m.put("version","v1");
    m.put("uuid", "418f0998-7860-4be7-a3be-bc1bbf3e6271");
 
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 删除组
   */
  public static void deleteTheGroup() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/delete-the-group/v1");
    m.put("version", "v1");
    m.put("uuids", "44dc3828-4d79-424a-bf74-62d20d76986c");
 
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 展示组下的人员
   */
  public static void getTheGroup() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/get-the-group/v1");
    m.put("version","v1");
    m.put("uuid", "30cad281-62bd-4f68-810f-fa9a710bb87e");
 
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 弹出框获取组
   */
  public static void listAllGroup() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_group");
    m.put("url/api", "/api/select/list-all-group/v1");
    m.put("version","v1");
    m.put("company_uuid", "8872c852-a47b-423b-9bae-c1022a1b8904");
 
    testPost(m);
  }
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 保存当前已选择的组织架构
   */
  public static void saveOrganization() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_organizational_structure_storage");
    m.put("url/api", "/api/select/save-organization/v1");
    m.put("version","v1");
    m.put("uuid", "f0241965-7063-4788-ace0-cacc3c382f5e");//可为空
 
    List fList = new ArrayList();
 
    Map fieldMap=new HashMap();
    fieldMap.put("organization_names","test11");//员工名称
    fieldMap.put("organization_types", 1);//类型
    fieldMap.put("organization_uuids","83ff8990-ad89-44ba-a6a1-4d5535bee556");//唯一标识
    fList.add(fieldMap);
    Map fieldMap2=new HashMap();
    fieldMap2.put("organization_names", "测试客户t2");
    fieldMap2.put("organization_types", 2);//类型
    fieldMap2.put("organization_uuids","111ce77a-0d23-4516-b416-471840eb135d");//唯一标识
    fList.add(fieldMap2);
    Map fieldMap3=new HashMap();
    fieldMap3.put("organization_names","luoxin");
    fieldMap3.put("organization_types", 3);//类型
    fieldMap3.put("organization_uuids","3990f82b-58ac-4d68-9686-3ddfde9e5f8f");//唯一标识
    fList.add(fieldMap3);
    Map fieldMap4=new HashMap();
    fieldMap4.put("organization_names","测试杨东");
    fieldMap4.put("organization_types", 4);//类型
    fieldMap4.put("organization_uuids","fe53e24f-d094-42f3-9f14-20ee1b17f120");//唯一标识
    fList.add(fieldMap4);
    m.put("organizational_sub", fList);
    Map fieldMap5=new HashMap();
    fieldMap5.put("organization_names","公司组1");
    fieldMap5.put("organization_types", 5);//类型
    fieldMap5.put("organization_uuids","6e8870d3-679e-4fd4-adc4-c9d188bb0624");//唯一标识
    fList.add(fieldMap5);
    m.put("organizational_sub", fList);
    testPost(m);
  }
 
  /**
   * @Date: 2020-08-28 11:23:58
   * @Description: 获取已经保存的组织架构
   */
  public static void getAtPresentOrganization() {
    Map m = new HashMap();
    m.put("~table~", "product_sys_organizational_structure_storage");
    m.put("url/api", "/api/select/get-at-present-organization/v1");
    m.put("version","v1");
    m.put("uuid", "5a4a20c4-7abb-42af-8e35-6bb92157b025");
 
    testPost(m);
  }
}