...
|
...
|
@@ -2,10 +2,14 @@ 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)
|
...
|
...
|
@@ -22,35 +26,73 @@ public class TransAriiveTest { |
|
|
public void send(){
|
|
|
TRANSTOARRIVEEXPORT t = new TRANSTOARRIVEEXPORT();
|
|
|
//海关信息及IC卡相关部分
|
|
|
t.setApplycode(customsProperties.getApplyCode());
|
|
|
t.setApplyname(customsProperties.getApplyName());
|
|
|
t.setCopcode(customsProperties.getCopCode());
|
|
|
// 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.setCertno("21212321321321");
|
|
|
// 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");
|
|
|
t.setTrnmode("2");
|
|
|
t.setTrafway("4");
|
|
|
t.setUnloadcode("CGO");
|
|
|
t.setArrivetime(new Date());
|
|
|
|
|
|
/**
|
|
|
* 北方模式选填
|
|
|
* 南方模式填写“@”+13位载货清单号
|
|
|
* 水运中转模式:境内水路运输填报驳船船名;
|
|
|
* 境内铁路运输填报车名(主管海关4位关别代码+“TRAIN”);
|
|
|
* 境内公路运输填报车名(主管海关4位关别代码+“TRUCK”)
|
|
|
*/
|
|
|
t.setTrafname("");
|
|
|
/**
|
|
|
* 境内运输工具航(班)次:北方模式选填
|
|
|
* 南方模式免填
|
|
|
* 水运中转模式:境内水路运输填报驳船航次号;
|
|
|
* 境内铁路、公路运输填报6位启运日期〔顺序为年(2位)、月(2位)、日(2位)
|
|
|
*/
|
|
|
t.setVoyageno("");
|
|
|
// 境内运输方式:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输
|
|
|
t.setTrafway("5");
|
|
|
//货物信息部分
|
|
|
t.setGrosswt("42.00");
|
|
|
t.setPackno("2");
|
|
|
t.setGrosswt("16");
|
|
|
t.setUnloadcode("460043");
|
|
|
t.setArrivetime(new Date());
|
|
|
// t.setContatype("");
|
|
|
/**
|
|
|
* 转关方式:0-非转关运抵模式;1-南方转关运抵模式;2-北方转关运抵模式;3-水运中转运抵模式
|
|
|
*/
|
|
|
t.setTrnmode("2");
|
|
|
|
|
|
//申报签名部分
|
|
|
t.setOpertype("A");
|
|
|
t.setSign("kUNHDHVG1b72ZIrN8voIGUr+2JRITIo5FlusuSQCMerhV5GEGg9Z42L5F28MM+4gFL6CQgH2JPmdRdHAYIKJa89fdxGnHE3QSVd8dDUxx7q7AUUDzOg25OVB3ULywb8ruivj6tAR0daYkU3ACzWMYZoH4BNEMh4Za6DI7lBNf04=");
|
|
|
t.setOpertype("C");
|
|
|
// t.setSign("kUNHDHVG1b72ZIrN8voIGUr+2JRITIo5FlusuSQCMerhV5GEGg9Z42L5F28MM+4gFL6CQgH2JPmdRdHAYIKJa89fdxGnHE3QSVd8dDUxx7q7AUUDzOg25OVB3ULywb8ruivj6tAR0daYkU3ACzWMYZoH4BNEMh4Za6DI7lBNf04=");
|
|
|
t.setSigndate(new Date());
|
|
|
// t.setClientseqno("000000000000905006");
|
|
|
// t.setClientseqno("000000000000057246");
|
|
|
t.setClientseqno("000000000000002050");
|
|
|
t.setHostid("2012062600");
|
|
|
//t.setClientseqno("000000000000905006");
|
|
|
// t.setClientseqno(customsProperties.getTransarrive().getClientSeqno());
|
|
|
// t.setClientseqno(TransArriveTools.getClientseqno());
|
|
|
// t.setHostid("");
|
|
|
// t.setHostid(customsProperties.getTransarrive().getHostId());
|
|
|
//操作员签名证书号 暂时为空
|
|
|
// t.setCertno("");
|
|
|
|
|
|
transArriveExportService.send(t);
|
|
|
// transArriveExportService.addTransArriveExport(t);
|
|
|
List<String> ids = new ArrayList<>();
|
|
|
ids.add("202202101755010651");
|
|
|
transArriveExportService.batchSend(ids);
|
|
|
}
|
|
|
} |
...
|
...
|
|