2B菜鸟快递 和2C菜鸟快递,原理相同(都是菜鸟接口)。
只要2C业务的配置能获取面单号, 2B的热敏参数就参考2C热敏配置。

select * from TDefShippingMethods –2C快递表
select * from TDefShippingMethodsDet –2C快递热敏配置表

select * from TDefLogisticsCompanies –2B物流表
select * from TDefLogisticsCompaniesDet –2B物流热敏配置表

select * from TMS_BillTransPort –2B快递单号表
select * from TMS_BillTransPortdet –2B快递子单号表

1、新增物流编码,可以和2C的一致。 (指定打印机)

2、初期物流热敏脚本配置。 SessionKey 直接用2C里的 SessionKey
–TDefLogisticsCompaniesDet
if not exists(select 1 from TDefLogisticsCompaniesDet where ShippingCode = ‘CNYZ2B’ and ParmKey=’AppKey’)
begin
INSERT TDefLogisticsCompaniesDet (ShippingCode,ParmAssign,ParmKey,ParmName,ParmValue,Ex2,Status)
Select ‘CNYZ2B’,’*’,’AppKey’,’AppKey’,’24602748’,’0’,’1’
end

if not exists(select 1 from TDefLogisticsCompaniesDet where ShippingCode = ‘CNYZ2B’ and ParmKey=’AppSecret’)
begin
INSERT TDefLogisticsCompaniesDet (ShippingCode,ParmAssign,ParmKey,ParmName,ParmValue,Ex2,Status)
Select ‘CNYZ2B’,’*’,’AppSecret’,’AppSecret’,’bk4eZnxLLRKOBMfi/w0+ZsS2hyUQtIFgE+iccS75WF6GzkpNVFcl3w==’,’0’,’1’
end

if not exists(select 1 from TDefLogisticsCompaniesDet where ShippingCode = ‘CNYZ2B’ and ParmKey=’ServerAddr’)
begin
INSERT TDefLogisticsCompaniesDet (ShippingCode,ParmAssign,ParmKey,ParmName,ParmValue,Ex2,Status)
Select ‘CNYZ2B’,’*’,’ServerAddr’,’服务地址’,’http://gw.api.taobao.com/router/rest','0','1'
end

if not exists(select 1 from TDefLogisticsCompaniesDet where ShippingCode = ‘CNYZ2B’ and ParmKey=’SessionKey’)
begin
INSERT TDefLogisticsCompaniesDet (ShippingCode,ParmAssign,ParmKey,ParmName,ParmValue,Ex2,Status)
Select ‘CNYZ2B’,’‘,’SessionKey’,’SessionKey’,’店铺授权session填在此处’,’0’,’1’
End
If not exists(Select 1 From TDefLogisticsCompaniesDet Where ShippingCode = ‘CNYZ2B’ And ParmKey = ‘[KD]KdCode’)
Begin
Insert Into TDefLogisticsCompaniesDet(ShippingCode, ParmKey, ParmName, ParmValue, ParmAssign, Ex1)
Values(‘CNYZ2B’, ‘[KD]
KdCode’, ‘真实快递编号(快递对应CNYZ编号)’, ‘YTO’, ‘
‘, ‘|仓库’)
End
If not exists(Select 1 From TDefLogisticsCompaniesDet Where ShippingCode = ‘CNYZ2B’ And ParmKey = ‘WriteLog’)
Begin
Insert Into TDefLogisticsCompaniesDet (ShippingCode, ParmKey, ParmName, ParmValue,Ex1)
Values(‘CNYZ2B’, ‘WriteLog’, ‘API调用日志;0:不记录(默认) 1:记录’, ‘1’, ‘
|仓库’)
End
GO

3、*物流交接–》按出库单匹配物流单 匹配快递,获取网点,获取面单 *

获取后的热敏参数配置是保存在 TDefLogisticsCompaniesDet 表里。
(若获取模版和网点后 TDefLogisticsCompaniesDet 没有相关信息, 可直接 把2C 相关快递的热敏参数复制进去。 CNYZ 改为CNYZ2B )

如下图: 2B 和2C菜鸟中通热敏相关参数配置对比。只有快递公司编码的区别

文档更新时间: 2025-05-30 17:57   作者:赵志