|
@@ -20,6 +20,7 @@ public class MessageXML {
|
|
|
* 结关报文:海关数据中心--->银行
|
|
|
*/
|
|
|
public static String CXB001(PaymentDto paymentDto) {
|
|
|
+ paymentDto.setFieldCode("861501");
|
|
|
String date = sdf.format(new Date());
|
|
|
String payload =
|
|
|
"<payload xsi:type=\"responseDTO\">\n" +
|
|
@@ -247,6 +248,7 @@ public class MessageXML {
|
|
|
* 订单扣款:一级市场--->银行
|
|
|
*/
|
|
|
public static String SXB010(PaymentDto paymentDto) {
|
|
|
+ paymentDto.setFieldCode("861501");
|
|
|
String date = sdf.format(new Date());
|
|
|
String payload =
|
|
|
"<payload xsi:type=\"orderDTO\">" +
|
|
@@ -267,8 +269,12 @@ public class MessageXML {
|
|
|
" <account>" + paymentDto.getBankCode() + "</account>\n" + //银行账号
|
|
|
" <bankCode>" + paymentDto.getBankNo() + "</bankCode>\n" + //开户行代码
|
|
|
" <tel>" + paymentDto.getBorderTel() + "</tel>\n" + //联系电话
|
|
|
+ " <enAddress></enAddress>\n" +
|
|
|
+ " <bankSignTime></bankSignTime>\n" +
|
|
|
"</vendee>\n" +
|
|
|
"<vendor>\n" +
|
|
|
+ " <title></title>\n" +
|
|
|
+ " <enTitle></enTitle>\n" +
|
|
|
" <name>" + paymentDto.getOwnerName() + "</name>\n" + //商铺所属人姓名
|
|
|
" <papersType>" + paymentDto.getOwnerIdtype() + "</papersType>\n" + //所属人证件类型
|
|
|
" <papersNo>" + paymentDto.getShopSccd() + "</papersNo>\n" + //所属人证件号
|
|
@@ -276,8 +282,12 @@ public class MessageXML {
|
|
|
" <account>" + paymentDto.getBankAccount() + "</account>\n" + //银行账号
|
|
|
" <bankCode>" + paymentDto.getBank() + "</bankCode>\n" + //开户行代码
|
|
|
" <tel>" + paymentDto.getOwnerTel() + "</tel>\n" + //联系电话
|
|
|
+ " <address></address>\n" +
|
|
|
+ " <enAddress></enAddress>\n" +
|
|
|
+ " <abroad></abroad>\n" +
|
|
|
"</vendor>\n" +
|
|
|
"<items>\n" +
|
|
|
+ " <code>" + paymentDto.getCodeTs() + "</code>\n" + //商品编码
|
|
|
" <name>" + paymentDto.getGoodsName() + "</name>\n" + //商品名称
|
|
|
" <unit>" + paymentDto.getGoodsUnit() + "</unit>\n" + //商品单位
|
|
|
" <price>" + paymentDto.getDeclPrice() + "</price>\n" + //商品单价
|
|
@@ -322,6 +332,7 @@ public class MessageXML {
|
|
|
* 订单退款:一级市场--->银行
|
|
|
*/
|
|
|
public static String SXB013(PaymentDto paymentDto) {
|
|
|
+ paymentDto.setFieldCode("861501");
|
|
|
String date = sdf.format(new Date());
|
|
|
String payload =
|
|
|
"<payload xsi:type=\"orderDTO\">" +
|
|
@@ -341,8 +352,12 @@ public class MessageXML {
|
|
|
" <account>" + paymentDto.getBankCode() + "</account>\n" + //银行账号
|
|
|
" <bankCode>" + paymentDto.getBankNo() + "</bankCode>\n" + //开户行代码
|
|
|
" <tel>" + paymentDto.getBorderTel() + "</tel>\n" + //联系电话
|
|
|
+ " <enAddress></enAddress>\n" +
|
|
|
+ " <bankSignTime></bankSignTime>\n" +
|
|
|
"</vendee>\n" +
|
|
|
"<vendor>\n" +
|
|
|
+ " <title></title>\n" +
|
|
|
+ " <enTitle></enTitle>\n" +
|
|
|
" <name>" + paymentDto.getOwnerName() + "</name>\n" + //商铺所属人姓名
|
|
|
" <papersType>" + paymentDto.getOwnerIdtype() + "</papersType>\n" + //所属人证件类型
|
|
|
" <papersNo>" + paymentDto.getShopSccd() + "</papersNo>\n" + //所属人证件号
|
|
@@ -350,8 +365,12 @@ public class MessageXML {
|
|
|
" <account>" + paymentDto.getBankAccount() + "</account>\n" + //银行账号
|
|
|
" <bankCode>" + paymentDto.getBank() + "</bankCode>\n" + //开户行代码
|
|
|
" <tel>" + paymentDto.getOwnerTel() + "</tel>\n" + //联系电话
|
|
|
+ " <address></address>\n" +
|
|
|
+ " <enAddress></enAddress>\n" +
|
|
|
+ " <abroad></abroad>\n" +
|
|
|
"</vendor>\n" +
|
|
|
"<items>\n" +
|
|
|
+ " <code>" + paymentDto.getCodeTs() + "</code>\n" + //商品编码
|
|
|
" <name>" + paymentDto.getGoodsName() + "</name>\n" + //商品名称
|
|
|
" <unit>" + paymentDto.getGoodsUnit() + "</unit>\n" + //商品单位
|
|
|
" <price>" + paymentDto.getDeclPrice() + "</price>\n" + //商品单价
|
|
@@ -397,9 +416,10 @@ public class MessageXML {
|
|
|
* 通关车批信息同步(车出一级市场时):一级市场--->银行
|
|
|
*/
|
|
|
public static String SXB023(PaymentDto paymentDto) {
|
|
|
+ paymentDto.setFieldCode("861501");
|
|
|
String date = sdf.format(new Date());
|
|
|
String payload=
|
|
|
- "<payload xsi:type=\"carDTO\">" +
|
|
|
+ "<payload xsi:type=\"carpoolDTO\">" +
|
|
|
"<registration>" + paymentDto.getVoyageNo() + "</registration>\n" + //车辆批号
|
|
|
"<plateNumber>" + paymentDto.getVeNo() + "</plateNumber>\n" + //车牌号
|
|
|
"<Order>" + paymentDto.getTradeNos() + "</Order>\n" +//订单号 n个
|
|
@@ -507,45 +527,57 @@ public class MessageXML {
|
|
|
public static String MKT006_NoCommission(PaymentTwoDto paymentTwoDto) {
|
|
|
paymentTwoDto.setFieldCode("861501");
|
|
|
String date = sdf.format(new Date());
|
|
|
+ String purchaserXml = "<vendee" +//买方基本信息(采购企业)
|
|
|
+ " name=\"" + paymentTwoDto.getPcName() + "\"" + //企业名称
|
|
|
+ " papersType=\"0008\"" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " papersNo=\"" + paymentTwoDto.getDutyParagraph() + "\"" + //证件号
|
|
|
+ " nationality=\"0001\"" + //国籍
|
|
|
+ " accountNo=\"" + paymentTwoDto.getPcBankAccount() + "\"" + //银行账号
|
|
|
+ " bankCode=\"" + paymentTwoDto.getPcBankNo() + "\"" + //开户行代码
|
|
|
+ " tel=\"" + paymentTwoDto.getPcContact() + "\"" + //联系电话
|
|
|
+ "/>\n";
|
|
|
+ if(paymentTwoDto.getPcType() == 2) {
|
|
|
+ purchaserXml = "<vendee" +//买方基本信息(个人采购商)
|
|
|
+ " name=\"" + paymentTwoDto.getPcName() + "\"" + //企业名称
|
|
|
+ " papersType=\"0001\"" + //证件类型 0001 身份证
|
|
|
+ " papersNo=\"" + paymentTwoDto.getPcIdCard() + "\"" + //证件号
|
|
|
+ " nationality=\"0001\"" + //国籍
|
|
|
+ " accountNo=\"" + paymentTwoDto.getPcBankAccount() + "\"" + //银行账号
|
|
|
+ " bankCode=\"" + paymentTwoDto.getPcBankNo() + "\"" + //开户行代码
|
|
|
+ " tel=\"" + paymentTwoDto.getPcContact() + "\"" + //联系电话
|
|
|
+ "/>\n";
|
|
|
+ }
|
|
|
String payload=
|
|
|
"<payload xsi:type=\"orderDTO\"" +
|
|
|
- " sn=\"" + paymentTwoDto.getOrderNo() + "\"" + //订单号
|
|
|
- " organization=\"" + paymentTwoDto.getFieldCode() + "\"" + //互市点机构代码
|
|
|
- " currency=\"RMB\"" + //币种
|
|
|
- " type=\"001\"" + //业务类型 001 代表扣款订单
|
|
|
- " total=\"" + paymentTwoDto.getResalePrice() + "\"" + //订单总金额 8150.00 【买方总支付金额】(转售金额)
|
|
|
- //" actualTotal=\"</actualTotal>\n" + //扣除手续费边民实际到账金额 actualTotal忽略
|
|
|
- " dateTime=\"2024-01-17 10:11:55 876\"" + //订单时间 YYYY-MM—DD HH:MM:DD SSS
|
|
|
+ " sn=\"" + paymentTwoDto.getOrderNo() + "\"" + //订单号
|
|
|
+ " organization=\"" + paymentTwoDto.getFieldCode() + "\"" + //互市点机构代码
|
|
|
+ " currency=\"RMB\"" + //币种
|
|
|
+ " type=\"001\"" + //业务类型 001 代表扣款订单
|
|
|
+ " total=\"" + paymentTwoDto.getResalePrice() + "\"" + //订单总金额 8150.00 【买方总支付金额】(转售金额)
|
|
|
+ //" actualTotal=\"</actualTotal>\n" + //扣除手续费边民实际到账金额 actualTotal忽略
|
|
|
+ " dateTime=\"" + date + "\"" + //订单时间 YYYY-MM—DD HH:MM:DD SSS
|
|
|
">" +
|
|
|
|
|
|
- "<vendee" +//买方基本信息(采购企业)
|
|
|
- " name=\"云南跨境贸易公司\"" + //企业名称
|
|
|
- " papersType=\"0008\"" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
- " papersNo=\"12312312-3\"" + //证件号
|
|
|
- " nationality=\"0001\"" + //国籍
|
|
|
- " accountNo=\"0100028613124012\"" + //银行账号
|
|
|
- " bankCode=\"MRCCCNB1\"" + //开户行代码
|
|
|
- " tel=\"15195882701\"" + //联系电话
|
|
|
- "/>\n" +
|
|
|
+ purchaserXml +
|
|
|
|
|
|
"<vendor" +//卖方基础信息(边民)
|
|
|
- " name=\"" + paymentTwoDto.getBorderName() + "\"" + //边民姓名
|
|
|
- " papersType=\"0001\"" + //证件类型 0001 身份证
|
|
|
- " papersNo=\"" + paymentTwoDto.getBorderidno() + "\"" + //边民证件号
|
|
|
- " nationality=\"0001\"" + //国籍
|
|
|
- " accountNo=\"" + paymentTwoDto.getBankCode() + "\"" + //银行账号
|
|
|
- " bankCode=\"MRCCCNB1\"" + //开户行代码
|
|
|
- " tel=\"" + paymentTwoDto.getBorderTel() + "\"" + //联系电话
|
|
|
+ " name=\"" + paymentTwoDto.getBorderName() + "\"" + //边民姓名
|
|
|
+ " papersType=\"" + paymentTwoDto.getPapersType() + "\"" + //证件类型 0001 身份证
|
|
|
+ " papersNo=\"" + paymentTwoDto.getBorderidno() + "\"" + //边民证件号
|
|
|
+ " nationality=\"" + paymentTwoDto.getBorderNationality() + "\"" + //国籍
|
|
|
+ " accountNo=\"" + paymentTwoDto.getBankCode() + "\"" + //银行账号
|
|
|
+ " bankCode=\"" + paymentTwoDto.getBankNo() + "\"" + //开户行代码
|
|
|
+ " tel=\"" + paymentTwoDto.getBorderTel() + "\"" + //联系电话
|
|
|
"/>\n" +
|
|
|
|
|
|
"<items" +//商品明细
|
|
|
- " code=\"" + paymentTwoDto.getCodeTs() + "\"" + //商品编码
|
|
|
- " name=\"" + paymentTwoDto.getGoodsName() + "\"" + //商品名称
|
|
|
- " unit=\"" + paymentTwoDto.getGoodsUnit() + "\"" + //商品单位
|
|
|
- " price=\"" + paymentTwoDto.getDeclPrice() + "\"" + //商品单价
|
|
|
- " quantity=\"" + paymentTwoDto.getBuyQty() + "\"" + //商品数量
|
|
|
- " weight=\"" + paymentTwoDto.getGrossWt() + "\"" + //商品重量
|
|
|
- " amount=\"" + paymentTwoDto.getTotalPrice() + "\"" + //金额
|
|
|
+ " code=\"" + paymentTwoDto.getCodeTs() + "\"" + //商品编码
|
|
|
+ " name=\"" + paymentTwoDto.getGoodsName() + "\"" + //商品名称
|
|
|
+ " unit=\"" + paymentTwoDto.getGoodsUnit() + "\"" + //商品单位
|
|
|
+ " price=\"" + paymentTwoDto.getDeclPrice() + "\"" + //商品单价
|
|
|
+ " quantity=\"" + paymentTwoDto.getBuyQty() + "\"" + //商品数量
|
|
|
+ " weight=\"" + paymentTwoDto.getNetWt() + "\"" + //商品重量
|
|
|
+ " amount=\"0\"" + //金额
|
|
|
"/>\n" +
|
|
|
|
|
|
"</payload>";
|
|
@@ -567,6 +599,7 @@ public class MessageXML {
|
|
|
return xml;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 订单扣款(+手续费):二级市场--->银行
|
|
|
*/
|
|
@@ -731,7 +764,6 @@ public class MessageXML {
|
|
|
return xml;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private static String chargesXml(List<CompanyDto> companyDtoList, String orderNo) {
|
|
|
String xml = "";
|
|
|
for (CompanyDto companyDto : companyDtoList) {
|
|
@@ -756,10 +788,5 @@ public class MessageXML {
|
|
|
return xml;
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss sss");
|
|
|
- Date day = new Date();
|
|
|
- String format = sdf.format(day);
|
|
|
- System.out.println(UUID.randomUUID());
|
|
|
- }
|
|
|
+
|
|
|
}
|