xg
许鹏程
2023-05-26 2476c4f7acc1a3a9087227660e32ef42157a46b6
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
package com.product.org.admin.test;
 
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import com.product.common.utils.HttpTest;
/**
 * 
 * Copyright  LX-BASE
 * @Title: ReplaceTest
 * @Project: LX-BASE-SERVER
 * @Date: 2020年5月29日 上午10:59:05 
 * @Author: 郑盟
 * @Description:业务代理设置,对应业务代理表
 */
public class ReplaceTest extends HttpTest {
    public static void main(String[] args) {
//        ReplaceTest.findReplace();// 业务操作代理详情查询
//        ReplaceTest.listReplace();// 业务操作代理列表查询
        ReplaceTest.AddReplace();//业务操作代理新增
//        ReplaceTest.UpdateReplace();// 业务操作代理修改
//        ReplaceTest.delReplace();//删除业务操作代理
    }
 
    public static void findReplace() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_apply_on_behalf");
        m.put("url/api", "/api/operation_replace/find-replace/v1");
        m.put("uuid", "f732c8e9-3191-4500-9be6-07d8f61c7183");
        testPost(m);
    }
 
    public static void listReplace() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_apply_on_behalf");
        m.put("url/api", "/api/operation_replace/list-replace/v1");
//        m.put("filter", "");//自定义列表过滤条件默认为空
        m.put("cpage", 10);
        m.put("pagesize", 1);
        testPost(m);
    }
 
    public static void AddReplace() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_apply_on_behalf");
        m.put("url/api", "/api/operation_replace/add-replace/v1");
        m.put("onbehalf_reason", "ces"); // 代理原因
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");// 设置日期格式
        m.put("effective_utc_start_date", "2020-09-01"); // 启用时间
        m.put("effective_utc_end_date", "2020-09-24"); // 取消时间
        m.put("Is_used", 1); // 是否启用 前端没找到
        m.put("Is_feedback", 1); // 是否反馈
        List sub = new ArrayList();
        m.put("product_sys_apply_on_behalf_details", sub);
        for (int i = 0; i < 2; i++) {
            Map stb = new HashMap();
            stb.put("on_behalf_staff_uuid", "92493de3-9ce8-45b8-a00c-822ece69e7cd");// 流程UUID
            stb.put("function_uuid", "002");// 代理人员UUID
            stb.put("button_uuid", "001");// 代理功能UUID
            sub.add(stb);
        }
        testPost(m);
    }
 
    public static void UpdateReplace() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_apply_on_behalf");
        m.put("url/api", "/api/operation_replace/update-replace/v1");
        m.put("uuid", "f732c8e9-3191-4500-9be6-07d8f61c7183"); // uuid
        m.put("onbehalf_reason", "原因33333"); // 代理原因
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");// 设置日期格式
        m.put("effective_utc_start_date", df.format(new Date())); // 启用时间
        m.put("effective_utc_end_date", df.format(new Date())); // 取消时间
        m.put("Is_used", 1); // 是否启用 前端没找到
        m.put("Is_feedback", 1); // 是否反馈
        m.put("org_level_uuid", "00322");// 被代理人员UUID
        m.put("on_behalf_staff_uuid", "001");// 被代理人员UUID
        List sub = new ArrayList();
        m.put("product_sys_apply_on_behalf_details", sub);
        for (int i = 0; i < 2; i++) {
            if (i == 0) {
                Map stb = new HashMap();
                stb.put("uuid", "35911cc9-6e2d-4b23-9eed-3028b55787a9");// / UUID
                stb.put("replace_staff_uuid", "003");// / 代理人员UUID
                
                stb.put("function_uuid", "65565");// 代理功能UUID
                stb.put("button_uuid", "64001");// 代理按鈕UUID
                sub.add(stb);
            }
            if (i == 1) {
                Map stb = new HashMap();
//                stb.put("uuid", "dfb25571-e1dd-4f78-ae71-2cdfeffdd4a8");// / UUID
//                stb.put("~type~", "del");// / UUID
                stb.put("replace_staff_uuid", "003");// / 代理人员UUID
                stb.put("function_uuid", "65565");// 代理功能UUID
                stb.put("button_uuid", "64001");// 代理按鈕UUID
                sub.add(stb);
            }
 
        }
        testPost(m);
    }
 
    public static void delReplace() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_apply_on_behalf");
        m.put("url/api", "/api/operation_replace/delete-replace/v1");
        m.put("uuid", "e828070e-7a45-4a87-afee-51f0a262b9d9");
        testPost(m);
    }
 
}