feat 添加订单详情接口
This commit is contained in:
parent
ad0d91ca2f
commit
291d170ee6
@ -124,7 +124,7 @@ namespace ARW.Model.Vo.Api.OrderManage.Orders
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// 订单状态(1: 待付款 2: 待发货 3: 待收货 4: 已完成 5:待取消)
|
||||
/// </summary>
|
||||
public int OrderStatus { get; set; }
|
||||
|
||||
@ -177,10 +177,16 @@ namespace ARW.Model.Vo.Api.OrderManage.Orders
|
||||
public Logistics LogisticsVO { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物流状态
|
||||
/// </summary>
|
||||
public TrajectoryVo TrajectoryVos { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自动取消时间
|
||||
/// </summary>
|
||||
public DateTime AutoCancelTime { get; set; }
|
||||
public DateTime? AutoCancelTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
48
ARW.Model/Vo/Api/OrderManage/Orders/Trajectory.cs
Normal file
48
ARW.Model/Vo/Api/OrderManage/Orders/Trajectory.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using Newtonsoft.Json;
|
||||
using OfficeOpenXml.Attributes;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ARW.Model.Vo.Api.OrderManage.Orders
|
||||
{
|
||||
/// <summary>
|
||||
/// 物流状态展示对象Api
|
||||
///
|
||||
/// @author lwh
|
||||
/// @date 2023-10-19
|
||||
/// </summary>
|
||||
public class Trajectory
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 标题
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 图标
|
||||
/// </summary>
|
||||
public string Icon { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 物流节点
|
||||
/// </summary>
|
||||
public List<TrajectoryNode> Nodes { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 是否展示
|
||||
/// </summary>
|
||||
public bool IsShow { get; set; } = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
}
|
||||
|
||||
}
|
43
ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryNode.cs
Normal file
43
ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryNode.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using Newtonsoft.Json;
|
||||
using OfficeOpenXml.Attributes;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ARW.Model.Vo.Api.OrderManage.Orders
|
||||
{
|
||||
/// <summary>
|
||||
/// 物流状态详情对象Api
|
||||
///
|
||||
/// @author lwh
|
||||
/// @date 2023-10-19
|
||||
/// </summary>
|
||||
public class TrajectoryNode
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 描述
|
||||
/// </summary>
|
||||
public string Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 时间
|
||||
/// </summary>
|
||||
public DateTime? Timestamp { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
36
ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryVo.cs
Normal file
36
ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryVo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Newtonsoft.Json;
|
||||
using OfficeOpenXml.Attributes;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ARW.Model.Vo.Api.OrderManage.Orders
|
||||
{
|
||||
/// <summary>
|
||||
/// 物流状态展示对象Api
|
||||
///
|
||||
/// @author lwh
|
||||
/// @date 2023-10-20
|
||||
/// </summary>
|
||||
public class TrajectoryVo
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 快递单号
|
||||
/// </summary>
|
||||
public string LogisticsCompanyCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 物流公司名称
|
||||
/// </summary>
|
||||
public string LogisticsCompanyName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 物流节点
|
||||
/// </summary>
|
||||
public List<Trajectory> Trajectorys { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -132,7 +132,14 @@ namespace ARW.Service.Api.BusinessService.GoodsManager.Goodss
|
||||
});
|
||||
|
||||
|
||||
return await query.ToPageAsync(parm);
|
||||
var list = await query.ToPageAsync(parm);
|
||||
|
||||
foreach (var item in list.Result)
|
||||
{
|
||||
item.Thumb = item.Images.Split(",").First();
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,13 +22,13 @@ using ARW.Model.Models.Business.GoodsManager.GoodsComments;
|
||||
using ARW.Repository.Business.GoodsManager.GoodsComments;
|
||||
using ARW.Repository.Business.ShopManager.Shops;
|
||||
using ARW.Model.Models.Business.ShopManager.Shops;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using ARW.Model.Vo.Api.GoodsManager.Goodss;
|
||||
using Newtonsoft.Json;
|
||||
using Senparc.CO2NET.Extensions;
|
||||
using ARW.Repository.Business.OrderManage.OrderCustomerAddreses;
|
||||
using ARW.Repository.Business.Custom.Regions;
|
||||
using ARW.Service.Business.IBusinessService.Custom.Regions;
|
||||
using Infrastructure.Kuaidi100;
|
||||
using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys;
|
||||
using ARW.Repository.Business.LogisticsManage.LogisticsCompanys;
|
||||
|
||||
namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
{
|
||||
@ -50,9 +50,10 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
private readonly SpecRepository _SpecRepository;
|
||||
private readonly SpecValueRepository _SpecValueRepository;
|
||||
private readonly ShopRepository _ShopRepository;
|
||||
private readonly LogisticsCompanyRepository _LogisticsCompanyRepository;
|
||||
private readonly IRegionService _RegionService;
|
||||
|
||||
public OrderServiceImplApi(OrderRepository OrderRepository, OrderGoodsRepository orderGoodsRepository, GoodsRepository goodsRepository, GoodsSkuRepository goodsSkuRepository, SpecRepository specRepository, SpecValueRepository specValueRepository, GoodsCommentRepository goodsCommentRepository, ShopRepository shopRepository, OrderCustomerAddressRepository orderCustomerAddressRepository, IRegionService regionService)
|
||||
public OrderServiceImplApi(OrderRepository OrderRepository, OrderGoodsRepository orderGoodsRepository, GoodsRepository goodsRepository, GoodsSkuRepository goodsSkuRepository, SpecRepository specRepository, SpecValueRepository specValueRepository, GoodsCommentRepository goodsCommentRepository, ShopRepository shopRepository, OrderCustomerAddressRepository orderCustomerAddressRepository, IRegionService regionService, LogisticsCompanyRepository logisticsCompanyRepository)
|
||||
{
|
||||
this._OrderRepository = OrderRepository;
|
||||
_OrderGoodsRepository = orderGoodsRepository;
|
||||
@ -64,6 +65,7 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
_ShopRepository = shopRepository;
|
||||
_OrderCustomerAddressRepository = orderCustomerAddressRepository;
|
||||
_RegionService = regionService;
|
||||
_LogisticsCompanyRepository = logisticsCompanyRepository;
|
||||
}
|
||||
|
||||
#region Api接口代码
|
||||
@ -282,7 +284,7 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
TotalAmount = s.OrderAmount,
|
||||
GoodsAmount = s.GoodsTotalAmoun,
|
||||
PaymentAmount = s.PayPrice,
|
||||
FreightFee = s.OrderAmount,
|
||||
FreightFee = s.ExpressPrice,
|
||||
CouponAmount = s.CouponMoney,
|
||||
Remark = s.OrderRemark,
|
||||
}).Take(1);
|
||||
@ -296,6 +298,8 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
json = json.Substring(0, json.Length - 1);
|
||||
var data = JsonConvert.DeserializeObject<OrderApiDetailsVo>(json);
|
||||
|
||||
var order = await _OrderRepository.GetFirstAsync(s => s.OrderGuid == data.OrderGuid);
|
||||
|
||||
// 订单商品
|
||||
var orderItemList = new List<OrderItem>();
|
||||
var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == data.OrderGuid);
|
||||
@ -337,11 +341,13 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
data.LogisticsVO = logistics;
|
||||
}
|
||||
|
||||
// 处理订单状态
|
||||
//if ()
|
||||
//{
|
||||
/* 处理物流状态 */
|
||||
data = GetTrajectory(order, data);
|
||||
|
||||
/* 处理订单状态 */
|
||||
data = GetOrderStatus(order, data);
|
||||
|
||||
|
||||
//}
|
||||
|
||||
json = data.ToJson();
|
||||
}
|
||||
@ -351,6 +357,126 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 处理物流状态
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public OrderApiDetailsVo GetTrajectory(Order order, OrderApiDetailsVo data)
|
||||
{
|
||||
data.TrajectoryVos = new TrajectoryVo();
|
||||
var trajectoryList = new List<Trajectory>();
|
||||
|
||||
// 已下单(待发货)
|
||||
if (order.OrderStatus == 1)
|
||||
{
|
||||
var trajectoryNodeList1 = new List<TrajectoryNode> { GetTrajectoryNode("订单已提交", order.Create_time) };
|
||||
var trajectory1 = GetTrajectory("", "", trajectoryNodeList1, 3);
|
||||
trajectoryList.Add(trajectory1);
|
||||
|
||||
var trajectoryNodeList2 = new List<TrajectoryNode> { GetTrajectoryNode("订单已经支付成功,支付方式为:微信支付", order.PayTime) };
|
||||
var trajectory2 = GetTrajectory("已下单", "https://cdn-we-retail.ym.tencent.com/web/trajectoryIcons/ordered.svg", trajectoryNodeList2, 2);
|
||||
trajectoryList.Add(trajectory2);
|
||||
|
||||
// 运输中(已发货,待收货)
|
||||
if (order.DeliveryStatus == 2 && order.ReceiptStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1)
|
||||
{
|
||||
data.TrajectoryVos.LogisticsCompanyCode = order.LogisticsTrackingNumber;
|
||||
data.TrajectoryVos.LogisticsCompanyName = order.LogisticsCompany;
|
||||
|
||||
var trajectoryNodeList3 = new List<TrajectoryNode> { GetTrajectoryNode($"商家已发货,物流承运商:{order.LogisticsCompany}", order.DeliveryTime) };
|
||||
|
||||
// 对接快递100接口
|
||||
//var company = _LogisticsCompanyRepository.GetFirst(s => s.LogisticsCompanyGuid == order.LogisticsCompanyGuid);
|
||||
//var trackRes = Kuaidi100.GetQueryTrack(company.LogisticsCompanyCode, order.LogisticsTrackingNumber);
|
||||
|
||||
var trajectory3 = GetTrajectory("已发货", "deliver", trajectoryNodeList3, 1);
|
||||
trajectoryList.Add(trajectory3);
|
||||
}
|
||||
}
|
||||
|
||||
//foreach (var item in trajectoryList)
|
||||
//{
|
||||
// item.Nodes = item.Nodes.OrderBy(s => s.Sort).ToList();
|
||||
//}
|
||||
trajectoryList = trajectoryList.OrderBy(s => s.Sort).ToList();
|
||||
data.TrajectoryVos.Trajectorys = trajectoryList;
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
public Trajectory GetTrajectory(string title, string icon, List<TrajectoryNode> trajectoryNodeList, int sort)
|
||||
{
|
||||
var trajectory = new Trajectory();
|
||||
trajectory.Title = title;
|
||||
trajectory.Icon = icon;
|
||||
trajectory.Nodes = trajectoryNodeList;
|
||||
trajectory.Sort = sort;
|
||||
|
||||
return trajectory;
|
||||
}
|
||||
|
||||
|
||||
public TrajectoryNode GetTrajectoryNode(string status, DateTime? time)
|
||||
{
|
||||
var trajectoryNode = new TrajectoryNode();
|
||||
trajectoryNode.Status = status;
|
||||
trajectoryNode.Timestamp = time;
|
||||
return trajectoryNode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 处理订单状态
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public OrderApiDetailsVo GetOrderStatus(Order order, OrderApiDetailsVo data)
|
||||
{
|
||||
// 待付款
|
||||
if (order.PayStatus == 1 && order.OrderStatus == 1)
|
||||
{
|
||||
data.AutoCancelTime = order.Create_time.AddMinutes(30); ;
|
||||
data.OrderStatus = 1;
|
||||
data.OrderStatusName = "待付款";
|
||||
}
|
||||
// 待发货
|
||||
if (order.DeliveryStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1)
|
||||
{
|
||||
data.OrderStatus = 2;
|
||||
data.OrderStatusName = "待发货";
|
||||
}
|
||||
// 待收货
|
||||
if (order.DeliveryStatus == 2 && order.ReceiptStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1)
|
||||
{
|
||||
data.OrderStatus = 2;
|
||||
data.OrderStatusName = "待收货";
|
||||
}
|
||||
// 已完成
|
||||
if (order.PayStatus == 2 && order.OrderStatus == 4)
|
||||
{
|
||||
data.OrderStatus = 2;
|
||||
data.OrderStatusName = "已完成";
|
||||
}
|
||||
// 已取消
|
||||
if (order.OrderStatus == 2)
|
||||
{
|
||||
data.OrderStatus = 2;
|
||||
data.OrderStatusName = "已取消";
|
||||
}
|
||||
// 待取消
|
||||
if (order.OrderStatus == 3)
|
||||
{
|
||||
data.OrderStatus = 5;
|
||||
data.OrderStatusName = "待取消";
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 业务方法调用
|
||||
|
||||
|
@ -71,7 +71,7 @@ namespace ARW.Tasks.TaskScheduler.Business
|
||||
{
|
||||
logger.Info("执行到了这里" + item.OpenId);
|
||||
logger.Info("一共有" + waitPushList.Count + "个");
|
||||
var res = await Subscribe.SubscribeMessage(item.TemplateId, item.OpenId, templateMessageData);
|
||||
var res = await Infrastructure.WeChat.SubScribe.Subscribe.SubscribeMessage(item.TemplateId, item.OpenId, templateMessageData);
|
||||
logger.Info("推送结果:" + res);
|
||||
|
||||
if (res == "消息已发送,请注意查收")
|
||||
|
@ -154,6 +154,8 @@ namespace ARW.WebApi.Controllers.Business.OrderManage.Orders
|
||||
var order = await _OrderService.GetFirstAsync(s => s.OrderGuid == parm.OrderGuid);
|
||||
var payment = await _PaymentService.GetFirstAsync(s => s.PaymentGuid == order.PaymentGuid);
|
||||
|
||||
if (parm.IsAgree)
|
||||
{
|
||||
Pay pay = new Pay(_httpClient);
|
||||
var transactionId = payment.PaymentWeixinNumber;
|
||||
string paymentRefundNumber = "";
|
||||
@ -173,6 +175,8 @@ namespace ARW.WebApi.Controllers.Business.OrderManage.Orders
|
||||
PaymentRefundNumber = canleRes.out_refund_no,
|
||||
}, f => f.PaymentNumber == canleRes.out_trade_no);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var res = await _OrderService.CancelOrder(parm);
|
||||
return SUCCESS(res);
|
||||
|
@ -121,6 +121,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"Kuaidi100Setting": {
|
||||
"key": "QsJHChwz3944", //授权key
|
||||
"customer": "5279A349F41783B3ECF3140056E76FAB", //customer
|
||||
"secret": "fcf0f7ae2f484d62be34a402f15cec3d", //secret
|
||||
"userid": "ff5c88135d414a13aa0c2b21e893fd46", //userid
|
||||
"siid": "", // 快递100打印机或者云盒设备码(使用电子面单打印接口或云打印相关接口必填)
|
||||
"tid": "" // 短信模板id
|
||||
},
|
||||
//Senparc.Weixin SDK 设置
|
||||
"SenparcWeixinSetting": {
|
||||
//以下为 Senparc.Weixin 的 SenparcWeixinSetting 微信配置
|
||||
|
250
Infrastructure/Kuaidi100/Common/ApiInfoConstant.cs
Normal file
250
Infrastructure/Kuaidi100/Common/ApiInfoConstant.cs
Normal file
@ -0,0 +1,250 @@
|
||||
using System;
|
||||
|
||||
|
||||
namespace Common
|
||||
{
|
||||
public class ApiInfoConstant
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询url
|
||||
/// </summary>
|
||||
public const string QUERY_URL = "http://poll.kuaidi100.com/poll/query.do";
|
||||
|
||||
/// <summary>
|
||||
/// 订阅url
|
||||
/// </summary>
|
||||
public const string SUBSCRIBE_URL = "https://poll.kuaidi100.com/poll";
|
||||
/// <summary>
|
||||
/// 地图轨迹查询url
|
||||
/// </summary>
|
||||
public const string QUERY_URL_WITH_MAP = "https://poll.kuaidi100.com/poll/maptrack.do";
|
||||
|
||||
/// <summary>
|
||||
/// 地图轨迹订阅url
|
||||
/// </summary>
|
||||
public const string SUBSCRIBE_URL_WITH_MAP = "http://poll.kuaidi100.com/pollmap";
|
||||
/// <summary>
|
||||
/// 订阅SCHEMA
|
||||
/// </summary>
|
||||
public const string SUBSCRIBE_SCHEMA = "json";
|
||||
/// <summary>
|
||||
/// 智能单号识别url
|
||||
/// </summary>
|
||||
public const string AUTO_NUM_URL = "http://www.kuaidi100.com/autonumber/auto?num={0}&key={1}";
|
||||
/// <summary>
|
||||
/// 电子面单html url
|
||||
/// </summary>
|
||||
public const string ELECTRONIC_ORDER_HTML_URL = "http://poll.kuaidi100.com/eorderapi.do";
|
||||
/// <summary>
|
||||
/// 电子面单html方法
|
||||
/// </summary>
|
||||
public const string ELECTRONIC_ORDER_HTML_METHOD = "getElecOrder";
|
||||
/// <summary>
|
||||
/// 电子面单获取图片 url
|
||||
/// </summary>
|
||||
public const string ELECTRONIC_ORDER_PIC_URL = "https://poll.kuaidi100.com/printapi/printtask.do";
|
||||
/// <summary>
|
||||
/// 电子面单获取图片
|
||||
/// </summary>
|
||||
public const string ELECTRONIC_ORDER_PIC_METHOD = "getPrintImg";
|
||||
/// <summary>
|
||||
/// 电子面单打印 url
|
||||
/// </summary>
|
||||
public const string ELECTRONIC_ORDER_PRINT_URL = "https://poll.kuaidi100.com/printapi/printtask.do";
|
||||
/// <summary>
|
||||
/// 电子面单打印方法
|
||||
/// </summary>
|
||||
public const string ELECTRONIC_ORDER_PRINT_METHOD = "eOrder";
|
||||
/// <summary>
|
||||
/// 菜鸟淘宝账号授权
|
||||
/// </summary>
|
||||
public const string AUTH_THIRD_URL = "https://poll.kuaidi100.com/printapi/authThird.do";
|
||||
/// <summary>
|
||||
/// 云打印url
|
||||
/// </summary>
|
||||
public const string CLOUD_PRINT_URL = "http://poll.kuaidi100.com/printapi/printtask.do?method={0}&t={1}&key={2}&sign={3}¶m={4}";
|
||||
/// <summary>
|
||||
/// 自定义打印方法
|
||||
/// </summary>
|
||||
public const string CLOUD_PRINT_CUSTOM_METHOD = "printOrder";
|
||||
/// <summary>
|
||||
/// 附件打印方法
|
||||
/// </summary>
|
||||
public const string CLOUD_PRINT_ATTACHMENT_METHOD = "imgOrder";
|
||||
/// <summary>
|
||||
/// 复打方法
|
||||
/// </summary>
|
||||
public const string CLOUD_PRINT_OLD_METHOD = "printOld";
|
||||
/// <summary>
|
||||
/// 硬件状态接口方法
|
||||
/// </summary>
|
||||
public const string CLOUD_PRINT_DEV_STATUS = "devstatus";
|
||||
/// <summary>
|
||||
/// 短信url
|
||||
/// </summary>
|
||||
public const string SEND_SMS_URL = "http://apisms.kuaidi100.com:9502/sms/send.do";
|
||||
/// <summary>
|
||||
/// 商家寄件
|
||||
/// </summary>
|
||||
public const string B_ORDER_URL = "https://order.kuaidi100.com/order/borderbestapi.do";
|
||||
/// <summary>
|
||||
/// 商家寄件查询运力
|
||||
/// </summary>
|
||||
public const string B_ORDER_QUERY_TRANSPORT_CAPACITY_METHOD = "querymkt";
|
||||
/// <summary>
|
||||
/// 商家寄件下单
|
||||
/// </summary>
|
||||
public const string B_ORDER_SEND_METHOD = "bOrderBest";
|
||||
/// <summary>
|
||||
/// 商家寄件获取验证码
|
||||
/// </summary>
|
||||
public const string B_ORDER_CODE_METHOD = "getCode";
|
||||
/// <summary>
|
||||
/// 商家寄件取消
|
||||
/// </summary>
|
||||
public const string B_ORDER_CANCEL_METHOD = "cancelBest";
|
||||
/// <summary>
|
||||
/// 商家寄件(官方寄件)请求url
|
||||
/// </summary>
|
||||
public const string B_ORDER_OFFICIAL_URL = "https://poll.kuaidi100.com/order/borderapi.do";
|
||||
/// <summary>
|
||||
/// 商家寄件(官方寄件)下单
|
||||
/// </summary>
|
||||
public const string B_ORDER_OFFICIAL_ORDER_METHOD = "bOrder";
|
||||
/// <summary>
|
||||
/// 商家寄件(官方寄件)取消
|
||||
/// </summary>
|
||||
public const string B_ORDER_OFFICIAL_CANCEL_METHOD = "cancel";
|
||||
/// <summary>
|
||||
/// 商家寄件(官方寄件)查询价格
|
||||
/// </summary>
|
||||
public const string B_ORDER_OFFICIAL_PRICE_METHOD = "Price";
|
||||
|
||||
/// <summary>
|
||||
/// 同城配送请求url
|
||||
/// </summary>
|
||||
public const string SAME_CITY_ORDER_URL = "https://order.kuaidi100.com/sameCity/order";
|
||||
/// <summary>
|
||||
/// 同城配送授权方法
|
||||
/// </summary>
|
||||
public const string SAME_CITY_AUTH_METHOD = "auth";
|
||||
/// <summary>
|
||||
/// 同城配送下单方法
|
||||
/// </summary>
|
||||
public const string SAME_CITY_ORDER_METHOD = "order";
|
||||
/// <summary>
|
||||
/// 同城配送查询订单方法
|
||||
/// </summary>
|
||||
public const string SAME_CITY_QUERY_METHOD = "query";
|
||||
/// <summary>
|
||||
/// 同城配送取消订单方法
|
||||
/// </summary>
|
||||
public const string SAME_CITY_CANCEL_METHOD = "cancel";
|
||||
/// <summary>
|
||||
/// 取消方法
|
||||
/// </summary>
|
||||
public const string CANCEL_METHOD = "cancel";
|
||||
/// <summary>
|
||||
/// 快递预估时效
|
||||
/// </summary>
|
||||
public const string TIME = "time";
|
||||
/// <summary>
|
||||
/// 指令打印方法
|
||||
/// </summary>
|
||||
public const string CLOUD_PRINT_COMMAND = "printCommand";
|
||||
/// <summary>
|
||||
/// 指令打印
|
||||
/// </summary>
|
||||
public const string INTERNATIONAL_SHIPMENT_URL = "http://api.kuaidi100.com/sendAssistant/order/apiCall";
|
||||
/// <summary>
|
||||
/// 订单导入授权url
|
||||
/// </summary>
|
||||
public const string THIRD_PLATFORM_ORDER_SHOP_AUTHORIZE_url = "https://api.kuaidi100.com/ent/shop/authorize";
|
||||
/// <summary>
|
||||
/// 订单导入提交订单获取任务接口
|
||||
/// </summary>
|
||||
public const string THIRD_PLATFORM_ORDER_COMMIT_TASK = "https://api.kuaidi100.com/ent/order/task";
|
||||
/// <summary>
|
||||
/// 订单导入提交订单回填单号
|
||||
/// </summary>
|
||||
public const string THIRD_PLATFORM_ORDER_UPLOAD_NUM = "https://api.kuaidi100.com/ent/logistics/send";
|
||||
/// <summary>
|
||||
/// 发货单接口url
|
||||
/// </summary>
|
||||
public const string BILL_PARCELS_URL = "https://poll.kuaidi100.com/print/billparcels.do";
|
||||
/// <summary>
|
||||
/// 发货单接口方法
|
||||
/// </summary>
|
||||
public const string BILL_PARCELS_METHOD = "billparcels";
|
||||
|
||||
/// <summary>
|
||||
/// 面单余额接口方法
|
||||
/// </summary>
|
||||
public const string THIRD_PLATFORM_BRANCH_INFO_METHOD = "getThirdInfo";
|
||||
|
||||
/// <summary>
|
||||
/// 快递面单OCR识别接口
|
||||
/// </summary>
|
||||
public const string OCR_URL = "http://api.kuaidi100.com/elec/detocr";
|
||||
/// <summary>
|
||||
/// 新模板编辑器请求url
|
||||
/// </summary>
|
||||
public const string NEW_TEMPLATE_URL = "https://api.kuaidi100.com/label/order";
|
||||
/// <summary>
|
||||
/// 下单
|
||||
/// </summary>
|
||||
public const String ORDER = "order";
|
||||
/// <summary>
|
||||
/// 自定义
|
||||
/// </summary>
|
||||
public const String CUSTOM = "custom";
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
public const String DETAIL = "detail";
|
||||
/// <summary>
|
||||
/// C端寄件下单接口url
|
||||
/// </summary>
|
||||
public const string C_ORDER_URL = "https://order.kuaidi100.com/order/corderapi.do";
|
||||
/// <summary>
|
||||
/// 价格
|
||||
/// </summary>
|
||||
public const string PRICE = "price";
|
||||
/// <summary>
|
||||
/// cOrder
|
||||
/// </summary>
|
||||
public const string CORDER = "cOrder";
|
||||
/// <summary>
|
||||
/// 快递可用性接口url
|
||||
/// </summary>
|
||||
public const string EXPRESS_REACHABLE_URL = "http://api.kuaidi100.com/reachable.do";
|
||||
/// <summary>
|
||||
/// 快递可用性接口方法
|
||||
/// </summary>
|
||||
public const string EXPRESS_REACHABLE_METHOD = "reachable";
|
||||
/// <summary>
|
||||
/// 同城寄件接口url
|
||||
/// </summary>
|
||||
public const string BSAMECITY_EXPRESS_URL = "https://api.kuaidi100.com/bsamecity/order";
|
||||
/// <summary>
|
||||
/// 同城寄件-预下单方法
|
||||
/// </summary>
|
||||
public const string BSAMECITY_EXPRESS_PRICE = "price";
|
||||
/// <summary>
|
||||
/// 同城寄件-下单方法
|
||||
/// </summary>
|
||||
public const string BSAMECITY_EXPRESS_ORDER = "order";
|
||||
/// <summary>
|
||||
/// 同城寄件-预取消方法
|
||||
/// </summary>
|
||||
public const string BSAMECITY_EXPRESS_PRECANCEL = "precancel";
|
||||
/// <summary>
|
||||
/// 同城寄件-取消方法
|
||||
/// </summary>
|
||||
public const string BSAMECITY_EXPRESS_CANCEL = "cancel";
|
||||
/// <summary>
|
||||
/// 同城寄件-加小费方法
|
||||
/// </summary>
|
||||
public const string BSAMECITY_EXPRESS_ADDFEE = "addfee";
|
||||
}
|
||||
}
|
42
Infrastructure/Kuaidi100/Common/Kuaidi100Config.cs
Normal file
42
Infrastructure/Kuaidi100/Common/Kuaidi100Config.cs
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
namespace Common{
|
||||
/// <summary>
|
||||
/// 快递100的基础账号信息,可以在这里获取
|
||||
/// https://poll.kuaidi100.com/manager/page/myinfo/enterprise
|
||||
/// </summary>
|
||||
public class KuaiDi100Config
|
||||
{
|
||||
/// <summary>
|
||||
/// 授权key
|
||||
/// </summary>
|
||||
public string key { get; set; }
|
||||
/// <summary>
|
||||
/// customer
|
||||
/// </summary>
|
||||
public string customer { get; set; }
|
||||
/// <summary>
|
||||
/// secret
|
||||
/// </summary>
|
||||
public string secret { get; set; }
|
||||
/// <summary>
|
||||
/// 快递100打印机或者云盒设备码(使用电子面单打印接口或云打印相关接口必填)
|
||||
/// </summary>
|
||||
public string siid { get; set; }
|
||||
/// <summary>
|
||||
/// userid
|
||||
/// </summary>
|
||||
public string userid { get; set; }
|
||||
/// <summary>
|
||||
/// 短信模板id
|
||||
/// </summary>
|
||||
public string tid { get; set; }
|
||||
/// <summary>
|
||||
/// 电子面单快递公司账号信息(月结账号)
|
||||
/// </summary>
|
||||
public string partnerId { get; set; }
|
||||
/// <summary>
|
||||
/// 电子面单快递公司账号信息(账号密码)
|
||||
/// </summary>
|
||||
public string partnerKey { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.BorderOfficial
|
||||
{
|
||||
public class BOrderOfficialCancelParam {
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单ID
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 取消原因,例:暂时不寄件
|
||||
/// </summary>
|
||||
public string cancelMsg {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.BorderOfficial
|
||||
{
|
||||
public class BOrderOfficialOrderParam {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》
|
||||
/// </summary>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人姓名
|
||||
/// </summary>
|
||||
public string recManName {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string recManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园
|
||||
/// </summary>
|
||||
public string recManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人姓名
|
||||
/// </summary>
|
||||
public string sendManName {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string sendManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园B10
|
||||
/// </summary>
|
||||
public string sendManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 物品名称,例:文件
|
||||
/// </summary>
|
||||
public string cargo {get; set;}
|
||||
/// <summary>
|
||||
/// 重量
|
||||
/// </summary>
|
||||
public string weight {get; set;}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt {get; set;}
|
||||
/// <summary>
|
||||
/// callBackUrl订单信息回调
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 快递业务服务类型,例:标准快递,默认为标准快递
|
||||
/// </summary>
|
||||
public string serviceType {get; set;}
|
||||
/// <summary>
|
||||
/// 预约日期,例如:今天/明天/后天
|
||||
/// </summary>
|
||||
public string dayType {get; set;}
|
||||
/// <summary>
|
||||
/// 预约起始时间,24小时制(HH:mm),例如:09:00
|
||||
/// </summary>
|
||||
public string pickupStartTime {get; set;}
|
||||
/// <summary>
|
||||
/// 预约截止时间,24小时制(HH:mm),例如:10:00
|
||||
/// </summary>
|
||||
public string pickupEndTime {get; set;}
|
||||
/// <summary>
|
||||
/// 保价额度,单位:元
|
||||
/// </summary>
|
||||
public string valinsPay {get; set;}
|
||||
/// <summary>
|
||||
/// 是否口令签收,Y:需要 N: 不需要,默认值为N(德邦快递专属参数)
|
||||
/// </summary>
|
||||
public string passwordSigning {get; set;}
|
||||
/// <summary>
|
||||
/// 是否开启订阅功能 0:不开启(默认) 1:开启 说明开启订阅功能时:pollCallBackUrl必须填入 此功能只针对有快递单号的单
|
||||
/// </summary>
|
||||
public string op {get; set;}
|
||||
/// <summary>
|
||||
/// 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
|
||||
/// </summary>
|
||||
public string pollCallBackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 添加此字段表示开通行政区域解析功能 。
|
||||
/// 0:关闭(默认)
|
||||
/// 1:开通行政区域解析功能以及物流轨迹增加物流状态名称
|
||||
/// 4:开通行政解析功能以及物流轨迹增加物流高级状态名称、状态值并且返回出发、目的及当前城市信息(详见:快递信息推送接口文档)
|
||||
/// </summary>
|
||||
public string resultv2 {get; set;}
|
||||
/// <summary>
|
||||
/// 面单返回类型,默认为空,不返回面单内容。10:设备打印,20:生成图片短链回调。
|
||||
/// </summary>
|
||||
public string returnType {get; set;}
|
||||
/// <summary>
|
||||
/// 设备码,returnType为10时必填
|
||||
/// </summary>
|
||||
public string siid {get; set;}
|
||||
/// <summary>
|
||||
/// 模板编码,通过管理后台的电子面单模板信息获取 ,returnType不为空时必填
|
||||
/// </summary>
|
||||
public string tempid {get; set;}
|
||||
/// <summary>
|
||||
/// 打印状态回调地址,returnType为10时必填
|
||||
/// </summary>
|
||||
public string printCallBackUrl {get; set;}
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.BorderOfficial
|
||||
{
|
||||
public class BOrderOfficialQueryDetailParam {
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.BorderOfficial
|
||||
{
|
||||
public class BOrderOfficialQueryPriceParam {
|
||||
/// <summary>
|
||||
/// 快递公司编码
|
||||
/// </summary>
|
||||
public string kuaidiCom {get; set;}
|
||||
/// <summary>
|
||||
/// 出发地地址,最小颗粒到市级,例如:广东省深圳市
|
||||
/// </summary>
|
||||
public string sendManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 目的地地址,最小颗粒到市级,例如:广东省深圳市
|
||||
/// </summary>
|
||||
public string recManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 重量
|
||||
/// </summary>
|
||||
public string weight {get; set;}
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
public string serviceType {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
26
Infrastructure/Kuaidi100/Common/Request/BaseReq.cs
Normal file
26
Infrastructure/Kuaidi100/Common/Request/BaseReq.cs
Normal file
@ -0,0 +1,26 @@
|
||||
namespace Common.Request
|
||||
{
|
||||
public class BaseReq<T>{
|
||||
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
public string method {get; set;}
|
||||
/// <summary>
|
||||
/// 快递100分配给贵司的的授权key
|
||||
/// </summary>
|
||||
public string key {get; set;}
|
||||
/// <summary>
|
||||
/// 加密签名信息:MD5(param+t+key+secret);加密后字符串转大写
|
||||
/// </summary>
|
||||
public string sign {get; set;}
|
||||
/// <summary>
|
||||
/// 当前请求时间戳
|
||||
/// </summary>
|
||||
public string t {get; set;}
|
||||
/// <summary>
|
||||
/// 其他参数
|
||||
/// </summary>
|
||||
public T param {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderCallBackParam {
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》,选填。
|
||||
/// </summary>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 快递单号,单号的最大长度是32个字符。
|
||||
/// </summary>
|
||||
public string kuaidinum {get; set;}
|
||||
/// <summary>
|
||||
/// 状态码
|
||||
/// </summary>
|
||||
public string status {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 状态描述
|
||||
/// </summary>
|
||||
public string message {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 订单内容
|
||||
/// </summary>
|
||||
public BOrderCallBackParamData data {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderCallBackParamData {
|
||||
/// <summary>
|
||||
/// 平台订单ID
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单状态: 1,‘已接单’, 2,‘收件中’, 3,‘改派’, 7,‘快递员修改订单信息’, 9,‘用户主动取消’, 10,‘已取件’, 15,‘已结算’, 99,‘订单已取消’
|
||||
/// </summary>
|
||||
public string status {get; set;}
|
||||
/// <summary>
|
||||
/// 快递员姓名
|
||||
/// </summary>
|
||||
public string courierName {get; set;}
|
||||
/// <summary>
|
||||
/// 快递员电话
|
||||
/// </summary>
|
||||
public string courierMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 重量
|
||||
/// </summary>
|
||||
public string weight {get; set;}
|
||||
/// <summary>
|
||||
/// 运费
|
||||
/// </summary>
|
||||
public string freight {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderCallBackReq{
|
||||
/// <summary>
|
||||
/// 任务id
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 签名
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string sign {get; set;}
|
||||
/// <summary>
|
||||
/// 参数主体
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public BOrderCallBackParam param {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderCancelParam {
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单ID
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 取消原因,例:暂时不寄件了
|
||||
/// </summary>
|
||||
public string cancelMsg {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderGetCodeParam {
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单ID
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderParam {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》
|
||||
/// </summary>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人姓名
|
||||
/// </summary>
|
||||
public string recManName {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string recManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园
|
||||
/// </summary>
|
||||
public string recManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人姓名
|
||||
/// </summary>
|
||||
public string sendManName {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string sendManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园B10
|
||||
/// </summary>
|
||||
public string sendManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 物品名称,例:文件
|
||||
/// </summary>
|
||||
public string cargo {get; set;}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string weight {get; set;}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt {get; set;}
|
||||
/// <summary>
|
||||
/// callBackUrl订单信息回调
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 快递业务服务类型,例:标准快递,默认为标准快递
|
||||
/// </summary>
|
||||
public string serviceType {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Border
|
||||
{
|
||||
public class BOrderQueryParam {
|
||||
/// <summary>
|
||||
/// 寄件地址
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string sendAddr {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore}).Replace("\r\n","").Replace(" ","");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using Newtonsoft.Json;
|
||||
namespace Common.Request.Bsamecity
|
||||
{
|
||||
public class BsamecityAddfeeParam{
|
||||
/// <summary>
|
||||
/// 下单时返回的orderId
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 下单时返回的taskId
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单小费,单位元
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string tips {get; set;}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string remark {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using Newtonsoft.Json;
|
||||
namespace Common.Request.Bsamecity
|
||||
{
|
||||
public class BsamecityCancelParam{
|
||||
/// <summary>
|
||||
/// 下单时返回的taskId
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单id
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 取消原因类型
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public int cancelMsgType {get; set;}
|
||||
/// <summary>
|
||||
/// 取消原因
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string cancelMsg {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
namespace Common.Request.Bsamecity
|
||||
{
|
||||
public class BsamecityOrderParam{
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 坐标类型(1:百度坐标,2:高德坐标 ,默认2)
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public int lbsType {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人姓名,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManName {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人的手机号(有手机号和固话正则校验)
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在的省,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManProvince {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在的市,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManCity {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在的区,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManDistrict {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在的完整地址,如 科技南十二路2号金蝶软件园B10,长度最大100
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人地址纬度,默认高德坐标,长度最大10
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManLat {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人地址经度,默认高德坐标,长度最大10
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string recManLng {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人姓名,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManName {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人的手机号(有手机号和固话正则校验)
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的省,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManProvince {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的市,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManCity {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的区,长度最大20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManDistrict {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的完整地址,如 科技南十二路2号金蝶软件园B10,长度最大100
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人地址纬度,默认高德坐标,长度最大10
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManLat {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人地址经度,默认高德坐标,长度最大10
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string sendManLng {get; set;}
|
||||
/// <summary>
|
||||
/// 物品总重量KG,例:1.5,单位kg
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string weight {get; set;}
|
||||
/// <summary>
|
||||
/// 备注,例:测试寄件,长度最多255
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string remark {get; set;}
|
||||
/// <summary>
|
||||
/// 体积cm3,长度最多20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string volume {get; set;}
|
||||
/// <summary>
|
||||
/// 0:无需预约 1:预约单送达时间 2:预约单上门时间 默认为0
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public int orderType {get; set;}
|
||||
/// <summary>
|
||||
/// 取货时间,orderType=2时必填,例子:2020-02-02 22:00
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string expectPickupTime {get; set;}
|
||||
/// <summary>
|
||||
/// 期望送达时间,orderType=1时必填(例子:2020-02-02 22:00)
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string expectFinishTime {get; set;}
|
||||
/// <summary>
|
||||
/// 保价物品金额
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string insurance {get; set;}
|
||||
/// <summary>
|
||||
/// 物品总金额,例:100.23
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string price {get; set;}
|
||||
/// <summary>
|
||||
/// 是否为专人直送订单,0为否,1为是
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public int directDelivery {get; set;}
|
||||
/// <summary>
|
||||
/// 商品详情
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public List<Goods> goods {get; set;}
|
||||
/// <summary>
|
||||
/// 下单结果回调地址
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string callbackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串,长度最多20
|
||||
/// <summary>
|
||||
/// <value></value>
|
||||
public string salt {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
26
Infrastructure/Kuaidi100/Common/Request/Bsamecity/Goods.cs
Normal file
26
Infrastructure/Kuaidi100/Common/Request/Bsamecity/Goods.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Bsamecity
|
||||
{
|
||||
public class Goods
|
||||
{
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
public string name;
|
||||
/**
|
||||
* 商品类型,参考物品类型
|
||||
*/
|
||||
public string type;
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
public int count;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class AttachmentParam {
|
||||
/// <summary>
|
||||
/// 贵司内部自定义的订单编号,需要保证唯一性,非必填
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 打印设备,通过打印机输出的设备码进行获取
|
||||
/// </summary>
|
||||
public string siid {get; set;}
|
||||
/// <summary>
|
||||
/// 打印纸的高度
|
||||
/// </summary>
|
||||
public string height {get; set;}
|
||||
/// <summary>
|
||||
/// 打印纸的宽度
|
||||
/// </summary>
|
||||
public string width {get; set;}
|
||||
/// <summary>
|
||||
/// 打印状态回调地址
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt {get; set;}
|
||||
/// <summary>
|
||||
/// 需要打印的份数,默认是一份
|
||||
/// </summary>
|
||||
public string copyNum {get; set;}
|
||||
/// <summary>
|
||||
/// 打印范围,起始页,仅对多页文件支持,默认是打印整个文档
|
||||
/// </summary>
|
||||
public string startPage {get; set;}
|
||||
/// <summary>
|
||||
/// 打印范围,结束页,仅对多页文件支持,默认是打印整个文档
|
||||
/// </summary>
|
||||
public string endPage {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class CommandParam {
|
||||
/// <summary>
|
||||
/// 可识别打印指令,内容需我司硬件指令进行协商确定
|
||||
/// </summary>
|
||||
public string content {get; set;}
|
||||
/// <summary>
|
||||
/// 打印设备,通过打印机输出的设备码进行获取
|
||||
/// </summary>
|
||||
public string siid {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt {get; set;}
|
||||
/// <summary>
|
||||
/// 打印状态回调地址
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
40
Infrastructure/Kuaidi100/Common/Request/Cloud/CustomParam.cs
Normal file
40
Infrastructure/Kuaidi100/Common/Request/Cloud/CustomParam.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class CustomParam {
|
||||
/// <summary>
|
||||
/// 贵司内部自定义的订单编号,需要保证唯一性,非必填
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 通过管理后台的打印摸版配置信息获取
|
||||
/// </summary>
|
||||
public string tempid {get; set;}
|
||||
/// <summary>
|
||||
/// 打印设备,通过打印机输出的设备码进行获取
|
||||
/// </summary>
|
||||
public string siid {get; set;}
|
||||
/// <summary>
|
||||
/// 打印纸的高度
|
||||
/// </summary>
|
||||
public string height {get; set;}
|
||||
/// <summary>
|
||||
/// 打印纸的宽度
|
||||
/// </summary>
|
||||
public string width {get; set;}
|
||||
/// <summary>
|
||||
/// 打印状态回调地址
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class DevStatusParam {
|
||||
/// <summary>
|
||||
/// 设备码
|
||||
/// </summary>
|
||||
public string siid {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
28
Infrastructure/Kuaidi100/Common/Request/Cloud/ImageInfo.cs
Normal file
28
Infrastructure/Kuaidi100/Common/Request/Cloud/ImageInfo.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class ImageInfo {
|
||||
/// <summary>
|
||||
/// BASE_64:base64 图片格式;URL:图片地址;QR_CODE:二维码;CODE_128:code128格式的条形码
|
||||
/// </summary>
|
||||
public string type {get; set;}
|
||||
/// <summary>
|
||||
/// 图片内容
|
||||
/// </summary>
|
||||
public string content {get; set;}
|
||||
/// <summary>
|
||||
/// 图片宽度
|
||||
/// </summary>
|
||||
public string width {get; set;}
|
||||
/// <summary>
|
||||
/// 图片高度
|
||||
/// </summary>
|
||||
public string height {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class ParcelsBillsParam<T> {
|
||||
/// <summary>
|
||||
/// 打印设备,通过打印机输出的设备码进行获取
|
||||
/// </summary>
|
||||
public string siid {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 通过管理后台的打印发货单模板配置信息获取
|
||||
/// </summary>
|
||||
public string tempid {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 设备码
|
||||
/// </summary>
|
||||
public List<T> tb0 {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 设备码
|
||||
/// </summary>
|
||||
public ImageInfo img0 {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 打印状态回调地址,默认仅支持http
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.cloud
|
||||
{
|
||||
public class PrintOldParam {
|
||||
/// <summary>
|
||||
/// 任务id
|
||||
/// </summary>
|
||||
public string taskId {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Corder
|
||||
{
|
||||
public class COrderCancelParam {
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId {get; set;}
|
||||
/// <summary>
|
||||
/// 订单ID
|
||||
/// </summary>
|
||||
public string orderId {get; set;}
|
||||
/// <summary>
|
||||
/// 取消原因,例:暂时不寄件
|
||||
/// </summary>
|
||||
public string cancelMsg {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Corder
|
||||
{
|
||||
public class COrderParam {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》
|
||||
/// </summary>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人姓名
|
||||
/// </summary>
|
||||
public string recManName {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string recManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园
|
||||
/// </summary>
|
||||
public string recManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人姓名
|
||||
/// </summary>
|
||||
public string sendManName {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string sendManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园B10
|
||||
/// </summary>
|
||||
public string sendManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 物品名称,例:文件
|
||||
/// </summary>
|
||||
public string cargo {get; set;}
|
||||
/// <summary>
|
||||
/// 重量
|
||||
/// </summary>
|
||||
public string weight {get; set;}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark {get; set;}
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt {get; set;}
|
||||
/// <summary>
|
||||
/// callBackUrl订单信息回调
|
||||
/// </summary>
|
||||
public string callBackUrl {get; set;}
|
||||
/// <summary>
|
||||
/// 预约日期,例如:今天/明天/后天
|
||||
/// </summary>
|
||||
public string dayType {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 预约起始时间,24小时制(HH:mm),例如:09:00
|
||||
/// </summary>
|
||||
public string pickupStartTime {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 预约截止时间,24小时制(HH:mm),例如:10:00
|
||||
/// </summary>
|
||||
public string pickupEndTime {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 是否开启订阅功能 0:不开启(默认) 1:开启 说明开启订阅功能时:pollCallBackUrl必须填入 此功能只针对有快递单号的单
|
||||
/// </summary>
|
||||
public string op {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
|
||||
/// </summary>
|
||||
public string pollCallBackUrl {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 添加此字段表示开通行政区域解析功能 。
|
||||
/// 0:关闭(默认)
|
||||
/// 1:开通行政区域解析功能以及物流轨迹增加物流状态名称
|
||||
/// 4:开通行政解析功能以及物流轨迹增加物流高级状态名称、状态值并且返回出发、目的及当前城市信息(详见:快递信息推送接口文档)
|
||||
/// </summary>
|
||||
public string resultv2 {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Corder
|
||||
{
|
||||
public class COrderQueryPriceParam {
|
||||
/// <summary>
|
||||
/// 快递公司编码
|
||||
/// </summary>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 出发地地址,最小颗粒到市级,例如:广东省深圳市
|
||||
/// </summary>
|
||||
public string sendManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 目的地地址,最小颗粒到市级,例如:广东省深圳市
|
||||
/// </summary>
|
||||
public string recManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 重量
|
||||
/// </summary>
|
||||
public string weight {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Electronic
|
||||
{
|
||||
public class CancelPrint
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 电子面单客户账户或月结账号,需贵司向当地快递公司网点申请
|
||||
/// </summary>
|
||||
public string partnerId { get; set; }
|
||||
/// <summary>
|
||||
/// 电子面单密码,需贵司向当地快递公司网点申请
|
||||
/// </summary>
|
||||
public string partnerKey { get; set; }
|
||||
/// <summary>
|
||||
/// 电子面单密钥,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典
|
||||
/// </summary>
|
||||
public string partnerSecret { get; set; }
|
||||
/// <summary>
|
||||
/// 电子面单客户账户名称,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典
|
||||
/// </summary>
|
||||
public string partnerName { get; set; }
|
||||
/// <summary>
|
||||
/// 收件网点名称,由快递公司当地网点分配, 若使用淘宝授权填入(taobao),使用菜鸟授权填入(cainiao)
|
||||
/// </summary>
|
||||
public string net { get; set; }
|
||||
/// <summary>
|
||||
/// 电子面单承载编号,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典
|
||||
/// </summary>
|
||||
public string code { get; set; }
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母
|
||||
/// </summary>
|
||||
public string kuaidicom { get; set; }
|
||||
/// <summary>
|
||||
/// 快递公司订单号(对应下单时返回的kdComOrderNum,如果没有可以不传,否则必传)
|
||||
/// </summary>
|
||||
public string orderId { get; set; }
|
||||
/// <summary>
|
||||
/// 快递单号
|
||||
/// </summary>
|
||||
public string kuaidinum { get; set; }
|
||||
/// <summary>
|
||||
/// 取消原因
|
||||
/// </summary>
|
||||
public string reason { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Electronic.Html
|
||||
{
|
||||
public class PrintHtmlParam
|
||||
{
|
||||
/**
|
||||
* 电子面单客户账户或月结账号,需贵司向当地快递公司网点申请
|
||||
*/
|
||||
public string partnerId {get; set;}
|
||||
/**
|
||||
* 电子面单密码,需贵司向当地快递公司网点申请
|
||||
*/
|
||||
public string partnerKey {get; set;}
|
||||
/**
|
||||
* 收件网点名称,由快递公司当地网点分配,
|
||||
* 若使用淘宝授权填入(taobao),使用菜鸟授权填入(cainiao)
|
||||
*/
|
||||
public string net {get; set;}
|
||||
/**
|
||||
* 快递公司的编码,一律用小写字母
|
||||
*/
|
||||
public string kuaidicom {get; set;}
|
||||
/**
|
||||
* 收件人信息
|
||||
*/
|
||||
public ManInfo recMan {get; set;}
|
||||
/**
|
||||
* 收件人信息
|
||||
*/
|
||||
public ManInfo sendMan {get; set;}
|
||||
/**
|
||||
* 物品名称(部分快递公司必填)
|
||||
*/
|
||||
public string cargo {get; set;}
|
||||
/**
|
||||
* 物品总数量。
|
||||
* 另外该属性与子单有关,如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号),
|
||||
* needChild = 1、count 需要大于1,如count = 2 则一个主单 一个子单,
|
||||
* count = 3则一个主单 二个子单;返回的子单号码见返回结果的childNum字段
|
||||
*/
|
||||
public string count {get; set;}
|
||||
/**
|
||||
* 物品总重量,单位:KG (例子:0.5)
|
||||
*/
|
||||
public string weight {get; set;}
|
||||
/**
|
||||
* 支付方式:
|
||||
* SHIPPER:寄方付(默认)
|
||||
* CONSIGNEE:到付
|
||||
* MONTHLY:月结
|
||||
* THIRDPARTY:第三方支付
|
||||
*/
|
||||
public string payType {get; set;}
|
||||
/**
|
||||
* 快递类型:
|
||||
* 标准快递(默认)
|
||||
* 顺丰特惠
|
||||
* EMS经济
|
||||
*/
|
||||
public string expType {get; set;}
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
public string remark {get; set;}
|
||||
/**
|
||||
* 保价额度
|
||||
*/
|
||||
public string valinsPay {get; set;}
|
||||
/**
|
||||
* 代收货款额度
|
||||
*/
|
||||
public string collection {get; set;}
|
||||
/**
|
||||
* 是否需要子单(支持子单的快递公司才可以用,是否支持可以参考参数字典)
|
||||
* 1:需要
|
||||
* 0:不需要(默认)
|
||||
* 如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号);
|
||||
* needChild = 1、count 需要大于1,如count = 2 一个主单 一个子单,
|
||||
* count = 3 一个主单 二个子单,返回的子单号码见返回结果的childNum字段
|
||||
*/
|
||||
public string needChild {get; set;}
|
||||
/**
|
||||
* 是否需要回单(支持回单的快递公司才可以用,是否支持可以参考参数字典)
|
||||
* 1:需要
|
||||
* 0:不需要(默认)
|
||||
* 返回的回单号见返回结果的returnNum字段
|
||||
*/
|
||||
public string needBack {get; set;}
|
||||
/**
|
||||
* 贵司内部自定义的订单编号,需要保证唯一性
|
||||
*/
|
||||
public string orderId {get; set;}
|
||||
/**
|
||||
* 是否返回面单
|
||||
* 0:不需要(默认)
|
||||
* 1:需要
|
||||
* 如果需要,则返回要打印的模版的HTML代码,贵司可以直接将之显示到IE等浏览器,然后通过浏览器进行打印
|
||||
*/
|
||||
public string needTemplate {get; set;}
|
||||
/**
|
||||
* 签名用随机字符串
|
||||
*/
|
||||
public string salt {get; set;}
|
||||
/**
|
||||
* 是否开启订阅功能:
|
||||
* 0:不开启(默认)
|
||||
* 1:开启
|
||||
* 说明开启订阅功能时:pollCallBackUrl必须填入
|
||||
* 此功能只针对有快递单号的单
|
||||
*/
|
||||
public string op {get; set;}
|
||||
/**
|
||||
* 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
|
||||
*/
|
||||
public string pollCallBackUrl {get; set;}
|
||||
/**
|
||||
* 添加此字段表示开通行政区域解析功能:0:关闭(默认);1:开通行政区域解析功能
|
||||
*/
|
||||
public string resultv2 {get; set;}
|
||||
/**
|
||||
* 该字段为申通专用,其他公司勿传;申通的需要传 44
|
||||
*/
|
||||
public string code {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
namespace Common.Request.Electronic.Html
|
||||
{
|
||||
public class PrintHtmlReq
|
||||
{
|
||||
/**
|
||||
* 业务类型(默认:getPrintImg)
|
||||
*/
|
||||
public string method {get; set;}
|
||||
/**
|
||||
* 快递100分配给贵司的的授权key
|
||||
*/
|
||||
public string key {get; set;}
|
||||
/**
|
||||
* 加密签名信息:MD5(param+t+key+secret);加密后字符串转大写
|
||||
*/
|
||||
public string sign {get; set;}
|
||||
/**
|
||||
* 当前请求时间戳
|
||||
*/
|
||||
public string t {get; set;}
|
||||
/**
|
||||
* 其他参数组合成的json对象
|
||||
*/
|
||||
public PrintHtmlParam param {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Electronic.Image
|
||||
{
|
||||
public class PrintImgParam {
|
||||
/**
|
||||
* 业务类型,默认为10
|
||||
*/
|
||||
public string type {get; set;}
|
||||
/**
|
||||
* 电子面单客户账户或月结账号,需贵司向当地快递公司网点申请
|
||||
*/
|
||||
public string partnerId {get; set;}
|
||||
/**
|
||||
* 电子面单密码,需贵司向当地快递公司网点申请
|
||||
*/
|
||||
public string partnerKey {get; set;}
|
||||
/**
|
||||
* 收件网点名称,由快递公司当地网点分配,
|
||||
* 若使用淘宝授权填入(taobao),使用菜鸟授权填入(cainiao)
|
||||
*/
|
||||
public string net {get; set;}
|
||||
/**
|
||||
* 快递公司的编码,一律用小写字母
|
||||
*/
|
||||
public string kuaidicom {get; set;}
|
||||
/**
|
||||
* 收件人姓名
|
||||
*/
|
||||
public string recManName {get; set;}
|
||||
/**
|
||||
* 收件人的手机号
|
||||
*/
|
||||
public string recManMobile {get; set;}
|
||||
/**
|
||||
* 收件人所在完整地址
|
||||
*/
|
||||
public string recManPrintAddr {get; set;}
|
||||
/**
|
||||
* 寄件人姓名
|
||||
*/
|
||||
public string sendManName {get; set;}
|
||||
/**
|
||||
* 寄件人的手机号
|
||||
*/
|
||||
public string sendManMobile {get; set;}
|
||||
/**
|
||||
* 寄件人所在的完整地址
|
||||
*/
|
||||
public string sendManPrintAddr {get; set;}
|
||||
/**
|
||||
* 打印电子面单模板编码(登录快递100管理后台查看)
|
||||
*/
|
||||
public string tempid {get; set;}
|
||||
/**
|
||||
* 物品名称(部分快递公司必填)
|
||||
*/
|
||||
public string cargo {get; set;}
|
||||
/**
|
||||
* 物品总数量。
|
||||
* 另外该属性与子单有关,如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号),
|
||||
* needChild = 1、count 需要大于1,如count = 2 则一个主单 一个子单,
|
||||
* count = 3则一个主单 二个子单;返回的子单号码见返回结果的childNum字段
|
||||
*/
|
||||
public string count {get; set;}
|
||||
/**
|
||||
* 物品总重量,单位:KG (例子:0.5)
|
||||
*/
|
||||
public string weight {get; set;}
|
||||
/**
|
||||
* 支付方式:
|
||||
* SHIPPER:寄方付(默认)
|
||||
* CONSIGNEE:到付
|
||||
* MONTHLY:月结
|
||||
* THIRDPARTY:第三方支付
|
||||
*/
|
||||
public string payType {get; set;}
|
||||
/**
|
||||
* 快递类型:
|
||||
* 标准快递(默认)
|
||||
* 顺丰特惠
|
||||
* EMS经济
|
||||
*/
|
||||
public string expType {get; set;}
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
public string remark {get; set;}
|
||||
/**
|
||||
* 保价额度
|
||||
*/
|
||||
public string valinsPay {get; set;}
|
||||
/**
|
||||
* 代收货款额度
|
||||
*/
|
||||
public string collection {get; set;}
|
||||
/**
|
||||
* 是否需要子单(支持子单的快递公司才可以用,是否支持可以参考参数字典)
|
||||
* 1:需要
|
||||
* 0:不需要(默认)
|
||||
* 如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号);
|
||||
* needChild = 1、count 需要大于1,如count = 2 一个主单 一个子单,
|
||||
* count = 3 一个主单 二个子单,返回的子单号码见返回结果的childNum字段
|
||||
*/
|
||||
public string needChild {get; set;}
|
||||
/**
|
||||
* 是否需要回单(支持回单的快递公司才可以用,是否支持可以参考参数字典)
|
||||
* 1:需要
|
||||
* 0:不需要(默认)
|
||||
* 返回的回单号见返回结果的returnNum字段
|
||||
*/
|
||||
public string needBack {get; set;}
|
||||
/**
|
||||
* 贵司内部自定义的订单编号,需要保证唯一性
|
||||
*/
|
||||
public string orderId {get; set;}
|
||||
/**
|
||||
* 生成图片的高,以mm为单位(默认100)
|
||||
*/
|
||||
public string height {get; set;}
|
||||
/**
|
||||
* 生成图片的宽,以mm为单位(默认180)
|
||||
*/
|
||||
public string width {get; set;}
|
||||
/**
|
||||
* 签名用随机字符串
|
||||
*/
|
||||
public string salt {get; set;}
|
||||
/**
|
||||
* 是否开启订阅功能:
|
||||
* 0:不开启(默认)
|
||||
* 1:开启
|
||||
* 说明开启订阅功能时:pollCallBackUrl必须填入
|
||||
* 此功能只针对有快递单号的单
|
||||
*/
|
||||
public string op {get; set;}
|
||||
/**
|
||||
* 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
|
||||
*/
|
||||
public string pollCallBackUrl {get; set;}
|
||||
/**
|
||||
* 添加此字段表示开通行政区域解析功能:0:关闭(默认);1:开通行政区域解析功能
|
||||
*/
|
||||
public string resultv2 {get; set;}
|
||||
/**
|
||||
* 该字段为申通专用,其他公司勿传;申通的需要传 44
|
||||
*/
|
||||
public string code {get; set;}
|
||||
/**
|
||||
* 打印时间
|
||||
*/
|
||||
public string printTime {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
namespace Common.Request.Electronic.Image
|
||||
{
|
||||
public class PrintImgReq {
|
||||
/**
|
||||
* 业务类型(默认:getPrintImg)
|
||||
*/
|
||||
public string method {get; set;}
|
||||
/**
|
||||
* 快递100分配给贵司的的授权key
|
||||
*/
|
||||
public string key {get; set;}
|
||||
/**
|
||||
* 加密签名信息:MD5(param+t+key+secret);加密后字符串转大写
|
||||
*/
|
||||
public string sign {get; set;}
|
||||
/**
|
||||
* 当前请求时间戳
|
||||
*/
|
||||
public string t {get; set;}
|
||||
/**
|
||||
* 其他参数组合成的json对象
|
||||
*/
|
||||
public PrintImgParam param {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Electronic
|
||||
{
|
||||
public class ManInfo
|
||||
{
|
||||
/**
|
||||
* 收件人姓名 (必填)
|
||||
*/
|
||||
public string name {get; set;}
|
||||
/**
|
||||
* 收件人的手机号,手机号和电话号二者其一必填 (必填)
|
||||
*/
|
||||
public string mobile {get; set;}
|
||||
/**
|
||||
* 收件人所在完整地址 (必填)
|
||||
*/
|
||||
public string printAddr {get; set;}
|
||||
/**
|
||||
* 收件人所在公司名称(可选)
|
||||
*/
|
||||
public string company {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Electronic.Print
|
||||
{
|
||||
public class PrintCloudParam
|
||||
{
|
||||
/**
|
||||
* 业务类型,默认为10
|
||||
*/
|
||||
public string type {get; set;}
|
||||
/**
|
||||
* 电子面单客户账户或月结账号,需贵司向当地快递公司网点申请
|
||||
*/
|
||||
public string partnerId {get; set;}
|
||||
/**
|
||||
* 电子面单密码,需贵司向当地快递公司网点申请
|
||||
*/
|
||||
public string partnerKey {get; set;}
|
||||
/**
|
||||
* 收件网点名称,由快递公司当地网点分配,
|
||||
* 若使用淘宝授权填入(taobao),使用菜鸟授权填入(cainiao)
|
||||
*/
|
||||
public string net {get; set;}
|
||||
/**
|
||||
* 快递公司的编码,一律用小写字母
|
||||
*/
|
||||
public string kuaidicom {get; set;}
|
||||
/**
|
||||
* 收件人信息
|
||||
*/
|
||||
public ManInfo recMan {get; set;}
|
||||
/**
|
||||
* 收件人信息
|
||||
*/
|
||||
public ManInfo sendMan {get; set;}
|
||||
/**
|
||||
* 物品名称(部分快递公司必填)
|
||||
*/
|
||||
public string cargo {get; set;}
|
||||
/**
|
||||
* 物品总数量。
|
||||
* 另外该属性与子单有关,如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号),
|
||||
* needChild = 1、count 需要大于1,如count = 2 则一个主单 一个子单,
|
||||
* count = 3则一个主单 二个子单;返回的子单号码见返回结果的childNum字段
|
||||
*/
|
||||
public string count {get; set;}
|
||||
/**
|
||||
* 物品总重量,单位:KG (例子:0.5)
|
||||
*/
|
||||
public string weight {get; set;}
|
||||
/**
|
||||
* 支付方式:
|
||||
* SHIPPER:寄方付(默认)
|
||||
* CONSIGNEE:到付
|
||||
* MONTHLY:月结
|
||||
* THIRDPARTY:第三方支付
|
||||
*/
|
||||
public string payType {get; set;}
|
||||
/**
|
||||
* 快递类型:
|
||||
* 标准快递(默认)
|
||||
* 顺丰特惠
|
||||
* EMS经济
|
||||
*/
|
||||
public string expType {get; set;}
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
public string remark {get; set;}
|
||||
/**
|
||||
* 电子面单模板编码
|
||||
*/
|
||||
public string tempid {get; set;}
|
||||
/**
|
||||
* 打印设备编码。通过打印机输出的设备码进行获取
|
||||
*/
|
||||
public string siid {get; set;}
|
||||
/**
|
||||
* 保价额度
|
||||
*/
|
||||
public string valinsPay {get; set;}
|
||||
/**
|
||||
* 代收货款额度
|
||||
*/
|
||||
public string collection {get; set;}
|
||||
/**
|
||||
* 是否需要子单(支持子单的快递公司才可以用,是否支持可以参考参数字典)
|
||||
* 1:需要
|
||||
* 0:不需要(默认)
|
||||
* 如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号);
|
||||
* needChild = 1、count 需要大于1,如count = 2 一个主单 一个子单,
|
||||
* count = 3 一个主单 二个子单,返回的子单号码见返回结果的childNum字段
|
||||
*/
|
||||
public string needChild {get; set;}
|
||||
/**
|
||||
* 是否需要回单(支持回单的快递公司才可以用,是否支持可以参考参数字典)
|
||||
* 1:需要
|
||||
* 0:不需要(默认)
|
||||
* 返回的回单号见返回结果的returnNum字段
|
||||
*/
|
||||
public string needBack {get; set;}
|
||||
/**
|
||||
* 贵司内部自定义的订单编号,需要保证唯一性
|
||||
*/
|
||||
public string orderId {get; set;}
|
||||
/**
|
||||
* 生成图片的高,以mm为单位(默认100)
|
||||
*/
|
||||
public string height {get; set;}
|
||||
/**
|
||||
* 生成图片的宽,以mm为单位(默认180)
|
||||
*/
|
||||
public string width {get; set;}
|
||||
/**
|
||||
* 签名用随机字符串
|
||||
*/
|
||||
public string salt {get; set;}
|
||||
/**
|
||||
* 是否开启订阅功能:
|
||||
* 0:不开启(默认)
|
||||
* 1:开启
|
||||
* 说明开启订阅功能时:pollCallBackUrl必须填入
|
||||
* 此功能只针对有快递单号的单
|
||||
*/
|
||||
public string op {get; set;}
|
||||
/**
|
||||
* 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
|
||||
*/
|
||||
public string pollCallBackUrl {get; set;}
|
||||
/**
|
||||
* 添加此字段表示开通行政区域解析功能:0:关闭(默认);1:开通行政区域解析功能
|
||||
*/
|
||||
public string resultv2 {get; set;}
|
||||
/**
|
||||
* 该字段为申通专用,其他公司勿传;申通的需要传 44
|
||||
*/
|
||||
public string code {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
namespace Common.Request.Electronic.Print
|
||||
{
|
||||
public class PrintCloudReq
|
||||
{
|
||||
/**
|
||||
* 业务类型(默认:getPrintImg)
|
||||
*/
|
||||
public string method {get; set;}
|
||||
/**
|
||||
* 快递100分配给贵司的的授权key
|
||||
*/
|
||||
public string key {get; set;}
|
||||
/**
|
||||
* 加密签名信息:MD5(param+t+key+secret);加密后字符串转大写
|
||||
*/
|
||||
public string sign {get; set;}
|
||||
/**
|
||||
* 当前请求时间戳
|
||||
*/
|
||||
public string t {get; set;}
|
||||
/**
|
||||
* 其他参数组合成的json对象
|
||||
*/
|
||||
public PrintCloudParam param {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Electronic.ocr
|
||||
{
|
||||
public class OcrParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 图像数据,base64编码,要求base64编码后大小不超过4M,支持jpg/jpeg/png/bmp格式
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string image {get; set;}
|
||||
/// <summary>
|
||||
/// 是否兼容图像倾斜,true:是;false:否,默认不检测,即:false
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public bool enableTilt {get; set;}
|
||||
/// <summary>
|
||||
/// 图片URL。image、imageUrl、pdfUrl三者必填其一,优先顺序:image>imageUrl>pdfUrl,最大长度不超过1024b,下载超时默认为2s
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string imageUrl {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// 需要检测识别的面单元素。取值范围:barcode,qrcode,receiver,sender,bulkpen。不传或者 null 则默认为 ["barcode", "receiver", "sender"]
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string[] include {get; set;}
|
||||
/// <summary>
|
||||
/// PDF文件URL。image、imageUrl、pdfUrl三者必填其一,优先顺序:image>imageUrl>pdfUrl,最大长度不超过1024b,下载超时默认为2s
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string pdfUrl {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Common.Request.Label
|
||||
{
|
||||
public class CustomPrintParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 自定义参数,优先级高于系统生成值,即出现相同key时,使用该参数的value
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public Dictionary<string, object> customParam;
|
||||
/// <summary>
|
||||
/// 打印方向(默认0) 0-正方向 1-反方向
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string direction;
|
||||
/// <summary>
|
||||
/// 打印设备,通过打印机输出的设备码进行获取
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string siid;
|
||||
/// <summary>
|
||||
/// 打印状态回调地址
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string callBackUrl;
|
||||
/// <summary>
|
||||
/// 快递100模板url
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string tempId;
|
||||
/// <summary>
|
||||
/// 打印类型(HTML,IMAGE,CMD,CLOUD,NON)
|
||||
/// NON:只下单不打印(默认)
|
||||
/// HTML:生成html短链
|
||||
/// IMAGE:生成图片短链
|
||||
/// CMD:生成打印指令
|
||||
/// CLOUD:使用快递100云打印机打印,使用CLOUD时siid必填
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string printType;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// 快递预估时效查询接口请求参数
|
||||
/// </summary>
|
||||
namespace Common.Request.Label
|
||||
{
|
||||
public class DeliveryTimeParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 快递公司编码
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string kuaidicom;
|
||||
/// <summary>
|
||||
/// 出发地(地址需包含3级及以上),例如:广东深圳南山区
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string from;
|
||||
/// <summary>
|
||||
/// 目的地(地址需包含3级及以上),例如:北京海淀区
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string to;
|
||||
/// <summary>
|
||||
/// 下单时间,格式要求yyyy-MM-dd HH:mm:ss, 例如:2023-08-08 08:08:08
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string orderTime;
|
||||
/// <summary>
|
||||
/// 产品类型
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string expType;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
}
|
375
Infrastructure/Kuaidi100/Common/Request/Label/OrderParam.cs
Normal file
375
Infrastructure/Kuaidi100/Common/Request/Label/OrderParam.cs
Normal file
@ -0,0 +1,375 @@
|
||||
using Common.Request.Electronic;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Common.Request.Label
|
||||
{
|
||||
public class OrderParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 收件人信息
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ManInfo recMan;
|
||||
/// <summary>
|
||||
/// 寄件人信息
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ManInfo sendMan;
|
||||
/// <summary>
|
||||
/// 快递公司编码
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string kuaidicom;
|
||||
/// <summary>
|
||||
/// 快递公司单号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string kuaidinum;
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string orderId;
|
||||
/// <summary>
|
||||
/// SHIPPER:寄方付 CONSIGNEE:到付 MONTHLY:月结 THIRDPARTY:第三方支付
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string payType = "MONTHLY";
|
||||
/// <summary>
|
||||
/// 快递类型: 标准快递 顺丰特惠 电商特惠 EMS经济
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string expType;
|
||||
/// <summary>
|
||||
/// 重量
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public double weight;
|
||||
/// <summary>
|
||||
/// 体积(长 /// 宽 /// 高)
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string volume;
|
||||
/// <summary>
|
||||
/// 物品总数量
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int count = 1;
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string remark;
|
||||
/// <summary>
|
||||
/// 保价额度
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public double valinsPay;
|
||||
/// <summary>
|
||||
/// 代收货款
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public double collection;
|
||||
/// <summary>
|
||||
/// 物品名称,例:文件
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string cargo;
|
||||
/// <summary>
|
||||
/// 是否需要子单: 1:需要 0:不需要(默认) 如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号); needChild = 1、count 需要大于1,如count = 2 一个主单 一个子单,count = 3 一个主单 二个子单,返回的子单号码见返回结果的childNum字段
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string needChild;
|
||||
/// <summary>
|
||||
/// 是否需要回单: 1:需要 0:不需要(默认) 返回的回单号见返回结果的returnNum字段
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string needBack;
|
||||
/// <summary>
|
||||
/// 电子面单客户账户或月结账号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string partnerId;
|
||||
/// <summary>
|
||||
/// 电子面单密码
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string partnerKey;
|
||||
/// <summary>
|
||||
/// 电子面单密钥
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string net;
|
||||
/// <summary>
|
||||
/// 电子面单承载编号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string code;
|
||||
/// <summary>
|
||||
/// 电子面单客户账户名称
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string partnerName;
|
||||
/// <summary>
|
||||
/// 电子面单承载快递员名
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string checkMan;
|
||||
/// <summary>
|
||||
/// 电子面单密钥,需贵司向当地快递公司网点申请
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string partnerSecret;
|
||||
/// <summary>
|
||||
/// 在使用菜鸟/淘宝/拼多多授权电子面单时,若月结账号下存在多个网点,则tbNet="网点名称,网点编号" ,注意此处为英文逗号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string tbNet;
|
||||
/// <summary>
|
||||
/// 邮费
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public double freight;
|
||||
/// <summary>
|
||||
/// 京东增值服务用
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string expressExtra;
|
||||
/// <summary>
|
||||
/// 增值服务 {"backnum":{"value":"无需返单"}}
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string addService;
|
||||
/// <summary>
|
||||
/// 订单类型;京东订单-JINGDONG;淘宝订单-TAOBAOSENT
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string recordType;
|
||||
/// <summary>
|
||||
/// 预约取件开始时间
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public long startGotTime;
|
||||
/// <summary>
|
||||
/// 预约取件结束时间
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public long endGotTime;
|
||||
/// <summary>
|
||||
/// 代收账户
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string colAcctNumber;
|
||||
/// <summary>
|
||||
/// 代收账户名
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string colAcctName;
|
||||
/// <summary>
|
||||
/// 顺丰电子验收
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
// public int elecValidateType ;
|
||||
/// <summary>
|
||||
/// 顺丰电子验收图片熟悉数量
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
// public int elecPicCount;
|
||||
/// <summary>
|
||||
/// 顺丰手持设备扫描设置
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int scanSupport ;
|
||||
/// <summary>
|
||||
/// 文件url
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string fileUrl;
|
||||
/// <summary>
|
||||
/// 取件方式
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string pickMethod;
|
||||
/// <summary>
|
||||
/// 是否外发,1-外发,0不外发
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int isOut = 0;
|
||||
/// <summary>
|
||||
/// 是否合伙人自提:1-是,0-否
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int isPickupSelf = 0;
|
||||
/// <summary>
|
||||
/// 是否接受仅镇中心派送:1-是,0-否
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int isCenterDelivery = 0;
|
||||
/// <summary>
|
||||
/// 第三方平台订单号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string thirdOrderId;
|
||||
/// <summary>
|
||||
/// 开放地址ID 淘宝订单收件人ID (Open Addressee ID),长度不超过128个字符,淘宝订单加密情况用于解密。
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string oaid;
|
||||
/// <summary>
|
||||
/// 菜鸟地址ID,针对电商平台加密订单场景使用,淘系订单使用oaid,非淘使用caid。
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string caid;
|
||||
|
||||
/// <summary>
|
||||
/// normal-常规的字母单,multi-一票多件
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string childNumType = "normal";
|
||||
/// <summary>
|
||||
/// 回单数量
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int backSign;
|
||||
/// <summary>
|
||||
/// 第三方平台模板url
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string thirdTemplateURL;
|
||||
/// <summary>
|
||||
/// 京东快运站点揽收字段
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int siteCollect;
|
||||
/// <summary>
|
||||
/// 京东快运站点派送字段
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int siteDelivery;
|
||||
/// <summary>
|
||||
/// 回单号
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string returnNum;
|
||||
/// <summary>
|
||||
/// 车辆类型名称(京东快运整车需要)
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string vehicleTypeName;
|
||||
/// <summary>
|
||||
/// 车辆类型编码(京东快运整车需要)
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string vehicleTypeNo;
|
||||
/// <summary>
|
||||
/// 整车单号(京东快运整车需要)
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string vehicleOrderNo;
|
||||
/// <summary>
|
||||
/// 自定义参数,优先级高于系统生成值,即出现相同key时,使用该参数的value
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public Dictionary<string, object> customParam;
|
||||
/// <summary>
|
||||
/// 打印方向(默认0) 0-正方向 1-反方向
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string direction;
|
||||
/// <summary>
|
||||
/// 打印设备,通过打印机输出的设备码进行获取
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string siid;
|
||||
/// <summary>
|
||||
/// 打印状态回调地址
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string callBackUrl;
|
||||
/// <summary>
|
||||
/// 签名用随机字符串,用于验证签名sign。salt值不为null时,推送数据将包含该加密签名,加密方式:md5(param+salt)。注意: salt值为空串时,推送的数据也会包含sign,此时可忽略sign的校验。
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string salt;
|
||||
/// <summary>
|
||||
/// 是否开启订阅功能 false:不开启(默认) true:开启 说明开启订阅功能时:pollCallBackUrl必须填入 此功能只针对有快递单号的单
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public bool needSubscribe;
|
||||
/// <summary>
|
||||
/// 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string pollCallBackUrl;
|
||||
/// <summary>
|
||||
/// 添加此字段表示开通行政区域解析或地图轨迹功能 。
|
||||
/// 0:关闭(默认)
|
||||
/// 1:开通行政区域解析功能
|
||||
/// 3:开通地图轨迹及时效返回
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string resultv2;
|
||||
/// <summary>
|
||||
/// 快递100模板url
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string tempId;
|
||||
/// <summary>
|
||||
/// 快递100子单模板url()
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string childTempId;
|
||||
/// <summary>
|
||||
/// 快递100回单模板url
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string backTempId;
|
||||
/// <summary>
|
||||
/// 是否脱敏 false:关闭(默认)true:开启
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public bool needDesensitization;
|
||||
/// <summary>
|
||||
/// 是否需要logo false:关闭(默认)true:开启
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public bool needLogo;
|
||||
/// <summary>
|
||||
/// 打印类型(HTML,IMAGE,CMD,CLOUD,NON)
|
||||
/// NON:只下单不打印(默认)
|
||||
/// HTML:生成html短链
|
||||
/// IMAGE:生成图片短链
|
||||
/// CMD:生成打印指令
|
||||
/// CLOUD:使用快递100云打印机打印,使用CLOUD时siid必填
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string printType;
|
||||
|
||||
/// <summary>
|
||||
/// 第三方平台订单是否需要ocr,开启后将会通过推送方式推送 false:关闭(默认)true:开启
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public bool needOcr;
|
||||
|
||||
/// <summary>
|
||||
/// 需要检测识别的面单元素。取值范围:barcode,qrcode,receiver,sender,bulkpen。不传或者 null 则默认为 ["barcode", "receiver", "sender"]
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string[] ocrInclude;
|
||||
|
||||
public string height;
|
||||
|
||||
public string width;
|
||||
/// <summary>
|
||||
/// 第三方平台自定义区域模板地址
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string thirdCustomTemplateUrl;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Label
|
||||
{
|
||||
public class RepeatPrintParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务ID,对应下单时返回的taskId
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string taskId;
|
||||
/// <summary>
|
||||
/// 快递100打印机,不填默认为下单时填入的siid
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string siid;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
}
|
47
Infrastructure/Kuaidi100/Common/Request/QueryTrackParam.cs
Normal file
47
Infrastructure/Kuaidi100/Common/Request/QueryTrackParam.cs
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request
|
||||
{
|
||||
public class QueryTrackParam
|
||||
{
|
||||
/**
|
||||
* 查询的快递公司的编码,一律用小写字母
|
||||
*/
|
||||
public string com {get; set;}
|
||||
/**
|
||||
* 查询的快递单号, 单号的最大长度是32个字符
|
||||
*/
|
||||
public string num {get; set;}
|
||||
/**
|
||||
* 收件人或寄件人的手机号或固话
|
||||
*/
|
||||
public string phone {get; set;}
|
||||
/**
|
||||
* 出发地城市,省-市-区
|
||||
*/
|
||||
public string from {get; set;}
|
||||
/**
|
||||
* 目的地城市,省-市-区
|
||||
*/
|
||||
public string to {get; set;}
|
||||
/**
|
||||
* 添加此字段表示开通行政区域解析功能。0:关闭(默认),1:开通行政区域解析功能,2:开通行政解析功能并且返回出发、目的及当前城市信息
|
||||
*/
|
||||
public string resultv2 {get; set;}
|
||||
/**
|
||||
* 返回数据格式。0:json(默认),1:xml,2:html,3:text
|
||||
*/
|
||||
public string show {get; set;}
|
||||
/**
|
||||
* 返回结果排序方式。desc:降序(默认),asc:升序
|
||||
*/
|
||||
public string order {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
19
Infrastructure/Kuaidi100/Common/Request/QueryTrackReq.cs
Normal file
19
Infrastructure/Kuaidi100/Common/Request/QueryTrackReq.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System ;
|
||||
namespace Common.Request
|
||||
{
|
||||
public class QueryTrackReq
|
||||
{
|
||||
/**
|
||||
* 我方分配给贵司的的公司编号, 点击查看账号信息
|
||||
*/
|
||||
public string customer {get; set;}
|
||||
/**
|
||||
* 签名, 用于验证身份, 按param + key + customer 的顺序进行MD5加密(注意加密后字符串要转大写), 不需要“+”号
|
||||
*/
|
||||
public string sign {get; set;}
|
||||
/**
|
||||
* 其他参数组合成的json对象
|
||||
*/
|
||||
public QueryTrackParam param {get; set;}
|
||||
}
|
||||
}
|
39
Infrastructure/Kuaidi100/Common/Request/Sms/SendSmsReq.cs
Normal file
39
Infrastructure/Kuaidi100/Common/Request/Sms/SendSmsReq.cs
Normal file
@ -0,0 +1,39 @@
|
||||
namespace Common.Request.Sms
|
||||
{
|
||||
public class SendSmsReq
|
||||
{
|
||||
/**
|
||||
* 加密签名信息:MD5(key + userid);加密后字符串转大写
|
||||
*/
|
||||
public string sign {get; set;}
|
||||
/**
|
||||
* 我方分配给贵司的的短信接口用户ID,点击查看账号信息
|
||||
*/
|
||||
public string userid {get; set;}
|
||||
/**
|
||||
* 商户名称签名;最好用简称,该字段信息会在短信标签处显示。不要超过5个字符
|
||||
*/
|
||||
public string seller {get; set;}
|
||||
/**
|
||||
* 接收短信手机号
|
||||
*/
|
||||
public string phone {get; set;}
|
||||
/**
|
||||
* 短信模板ID
|
||||
*/
|
||||
public string tid {get; set;}
|
||||
/**
|
||||
* 短信模板替换内容
|
||||
*/
|
||||
public string content {get; set;}
|
||||
/**
|
||||
* 外部订单号:当该短信发送模板有回调地址时,外部订单号会返回给调用者,方便用户更新数据
|
||||
*/
|
||||
public string outorder {get; set;}
|
||||
/**
|
||||
* 回调地址:如果客户在发送短信时填写该参数,将按照这个参数回调短信发送状态;
|
||||
* 如果为空,将按照模板配置的地址回调短信发送状态;如果两个参数都不填写,将不会回调通知状态
|
||||
*/
|
||||
public string callback {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Subscribe
|
||||
{
|
||||
public class SubscribeParam
|
||||
{
|
||||
/**
|
||||
* 订阅的快递公司的编码,一律用小写字母
|
||||
*/
|
||||
public string company {get; set;}
|
||||
/**
|
||||
* 订阅的快递单号,单号的最大长度是32个字符
|
||||
*/
|
||||
public string number {get; set;}
|
||||
/**
|
||||
* 出发地城市,省-市-区,非必填,填了有助于提升签收状态的判断的准确率,请尽量提供
|
||||
*/
|
||||
public string from {get; set;}
|
||||
/**
|
||||
* 目的地城市,省-市-区,非必填,填了有助于提升签收状态的判断的准确率,且到达目的地后会加大监控频率,请尽量提供
|
||||
*/
|
||||
public string to {get; set;}
|
||||
/**
|
||||
* 我方分配给贵司的的授权key
|
||||
*/
|
||||
public string key {get; set;}
|
||||
/**
|
||||
* 附加参数信息
|
||||
*/
|
||||
public SubscribeParameters parameters {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.Subscribe
|
||||
{
|
||||
public class SubscribeParameters
|
||||
{
|
||||
/**
|
||||
* 回调接口的地址。如果需要在推送信息回传自己业务参数,可以在回调地址URL后面拼接上去,如示例中的orderId
|
||||
* http://www.xxxxx.com/callback?orderId=123
|
||||
*/
|
||||
public string callbackurl{get; set;}
|
||||
/**
|
||||
* 签名用随机字符串。32位自定义字符串。添加该参数,则推送的时候会增加sign给贵司校验消息的可靠性
|
||||
*/
|
||||
public string salt{get; set;}
|
||||
/**
|
||||
* 添加此字段表示开通行政区域解析功能。0:关闭(默认),1:开通行政区域解析功能
|
||||
*/
|
||||
public string resultv2{get; set;}
|
||||
/**
|
||||
* 添加此字段且将此值设为1,则表示开始智能判断单号所属公司的功能,
|
||||
* 开启后,company字段可为空,即只传运单号(number字段),我方收到后会根据单号判断出其所属的快递公司(即company字段)。
|
||||
* 建议只有在无法知道单号对应的快递公司(即company的值)的情况下才开启此功能。
|
||||
*/
|
||||
public string autoCom{get; set;}
|
||||
/**
|
||||
* 添加此字段表示开启国际版
|
||||
* 开启后,若订阅的单号(即number字段)属于国际单号,会返回出发国与目的国两个国家的跟踪信息{get; set;}
|
||||
* 本功能暂时只支持邮政体系(国际类的邮政小包、EMS)内的快递公司{get; set;}
|
||||
* 若单号我方识别为非国际单,即使添加本字段,也不会返回destResult元素组.
|
||||
*/
|
||||
public string interCom{get; set;}
|
||||
/**
|
||||
* 出发国家编码
|
||||
*/
|
||||
public string departureCountry{get; set;}
|
||||
/**
|
||||
* 出发国家快递公司的编码
|
||||
*/
|
||||
public string departureCom{get; set;}
|
||||
/**
|
||||
* 目的国家编码
|
||||
*/
|
||||
public string destinationCountry{get; set;}
|
||||
/**
|
||||
* 目的国家快递公司的编码
|
||||
*/
|
||||
public string destinationCom{get; set;}
|
||||
/**
|
||||
* 收件人或寄件人的手机号或固话(顺丰单号必填,也可以填写后四位,如果是固话,请不要上传分机号)
|
||||
*/
|
||||
public string phone{get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
namespace Common.Request.Subscribe
|
||||
{
|
||||
public class SubscribeReq
|
||||
{
|
||||
/**
|
||||
* 返回数据格式(json、xml、text)
|
||||
*/
|
||||
public string schema {get; set;}
|
||||
/**
|
||||
* 其他参数
|
||||
*/
|
||||
public SubscribeParam param {get; set;}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class CancelReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 快遞單號
|
||||
/// </summary>
|
||||
public string kuaidicom { get; set; }
|
||||
/// <summary>
|
||||
/// 快遞單號
|
||||
/// </summary>
|
||||
public string kuaidinum { get; set; }
|
||||
/// <summary>
|
||||
/// 訂單id
|
||||
/// </summary>
|
||||
public string orderId { get; set; }
|
||||
/// <summary>
|
||||
/// 驗證信息
|
||||
/// </summary>
|
||||
public ValidateInfo vi { get; set; }
|
||||
/// <summary>
|
||||
/// 驗證信息
|
||||
/// </summary>
|
||||
public string openid { get; set; }
|
||||
/// <summary>
|
||||
/// 取消原因
|
||||
/// </summary>
|
||||
public string reason { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class CustomsClearance
|
||||
{
|
||||
/// <summary>
|
||||
/// 用途(具体参考每个快递公司)
|
||||
/// GIFT
|
||||
/// NOT_SOLD
|
||||
/// PERSONAL_EFFECTS
|
||||
/// REPAIR_AND_RETURN
|
||||
/// SAMPLE
|
||||
/// SOLD
|
||||
/// </summary>
|
||||
public string purpose { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是文件(默认 true 文件)
|
||||
/// </summary>
|
||||
public bool isDocument { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class ExportInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 净重
|
||||
/// </summary>
|
||||
public double netWeight { get; set; }
|
||||
/// <summary>
|
||||
/// 毛重
|
||||
/// </summary>
|
||||
public double grossWeight { get; set; }
|
||||
/// <summary>
|
||||
/// 原产国国家代码,中国-CN,美国-US
|
||||
/// </summary>
|
||||
public string manufacturingCountryCode { get; set; }
|
||||
/// <summary>
|
||||
/// 单位价格
|
||||
/// </summary>
|
||||
public double unitPrice { get; set; }
|
||||
/// <summary>
|
||||
/// 商品数量,INT 1 -1000000000,必须整数,小数dhl会报错,且不返回具体错误
|
||||
/// </summary>
|
||||
public int quantity { get; set; }
|
||||
/// <summary>
|
||||
/// 计数单位,件-PCS {get; set;}双-PRS {get; set;}千克-KG {get; set;}默认件
|
||||
/// </summary>
|
||||
public string quantityUnitOfMeasurement { get; set; }
|
||||
/// <summary>
|
||||
/// 物品描述
|
||||
/// </summary>
|
||||
public string desc { get; set; }
|
||||
/// <summary>
|
||||
/// 进口商品编码
|
||||
/// </summary>
|
||||
public string importCommodityCode { get; set; }
|
||||
/// <summary>
|
||||
/// 出口商品编码
|
||||
/// </summary>
|
||||
public string exportCommodityCode { get; set; }
|
||||
/// <summary>
|
||||
/// 件数
|
||||
/// </summary>
|
||||
public int numberOfPieces { get; set; }
|
||||
/// <summary>
|
||||
/// sku
|
||||
/// </summary>
|
||||
public string sku { get; set; }
|
||||
/// <summary>
|
||||
/// 产品的中文名
|
||||
/// </summary>
|
||||
public string zhName { get; set; }
|
||||
/// <summary>
|
||||
/// 产品的英文名
|
||||
/// </summary>
|
||||
public string enName { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class InterManInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// 手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string mobile { get; set; }
|
||||
/// <summary>
|
||||
/// 电话号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string tel { get; set; }
|
||||
/// <summary>
|
||||
/// 城市
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
/// <summary>
|
||||
/// 收件人所在完整地址
|
||||
/// </summary>
|
||||
public string addr { get; set; }
|
||||
/// <summary>
|
||||
/// 州|省,可作为收件地址补充
|
||||
/// </summary>
|
||||
public string province { get; set; }
|
||||
/// <summary>
|
||||
/// 郡|县,可作为收件地址补充
|
||||
/// </summary>
|
||||
public string district { get; set; }
|
||||
/// <summary>
|
||||
/// 公司名称
|
||||
/// </summary>
|
||||
public string company { get; set; }
|
||||
/// <summary>
|
||||
/// 邮编
|
||||
/// </summary>
|
||||
public string zipcode { get; set; }
|
||||
/// <summary>
|
||||
/// 国家代号 CN-中国 ,US-美国等, 详见字典表
|
||||
/// </summary>
|
||||
public string countryCode { get; set; }
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
public string email { get; set; }
|
||||
/// <summary>
|
||||
/// 州或省代号,美国必填,例如纽约州-NY
|
||||
/// </summary>
|
||||
public string stateOrProvinceCode { get; set; }
|
||||
/// <summary>
|
||||
/// 税号
|
||||
/// </summary>
|
||||
public string taxId { get; set; }
|
||||
/// <summary>
|
||||
/// 纳税人类型
|
||||
/// </summary>
|
||||
public string taxType { get; set; }
|
||||
/// <summary>
|
||||
/// VAT税号(数字或字母);欧盟国家(含英国)使用的增值税号;
|
||||
/// </summary>
|
||||
public string vatNum { get; set; }
|
||||
/// <summary>
|
||||
/// EORI号码(数字或字母);欧盟入关时需要EORI号码,用于商品货物的清关
|
||||
/// </summary>
|
||||
public string eoriNum { get; set; }
|
||||
/// <summary>
|
||||
/// IOSS号码
|
||||
/// </summary>
|
||||
public string iossNum { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class InvoiceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 发票日期(格式:yyyy-MM-dd)
|
||||
/// </summary>
|
||||
public string date { get; set; }
|
||||
/// <summary>
|
||||
/// 发票号
|
||||
/// </summary>
|
||||
public string number { get; set; }
|
||||
/// <summary>
|
||||
/// 发票类型
|
||||
/// </summary>
|
||||
public string type { get; set; }
|
||||
/// <summary>
|
||||
/// 发票抬头,base64字符或常规字符,不同快递公司要求不一样
|
||||
/// </summary>
|
||||
public string title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发票签名(BASE64字符串)
|
||||
/// </summary>
|
||||
public string signature { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用无纸化贸易
|
||||
/// </summary>
|
||||
public bool pltEnable { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class PackageInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 高度 {get; set;}单位厘米,默认1.0
|
||||
/// </summary>
|
||||
public double height { get; set; }
|
||||
/// <summary>
|
||||
/// 宽度 {get; set;}单位厘米, 默认10.0
|
||||
/// </summary>
|
||||
public double width { get; set; }
|
||||
/// <summary>
|
||||
/// 长度 {get; set;}单位厘米默认10.0
|
||||
/// </summary>
|
||||
public double length { get; set; }
|
||||
/// <summary>
|
||||
/// 重量 {get; set;} 单位千克,默认0.1
|
||||
/// </summary>
|
||||
public double weight { get; set; }
|
||||
/// <summary>
|
||||
/// 该包裹的备注信息之类
|
||||
/// </summary>
|
||||
public string packageReference { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class Payment
|
||||
{
|
||||
/// <summary>
|
||||
/// 运费支付方式(支付方式:SHIPPER-寄方付 {get; set;}CONSIGNEE-收方付 默认SHIPPER)
|
||||
/// 关税(支付方式:DDU-寄方支付 {get; set;}DDP-收方支付 {get; set;}默认DDP)
|
||||
/// </summary>
|
||||
public string paymentType { get; set; }
|
||||
/// <summary>
|
||||
/// 账号
|
||||
/// </summary>
|
||||
public string account { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class ShipmentReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 收件人信息
|
||||
/// </summary>
|
||||
public InterManInfo recMan { get; set; }
|
||||
/// <summary>
|
||||
/// 寄件人信息
|
||||
/// </summary>
|
||||
public InterManInfo sendMan { get; set; }
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见参数字典)
|
||||
/// </summary>
|
||||
public string kuaidicom { get; set; }
|
||||
/// <summary>
|
||||
/// 产品类型: 默认标准快递,请参考参数字典)
|
||||
/// </summary>
|
||||
public string expType { get; set; }
|
||||
/// <summary>
|
||||
/// 物品总重量
|
||||
/// </summary>
|
||||
public double weight { get; set; }
|
||||
/// <summary>
|
||||
/// 包裹数
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark { get; set; }
|
||||
/// <summary>
|
||||
/// 货物描述
|
||||
/// </summary>
|
||||
public string cargo { get; set; }
|
||||
/// <summary>
|
||||
/// 月结或支付账号,详见字典表
|
||||
/// </summary>
|
||||
public string partnerId { get; set; }
|
||||
/// <summary>
|
||||
/// 月结账号密钥,详见字典表
|
||||
/// </summary>
|
||||
public string partnerKey { get; set; }
|
||||
/// <summary>
|
||||
/// 账号参数,详见字典表
|
||||
/// </summary>
|
||||
public string code { get; set; }
|
||||
/// <summary>
|
||||
/// 月结账号用户名,详见字典表
|
||||
/// </summary>
|
||||
public string partnerName { get; set; }
|
||||
/// <summary>
|
||||
/// 月结账号用户密码,详见字典表
|
||||
/// </summary>
|
||||
public string partnerSecret { get; set; }
|
||||
/// <summary>
|
||||
/// 贸易条款 {get; set;}CFR,DAP等,国际贸易规范用于,默认DAP
|
||||
/// </summary>
|
||||
public string tradeTerm { get; set; }
|
||||
/// <summary>
|
||||
/// 申报价值,包裹类必填,货币单位根据currency确定,人民币单位是元
|
||||
/// </summary>
|
||||
public double customsValue { get; set; }
|
||||
/// <summary>
|
||||
/// 包裹信息集合
|
||||
/// </summary>
|
||||
public List<PackageInfo> packageInfos { get; set; }
|
||||
/// <summary>
|
||||
/// 出口信息集合,一般包裹类要求必填,文件类不用填,用于清关报备
|
||||
/// </summary>
|
||||
public List<ExportInfo> exportInfos { get; set; }
|
||||
/// <summary>
|
||||
/// 货币单位,CNY-人民币 {get; set;}USD-美元 {get; set;}默认CNY
|
||||
/// </summary>
|
||||
public string currency { get; set; }
|
||||
/// <summary>
|
||||
/// 关税支付方式,默认收件人支付
|
||||
/// </summary>
|
||||
public Payment dutiesPaymentType { get; set; }
|
||||
/// <summary>
|
||||
/// 运费支付方式(默认寄件人支付)SHIPPER:寄方付 CONSIGNEE:到付 MONTHLY:月结 THIRDPARTY:第三方支付
|
||||
/// </summary>
|
||||
public Payment freightPaymentType { get; set; }
|
||||
/// <summary>
|
||||
/// 下单时间(格式:yyyy-MM-dd HH:mm:ss,不传或者格式不正确默认当前时间)
|
||||
/// </summary>
|
||||
public string shipTime { get; set; }
|
||||
/// <summary>
|
||||
/// 打包方式:默认用户自行打包
|
||||
/// </summary>
|
||||
public string packagingType { get; set; }
|
||||
/// <summary>
|
||||
/// 商业发票信息
|
||||
/// </summary>
|
||||
public InvoiceInfo invoiceInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 是否需要发票
|
||||
/// </summary>
|
||||
public bool needInvoice { get; set; }
|
||||
/// <summary>
|
||||
/// 清关信息
|
||||
/// </summary>
|
||||
public CustomsClearance customsClearance { get; set; }
|
||||
/// <summary>
|
||||
/// 时区,默认东八区时间 'GMT+8'预留
|
||||
/// </summary>
|
||||
public string timezone { get; set; }
|
||||
/// <summary>
|
||||
/// SI表示千克和厘米组合;SU表示磅和英寸组合
|
||||
/// </summary>
|
||||
public string unitOfMeasurement { get; set; }
|
||||
/// <summary>
|
||||
/// 路线ID(极兔国际必填)
|
||||
/// </summary>
|
||||
public string routeId { get; set; }
|
||||
/// <summary>
|
||||
/// 是否需要通知
|
||||
/// </summary>
|
||||
public bool needNotification { get; set; }
|
||||
/// <summary>
|
||||
/// 通知郵箱
|
||||
/// </summary>
|
||||
public string notifyEmail { get; set; }
|
||||
/// <summary>
|
||||
/// 送达确认签名 (0-不需要签名 1-需提供签名 2-要求成年人签名)
|
||||
/// </summary>
|
||||
public int needDeliveryConfirmation { get; set; }
|
||||
/// <summary>
|
||||
/// 是否周六交貨
|
||||
/// </summary>
|
||||
public bool needSaturdayDelivery { get; set; }
|
||||
/// <summary>
|
||||
/// 是否包含电池
|
||||
/// </summary>
|
||||
public bool butterFlag { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.internationalshipment
|
||||
{
|
||||
public class ValidateInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 月结或支付账号,详见字典表
|
||||
/// </summary>
|
||||
public string partnerId;
|
||||
/// <summary>
|
||||
/// 月结账号用户名,详见字典表
|
||||
/// </summary>
|
||||
public string partnerName;
|
||||
/// <summary>
|
||||
/// 月结账号密钥,详见字典表
|
||||
/// </summary>
|
||||
public string partnerKey;
|
||||
/// <summary>
|
||||
/// 月结账号用户密码,详见字典表
|
||||
/// </summary>
|
||||
public string partnerSecret;
|
||||
/// <summary>
|
||||
/// 账号参数,详见字典表
|
||||
/// </summary>
|
||||
public string code;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.reachable
|
||||
{
|
||||
public class ExpressReachableParam {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》
|
||||
/// </summary>
|
||||
public string kuaidicom {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人姓名
|
||||
/// </summary>
|
||||
public string recManName {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string recManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 收件人所在完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园
|
||||
/// </summary>
|
||||
public string recManPrintAddr {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人姓名
|
||||
/// </summary>
|
||||
public string sendManName {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string sendManMobile {get; set;}
|
||||
/// <summary>
|
||||
/// 寄件人所在的完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园B10
|
||||
/// </summary>
|
||||
public string sendManPrintAddr {get; set;}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this,Formatting.Indented,new JsonSerializerSettings(){NullValueHandling = NullValueHandling.Ignore});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.samecity
|
||||
{
|
||||
public class OrderGoods
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品名称
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// 商品价格(分)
|
||||
/// </summary>
|
||||
public int price { get; set; }
|
||||
/// <summary>
|
||||
/// 商品数量
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
/// <summary>
|
||||
/// 商品单位
|
||||
/// </summary>
|
||||
public string unit { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.samecity
|
||||
{
|
||||
public class SameCityAuthParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 快递公司,一律用小写字母,见参数字典
|
||||
/// </summary>
|
||||
public string com { get; set; }
|
||||
/// <summary>
|
||||
/// 授权店铺id
|
||||
/// </summary>
|
||||
public string storeId { get; set; }
|
||||
/// <summary>
|
||||
/// 授权后信息的信息回调地址
|
||||
/// </summary>
|
||||
public string callbackUrl { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.samecity
|
||||
{
|
||||
public class SameCityCancelParam
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId { get; set; }
|
||||
/// <summary>
|
||||
/// 订单ID
|
||||
/// </summary>
|
||||
public string orderId { get; set; }
|
||||
/// <summary>
|
||||
/// 取消原因
|
||||
/// </summary>
|
||||
public string cancelMsg { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Common.Request.samecity
|
||||
{
|
||||
public class SameCityOrderParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 快递公司的编码,一律用小写字母,见《快递公司编码》
|
||||
/// </summary>
|
||||
public string com { get; set; }
|
||||
/// <summary>
|
||||
/// 收件人姓名
|
||||
/// </summary>
|
||||
public string recManName { get; set; }
|
||||
/// <summary>
|
||||
/// 收件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string recManMobile { get; set; }
|
||||
/// <summary>
|
||||
/// 收件人所在完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园
|
||||
/// </summary>
|
||||
public string recManPrintAddr { get; set; }
|
||||
/// <summary>
|
||||
/// 寄件人姓名
|
||||
/// </summary>
|
||||
public string sendManName { get; set; }
|
||||
/// <summary>
|
||||
/// 寄件人的手机号,手机号和电话号二者其一必填
|
||||
/// </summary>
|
||||
public string sendManMobile { get; set; }
|
||||
/// <summary>
|
||||
/// 寄件人所在的完整地址,如广东深圳市深圳市南山区科技南十二路2号金蝶软件园B10
|
||||
/// </summary>
|
||||
public string sendManPrintAddr { get; set; }
|
||||
/// <summary>
|
||||
/// 服务类型
|
||||
/// </summary>
|
||||
public string serviceType { get; set; }
|
||||
/// <summary>
|
||||
/// 物品总重量KG,例:1.5,单位kg
|
||||
/// </summary>
|
||||
public double weight { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark { get; set; }
|
||||
/// <summary>
|
||||
/// 签名用随机字符串
|
||||
/// </summary>
|
||||
public string salt { get; set; }
|
||||
/// <summary>
|
||||
/// callBackUrl订单信息回调
|
||||
/// </summary>
|
||||
public string callbackUrl { get; set; }
|
||||
/// <summary>
|
||||
/// 订单类型,默认为0 0: 立即单 1: 预约单
|
||||
/// </summary>
|
||||
public int orderType { get; set; }
|
||||
/// <summary>
|
||||
/// 取货时间(2020-02-02 22:00,指的是预约取件时间)
|
||||
/// </summary>
|
||||
|
||||
public string pickupTime { get; set; }
|
||||
/// <summary>
|
||||
/// 支付方式,SHIPPER: 寄付(默认),CONSIGNEE: 到付
|
||||
/// </summary>
|
||||
public string payment { get; set; }
|
||||
/// <summary>
|
||||
/// 对应商家版物品来源流水号
|
||||
/// </summary>
|
||||
public string orderSourceNo { get; set; }
|
||||
/// <summary>
|
||||
/// 物品来源
|
||||
/// </summary>
|
||||
public string orderSourceType { get; set; }
|
||||
/// <summary>
|
||||
/// 店铺ID
|
||||
/// </summary>
|
||||
public string storeId { get; set; }
|
||||
/// <summary>
|
||||
/// 小费(分)
|
||||
/// </summary>
|
||||
public int additionFee { get; set; }
|
||||
/// <summary>
|
||||
/// 保险费用(闪送支持)
|
||||
/// </summary>
|
||||
public int insurance { get; set; }
|
||||
/// <summary>
|
||||
/// 保险产品ID(闪送支持)
|
||||
/// </summary>
|
||||
public string insuranceProId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品价格
|
||||
/// </summary>
|
||||
public int price { get; set; }
|
||||
/// <summary>
|
||||
/// 代收价格
|
||||
/// </summary>
|
||||
public int CollectionPrice { get; set; }
|
||||
|
||||
public string partnerId { get; set; }
|
||||
|
||||
public string partnerKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品详情(强烈建议提供,方便骑手在取货时确认货品信息 ;顺丰时必填)
|
||||
/// </summary>
|
||||
public List<OrderGoods> goods { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.samecity
|
||||
{
|
||||
public class SameCityQueryParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string taskId { get; set; }
|
||||
/// <summary>
|
||||
/// 订单ID
|
||||
/// </summary>
|
||||
public string orderId { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.thirdPlatform
|
||||
{
|
||||
public class BranchInfoParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 调用菜鸟或淘宝第三方授权接口后获取到的partnerId值
|
||||
/// </summary>
|
||||
public string partnerId { get; set; }
|
||||
/// <summary>
|
||||
/// 调用菜鸟或淘宝第三方授权接口后获取到的partnerKey值
|
||||
/// </summary>
|
||||
public string partnerKey { get; set; }
|
||||
/// <summary>
|
||||
/// 菜鸟:cainiao,淘宝:taobao,京东无界:jdalpha,拼多多:pinduoduoWx,抖店:douyin
|
||||
/// </summary>
|
||||
public string net { get; set; }
|
||||
/// <summary>
|
||||
/// 快递公司编号
|
||||
/// </summary>
|
||||
public string com { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.thirdPlatform
|
||||
{
|
||||
public class CommitTaskParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 店铺类型,TAOBAO:淘宝,JINGDONG:京东,TOUTIAO:抖店,PINDUODUO:拼多多
|
||||
/// </summary>
|
||||
public string shopType { get; set; }
|
||||
/// <summary>
|
||||
/// 店铺ID
|
||||
/// </summary>
|
||||
public string shopId { get; set; }
|
||||
/// <summary>
|
||||
/// 订单状态,UNPAY:未付款;UNSHIP:待发货(默认值);SHIPED:等待卖家确认收货;FINISH:交易成功/完成;CLOSE:交易关闭/取消
|
||||
/// </summary>
|
||||
public string orderStatus { get; set; }
|
||||
/// <summary>
|
||||
/// 订单更新的最小时间,格式:yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
public string updateAtMin { get; set; }
|
||||
/// <summary>
|
||||
/// 订单更新的最大时间,格式:yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
public string updateAtMax { get; set; }
|
||||
/// <summary>
|
||||
/// 调参数sign的加密参数,非空时回调才会有sign参数
|
||||
/// </summary>
|
||||
public string salt { get; set; }
|
||||
/// <summary>
|
||||
/// 授权后信息的信息回调地址
|
||||
/// </summary>
|
||||
public string callbackUrl { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.thirdPlatform
|
||||
{
|
||||
public class PlatformAuthParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 请求的第三方平台,仅主账号可授权。淘宝:taobao,菜鸟:cainiao,京东:jdalpha,拼多多:pinduoduoWx,抖店:douyin
|
||||
/// </summary>
|
||||
public string net { get; set; }
|
||||
/// <summary>
|
||||
/// 已经授权完需要重新获取授权信息
|
||||
/// </summary>
|
||||
public string partnerId { get; set; }
|
||||
/// <summary>
|
||||
/// 授权后信息的信息回调地址
|
||||
/// </summary>
|
||||
public string callbackUrl { get; set; }
|
||||
/// <summary>
|
||||
/// web(默认),wap(只有淘宝和菜鸟可以使用)
|
||||
/// </summary>
|
||||
public string view { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.thirdPlatform
|
||||
{
|
||||
public class StoreAuthParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 店铺类型,TAOBAO:淘宝,JINGDONG:京东,TOUTIAO:抖店,PINDUODUO:拼多多
|
||||
/// </summary>
|
||||
public string shopType { get; set; }
|
||||
/// <summary>
|
||||
/// 调参数sign的加密参数,非空时回调才会有sign参数
|
||||
/// </summary>
|
||||
public string salt { get; set; }
|
||||
/// <summary>
|
||||
/// 授权后信息的信息回调地址
|
||||
/// </summary>
|
||||
public string callBackUrl { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Request.thirdPlatform
|
||||
{
|
||||
public class UploadNumParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 店铺类型,TAOBAO:淘宝,JINGDONG:京东,TOUTIAO:抖店,PINDUODUO:拼多多
|
||||
/// </summary>
|
||||
public string shopType { get; set; }
|
||||
/// <summary>
|
||||
/// 店铺ID
|
||||
/// </summary>
|
||||
public string shopId { get; set; }
|
||||
/// <summary>
|
||||
/// 订单号,需要填写正确,否则会被电商平台的风控系统拦截
|
||||
/// </summary>
|
||||
public string orderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 快递公司编码,需要填写正确,否则会被电商平台的风控系统拦截,编码请查看参数字典
|
||||
/// </summary>
|
||||
public string kuaidiCom { get; set; }
|
||||
/// <summary>
|
||||
/// 快递单号,需要填写正确,否则会被电商平台的风控系统拦截
|
||||
/// </summary>
|
||||
public string kuaidiNum { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
12
Infrastructure/Kuaidi100/Core/AutoNum.cs
Normal file
12
Infrastructure/Kuaidi100/Core/AutoNum.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Common;
|
||||
using Utils;
|
||||
|
||||
public static class AutoNum
|
||||
{
|
||||
public static string query(string num, string key)
|
||||
{
|
||||
var url = string.Format(ApiInfoConstant.AUTO_NUM_URL,num,key);
|
||||
var result = HttpUtils.doGet(url);
|
||||
return result;
|
||||
}
|
||||
}
|
79
Infrastructure/Kuaidi100/Core/BOrder.cs
Normal file
79
Infrastructure/Kuaidi100/Core/BOrder.cs
Normal file
@ -0,0 +1,79 @@
|
||||
using Common.Request.Border;
|
||||
using Common.Request;
|
||||
using Utils;
|
||||
using Common;
|
||||
using System;
|
||||
/// <summary>
|
||||
/// 商家寄件(优选)接口已弃用
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public static class Border
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询运力
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string transportCapacity(BaseReq<BOrderQueryParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_QUERY_TRANSPORT_CAPACITY_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string order(BaseReq<BOrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_SEND_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取验证码
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string getCode(BaseReq<BOrderGetCodeParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_CODE_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取消下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string cancel(BaseReq<BOrderCancelParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_CANCEL_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
78
Infrastructure/Kuaidi100/Core/BOrderOfficial.cs
Normal file
78
Infrastructure/Kuaidi100/Core/BOrderOfficial.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using Common.Request;
|
||||
using Common.Request.BorderOfficial;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 商家寄件(官方快递)
|
||||
/// </summary>
|
||||
public static class BOrderOfficial
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string order(BaseReq<BOrderOfficialOrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_OFFICIAL_ORDER_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_OFFICIAL_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 商家寄件下单价格接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string queryPrice(BaseReq<BOrderOfficialQueryPriceParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_OFFICIAL_PRICE_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_OFFICIAL_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取消下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string cancel(BaseReq<BOrderOfficialCancelParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.B_ORDER_OFFICIAL_CANCEL_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_OFFICIAL_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看订单详情
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string queryDetail(BaseReq<BOrderOfficialQueryDetailParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.DETAIL;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.B_ORDER_OFFICIAL_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
95
Infrastructure/Kuaidi100/Core/BsamecityOrder.cs
Normal file
95
Infrastructure/Kuaidi100/Core/BsamecityOrder.cs
Normal file
@ -0,0 +1,95 @@
|
||||
using Common.Request;
|
||||
using Common.Request.Bsamecity;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 同城寄件
|
||||
/// </summary>
|
||||
public static class BsamecityOrder
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 预下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string price(BaseReq<BsamecityOrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.BSAMECITY_EXPRESS_PRICE;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.BSAMECITY_EXPRESS_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string order(BaseReq<BsamecityOrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.BSAMECITY_EXPRESS_ORDER;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.BSAMECITY_EXPRESS_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 预取消
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string precancel(BaseReq<BsamecityCancelParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.BSAMECITY_EXPRESS_PRECANCEL;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.BSAMECITY_EXPRESS_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取消
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string cancel(BaseReq<BsamecityCancelParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.BSAMECITY_EXPRESS_CANCEL;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.BSAMECITY_EXPRESS_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加小费
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string addfee(BaseReq<BsamecityAddfeeParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.BSAMECITY_EXPRESS_ADDFEE;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.BSAMECITY_EXPRESS_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
64
Infrastructure/Kuaidi100/Core/COrder.cs
Normal file
64
Infrastructure/Kuaidi100/Core/COrder.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using Common.Request.Corder;
|
||||
using Common.Request;
|
||||
using Utils;
|
||||
using Common;
|
||||
using System;
|
||||
/// <summary>
|
||||
/// c端寄件
|
||||
/// </summary>
|
||||
public static class Corder
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string order(BaseReq<COrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.CORDER;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.C_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// C端寄件下单取消接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string cancel(BaseReq<COrderCancelParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.CANCEL_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.C_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C端寄件价格查询接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string queryPrice(BaseReq<COrderQueryPriceParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.PRICE;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.C_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
106
Infrastructure/Kuaidi100/Core/CloudPrint.cs
Normal file
106
Infrastructure/Kuaidi100/Core/CloudPrint.cs
Normal file
@ -0,0 +1,106 @@
|
||||
using Common.Request;
|
||||
using Common.Request.cloud;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 订单导入
|
||||
/// </summary>
|
||||
public static class CloudPrint
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 自定义打印接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string custom(BaseReq<CustomParam> param){
|
||||
param.method = ApiInfoConstant.CLOUD_PRINT_CUSTOM_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doGet(HttpUtils.buildUrl(ApiInfoConstant.CLOUD_PRINT_URL,param));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 附件打印接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string attachment(BaseReq<AttachmentParam> param,string filePath,string filename){
|
||||
param.method = ApiInfoConstant.CLOUD_PRINT_ATTACHMENT_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostMultipartFormData<AttachmentParam>(HttpUtils.buildUrl(ApiInfoConstant.CLOUD_PRINT_URL,param),filePath,filename);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 硬件状态接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string devStatus(BaseReq<DevStatusParam> param){
|
||||
param.method = ApiInfoConstant.CLOUD_PRINT_DEV_STATUS;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doGet(HttpUtils.buildUrl(ApiInfoConstant.CLOUD_PRINT_URL,param));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复打
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string printOld(BaseReq<PrintOldParam> param){
|
||||
param.method = ApiInfoConstant.CLOUD_PRINT_OLD_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_PIC_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 指令打印接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string commandPrint(BaseReq<CommandParam> param){
|
||||
param.method = ApiInfoConstant.CLOUD_PRINT_COMMAND;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_PRINT_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发货单接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string billParcels<T>(BaseReq<ParcelsBillsParam<T>> param){
|
||||
param.method = ApiInfoConstant.BILL_PARCELS_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.BILL_PARCELS_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
27
Infrastructure/Kuaidi100/Core/ExpressReachable.cs
Normal file
27
Infrastructure/Kuaidi100/Core/ExpressReachable.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Common.Request;
|
||||
using Common.Request.reachable;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 商家寄件(官方快递)
|
||||
/// </summary>
|
||||
public static class ExpressReachable
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 可用性查询
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string query(BaseReq<ExpressReachableParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.EXPRESS_REACHABLE_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.EXPRESS_REACHABLE_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
29
Infrastructure/Kuaidi100/Core/InternationalShipment.cs
Normal file
29
Infrastructure/Kuaidi100/Core/InternationalShipment.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Common.Request;
|
||||
using Common.Request.internationalshipment;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 国际电子面单API
|
||||
/// </summary>
|
||||
public static class InternationalShipment
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取面单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string getLabel(BaseReq<ShipmentReq> param){
|
||||
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.INTERNATIONAL_SHIPMENT_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
78
Infrastructure/Kuaidi100/Core/LabelV2.cs
Normal file
78
Infrastructure/Kuaidi100/Core/LabelV2.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using Common.Request;
|
||||
using Common.Request.Label;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 商家寄件(官方快递)
|
||||
/// </summary>
|
||||
public static class LabelV2
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string order(BaseReq<OrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.ORDER;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.NEW_TEMPLATE_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复打
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string repeatPrint(BaseReq<RepeatPrintParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.CLOUD_PRINT_OLD_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.NEW_TEMPLATE_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义打印
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string customPrint(BaseReq<CustomPrintParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.CUSTOM;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.NEW_TEMPLATE_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 快递预估时效查询
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string deliveryTime(BaseReq<DeliveryTimeParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.TIME;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.NEW_TEMPLATE_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
18
Infrastructure/Kuaidi100/Core/Ocr.cs
Normal file
18
Infrastructure/Kuaidi100/Core/Ocr.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using Common;
|
||||
using Utils;
|
||||
using Common.Request;
|
||||
using Common.Request.Electronic.ocr;
|
||||
|
||||
public static class Ocr
|
||||
{
|
||||
public static string ocr(BaseReq<OcrParam> param)
|
||||
{
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.OCR_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
37
Infrastructure/Kuaidi100/Core/PrintCloud.cs
Normal file
37
Infrastructure/Kuaidi100/Core/PrintCloud.cs
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request;
|
||||
using Common.Request.Electronic;
|
||||
using Common.Request.Electronic.Print;
|
||||
|
||||
public class PrintCloud{
|
||||
|
||||
|
||||
public static string query(PrintCloudReq param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_PRINT_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 面单取消
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string cancel(BaseReq<CancelPrint> param){
|
||||
param.method = ApiInfoConstant.CANCEL_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_HTML_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
19
Infrastructure/Kuaidi100/Core/PrintHtml.cs
Normal file
19
Infrastructure/Kuaidi100/Core/PrintHtml.cs
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request.Electronic.Html;
|
||||
|
||||
public class PrintHtml{
|
||||
|
||||
|
||||
public static string query(PrintHtmlReq param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_HTML_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
19
Infrastructure/Kuaidi100/Core/PrintImg.cs
Normal file
19
Infrastructure/Kuaidi100/Core/PrintImg.cs
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request.Electronic.Image;
|
||||
|
||||
public class PrintImg{
|
||||
|
||||
|
||||
public static string query(PrintImgReq param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_PRINT_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
21
Infrastructure/Kuaidi100/Core/QueryTrack.cs
Normal file
21
Infrastructure/Kuaidi100/Core/QueryTrack.cs
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
using System.Collections;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request;
|
||||
|
||||
public class QueryTrack{
|
||||
|
||||
|
||||
public static string query(QueryTrackReq query){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(query);
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.QUERY_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
21
Infrastructure/Kuaidi100/Core/QueryTrackWithMap.cs
Normal file
21
Infrastructure/Kuaidi100/Core/QueryTrackWithMap.cs
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
using System.Collections;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request;
|
||||
|
||||
public class QueryTrackWithMap{
|
||||
|
||||
|
||||
public static string query(QueryTrackReq query){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(query);
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.QUERY_URL_WITH_MAP,request);
|
||||
return result;
|
||||
}
|
||||
}
|
78
Infrastructure/Kuaidi100/Core/SameCity.cs
Normal file
78
Infrastructure/Kuaidi100/Core/SameCity.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using Common.Request;
|
||||
using Common.Request.samecity;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 同城配送
|
||||
/// </summary>
|
||||
public static class SameCity
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 同城配送账号授权接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string auth(BaseReq<SameCityAuthParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.SAME_CITY_AUTH_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SAME_CITY_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同城配送下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string order(BaseReq<SameCityOrderParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.SAME_CITY_ORDER_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SAME_CITY_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同城配送查询订单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string query(BaseReq<SameCityQueryParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.SAME_CITY_QUERY_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SAME_CITY_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取消下单
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string cancel(BaseReq<SameCityCancelParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.SAME_CITY_CANCEL_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SAME_CITY_ORDER_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
19
Infrastructure/Kuaidi100/Core/SendSms.cs
Normal file
19
Infrastructure/Kuaidi100/Core/SendSms.cs
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request;
|
||||
using Common.Request.Sms;
|
||||
|
||||
public class SendSms{
|
||||
|
||||
|
||||
public static string query(SendSmsReq query){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(query);
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SEND_SMS_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
22
Infrastructure/Kuaidi100/Core/Subscribe.cs
Normal file
22
Infrastructure/Kuaidi100/Core/Subscribe.cs
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
using System.Collections;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request.Subscribe;
|
||||
|
||||
public class Subscribe{
|
||||
|
||||
|
||||
public static string subscribe(SubscribeReq subscribeReq){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(subscribeReq);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SUBSCRIBE_URL,request);
|
||||
return result;
|
||||
}
|
||||
}
|
22
Infrastructure/Kuaidi100/Core/SubscribeWithMap.cs
Normal file
22
Infrastructure/Kuaidi100/Core/SubscribeWithMap.cs
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
using System.Collections;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Utils;
|
||||
using Common;
|
||||
using Common.Request.Subscribe;
|
||||
|
||||
public class SubscribeWithMap{
|
||||
|
||||
|
||||
public static string subscribe(SubscribeReq subscribeReq){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(subscribeReq);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.SUBSCRIBE_URL_WITH_MAP,request);
|
||||
return result;
|
||||
}
|
||||
}
|
93
Infrastructure/Kuaidi100/Core/ThirdPlatformOrder.cs
Normal file
93
Infrastructure/Kuaidi100/Core/ThirdPlatformOrder.cs
Normal file
@ -0,0 +1,93 @@
|
||||
using Common.Request;
|
||||
using Common.Request.thirdPlatform;
|
||||
using Utils;
|
||||
using Common;
|
||||
/// <summary>
|
||||
/// 订单导入
|
||||
/// </summary>
|
||||
public static class ThirdPlatformOrder
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取店铺授权超链接接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string auth(BaseReq<StoreAuthParam> param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.THIRD_PLATFORM_ORDER_SHOP_AUTHORIZE_url,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交订单获取任务接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string commitTask(BaseReq<CommitTaskParam> param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.THIRD_PLATFORM_ORDER_COMMIT_TASK,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 快递单号回传及订单发货接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string uploadNum(BaseReq<UploadNumParam> param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.THIRD_PLATFORM_ORDER_UPLOAD_NUM,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 第三方电商平台账号授权
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string platformAuth(BaseReq<PlatformAuthParam> param){
|
||||
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.AUTH_THIRD_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 面单余额
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static string branchInfo(BaseReq<BranchInfoParam> param){
|
||||
|
||||
param.method = ApiInfoConstant.THIRD_PLATFORM_BRANCH_INFO_METHOD;
|
||||
var request = ObjectToDictionaryUtils.ObjectToMap(param);
|
||||
|
||||
if(request == null){
|
||||
return null;
|
||||
}
|
||||
var result = HttpUtils.doPostForm(ApiInfoConstant.ELECTRONIC_ORDER_HTML_URL,request);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
1254
Infrastructure/Kuaidi100/Kuaidi100.cs
Normal file
1254
Infrastructure/Kuaidi100/Kuaidi100.cs
Normal file
File diff suppressed because one or more lines are too long
13
Infrastructure/Kuaidi100/Utils/DateUtils.cs
Normal file
13
Infrastructure/Kuaidi100/Utils/DateUtils.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
public static class DateUtils
|
||||
{
|
||||
public static string GetTimestamp()
|
||||
{
|
||||
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
return Convert.ToInt64(ts.TotalMilliseconds).ToString();
|
||||
}
|
||||
}
|
||||
}
|
79
Infrastructure/Kuaidi100/Utils/HttpUtils.cs
Normal file
79
Infrastructure/Kuaidi100/Utils/HttpUtils.cs
Normal file
@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Common.Request;
|
||||
using System.Web;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
class HttpUtils
|
||||
{
|
||||
public static string doPostForm(string url, Dictionary<string, string> param)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
using (var multipartFormDataContent = new FormUrlEncodedContent(param))
|
||||
{
|
||||
Console.WriteLine(JsonConvert.SerializeObject(param));
|
||||
var result = client.PostAsync(url, multipartFormDataContent).Result.Content.ReadAsStringAsync().Result;
|
||||
Console.WriteLine(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return e.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public static string doGet(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
Console.WriteLine(JsonConvert.SerializeObject(url));
|
||||
var result = client.GetAsync(url).Result.Content.ReadAsStringAsync().Result;
|
||||
Console.WriteLine(result);
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return e.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public static string doPostMultipartFormData<T>(string url, String filePath,String filename)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
using (var multipartFormDataContent = new MultipartFormDataContent())
|
||||
{
|
||||
multipartFormDataContent.Add(new ByteArrayContent(System.IO.File.ReadAllBytes(filePath)), "file", filename);
|
||||
var result = client.PostAsync(url, multipartFormDataContent).Result.Content.ReadAsStringAsync().Result;
|
||||
Console.WriteLine(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return e.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public static string buildUrl<T>(string url, BaseReq<T> baseReq){
|
||||
return string.Format(url,baseReq.method,baseReq.t,baseReq.key,baseReq.sign, HttpUtility.UrlEncode(baseReq.param.ToString()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
33
Infrastructure/Kuaidi100/Utils/ObjectToDictionaryUtils.cs
Normal file
33
Infrastructure/Kuaidi100/Utils/ObjectToDictionaryUtils.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
namespace Utils
|
||||
{
|
||||
public class ObjectToDictionaryUtils{
|
||||
public static Dictionary<string, string> ObjectToMap(object obj)
|
||||
{
|
||||
Dictionary<string, string> map = new Dictionary<string, string>();
|
||||
|
||||
Type t = obj.GetType(); // 获取对象对应的类, 对应的类型
|
||||
|
||||
PropertyInfo[] pi = t.GetProperties(BindingFlags.Public | BindingFlags.Instance); // 获取当前type公共属性
|
||||
|
||||
foreach (PropertyInfo p in pi)
|
||||
{
|
||||
MethodInfo m = p.GetGetMethod();
|
||||
|
||||
if (m != null && m.IsPublic)
|
||||
{
|
||||
// 进行判NULL处理
|
||||
if (m.Invoke(obj, new object[] { }) != null)
|
||||
{
|
||||
map.Add(p.Name, m.Invoke(obj, new object[] { })
|
||||
.ToString()); // 向字典添加元素
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user