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
package com.product.org.admin.test;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import com.product.common.utils.HttpTest;
import com.product.org.admin.config.CmnConst;
 
/**
 * 
* Copyright  LX-BASE
* @Title: LX-BASE-
* @Project: StaffSysPropertyTest
* @Date:  2020-06-20 14:55   
* @Author: 杜洪波
* @Description:员工系统属性分组表
 */
public class StaffSysPropertyTest extends HttpTest{
 
    public static void main(String[] args) {
//        listPropertyGroup();    //属性分组列表
        findPropertyGroup();    //属性分组详情
//        findProperty();            //分组属性详情
//        addPropertyGroup();        //新增属性分组
//        updatePropertyGroup();    //修改属性分组
//        deletePropertyGroup();    //删除属性分组
//        getAllSysProperty();    //获取所有属性
    }
    
    public static void listPropertyGroup() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/list-group/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP);
        map.put(CmnConst.CPAGE, 1);
        map.put(CmnConst.PAGESIZE, 10);
        testPost(map);
    }
    
    public static void findPropertyGroup() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/find-group/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP);
        map.put("uuid", "2c0fa2f9-bad2-4f22-bca1-d18a68ef9e63");
        testPost(map);
    }
    
    public static void findProperty() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/find-property/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP_DEFALUT_VALUE);
        map.put("staff_property_group_uuid", "159df699-9ad5-4466-a672-d15033c7218a");
        map.put("staff_property_master_uuid", "staff_property_uuid_007");
        testPost(map);
    }
    
    public static void addPropertyGroup() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/add-group/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP);
        map.put("staff_property_group_name", "属性分组4");            //属性组名称
        map.put("staff_property_group_description", "属性分组4");    //属性组描述
        map.put("staff_property_group_code", "001");            //属性组编码
        map.put("is_default", "1");        //是否默认
        map.put("org_level_uuid", "b8631dad-6cc1-4d5a-9f6f-e8c76e6a5464");    //所属公司
        map.put("remarks", "属性分组4");            //备注
        
        List<Object> property = new ArrayList<Object>();
        
        Map<String,Object> propertyOne1=new HashMap<String, Object>();
        propertyOne1.put("staff_property_master_uuid", "staff_property_uuid_015");    //属性uuid
        propertyOne1.put("staff_property_master_code", "AAA");    //属性编码
        propertyOne1.put("value", "cn");    //属性值
        propertyOne1.put("org_level_uuid", "001");    //所属公司
        propertyOne1.put("effective_utc_datetime", "2020-3-1");    //生效时间
        propertyOne1.put("remarks", "默认语言");    //备注
        
        Map<String,Object> propertyOne2=new HashMap<String, Object>();
        propertyOne2.put("staff_property_master_uuid", "staff_property_uuid_016");    //属性uuid
        propertyOne2.put("staff_property_master_code", "AAA|BBB001");    //属性编码
        propertyOne2.put("value", "zh");    //属性值
        propertyOne2.put("org_level_uuid", "001");    //所属公司
        propertyOne2.put("effective_utc_datetime", "2020-6-1");    //生效时间
        propertyOne2.put("remarks", "默认语言");    //备注
        
        Map<String,Object> propertyOne3=new HashMap<String, Object>();
        propertyOne3.put("staff_property_master_uuid", "staff_property_uuid_017");    //属性uuid
        propertyOne3.put("staff_property_master_code", "AAA|BBB002");    //属性编码
        propertyOne3.put("value", "中国");    //属性值
        propertyOne3.put("org_level_uuid", "001");    //所属公司
        propertyOne3.put("effective_utc_datetime", "2020-9-1");    //生效时间
        propertyOne3.put("remarks", "默认国家");    //备注
        
        Map<String,Object> propertyOne4=new HashMap<String, Object>();
        propertyOne4.put("staff_property_master_uuid", "staff_property_uuid_019");    //属性uuid
        propertyOne4.put("staff_property_master_code", "AAA|BBB001|CCC001");    //属性编码
        propertyOne4.put("value", "华夏");    //属性值
        propertyOne4.put("org_level_uuid", "001");    //所属公司
        propertyOne4.put("effective_utc_datetime", "2020-3-1");    //生效时间
        propertyOne4.put("remarks", "默认国家");    //备注
        
        Map<String,Object> propertyOne5=new HashMap<String, Object>();
        propertyOne5.put("staff_property_master_uuid", "staff_property_uuid_020");    //属性uuid
        propertyOne5.put("staff_property_master_code", "AAA|BBB001|CCC002");    //属性编码
        propertyOne5.put("value", "汉");    //属性值
        propertyOne5.put("org_level_uuid", "001");    //所属公司
        propertyOne5.put("effective_utc_datetime", "2020-6-1");    //生效时间
        propertyOne5.put("remarks", "默认民族");    //备注
        
        Map<String,Object> propertyOne6=new HashMap<String, Object>();
        propertyOne6.put("staff_property_master_uuid", "staff_property_uuid_022");    //属性uuid
        propertyOne6.put("staff_property_master_code", "AAA|BBB002|CCC001");    //属性编码
        propertyOne6.put("value", "其他");    //属性值
        propertyOne6.put("org_level_uuid", "001");    //所属公司
        propertyOne6.put("effective_utc_datetime", "2020-9-1");    //生效时间
        propertyOne6.put("remarks", "默认名族");    //备注
        
        Map<String,Object> propertyOne7=new HashMap<String, Object>();
        propertyOne7.put("staff_property_master_uuid", "staff_property_uuid_023");    //属性uuid
        propertyOne7.put("staff_property_master_code", "AAA|BBB002|CCC002");    //属性编码
        propertyOne7.put("value", "其他");    //属性值
        propertyOne7.put("org_level_uuid", "001");    //所属公司
        propertyOne7.put("effective_utc_datetime", "2020-9-1");    //生效时间
        propertyOne7.put("remarks", "默认名族");    //备注
        
        property.add(propertyOne1);
        property.add(propertyOne2);
        property.add(propertyOne3);
        property.add(propertyOne4);
        property.add(propertyOne5);
        property.add(propertyOne6);
        property.add(propertyOne7);
        
        map.put("product_sys_staff_property_group_default_value", property);
        
        testPost(map);
    }
    
    public static void updatePropertyGroup() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/update-group/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP);
        map.put("uuid", "2c0fa2f9-bad2-4f22-bca1-d18a68ef9e63");
        map.put("staff_property_group_code", "001");            //属性组编码
        map.put("is_default", "1");        //是否默认
        map.put("org_level_uuid", "919ccb16-5da2-4c43-897f-5048de86f90a");    //所属公司
        
        List<Object> property = new ArrayList<Object>();
        
        Map<String,Object> propertyOne1=new HashMap<String, Object>();
        propertyOne1.put("staff_property_master_uuid", "staff_property_uuid_007");    //属性uuid
        propertyOne1.put("staff_property_master_code", "default_language");    //属性编码
        propertyOne1.put("value", "cn");    //属性值
        propertyOne1.put("org_level_uuid", "001");    //所属公司
        propertyOne1.put("effective_utc_datetime", "2020-3-1");    //生效时间
        propertyOne1.put("remarks", "默认语言");    //备注
        Map<String,Object> propertyOne2=new HashMap<String, Object>();
        propertyOne2.put("staff_property_master_uuid", "staff_property_uuid_007");    //属性uuid
        propertyOne2.put("staff_property_master_code", "default_language");    //属性编码
        propertyOne2.put("value", "zh");    //属性值
        propertyOne2.put("org_level_uuid", "001");    //所属公司
        propertyOne2.put("effective_utc_datetime", "2020-6-1");    //生效时间
        propertyOne2.put("remarks", "默认语言");    //备注
        Map<String,Object> propertyOne3=new HashMap<String, Object>();
        propertyOne3.put("staff_property_master_uuid", "staff_property_uuid_008");    //属性uuid
        propertyOne3.put("staff_property_master_code", "default_country");    //属性编码
        propertyOne3.put("value", "中国");    //属性值
        propertyOne3.put("org_level_uuid", "001");    //所属公司
        propertyOne3.put("effective_utc_datetime", "2020-9-1");    //生效时间
        propertyOne3.put("remarks", "默认国家");    //备注
        
        property.add(propertyOne1);
        property.add(propertyOne2);
        property.add(propertyOne3);
        
