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
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;
 
public class StaffsRegularEmployeeTest extends HttpTest{
 
    
    public static void main(String[] args) {
 
//        listStaffInfo();    //员工列表
//        findStaffInfo();    //员工详情
//        addStaff();            //新增员工
        updateStaff();        //员工修改
//        freezAccount();        //冻结账号
//        staffBankInfo();    //戏赠或修改员工银行信息
    }
    
    public static void listStaffInfo() {
        Map<String, Object> map=new HashMap<String, Object>();
        map.put("url/api", "/api/staffRegularEmployee/list-regularEmployee/v1");
        map.put("~table~", "product_sys_staff_regular_employee");
        map.put(CmnConst.CPAGE, 1);
        map.put(CmnConst.PAGESIZE, 10);
        testPost(map);
    }
    
    public static void findStaffInfo() {
        Map<String, Object> map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-manager/find-staff/v1");
        map.put("~table~", "product_sys_staffs");
        map.put("uuid", "e2f158ec-a6c7-40e0-a201-4fd7eb2e0e98");
        testPost(map);
    }
    
    public static void addStaff() {
        Map<String, Object> map=new HashMap<String, Object>();
        map.put("url/api", "/api/staffRegularEmployee/add-regularEmployee/v1");
        map.put("~table~", "product_sys_staff_regular_employee");
        map.put("staff_uuid", "383479f1-a6c4-42bb-b821-b6e0537cf0e2");    //user表uuid
        map.put("join_com_date", "2020-07-01");    //员工姓
        map.put("change_regular_emp_date", "2020-08-03");        //员工名
        map.put("remark", "remark");    //员工洋名
        testPost(map);
    }
    
    public static void updateStaff() {
        Map<String, Object> map=new HashMap<String, Object>();
        map.put("url/api", "/api/staffRegularEmployee/update-regularEmployee/v1");
        map.put("~table~", "product_sys_staff_regular_employee");
        map.put("staff_uuid", "383479f1-a6c4-42bb-b821-b6e0537cf0e2");    //user表uuid
        map.put("join_com_date", "2020-07-01");    //员工姓
        map.put("change_regular_emp_date", "2020-09-03");        //员工名
        map.put("remark", "remark");    //员工洋名
        testPost(map);
    }
    
    public static void freezAccount() {
        Map<String, Object> map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-manager/staff-freezAccount/v1");
        map.put("~table~", "product_sys_staffs");
        map.put("uuid", "8c1a02c5-5d47-415a-960a-0c1b03a54b06");
        testPost(map);
    }
    
    public static void staffBankInfo() {
        Map<String, Object>map=new HashMap<String, Object>();
        map.put("url/api", "/api/staff-manager/staff-bankInfo/v1");
        
        List<Object> bankInfo = new ArrayList<Object>();
        
        Map<String,Object> bankInfo1=new HashMap<String, Object>();
        bankInfo1.put("~change_type~", "add");
        bankInfo1.put("staff_uuid", "8c1a02c5-5d47-415a-960a-0c1b03a54b06");
        bankInfo1.put("bank_name", "工商");
        bankInfo1.put("bank_account_number", "1000000000000001");
        bankInfo1.put("bank_account_holder_name", "茻冖釒灬氵");
        
        
        Map<String,Object> bankInfo2=new HashMap<String, Object>();
        bankInfo1.put("~change_type~", "add");
        bankInfo1.put("staff_uuid", "8c1a02c5-5d47-415a-960a-0c1b03a54b0622");
        bankInfo1.put("bank_name", "工商222");
        bankInfo1.put("bank_account_number", "100000000000000122");
        bankInfo1.put("bank_account_holder_name", "茻冖釒灬氵");
/*        Map<String,Object> bankInfo2=new HashMap<String, Object>();
        bankInfo2.put("~change_type~", "update");
        bankInfo2.put("uuid", "");
        bankInfo1.put("staff_uuid", "");
        bankInfo1.put("bank_name", "");
        bankInfo1.put("bank_account_number", "");
        bankInfo1.put("bank_account_holder_name", "");
        
        Map<String,Object> bankInfo3=new HashMap<String, Object>();
        bankInfo3.put("~change_type~", "delete");
        bankInfo3.put("uuid", "");
        bankInfo1.put("staff_uuid", "");
        bankInfo1.put("bank_name", "");
        bankInfo1.put("bank_account_number", "");
        bankInfo1.put("bank_account_holder_name", "");
*/    
        bankInfo.add(bankInfo1);
        bankInfo.add(bankInfo2);
        /*        bankInfo.add(bankInfo3);
*/        
        map.put("product_sys_staff_bank_account", bankInfo);
        
        testPost(map);
    }
}