|
|
@@ -1,10 +1,13 @@
|
|
|
package com.pj.xml;
|
|
|
|
|
|
|
|
|
+import com.pj.api.dto.CompanyDto;
|
|
|
import com.pj.api.dto.PaymentDto;
|
|
|
+import com.pj.api.dto.PaymentTwoDto;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
public class MessageXML {
|
|
|
@@ -180,65 +183,64 @@ public class MessageXML {
|
|
|
}
|
|
|
|
|
|
/** 订单扣款(无手续费):二级市场--->银行 */
|
|
|
- public static String MKT006_NoCommission(PaymentDto paymentDto) {
|
|
|
+ public static String MKT006_NoCommission(PaymentTwoDto paymentTwoDto) {
|
|
|
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" +
|
|
|
+ " <organization>"+paymentTwoDto.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
|
|
|
+ " <sn>"+paymentTwoDto.getOrderNo()+"</sn>\n" + //订单号
|
|
|
+ " <organization>"+paymentTwoDto.getFieldCode()+"</organization>\n" + //互市点机构代码
|
|
|
+ " <currency>"+paymentTwoDto.getCurrCode()+"</currency>\n" + //币种
|
|
|
+ " <type>001</type>\n" + //业务类型 001 代表扣款订单
|
|
|
+ " <total>"+paymentTwoDto.getResalePrice()+"</total>\n" + //订单总金额 8150.00 【买方总支付金额】(转售金额)
|
|
|
+ " <actualTotal></actualTotal>\n" + //扣除手续费边民实际到账金额 actualTotal忽略
|
|
|
+ " <dateTime>"+paymentTwoDto.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" + //联系电话
|
|
|
+ " <name>"+paymentTwoDto.getPcName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentTwoDto.getBusinessLicense()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentTwoDto.getPcBankAccount()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentTwoDto.getPcContact()+"</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" + //联系电话
|
|
|
+ " <name>"+paymentTwoDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
+ " <paperType>0001</paperType>\n" + //证件类型 0001 身份证
|
|
|
+ " <paperNo>"+paymentTwoDto.getBorderidno()+"</paperNo>\n" + //边民证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentTwoDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentTwoDto.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" + //金额
|
|
|
+ " <code>"+paymentTwoDto.getCodeTs()+"</code>\n" + //商品编码
|
|
|
+ " <name>"+paymentTwoDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentTwoDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentTwoDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentTwoDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentTwoDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentTwoDto.getResalePrice()+"</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" + //金额
|
|
|
+ " <name>"+paymentTwoDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentTwoDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentTwoDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentTwoDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentTwoDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentTwoDto.getResalePrice()+"</amount>\n" + //金额
|
|
|
"</items>\n" +
|
|
|
|
|
|
"</payload>\n" +
|
|
|
@@ -247,112 +249,119 @@ public class MessageXML {
|
|
|
}
|
|
|
|
|
|
/** 订单扣款(+手续费):二级市场--->银行 */
|
|
|
- public static String MKT006(PaymentDto paymentDto) {
|
|
|
+ public static String MKT006(PaymentTwoDto paymentTwoDto) {
|
|
|
String date = sdf.format(new Date());
|
|
|
-
|
|
|
+ String chargesXml = chargesXml(paymentTwoDto.getCompanyDtoList(),paymentTwoDto.getOrderNo());
|
|
|
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" +
|
|
|
+ " <organization>"+paymentTwoDto.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
|
|
|
+ " <sn>"+paymentTwoDto.getOrderNo()+"</sn>\n" + //订单号
|
|
|
+ " <organization>"+paymentTwoDto.getFieldCode()+"</organization>\n" + //互市点机构代码
|
|
|
+ " <currency>"+paymentTwoDto.getCurrCode()+"</currency>\n" + //币种
|
|
|
+ " <type>001</type>\n" + //业务类型 001 代表扣款订单
|
|
|
+ " <total>"+paymentTwoDto.getResalePrice()+"</total>\n" + //订单总金额 8150.00 【买方总支付金额】
|
|
|
+ " <actualTotal>"+paymentTwoDto.getTotalPrice()+"</actualTotal>\n" + //扣除手续费边民实际到账金额 8050
|
|
|
+ " <dateTime>"+paymentTwoDto.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" + //联系电话
|
|
|
+ " <name>"+paymentTwoDto.getPcName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentTwoDto.getBusinessLicense()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentTwoDto.getPcBankAccount()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentTwoDto.getPcContact()+"</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" + //联系电话
|
|
|
+ " <name>"+paymentTwoDto.getBorderName()+"</name>\n" + //边民姓名
|
|
|
+ " <paperType>0001</paperType>\n" + //证件类型 0001 身份证
|
|
|
+ " <paperNo>"+paymentTwoDto.getBorderidno()+"</paperNo>\n" + //边民证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentTwoDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <tel>"+paymentTwoDto.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" + //金额
|
|
|
+ " <code>"+paymentTwoDto.getCodeTs()+"</code>\n" + //商品编码
|
|
|
+ " <name>"+paymentTwoDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentTwoDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentTwoDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentTwoDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentTwoDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentTwoDto.getResalePrice()+"</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" + //金额
|
|
|
+ " <name>"+paymentTwoDto.getGoodsName()+"</name>\n" + //商品名称
|
|
|
+ " <unit>"+paymentTwoDto.getGoodsUnit()+"</unit>\n" + //商品单位
|
|
|
+ " <price>"+paymentTwoDto.getDeclPrice()+"</price>\n" + //商品单价
|
|
|
+ " <quantity>"+paymentTwoDto.getBuyQty()+"</quantity>\n" + //商品数量
|
|
|
+ " <weight>"+paymentTwoDto.getGrossWt()+"</weight>\n" + //商品重量
|
|
|
+ " <amount>"+paymentTwoDto.getResalePrice()+"</amount>\n" + //金额
|
|
|
"</items>\n" +
|
|
|
|
|
|
- "<charges>\n" +//父级手续费(有子级手续费)
|
|
|
- " <type>001</type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
- " <sn>"+UUID.randomUUID()+"</sn>\n" + //订单号
|
|
|
- " <name>"+paymentDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ /*"<charges>\n" +//父级手续费(有子级手续费)
|
|
|
+ " <type></type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
+ " <sn>"+paymentTwoDto.getOrderNo()+"</sn>\n" + //订单号(一级市场订单号)
|
|
|
+ " <name>"+paymentTwoDto.getPcName()+"</name>\n" + //企业名称
|
|
|
" <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
- " <paperNo>"+paymentDto.getBorderidno()+"</paperNo>\n" + //证件号
|
|
|
- " <nationality>中国</nationality>\n" + //国籍
|
|
|
- " <accountNo>"+paymentDto.getBankCode()+"</accountNo>\n" + //银行账号
|
|
|
+ " <paperNo>"+paymentTwoDto.getBusinessLicense()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+paymentTwoDto.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" + //证件号
|
|
|
+ " <tel>"+paymentTwoDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ " <total>"+paymentTwoDto.getBorderTel()+"</total>\n" + //手续费金额 70(包含了子级手续费 可多个)
|
|
|
+ "<childrenCharges>\n" +//子级手续费
|
|
|
+ " <type></type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
+ " <sn>"+UUID.randomUUID()+"</sn>\n" + //订单号
|
|
|
+ " <name>"+paymentTwoDto.getBorderName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+paymentTwoDto.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
|
|
|
+ " <accountNo>"+paymentTwoDto.getBankCode()+"</accountNo>\n" +//银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <bankNo></bankNo>\n" + //开户行行号 非必填
|
|
|
+ " <tel>"+paymentTwoDto.getBorderTel()+"</tel>\n" + //联系电话
|
|
|
+ " <total>"+paymentTwoDto.getBorderTel()+"</total>\n" + //手续费金额 2
|
|
|
"</childrenCharges>\n" +
|
|
|
- "</charges>\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" +
|
|
|
+ chargesXml + //父级手续费(无子级手续费)
|
|
|
|
|
|
"</payload>\n" +
|
|
|
"</message>\n";
|
|
|
return xml;
|
|
|
}
|
|
|
+ private static String chargesXml(List<CompanyDto> companyDtoList, String orderNo){
|
|
|
+ String xml = "";
|
|
|
+ for (CompanyDto companyDto : companyDtoList) {
|
|
|
+ xml += "<charges>\n" +//父级手续费(无子级手续费)
|
|
|
+ " <type></type>\n" + //手续费类型 数据字典:ChargeType
|
|
|
+ " <sn>"+orderNo+"</sn>\n" + //订单号
|
|
|
+ " <name>"+companyDto.getName()+"</name>\n" + //企业名称
|
|
|
+ " <paperType>0008</paperType>\n" + //证件类型 0008 社会统一信用代码(默认)
|
|
|
+ " <paperNo>"+companyDto.getUsci()+"</paperNo>\n" + //证件号
|
|
|
+ " <nationality>中国</nationality>\n" + //国籍
|
|
|
+ " <accountNo>"+companyDto.getBankAccount()+"</accountNo>\n" + //银行账号
|
|
|
+ " <bankCode>KCCBCN2K</bankCode>\n" + //开户行代码
|
|
|
+ " <bankNo></bankNo>\n" + //开户行行号 非必填
|
|
|
+ " <tel>"+companyDto.getContact()+"</tel>\n" + //联系电话
|
|
|
+ " <total>"+companyDto.getChargesPrice()+"</total>\n" + //手续费金额
|
|
|
+ "</charges>\n" ;
|
|
|
+ }
|
|
|
+ return xml;
|
|
|
+ }
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss sss");
|