//        map.put(.PRODUCT_SYS_staff_property_group_default_value", property);
        
        //属性组名
        List<Object> group_name = new ArrayList<Object>();
        
        Map<String,Object> group_name1=new HashMap<String, Object>();
        group_name1.put("uuid", "431399d8-763b-41e1-a54e-3f435c7cbb2a");
        group_name1.put("zh-CN", "测试数据123");
        Map<String,Object> group_name2=new HashMap<String, Object>();
        group_name2.put("uuid", "17df6aa8-c231-47a7-81f5-50a64f63d0ba");
        group_name2.put("zh-HK", "测试数据123");
        Map<String,Object> group_name3=new HashMap<String, Object>();
        group_name3.put("uuid", "a0ab1872-df4a-40ba-9fed-d03f808192bb");
        group_name3.put("en", "测试数据123");
        
        group_name.add(group_name1);
        group_name.add(group_name2);
        group_name.add(group_name3);
        
        map.put("staff_property_group_name", group_name);
        
        //属性组描述
        List<Object> group_description = new ArrayList<Object>();
        
        Map<String,Object> group_description1=new HashMap<String, Object>();
        group_description1.put("uuid", "8537a721-c8cf-4261-8ffc-df51d85df10c");
        group_description1.put("zh-CN", "测试数据123");
        Map<String,Object> group_description2=new HashMap<String, Object>();
        group_description2.put("uuid", "258af0ef-c8f0-4dbf-9c64-49777bbf920d");
        group_description2.put("zh-HK", "测试数据123");
        Map<String,Object> group_description3=new HashMap<String, Object>();
        group_description3.put("uuid", "e9fef1c0-9456-4041-9dbc-023aa74b64a9");
        group_description3.put("en", "测试数据123");
        
        group_description.add(group_description1);
        group_description.add(group_description2);
        group_description.add(group_description3);
        
