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
package com.product.org.admin.test;
 
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
 
import com.product.common.utils.HttpTest;
 
/**
 * 部门变更
* Copyright  LX-BASE
* @Title: LX-BASE-
* @Project: DeptChangeTest
* @Date:  2020-06-03 15:10   
* @Author: 杜洪波
* @Description:
 */
public class DeptChangeTest extends HttpTest{
    
    public static void main(String[] args) {
        deptMerge();
        addDepartment();
//        deptMove();
//        deptCancel();
//        listExceptionDept();
    }
    
    /**
     * 异常部门列表
     */
    public static void listExceptionDept() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/dept/list-exception-dept/v1");
        map.put("~table~", "product_sys_org_levels");
        map.put("cpage",1);
        map.put("pagesize",10);
        testPost(map);
    }
    
    /**
     * 部门合并
     */
    public static void deptMerge() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/dept/add-change/v1");
        map.put("~table~", "product_sys_org_levels_change");
        map.put("org_level_uuid","a34f8818-d36d-4d82-b1b0-dbc0d2e70a03");    //所属公司
        map.put("origin_dept_uuid","5050d74a-dbaf-420b-aef5-62a41610a4bf");//原部门uuid
        map.put("new_org_level_uuid","a34f8818-d36d-4d82-b1b0-dbc0d2e70a03");    //合并部门
        map.put("new_dept_uuid","a62f70d9-1ba7-43d2-b295-32cb068a1cb7");    //合并部门
        map.put("change_status_uuid","2");//变更类型
        map.put("change_effective", new Date());    //生效日期
        
        testPost(map);
    }
    
    /**
     *     新增部门
     */
    public static void addDepartment() {
        Map<String, Object> m = new HashMap<String, Object>();
        m.put("~table~", "product_sys_org_levels");
        m.put("url/api", "/api/org/levels/add-department/v1");
        m.put("sequence", 1);
        m.put("org_level_code_parent", "002-326");
        m.put("org_level_name", "效果部门");
        m.put("org_level_shortcode", "XGBM");
        testPost(m);
    }
    
    /**
     * 部门合并
     */
    /*
    public static void deptMerge() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/dept/dept-change/v1");
        map.put("~table~", "product_sys_org_levels_change");
        map.put("org_level_uuid","a34f8818-d36d-4d82-b1b0-dbc0d2e70a03");    //所属公司
        map.put("origin_dept_uuid","5050d74a-dbaf-420b-aef5-62a41610a4bf");//原部门uuid
        map.put("new_org_level_uuid","a34f8818-d36d-4d82-b1b0-dbc0d2e70a03");    //合并部门
        map.put("new_dept_uuid","a62f70d9-1ba7-43d2-b295-32cb068a1cb7");    //合并部门
        map.put("change_status_uuid","2");//变更类型
        
        testPost(map);
    }
    */
    /**
     * 部门迁移
     */
    public static void deptMove() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/dept/dept-change/v1");
        map.put("~table~", "product_sys_org_levels_change");
        map.put("origin_dept_uuid","5465665");//原部门uuid
        map.put("org_level_uuid","123123");    //所属公司
        map.put("change_status_uuid","3");//变更类型
        map.put("move_dept_uuid","1231236");    //迁入公司
        map.put("move_level_uuid","");    //迁入部门
        testPost(map);
    }
    /**
     * 部门撤销
     */
    public static void deptCancel() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/dept/dept-change/v1");
        map.put("~table~", "product_sys_org_levels_change");
        map.put("origin_dept_uuid","5243232");//原部门uuid
        map.put("change_status_uuid","1");//变更类型
        testPost(map);
    }
}