OrderParam.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. using Common.Request.Electronic;
  2. using Newtonsoft.Json;
  3. using System.Collections.Generic;
  4. namespace Common.Request.Label
  5. {
  6. public class OrderParam
  7. {
  8. /// <summary>
  9. /// 收件人信息
  10. /// </summary>
  11. /// <value></value>
  12. public ManInfo recMan;
  13. /// <summary>
  14. /// 寄件人信息
  15. /// </summary>
  16. /// <value></value>
  17. public ManInfo sendMan;
  18. /// <summary>
  19. /// 快递公司编码
  20. /// </summary>
  21. /// <value></value>
  22. public string kuaidicom;
  23. /// <summary>
  24. /// 快递公司单号
  25. /// </summary>
  26. /// <value></value>
  27. public string kuaidinum;
  28. /// <summary>
  29. /// 订单号
  30. /// </summary>
  31. /// <value></value>
  32. public string orderId;
  33. /// <summary>
  34. /// SHIPPER:寄方付 CONSIGNEE:到付 MONTHLY:月结 THIRDPARTY:第三方支付
  35. /// </summary>
  36. /// <value></value>
  37. public string payType = "MONTHLY";
  38. /// <summary>
  39. /// 快递类型: 标准快递 顺丰特惠 电商特惠 EMS经济
  40. /// </summary>
  41. /// <value></value>
  42. public string expType;
  43. /// <summary>
  44. /// 重量
  45. /// </summary>
  46. /// <value></value>
  47. public double weight;
  48. /// <summary>
  49. /// 体积(长 /// 宽 /// 高)
  50. /// </summary>
  51. /// <value></value>
  52. public string volume;
  53. /// <summary>
  54. /// 物品总数量
  55. /// </summary>
  56. /// <value></value>
  57. public int count = 1;
  58. /// <summary>
  59. /// 备注
  60. /// </summary>
  61. /// <value></value>
  62. public string remark;
  63. /// <summary>
  64. /// 保价额度
  65. /// </summary>
  66. /// <value></value>
  67. public double valinsPay;
  68. /// <summary>
  69. /// 代收货款
  70. /// </summary>
  71. /// <value></value>
  72. public double collection;
  73. /// <summary>
  74. /// 物品名称,例:文件
  75. /// </summary>
  76. /// <value></value>
  77. public string cargo;
  78. /// <summary>
  79. /// 是否需要子单: 1:需要 0:不需要(默认) 如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号); needChild = 1、count 需要大于1,如count = 2 一个主单 一个子单,count = 3 一个主单 二个子单,返回的子单号码见返回结果的childNum字段
  80. /// </summary>
  81. /// <value></value>
  82. public string needChild;
  83. /// <summary>
  84. /// 是否需要回单: 1:需要 0:不需要(默认) 返回的回单号见返回结果的returnNum字段
  85. /// </summary>
  86. /// <value></value>
  87. public string needBack;
  88. /// <summary>
  89. /// 电子面单客户账户或月结账号
  90. /// </summary>
  91. /// <value></value>
  92. public string partnerId;
  93. /// <summary>
  94. /// 电子面单密码
  95. /// </summary>
  96. /// <value></value>
  97. public string partnerKey;
  98. /// <summary>
  99. /// 电子面单密钥
  100. /// </summary>
  101. /// <value></value>
  102. public string net;
  103. /// <summary>
  104. /// 电子面单承载编号
  105. /// </summary>
  106. /// <value></value>
  107. public string code;
  108. /// <summary>
  109. /// 电子面单客户账户名称
  110. /// </summary>
  111. /// <value></value>
  112. public string partnerName;
  113. /// <summary>
  114. /// 电子面单承载快递员名
  115. /// </summary>
  116. /// <value></value>
  117. public string checkMan;
  118. /// <summary>
  119. /// 电子面单密钥,需贵司向当地快递公司网点申请
  120. /// </summary>
  121. /// <value></value>
  122. public string partnerSecret;
  123. /// <summary>
  124. /// 在使用菜鸟/淘宝/拼多多授权电子面单时,若月结账号下存在多个网点,则tbNet="网点名称,网点编号" ,注意此处为英文逗号
  125. /// </summary>
  126. /// <value></value>
  127. public string tbNet;
  128. /// <summary>
  129. /// 邮费
  130. /// </summary>
  131. /// <value></value>
  132. public double freight;
  133. /// <summary>
  134. /// 京东增值服务用
  135. /// </summary>
  136. /// <value></value>
  137. public string expressExtra;
  138. /// <summary>
  139. /// 增值服务 {"backnum":{"value":"无需返单"}}
  140. /// </summary>
  141. /// <value></value>
  142. public string addService;
  143. /// <summary>
  144. /// 订单类型;京东订单-JINGDONG;淘宝订单-TAOBAOSENT
  145. /// </summary>
  146. /// <value></value>
  147. public string recordType;
  148. /// <summary>
  149. /// 预约取件开始时间
  150. /// </summary>
  151. /// <value></value>
  152. public long startGotTime
  153. {
  154. get
  155. {
  156. if (this.kuaidicom.Equals("kuayue"))
  157. { return Utils.DateUtils.GetStartGotTime(); }
  158. else
  159. {
  160. return 0;
  161. }
  162. }
  163. }
  164. /// <summary>
  165. /// 预约取件结束时间
  166. /// </summary>
  167. /// <value></value>
  168. public long endGotTime;
  169. /// <summary>
  170. /// 代收账户
  171. /// </summary>
  172. /// <value></value>
  173. public string colAcctNumber;
  174. /// <summary>
  175. /// 代收账户名
  176. /// </summary>
  177. /// <value></value>
  178. public string colAcctName;
  179. /// <summary>
  180. /// 顺丰电子验收
  181. /// </summary>
  182. /// <value></value>
  183. public int elecValidateType = 0;
  184. /// <summary>
  185. /// 顺丰电子验收图片熟悉数量
  186. /// </summary>
  187. /// <value></value>
  188. public int elecPicCount = 0;
  189. /// <summary>
  190. /// 顺丰手持设备扫描设置
  191. /// </summary>
  192. /// <value></value>
  193. public int scanSupport = 0;
  194. /// <summary>
  195. /// 文件url
  196. /// </summary>
  197. /// <value></value>
  198. public string fileUrl;
  199. /// <summary>
  200. /// 取件方式
  201. /// </summary>
  202. /// <value></value>
  203. public string pickMethod;
  204. /// <summary>
  205. /// 是否外发,1-外发,0不外发
  206. /// </summary>
  207. /// <value></value>
  208. public int isOut = 0;
  209. /// <summary>
  210. /// 是否合伙人自提:1-是,0-否
  211. /// </summary>
  212. /// <value></value>
  213. public int isPickupSelf = 0;
  214. /// <summary>
  215. /// 是否接受仅镇中心派送:1-是,0-否
  216. /// </summary>
  217. /// <value></value>
  218. public int isCenterDelivery = 0;
  219. /// <summary>
  220. /// 第三方平台订单号
  221. /// </summary>
  222. /// <value></value>
  223. public string thirdOrderId;
  224. /// <summary>
  225. /// 开放地址ID 淘宝订单收件人ID (Open Addressee ID),长度不超过128个字符,淘宝订单加密情况用于解密。
  226. /// </summary>
  227. /// <value></value>
  228. public string oaid;
  229. /// <summary>
  230. /// 菜鸟地址ID,针对电商平台加密订单场景使用,淘系订单使用oaid,非淘使用caid。
  231. /// </summary>
  232. /// <value></value>
  233. public string caid;
  234. /// <summary>
  235. /// normal-常规的字母单,multi-一票多件
  236. /// </summary>
  237. /// <value></value>
  238. public string childNumType = "normal";
  239. /// <summary>
  240. /// 回单数量
  241. /// </summary>
  242. /// <value></value>
  243. public int backSign;
  244. /// <summary>
  245. /// 第三方平台模板url
  246. /// </summary>
  247. /// <value></value>
  248. public string thirdTemplateURL;
  249. /// <summary>
  250. /// 京东快运站点揽收字段
  251. /// </summary>
  252. /// <value></value>
  253. public int siteCollect;
  254. /// <summary>
  255. /// 京东快运站点派送字段
  256. /// </summary>
  257. /// <value></value>
  258. public int siteDelivery;
  259. /// <summary>
  260. /// 回单号
  261. /// </summary>
  262. /// <value></value>
  263. public string returnNum;
  264. /// <summary>
  265. /// 车辆类型名称(京东快运整车需要)
  266. /// </summary>
  267. /// <value></value>
  268. public string vehicleTypeName;
  269. /// <summary>
  270. /// 车辆类型编码(京东快运整车需要)
  271. /// </summary>
  272. /// <value></value>
  273. public string vehicleTypeNo;
  274. /// <summary>
  275. /// 整车单号(京东快运整车需要)
  276. /// </summary>
  277. /// <value></value>
  278. public string vehicleOrderNo;
  279. /// <summary>
  280. /// 自定义参数,优先级高于系统生成值,即出现相同key时,使用该参数的value
  281. /// </summary>
  282. /// <value></value>
  283. public Dictionary<string, object> customParam;
  284. /// <summary>
  285. /// 打印方向(默认0) 0-正方向 1-反方向
  286. /// </summary>
  287. /// <value></value>
  288. public string direction;
  289. /// <summary>
  290. /// 打印设备,通过打印机输出的设备码进行获取
  291. /// </summary>
  292. /// <value></value>
  293. public string siid;
  294. /// <summary>
  295. /// 打印状态回调地址
  296. /// </summary>
  297. /// <value></value>
  298. public string callBackUrl;
  299. /// <summary>
  300. /// 签名用随机字符串,用于验证签名sign。salt值不为null时,推送数据将包含该加密签名,加密方式:md5(param+salt)。注意: salt值为空串时,推送的数据也会包含sign,此时可忽略sign的校验。
  301. /// </summary>
  302. /// <value></value>
  303. public string salt;
  304. /// <summary>
  305. /// 是否开启订阅功能 false:不开启(默认) true:开启 说明开启订阅功能时:pollCallBackUrl必须填入 此功能只针对有快递单号的单
  306. /// </summary>
  307. /// <value></value>
  308. public bool needSubscribe;
  309. /// <summary>
  310. /// 如果op设置为1时,pollCallBackUrl必须填入,用于跟踪回调
  311. /// </summary>
  312. /// <value></value>
  313. public string pollCallBackUrl;
  314. /// <summary>
  315. /// 添加此字段表示开通行政区域解析或地图轨迹功能 。
  316. /// 0:关闭(默认)
  317. /// 1:开通行政区域解析功能
  318. /// 3:开通地图轨迹及时效返回
  319. /// </summary>
  320. /// <value></value>
  321. public string resultv2;
  322. /// <summary>
  323. /// 快递100模板url
  324. /// </summary>
  325. /// <value></value>
  326. public string tempId;
  327. /// <summary>
  328. /// 快递100子单模板url()
  329. /// </summary>
  330. /// <value></value>
  331. public string childTempId;
  332. /// <summary>
  333. /// 快递100回单模板url
  334. /// </summary>
  335. /// <value></value>
  336. public string backTempId;
  337. /// <summary>
  338. /// 是否脱敏 false:关闭(默认)true:开启
  339. /// </summary>
  340. /// <value></value>
  341. public bool needDesensitization;
  342. /// <summary>
  343. /// 是否需要logo false:关闭(默认)true:开启
  344. /// </summary>
  345. /// <value></value>
  346. public bool needLogo = true;
  347. /// <summary>
  348. /// 打印类型(HTML,IMAGE,CMD,CLOUD,NON)
  349. /// NON:只下单不打印(默认)
  350. /// HTML:生成html短链
  351. /// IMAGE:生成图片短链
  352. /// CMD:生成打印指令
  353. /// CLOUD:使用快递100云打印机打印,使用CLOUD时siid必填
  354. /// </summary>
  355. /// <value></value>
  356. public string printType;
  357. /// <summary>
  358. /// 第三方平台订单是否需要ocr,开启后将会通过推送方式推送 false:关闭(默认)true:开启
  359. /// </summary>
  360. /// <value></value>
  361. public bool needOcr;
  362. /// <summary>
  363. /// 需要检测识别的面单元素。取值范围:barcode,qrcode,receiver,sender,bulkpen。不传或者 null 则默认为 ["barcode", "receiver", "sender"]
  364. /// </summary>
  365. /// <value></value>
  366. public string[] ocrInclude;
  367. public string ocrInclude_temp
  368. {
  369. set
  370. {
  371. string tempstr = value;
  372. tempstr = tempstr.Replace("[", "").Replace("]", "").Replace("\"", "");
  373. ocrInclude = tempstr.Split(',');
  374. }
  375. }
  376. public string height;
  377. public string width;
  378. /// <summary>
  379. /// 第三方平台自定义区域模板地址
  380. /// </summary>
  381. /// <value></value>
  382. public string thirdCustomTemplateUrl;
  383. public override string ToString()
  384. {
  385. return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
  386. }
  387. }
  388. }