//        map.put("staff_property_group_description", group_description);
        
        //属性组备注
        List<Object> group_remark = new ArrayList<Object>();
        
        Map<String,Object> group_remark1=new HashMap<String, Object>();
        group_remark1.put("uuid", "0422e563-8f8b-4ad4-bb97-f556a6de1fa4");
        group_remark1.put("zh-CN", "测试数据123");
        Map<String,Object> group_remark2=new HashMap<String, Object>();
        group_remark2.put("uuid", "f2080b36-35f8-4d9e-a398-cbffadbb1e14");
        group_remark2.put("zh-HK", "测试数据123");
        Map<String,Object> group_remark3=new HashMap<String, Object>();
        group_remark3.put("uuid", "f738fcd7-0a2a-42ea-a716-fd955a4ec538");
        group_remark3.put("en", "测试数据123");
        
        group_remark.add(group_remark1);
        group_remark.add(group_remark2);
        group_remark.add(group_remark3);
        
//        map.put("remarks", group_remark);
        
        testPost(map);
    }
    
    public static void deletePropertyGroup() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/delete-group/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP);
        map.put("uuid", "814ab873-89d0-417e-9502-874bde3e4c94");
        testPost(map);
    }
    
    public static void getAllSysProperty() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-property/get-allProperty/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_STAFF_PROPERTY_GROUP);
        testPost(map);
    }
}