|
@@ -47,12 +47,12 @@ public class MessageXML {
|
|
|
" <total>"+paymentDto.getTotalPrice()+"</total>\n" + //总金额8000.00(一级市场边民订单金额)
|
|
|
" <date>"+paymentDto.getDeclTime()+"</date>\n" + //订单时间 YYYY-MM—DD HH:MM:DD SSS
|
|
|
"<vendee>\n" +
|
|
|
- " <name>"+paymentDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
- " <paperType>身份证</paperType>\n" + //证件类型
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
+ " <paperType>0001</paperType>\n" + //证件类型 0001 身份证
|
|
|
" <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //边民证件号
|
|
|
" <nationality>中国</nationality>\n" + //国籍
|
|
|
" <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
- " <bankCode>"+paymentDto.getBankName()+"</bankCode>\n" + //开户行代码
|
|
|
+ " <bankCode>ICBKCNBJYUN</bankCode>\n" + //开户行代码
|
|
|
" <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
"</vendee>\n" +
|
|
|
"<vendor>\n" +
|
|
@@ -61,13 +61,13 @@ public class MessageXML {
|
|
|
" <paperNo></paperNo>\n" + //所属人证件号
|
|
|
" <nationality></nationality>\n" + //国籍
|
|
|
" <accountNo>"+paymentDto.getBankAccount()+"</accountNo>\n" + //银行账号
|
|
|
- " <bankCode>"+paymentDto.getBank()+"</bankCode>\n" + //开户行代码
|
|
|
+ " <bankCode>ICBKCNBJYUN</bankCode>\n" + //开户行代码
|
|
|
" <tel>"+paymentDto.getOwnerTel()+"</tel>\n" + //联系电话
|
|
|
"<vendor>\n" +
|
|
|
"<items>\n" +
|
|
|
" <name>"+paymentDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
" <unit>"+paymentDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
- " <price></price>\n" + //商品单价
|
|
|
+ " <price>"+paymentDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
" <quantity>"+paymentDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
" <weight>"+paymentDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
" <amount>"+paymentDto.getTotalPrice()+"</amount>\n" + //金额
|
|
@@ -113,12 +113,12 @@ public class MessageXML {
|
|
|
" <total>"+paymentDto.getTotalPrice()+"</total>\n" + //总金额8000.00(一级市场边民订单金额)
|
|
|
" <date>"+paymentDto.getDeclTime()+"</date>\n" + //订单时间 YYYY-MM—DD HH:MM:DD SSS
|
|
|
"<vendee>\n" +
|
|
|
- " <name>"+paymentDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
- " <paperType>身份证</paperType>\n" + //证件类型
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
+ " <paperType>0001</paperType>\n" + //证件类型 0001 身份证
|
|
|
" <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //边民证件号
|
|
|
" <nationality>中国</nationality>\n" + //国籍
|
|
|
" <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
- " <bankCode>"+paymentDto.getBankName()+"</bankCode>\n" + //开户行代码
|
|
|
+ " <bankCode>ICBKCNBJYUN</bankCode>\n" + //开户行代码
|
|
|
" <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
"</vendee>\n" +
|
|
|
"<vendor>\n" +
|
|
@@ -127,13 +127,13 @@ public class MessageXML {
|
|
|
" <paperNo></paperNo>\n" + //所属人证件号
|
|
|
" <nationality></nationality>\n" + //国籍
|
|
|
" <accountNo>"+paymentDto.getBankAccount()+"</accountNo>\n" + //银行账号
|
|
|
- " <bankCode>"+paymentDto.getBank()+"</bankCode>\n" + //开户行代码
|
|
|
+ " <bankCode>ICBKCNBJYUN</bankCode>\n" + //开户行代码
|
|
|
" <tel>"+paymentDto.getOwnerTel()+"</tel>\n" + //联系电话
|
|
|
"<vendor>\n" +
|
|
|
"<items>\n" +
|
|
|
" <name>"+paymentDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
" <unit>"+paymentDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
- " <price></price>\n" + //商品单价
|
|
|
+ " <price>"+paymentDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
" <quantity>"+paymentDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
" <weight>"+paymentDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
" <amount>"+paymentDto.getTotalPrice()+"</amount>\n" + //金额
|
|
@@ -171,9 +171,184 @@ public class MessageXML {
|
|
|
" </item>\n" +
|
|
|
"</headers>\n" +
|
|
|
" <payload xsi:type=\"carDTO\">\n" +
|
|
|
- " <registration></registration>\n" + //车辆批号
|
|
|
- " <plateNumber></plateNumber>\n" + //车牌号
|
|
|
- " <Order></Order>\n" + //订单号 n个
|
|
|
+ " <registration>"+paymentDto.getVoyageNo()+"</registration>\n" + //车辆批号
|
|
|
+ " <plateNumber>"+paymentDto.getVeNo()+"</plateNumber>\n" + //车牌号
|
|
|
+ " <Order>"+paymentDto.getTradeNo()+"</Order>\n" + //订单号 n个
|
|
|
+ "</payload>\n" +
|
|
|
+ "</message>\n";
|
|
|
+ return xml;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** 订单扣款(无手续费):二级市场--->银行 */
|
|
|
+ public static String MKT006_NoCommission(PaymentDto paymentDto) {
|
|
|
+ String date = sdf.format(new Date());
|
|
|
+
|
|
|
+ String xml =
|
|
|
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
|
|
|
+ "<message xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"\" title=\"二级市场\">\n" +
|
|
|
+ "<headers>\n" +
|
|
|
+ " <sn>"+UUID.randomUUID()+"</sn>\n" +
|
|
|
+ " <date>"+date+"</date> \n" +
|
|
|
+ " <organization>"+paymentDto.getFieldCode()+"</organization>\n" +
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" +
|
|
|
+ " <operation>MKT006</operation>\n" +
|
|
|
+ "</headers>\n" +
|
|
|
+
|
|
|
+ " <payload xsi:type=\"orderDTO\">\n" +
|
|
|
+ " <sn>"+paymentDto.getTradeNo()+"</sn>\n" + //订单号
|
|
|
+ " <organization>"+paymentDto.getFieldCode()+"</organization>\n" + //互市点机构代码
|
|
|
+ " <currency>"+paymentDto.getCurrCode()+"</currency>\n" + //币种
|
|
|
+ " <type>001</type>\n" + //业务类型 001 代表扣款订单
|
|
|
+ " <total>"+paymentDto.getTotalPrice()+"</total>\n" + //订单总金额 8150.00 【买方总支付金额】
|
|
|
+ " <actualTotal></actualTotal>\n" + //扣除手续费边民实际到账金额 actualTotal忽略
|
|
|
+ " <dateTime>"+paymentDto.getDeclTime()+"</dateTime>\n" + //订单时间 YYYY-MM—DD HH:MM:DD SSS
|
|
|
+
|
|
|
+ "<vendee>\n" +//买方基本信息(采购企业)
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ "</vendee>\n" +
|
|
|
+
|
|
|
+ "<vendee>\n" +//卖方基础信息(边民)
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
+ " <paperType>0001</paperType>\n" + //证件类型 0001 身份证
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //边民证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ "</vendee>\n" +
|
|
|
+
|
|
|
+ "<items>\n" +//商品明细
|
|
|
+ " <code>"+paymentDto.getGoodsName()+"</code>\n" + //商品编码
|
|
|
+ " <name>"+paymentDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentDto.getTotalPrice()+"</amount>\n" + //金额
|
|
|
+ "</items>\n" +
|
|
|
+ "<items>\n" +
|
|
|
+ " <name>"+paymentDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentDto.getTotalPrice()+"</amount>\n" + //金额
|
|
|
+ "</items>\n" +
|
|
|
+
|
|
|
+ "</payload>\n" +
|
|
|
+ "</message>\n";
|
|
|
+ return xml;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** 订单扣款(+手续费):二级市场--->银行 */
|
|
|
+ public static String MKT006(PaymentDto paymentDto) {
|
|
|
+ String date = sdf.format(new Date());
|
|
|
+
|
|
|
+ String xml =
|
|
|
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
|
|
|
+ "<message xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"\" title=\"二级市场\">\n" +
|
|
|
+ "<headers>\n" +
|
|
|
+ " <sn>"+UUID.randomUUID()+"</sn>\n" +
|
|
|
+ " <date>"+date+"</date> \n" +
|
|
|
+ " <organization>"+paymentDto.getFieldCode()+"</organization>\n" +
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" +
|
|
|
+ " <operation>MKT006</operation>\n" +
|
|
|
+ "</headers>\n" +
|
|
|
+
|
|
|
+ " <payload xsi:type=\"orderDTO\">\n" +
|
|
|
+ " <sn>"+paymentDto.getTradeNo()+"</sn>\n" + //订单号
|
|
|
+ " <organization>"+paymentDto.getFieldCode()+"</organization>\n" + //互市点机构代码
|
|
|
+ " <currency>"+paymentDto.getCurrCode()+"</currency>\n" + //币种
|
|
|
+ " <type>001</type>\n" + //业务类型 001 代表扣款订单
|
|
|
+ " <total>"+paymentDto.getTotalPrice()+"</total>\n" + //订单总金额 8150.00 【买方总支付金额】
|
|
|
+ " <actualTotal>"+paymentDto.getTotalPrice()+"</actualTotal>\n" + //扣除手续费边民实际到账金额 8050
|
|
|
+ " <dateTime>"+paymentDto.getDeclTime()+"</dateTime>\n" + //订单时间 YYYY-MM—DD HH:MM:DD SSS
|
|
|
+
|
|
|
+ "<vendee>\n" +//买方基本信息(采购企业)
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ "</vendee>\n" +
|
|
|
+
|
|
|
+ "<vendee>\n" +//卖方基础信息(边民)
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
+ " <paperType>0001</paperType>\n" + //证件类型 0001 身份证
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //边民证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ "</vendee>\n" +
|
|
|
+
|
|
|
+ "<items>\n" +//商品明细
|
|
|
+ " <code>"+paymentDto.getGoodsName()+"</code>\n" + //商品编码
|
|
|
+ " <name>"+paymentDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentDto.getTotalPrice()+"</amount>\n" + //金额
|
|
|
+ "</items>\n" +
|
|
|
+ "<items>\n" +
|
|
|
+ " <name>"+paymentDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentDto.getTotalPrice()+"</amount>\n" + //金额
|
|
|
+ "</items>\n" +
|
|
|
+
|
|
|
+ "<charges>\n" +//父级手续费(有子级手续费)
|
|
|
+ " <type>001</type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
+ " <sn>"+UUID.randomUUID()+"</sn>\n" + //订单号
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <bankNo></bankNo>\n" + //开户行行号 非必填
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ " <total>"+paymentDto.getBorderTel()+"</total>\n" + //手续费金额 70(包含了子级手续费 可多个)
|
|
|
+ "<childrenCharges>\n" +//父级手续费(有子级手续费)
|
|
|
+ " <type>001</type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
+ " <sn>"+UUID.randomUUID()+"</sn>\n" + //订单号
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <bankNo></bankNo>\n" + //开户行行号 非必填
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ " <total>"+paymentDto.getBorderTel()+"</total>\n" + //手续费金额 2
|
|
|
+ "</childrenCharges>\n" +
|
|
|
+ "</charges>\n" +
|
|
|
+
|
|
|
+ "<charges>\n" +//父级手续费(无子级手续费)
|
|
|
+ " <type>001</type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
+ " <sn>"+UUID.randomUUID()+"</sn>\n" + //订单号
|
|
|
+ " <name>"+paymentDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <bankNo></bankNo>\n" + //开户行行号 非必填
|
|
|
+ " <tel>"+paymentDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ " <total>"+paymentDto.getBorderTel()+"</total>\n" + //手续费金额
|
|
|
+ "</charges>\n" +
|
|
|
+
|
|
|
"</payload>\n" +
|
|
|
"</message>\n";
|
|
|
return xml;
|