tjx
2025-10-24 b3677e3a87d6500b2954571f8ef9b03f7169a708
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
package com.gs.xiaomi;
 
import cn.hutool.crypto.digest.DigestUtil;
import com.gs.xiaomi.dto.BCS101Request;
import com.gs.xiaomi.dto.NumbericalDto;
import com.gs.xiaomi.service.BCS101ApiService;
import com.gs.xiaomi.service.XM104Service;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
 
@SpringBootTest
class XiaomiApplicationTests {
 
    @Autowired
    private XM104Service xm104Service;
 
    @Autowired
    private BCS101ApiService bcs101ApiService;
 
    @Test
    void contextLoads() throws Exception {
        xm104Service.getDb();
    }
 
    //manualSynchronization
    @Test
    void contextLoads1() throws Exception {
        NumbericalDto barcode = new NumbericalDto();
        barcode.setAsn("9316692923");
        xm104Service.manualSynchronization(barcode);
    }
 
    @Test
    void test() {
//        String str = ",,";
//        String[] parts = str.split(",");
//        for (String part : parts) {
//            System.out.println(part);
//        }
        System.out.println(DigestUtil.md5Hex("VDATA.XM104/177301/c5Kl}xN&i(").toUpperCase());
    }
 
    @Test
    void testBCS101ApiService() throws Exception {
        // 创建测试请求参数
        BCS101Request request = new BCS101Request();
        request.setSupplierId("177301");
        request.setDocNo("9311036039");
        request.setDocType("ASNGR");
        request.setPageNo(1);
        request.setPageSize(1000);
 
        String bcs101Data = bcs101ApiService.getBCS101Data(request);
        System.out.println(bcs101Data);
 
    }
}