TransAriiveTest.java
4.0 KB
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
import com.tianbo.analysis.NmmsAdminApplication;
import com.tianbo.analysis.config.CustomsProperties;
import com.tianbo.analysis.model.TRANSTOARRIVEEXPORT;
import com.tianbo.analysis.service.TransArriveExportService;
import com.tianbo.analysis.tools.TransArriveTools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@SpringBootTest(classes = NmmsAdminApplication.class)
@Slf4j
public class TransAriiveTest {
@Autowired
private CustomsProperties customsProperties;
@Autowired
TransArriveExportService transArriveExportService;
@org.junit.jupiter.api.Test
public void send(){
TRANSTOARRIVEEXPORT t = new TRANSTOARRIVEEXPORT();
//海关信息及IC卡相关部分
// t.setApplycode(customsProperties.getApplyCode());
// t.setApplyname(customsProperties.getApplyName());
// t.setCopcode(customsProperties.getCopCode());
t.setCustomscode("4604");
//操作员IC卡号
// t.setInputopid(customsProperties.getInputOpId());
// t.setInputopname(customsProperties.getInputOpName());
t.setSeqno("");
/**
* 运抵编号(北方模式必填
* 南方模式免填
* 水运中转模式选填
* 运抵编号规则:4位申报地海关代码+2位卸货地代码+6位编号生成日期〔顺序为年(2位)、月(2位)、日(2位)〕+6位流水号';)
*/
t.setArriveno("460443220210000002");
//货物承运运输信息部分
// 集装箱编号
t.setContaid("");
// 运单号
t.setBillno("78464757722");
// 进出境运输方式代码:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输
t.setTrafmode("5");
/**
* 北方模式选填
* 南方模式填写“@”+13位载货清单号
* 水运中转模式:境内水路运输填报驳船船名;
* 境内铁路运输填报车名(主管海关4位关别代码+“TRAIN”);
* 境内公路运输填报车名(主管海关4位关别代码+“TRUCK”)
*/
t.setTrafname("");
/**
* 境内运输工具航(班)次:北方模式选填
* 南方模式免填
* 水运中转模式:境内水路运输填报驳船航次号;
* 境内铁路、公路运输填报6位启运日期〔顺序为年(2位)、月(2位)、日(2位)
*/
t.setVoyageno("");
// 境内运输方式:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输
t.setTrafway("5");
//货物信息部分
t.setPackno("2");
t.setGrosswt("16");
t.setUnloadcode("460043");
t.setArrivetime(new Date());
// t.setContatype("");
/**
* 转关方式:0-非转关运抵模式;1-南方转关运抵模式;2-北方转关运抵模式;3-水运中转运抵模式
*/
t.setTrnmode("2");
//申报签名部分
t.setOpertype("C");
// t.setSign("kUNHDHVG1b72ZIrN8voIGUr+2JRITIo5FlusuSQCMerhV5GEGg9Z42L5F28MM+4gFL6CQgH2JPmdRdHAYIKJa89fdxGnHE3QSVd8dDUxx7q7AUUDzOg25OVB3ULywb8ruivj6tAR0daYkU3ACzWMYZoH4BNEMh4Za6DI7lBNf04=");
t.setSigndate(new Date());
//t.setClientseqno("000000000000905006");
// t.setClientseqno(customsProperties.getTransarrive().getClientSeqno());
// t.setClientseqno(TransArriveTools.getClientseqno());
// t.setHostid("");
// t.setHostid(customsProperties.getTransarrive().getHostId());
//操作员签名证书号 暂时为空
// t.setCertno("");
// transArriveExportService.addTransArriveExport(t);
List<String> ids = new ArrayList<>();
ids.add("202202101755010651");
transArriveExportService.batchSend(ids);
}
}