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 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 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 m = new HashMap(); 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 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 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 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); } }