zm
2024-11-04 9d22bf2b596d8f5627f671f009b3f42d71d73bf4
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
package com.product.administration.test;
 
import java.util.HashMap;
import java.util.Map;
 
import com.product.administration.config.CmnConst;
import com.product.common.utils.HttpTest;
 
public class PunchRecordTest extends HttpTest{
 
    public static void main(String[] args) {
        addRecordInfo();
    }
 
    public static void addRecordInfo() {
        String a="";
        
        for (int i = 1; i <= 31; i++) {
            if (i<10) {
                a="0"+i;
            }else {
                a=""+i;
            }
            for (int j = 0; j < 4; j++) {
                Map<String, Object>map=new HashMap<>();
                map.put("url/api", "/api/punch/record/add-record/v1");
                map.put("~table~", CmnConst.PRODUCT_OA_PUNCH_RECORD);
                if (j==0) {
                    map.put("created_datetime","2021-08-"+a+" 09:00:00");
                }else if (j==1) {
                    map.put("created_datetime","2021-08-"+a+" 12:00:00");
                }else if (j==2) {
                    map.put("created_datetime","2021-08-"+a+" 14:00:00");
                }else {
                    map.put("created_datetime","2021-08-"+a+" 17:00:00");
                }
                
                testPost(map);
            }
        }
    }
}