models.dart 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. //登录
  2. class Login {
  3. bool success;
  4. int code;
  5. String msg;
  6. LoginMap data;
  7. Login({
  8. this.success,
  9. this.code,
  10. this.msg,
  11. this.data,
  12. });
  13. factory Login.fromJson(Map<String, dynamic> json) {
  14. LoginMap tempData = LoginMap.fromJson(json['data']);
  15. return Login(
  16. success: json['success'],
  17. code: json['code'],
  18. msg: json['msg'],
  19. data: tempData);
  20. }
  21. }
  22. class LoginMap {
  23. String avatarUrl;
  24. String nickName;
  25. int roleType;
  26. String userId;
  27. int status;
  28. String token;
  29. List stationIds;
  30. LoginMap(
  31. {this.userId,
  32. this.avatarUrl,
  33. this.nickName,
  34. this.roleType,
  35. this.status,
  36. this.token,
  37. this.stationIds});
  38. factory LoginMap.fromJson(Map<String, dynamic> json) {
  39. return LoginMap(
  40. avatarUrl: json['avatarUrl'],
  41. nickName: json['nickName'],
  42. roleType: json['roleType'],
  43. userId: json['userId'],
  44. status: json['status'],
  45. token: json['token'],
  46. stationIds: json['stationIds']);
  47. }
  48. }
  49. //接单页列表
  50. class OrderListObj {
  51. bool success;
  52. int code;
  53. String msg;
  54. OrderListData data;
  55. OrderListObj({this.success, this.code, this.msg, this.data});
  56. factory OrderListObj.fromJson(Map<String, dynamic> json) {
  57. return OrderListObj(
  58. success: json['success'],
  59. code: json['code'],
  60. msg: json['msg'],
  61. data: OrderListData.fromJson(json['data']));
  62. }
  63. }
  64. class OrderListData {
  65. bool hasNextPage;
  66. List<OrderList> items;
  67. int limit;
  68. int page;
  69. int totalCount;
  70. int totalPage;
  71. OrderListData(
  72. {this.hasNextPage,
  73. this.items,
  74. this.limit,
  75. this.page,
  76. this.totalCount,
  77. this.totalPage});
  78. factory OrderListData.fromJson(Map<String, dynamic> json) {
  79. List list = json['items'] as List;
  80. List<OrderList> tempOrderList =
  81. list.map((i) => OrderList.fromJson(i)).toList();
  82. return OrderListData(
  83. hasNextPage: json['hasNextPage'],
  84. items: tempOrderList,
  85. limit: json['limit'],
  86. page: json['page'],
  87. totalCount: json['totalCount'],
  88. totalPage: json['totalPage']);
  89. }
  90. }
  91. class OrderList {
  92. String orderNo;
  93. int createTime;
  94. String goods;
  95. int goodsQuantity;
  96. String receiptCompanyAddress;
  97. String receiptCompanyName;
  98. String receiptCompanyPhone;
  99. String receiptCompanyProvinceName;
  100. String receiptCompanyCityName;
  101. String receiptCompanyAreaName;
  102. String sendCompanyAddress;
  103. String sendCompanyName;
  104. String sendCompanyPhone;
  105. String sendCompanyProvinceName;
  106. String sendCompanyCityName;
  107. String sendCompanyAreaName;
  108. OrderList(
  109. {this.orderNo,
  110. this.createTime,
  111. this.goods,
  112. this.goodsQuantity,
  113. this.receiptCompanyAddress,
  114. this.receiptCompanyName,
  115. this.receiptCompanyPhone,
  116. this.receiptCompanyProvinceName,
  117. this.receiptCompanyCityName,
  118. this.receiptCompanyAreaName,
  119. this.sendCompanyAddress,
  120. this.sendCompanyName,
  121. this.sendCompanyPhone,
  122. this.sendCompanyProvinceName,
  123. this.sendCompanyCityName,
  124. this.sendCompanyAreaName,
  125. });
  126. factory OrderList.fromJson(Map<String, dynamic> json) {
  127. return OrderList(
  128. orderNo: json['orderNo'] ?? '',
  129. createTime: json['createTime'] ?? '',
  130. goods: json['goods'] ?? '',
  131. goodsQuantity: json['goodsQuantity'] ?? '',
  132. receiptCompanyAddress: json['receiptCompanyAddress'] ?? '',
  133. receiptCompanyName: json['receiptCompanyName'] ?? '',
  134. receiptCompanyPhone: json['receiptCompanyPhone'] ?? '',
  135. receiptCompanyProvinceName:json['receiptCompanyProvinceName'] ?? '',
  136. receiptCompanyCityName:json['receiptCompanyCityName'] ?? '',
  137. receiptCompanyAreaName:json['receiptCompanyAreaName'] ?? '',
  138. sendCompanyAddress: json['sendCompanyAddress'] ?? '',
  139. sendCompanyName: json['sendCompanyName'] ?? '',
  140. sendCompanyPhone: json['sendCompanyPhone'] ?? '',
  141. sendCompanyProvinceName:json['sendCompanyProvinceName'] ?? '',
  142. sendCompanyCityName:json['sendCompanyCityName'] ?? '',
  143. sendCompanyAreaName:json['sendCompanyAreaName'] ?? '',
  144. );
  145. }
  146. }
  147. //获取站点
  148. class Station {
  149. bool success;
  150. int code;
  151. String msg;
  152. List<StationList> data;
  153. Station({this.success, this.code, this.msg, this.data});
  154. factory Station.fromJson(Map<String, dynamic> json) {
  155. List list = json['data'] as List;
  156. print(list.toString());
  157. List<StationList> tempList =
  158. list.map((i) => StationList.fromJson(i)).toList();
  159. return Station(
  160. success: json['success'],
  161. code: json['code'],
  162. msg: json['msg'],
  163. data: tempList);
  164. }
  165. }
  166. class StationList {
  167. String code;
  168. int id;
  169. String name;
  170. int stationStatus;
  171. int status;
  172. StationList({this.code, this.id, this.name, this.stationStatus, this.status});
  173. factory StationList.fromJson(Map<String, dynamic> json) {
  174. return StationList(
  175. code: json['code'],
  176. id: json['id'],
  177. name: json['name'],
  178. stationStatus: json['stationStatus'],
  179. status: json['status']);
  180. }
  181. }
  182. //站点线路
  183. class StationLine {
  184. bool success;
  185. int code;
  186. String msg;
  187. List<LineObj> data;
  188. StationLine({this.success, this.code, this.msg, this.data});
  189. factory StationLine.fromJson(Map<String, dynamic> json) {
  190. var list = json['data'] as List;
  191. List<LineObj> tempList = list.map((i) => LineObj.fromJson(i)).toList();
  192. return StationLine(
  193. success: json['success'],
  194. code: json['code'],
  195. msg: json['msg'],
  196. data: tempList);
  197. }
  198. }
  199. class LineObj {
  200. String code;
  201. int id;
  202. String name;
  203. LineObj({this.code, this.name, this.id});
  204. factory LineObj.fromJson(Map<String, dynamic> json) {
  205. return LineObj(code: json['code'], id: json['id'], name: json['name']);
  206. }
  207. }
  208. //修改密码
  209. class UpdataPasswrod {
  210. bool success;
  211. int code;
  212. String msg;
  213. String data;
  214. UpdataPasswrod({this.success, this.code, this.msg, this.data});
  215. factory UpdataPasswrod.fromJson(Map<String, dynamic> json) {
  216. return UpdataPasswrod(
  217. success: json['success'],
  218. code: json['code'],
  219. msg: json['msg'],
  220. data: json['data']);
  221. }
  222. }
  223. //手机号模糊匹配
  224. class LikePhone {
  225. bool success;
  226. int code;
  227. String msg;
  228. List<LikePhoneList> data;
  229. LikePhone({this.success, this.code, this.msg, this.data});
  230. factory LikePhone.fromJson(Map<String, dynamic> json) {
  231. List list = json['data'] as List;
  232. List<LikePhoneList> tempList =
  233. list.map((i) => LikePhoneList.fromJson(i)).toList();
  234. return LikePhone(
  235. success: json['success'],
  236. code: json['code'],
  237. msg: json['msg'],
  238. data: tempList);
  239. }
  240. }
  241. class LikePhoneList {
  242. String address;
  243. String areaCode;
  244. String areaName;
  245. String cityCode;
  246. String cityName;
  247. String companyCode;
  248. String companyName;
  249. String companyPhone;
  250. int id;
  251. String provinceCode;
  252. String provinceName;
  253. String uzerPhone;
  254. LikePhoneList(
  255. {this.address,
  256. this.areaCode,
  257. this.areaName,
  258. this.cityCode,
  259. this.cityName,
  260. this.companyCode,
  261. this.companyName,
  262. this.companyPhone,
  263. this.id,
  264. this.provinceCode,
  265. this.provinceName,
  266. this.uzerPhone});
  267. factory LikePhoneList.fromJson(Map<String, dynamic> json) {
  268. return LikePhoneList(
  269. address: json['address'],
  270. areaCode: json['areaCode'],
  271. areaName: json['areaName'],
  272. cityCode: json['cityCode'],
  273. cityName: json['cityName'],
  274. companyCode: json['companyCode'],
  275. companyName: json['companyName'],
  276. companyPhone: json['companyPhone'],
  277. id: json['id'],
  278. provinceCode: json['provinceCode'],
  279. provinceName: json['provinceName'],
  280. uzerPhone: json['uzerPhone']);
  281. }
  282. }
  283. //商品类别列表
  284. class GoodsCategory {
  285. bool success;
  286. int code;
  287. String msg;
  288. List<GoodCategoryList> data;
  289. GoodsCategory({this.success, this.code, this.msg, this.data});
  290. factory GoodsCategory.fromJson(Map<String, dynamic> json) {
  291. List list = json['data'] as List;
  292. List<GoodCategoryList> tempList =
  293. list.map((i) => GoodCategoryList.fromJson(i)).toList();
  294. return GoodsCategory(
  295. success: json['success'],
  296. code: json['code'],
  297. msg: json['msg'],
  298. data: tempList);
  299. }
  300. }
  301. class GoodCategoryList {
  302. int id;
  303. String name;
  304. GoodCategoryList({this.id, this.name});
  305. factory GoodCategoryList.fromJson(Map<String, dynamic> json) {
  306. return GoodCategoryList(id: json['id'], name: json['name']);
  307. }
  308. }
  309. //商品包装类别列表
  310. class GoodsPackage {
  311. bool success;
  312. int code;
  313. String msg;
  314. List<GoodsPackageList> data;
  315. GoodsPackage({this.success, this.code, this.msg, this.data});
  316. factory GoodsPackage.fromJson(Map<String, dynamic> json) {
  317. List list = json['data'] as List;
  318. List<GoodsPackageList> tempList =
  319. list.map((i) => GoodsPackageList.fromJson(i)).toList();
  320. return GoodsPackage(
  321. success: json['success'],
  322. code: json['code'],
  323. msg: json['msg'],
  324. data: tempList
  325. );
  326. }
  327. }
  328. class GoodsPackageList {
  329. int id;
  330. String name;
  331. GoodsPackageList({this.id, this.name});
  332. factory GoodsPackageList.fromJson(Map<String, dynamic> json) {
  333. return GoodsPackageList(id: json['id'], name: json['name']);
  334. }
  335. }
  336. //创建订单
  337. class CreateOrder {
  338. bool success;
  339. int code;
  340. String msg;
  341. String orderNo;
  342. CreateOrder({this.success, this.code, this.msg, this.orderNo});
  343. factory CreateOrder.fromJson(Map<String, dynamic> json) {
  344. return CreateOrder(
  345. success: json['success'],
  346. code: json['code'],
  347. msg: json['msg'],
  348. orderNo: json['data']['orderNo']);
  349. }
  350. }
  351. //订单详情
  352. class OrderDetailObj {
  353. bool success;
  354. int code;
  355. String msg;
  356. OrderDetailData data;
  357. OrderDetailObj({
  358. this.success,
  359. this.code,
  360. this.msg,
  361. this.data,
  362. });
  363. factory OrderDetailObj.fromJson(Map<String, dynamic> json) {
  364. OrderDetailData tempData = OrderDetailData.fromJson(json['data']);
  365. return OrderDetailObj(
  366. success: json['success'],
  367. code: json['code'],
  368. msg: json['msg'],
  369. data: tempData);
  370. }
  371. }
  372. class OrderDetailData {
  373. int createTime;
  374. String orderNo;
  375. String goods; //商品名称
  376. int goodsAgencyFund; //代收款
  377. int goodsCategoryId;
  378. String goodsCategoryName;//货物类型
  379. int goodsFlatCost; //工本费
  380. int goodsFreight; //运费
  381. int goodsInsurance; //商品保险费
  382. int goodsOtherFees; //其他费用
  383. int goodsPackingId;
  384. String goodsPackingName;//货物包装类型
  385. int goodsPaymentMethod;//付款方式
  386. int goodsPriceProtection; //商品保价
  387. int goodsQuantity; //商品数量
  388. int goodsValue; //商品价值
  389. double goodsWeight; //商品重量
  390. int id; //订单Id
  391. String lineCode;//线路编码
  392. int lineId;//线路id
  393. String lineName;//线路名称
  394. String memo; //备注
  395. int orderStatus; //订单状态 0:代收单,1:已接单,2:配送中,3:已签收,4:拒收
  396. String receiptCompanyAddress; //收件详细地址
  397. String receiptCompanyAreaCode; //收件区码
  398. String receiptCompanyAreaName; //收件区名
  399. String receiptCompanyBankCard; //收件银行卡号
  400. String receiptCompanyCityCode; //收件市码
  401. String receiptCompanyCityName; //收件市名
  402. String receiptCompanyName; //收件公司名称
  403. String receiptCompanyPhone; //收件公司电话
  404. String receiptCompanyProvinceCode; //收件省码
  405. String receiptCompanyProvinceName; //收件省名
  406. String sendCompanyAddress; //发件详细地址
  407. String sendCompanyAreaCode; //发件区码
  408. String sendCompanyAreaName; //发件区名
  409. String sendCompanyBankCard; //发件银行卡号
  410. String sendCompanyCityCode; //发件市码
  411. String sendCompanyCityName; //发件市名
  412. int sendCompanyId; //发件公司id
  413. String sendCompanyName; //发件公司名称
  414. String sendCompanyCode; //发件公司编码
  415. String sendCompanyProvinceCode; //发件公司市码
  416. String sendCompanyProvinceName; //发件公司市名
  417. String sendCompanyPhone;
  418. String senderIdCard; //发件人身份证号
  419. String senderName; //发件人名称
  420. String senderPhone; //发件人电话
  421. int stationId;
  422. String stationName;
  423. String receiptStationName;
  424. String receiptStationCode;
  425. OrderDetailData(
  426. {
  427. this.createTime,
  428. this.orderNo,
  429. this.goods,
  430. this.goodsAgencyFund,
  431. this.goodsCategoryId,
  432. this.goodsCategoryName,
  433. this.goodsFlatCost,
  434. this.goodsFreight,
  435. this.goodsInsurance,
  436. this.goodsOtherFees,
  437. this.goodsPackingId,
  438. this.goodsPackingName,
  439. this.goodsPaymentMethod,
  440. this.goodsPriceProtection,
  441. this.goodsQuantity,
  442. this.goodsValue,
  443. this.goodsWeight,
  444. this.id,
  445. this.lineCode,
  446. this.lineId,
  447. this.lineName,
  448. this.memo,
  449. this.orderStatus,
  450. this.receiptCompanyAddress,
  451. this.receiptCompanyAreaCode,
  452. this.receiptCompanyAreaName,
  453. this.receiptCompanyPhone,
  454. this.receiptCompanyBankCard,
  455. this.receiptCompanyCityCode,
  456. this.receiptCompanyCityName,
  457. this.receiptCompanyName,
  458. this.receiptCompanyProvinceCode,
  459. this.receiptCompanyProvinceName,
  460. this.sendCompanyAddress,
  461. this.sendCompanyAreaCode,
  462. this.sendCompanyAreaName,
  463. this.sendCompanyBankCard,
  464. this.sendCompanyCityCode,
  465. this.sendCompanyCityName,
  466. this.sendCompanyId,
  467. this.sendCompanyName,
  468. this.sendCompanyCode,
  469. this.sendCompanyProvinceCode,
  470. this.sendCompanyProvinceName,
  471. this.senderIdCard,
  472. this.senderName,
  473. this.sendCompanyPhone,
  474. this.senderPhone,
  475. this.stationId,
  476. this.stationName,
  477. this.receiptStationName,
  478. this.receiptStationCode,
  479. });
  480. factory OrderDetailData.fromJson(Map<String, dynamic> json) {
  481. return OrderDetailData(
  482. createTime:json['createTime'],
  483. orderNo: json['orderNo'],
  484. goods: json['goods'],
  485. goodsAgencyFund: json['goodsAgencyFund'],
  486. goodsCategoryId:json['goodsCategoryId'],
  487. goodsCategoryName:json['goodsCategoryName'],
  488. goodsFlatCost: json['goodsFlatCost'],
  489. goodsFreight: json['goodsFreight'],
  490. goodsInsurance: json['goodsInsurance'],
  491. goodsOtherFees: json['goodsOtherFees'],
  492. goodsPackingId:json['goodsPackingId'],
  493. goodsPackingName:json['goodsPackingName'],
  494. goodsPriceProtection: json['goodsPriceProtection'],
  495. goodsPaymentMethod:json['goodsPaymentMethod'],
  496. goodsQuantity: json['goodsQuantity'],
  497. goodsValue: json['goodsValue'],
  498. goodsWeight: json['goodsWeight'],
  499. id: json['id'],
  500. lineCode:json['lineCode'],
  501. lineId:json['lineId'],
  502. lineName:json['lineName'],
  503. memo: json['memo'],
  504. orderStatus: json['orderStatus'],
  505. receiptCompanyAddress: json['receiptCompanyAddress'],
  506. receiptCompanyAreaCode: json['receiptCompanyAreaCode'],
  507. receiptCompanyAreaName: json['receiptCompanyAreaName'],
  508. receiptCompanyBankCard: json['receiptCompanyBankCard'],
  509. receiptCompanyCityCode: json['receiptCompanyCityCode'],
  510. receiptCompanyCityName: json['receiptCompanyCityName'],
  511. receiptCompanyName: json['receiptCompanyName'],
  512. receiptCompanyPhone: json['receiptCompanyPhone'],
  513. receiptCompanyProvinceCode: json['receiptCompanyProvinceCode'],
  514. receiptCompanyProvinceName: json['receiptCompanyProvinceName'],
  515. sendCompanyAddress: json['sendCompanyAddress'],
  516. sendCompanyAreaCode: json['sendCompanyAreaCode'],
  517. sendCompanyAreaName: json['sendCompanyAreaName'],
  518. sendCompanyBankCard: json['sendCompanyBankCard'],
  519. sendCompanyCityCode: json['sendCompanyCityCode'],
  520. sendCompanyCityName: json['sendCompanyCityName'],
  521. sendCompanyId: json['sendCompanyId'],
  522. sendCompanyName: json['sendCompanyName'],
  523. sendCompanyCode: json['sendCompanyCode'],
  524. sendCompanyProvinceCode: json['sendCompanyProvinceCode'],
  525. sendCompanyProvinceName: json['sendCompanyProvinceName'],
  526. senderIdCard: json['senderIdCard'],
  527. senderName: json['senderName'],
  528. senderPhone: json['senderPhone'],
  529. sendCompanyPhone:json['sendCompanyPhone'],
  530. stationId:json['stationId'],
  531. stationName:json['stationName'],
  532. receiptStationName:json['receiptStationName'],
  533. receiptStationCode:json['receiptStationCode'],
  534. );
  535. }
  536. }
  537. //接单对象
  538. class OrderReception {
  539. bool success;
  540. int code;
  541. String msg;
  542. OrderReception({
  543. this.success,
  544. this.code,
  545. this.msg,
  546. });
  547. factory OrderReception.fromJson(Map<String, dynamic> json) {
  548. return OrderReception(
  549. success: json['success'],
  550. code: json['code'],
  551. msg: json['msg'],
  552. );
  553. }
  554. }
  555. //订单管理获取列表
  556. class FromStatusGetOrderObj {
  557. bool success;
  558. int code;
  559. String msg;
  560. FromStatusGetOrderData data;
  561. FromStatusGetOrderObj({this.success, this.code, this.msg, this.data});
  562. factory FromStatusGetOrderObj.fromJson(Map<String, dynamic> json) {
  563. return FromStatusGetOrderObj(
  564. success: json['success'],
  565. code: json['code'],
  566. msg: json['msg'],
  567. data: FromStatusGetOrderData.fromJson(json['data']));
  568. }
  569. }
  570. class FromStatusGetOrderData {
  571. bool hasNextPage;
  572. List<FromStatusGetOrderList> items;
  573. int limit;
  574. int page;
  575. int totalCount;
  576. int totalPage;
  577. FromStatusGetOrderData({
  578. this.hasNextPage,
  579. this.items,
  580. this.limit,
  581. this.page,
  582. this.totalCount,
  583. this.totalPage,
  584. });
  585. factory FromStatusGetOrderData.fromJson(Map<String, dynamic> json) {
  586. List list = json['items'] as List;
  587. List<FromStatusGetOrderList> tempList =
  588. list.map((i) => FromStatusGetOrderList.fromJson(i)).toList();
  589. return FromStatusGetOrderData(
  590. hasNextPage: json['hasNextPage'],
  591. items: tempList,
  592. limit: json['limit'],
  593. page: json['page'],
  594. totalCount: json['totalCount'],
  595. totalPage: json['totalPage'],
  596. );
  597. }
  598. }
  599. class FromStatusGetOrderList {
  600. int goodsAgencyFund;
  601. int goodsFreight;
  602. int goodsQuantity;
  603. int orderStatus;
  604. String orderNo;
  605. String goods;
  606. String receiptCompanyName;
  607. String sendCompanyName;
  608. FromStatusGetOrderList({
  609. this.goodsAgencyFund,
  610. this.goodsFreight,
  611. this.goodsQuantity,
  612. this.orderStatus,
  613. this.orderNo,
  614. this.goods,
  615. this.receiptCompanyName,
  616. this.sendCompanyName,
  617. });
  618. factory FromStatusGetOrderList.fromJson(Map<String, dynamic> json) {
  619. return FromStatusGetOrderList(
  620. goodsAgencyFund: json['goodsAgencyFund'],
  621. goodsFreight: json['goodsFreight'],
  622. goodsQuantity: json['goodsQuantity'],
  623. orderStatus: json['orderStatus'],
  624. orderNo: json['orderNo'],
  625. goods: json['goods'],
  626. receiptCompanyName: json['receiptCompanyName'],
  627. sendCompanyName: json['sendCompanyName'],
  628. );
  629. }
  630. }
  631. //提交改单、作废、寄件、拒收、签收后返回对象
  632. class OrderStatusReturnObj {
  633. bool success;
  634. int code;
  635. String msg;
  636. OrderStatusReturnObj({this.success, this.code, this.msg});
  637. factory OrderStatusReturnObj.fromJson(Map<String, dynamic> json) {
  638. return OrderStatusReturnObj(
  639. success: json['success'],
  640. code: json['code'],
  641. msg: json['msg'],
  642. );
  643. }
  644. }
  645. //模糊匹配订单号返回对象
  646. class LikeOrderNo {
  647. bool success;
  648. int code;
  649. String msg;
  650. List data;
  651. LikeOrderNo({
  652. this.success,
  653. this.code,
  654. this.msg,
  655. this.data,
  656. });
  657. factory LikeOrderNo.fromJson(Map<String, dynamic> json) {
  658. return LikeOrderNo(
  659. success: json['success'],
  660. code: json['code'],
  661. msg: json['msg'],
  662. data: json['data'],
  663. );
  664. }
  665. }
  666. //验证token是否过期返回对象
  667. class CheckToken {
  668. bool success;
  669. int code;
  670. String msg;
  671. String data;
  672. CheckToken({
  673. this.success,
  674. this.code,
  675. this.msg,
  676. this.data,
  677. });
  678. factory CheckToken.fromJson(Map<String, dynamic> json) {
  679. return CheckToken(
  680. success: json['success'],
  681. code: json['code'],
  682. msg: json['msg'],
  683. data: json['data'],
  684. );
  685. }
  686. }
  687. //蓝牙信息缓存对象
  688. class BtInfoList {
  689. List<BtInfoObj> btList;
  690. BtInfoList({this.btList});
  691. factory BtInfoList.fromJson(List json) {
  692. List tempList = json.map((i) => BtInfoObj.fromJson(i)).toList();
  693. return BtInfoList(btList: tempList);
  694. }
  695. }
  696. class BtInfoObj {
  697. String name;
  698. bool showLoadStauts;
  699. bool connectStatus;
  700. BtInfoObj({this.name, this.showLoadStauts, this.connectStatus});
  701. factory BtInfoObj.fromJson(Map<String, dynamic> json) {
  702. return BtInfoObj(
  703. name: json['name'],
  704. showLoadStauts: json['showLoadStauts'],
  705. connectStatus: json['connectStatus'],
  706. );
  707. }
  708. }
  709. //根据公司id获取线路
  710. class CompanyOfLine {
  711. bool success;
  712. int code;
  713. String msg;
  714. List<CompanyOfLineList> data;
  715. CompanyOfLine({
  716. this.success,
  717. this.code,
  718. this.msg,
  719. this.data
  720. });
  721. factory CompanyOfLine.fromJson(Map<String,dynamic> json){
  722. var list = json['data'] as List;
  723. List tempList = list.map((i) => CompanyOfLineList.fromJson(i)).toList();
  724. return CompanyOfLine(
  725. success:json['success'],
  726. code:json['code'],
  727. msg:json['msg'],
  728. data:tempList,
  729. );
  730. }
  731. }
  732. class CompanyOfLineList {
  733. int lineId;
  734. String lineName;
  735. int uzerCompanyId;
  736. bool checkedStatus = false;
  737. CompanyOfLineList({
  738. this.lineId,
  739. this.lineName,
  740. this.uzerCompanyId,
  741. });
  742. factory CompanyOfLineList.fromJson(Map<String, dynamic> json) {
  743. return CompanyOfLineList(
  744. lineId:json['lineId'],
  745. lineName:json['lineName'],
  746. uzerCompanyId:json['uzerCompanyId'],
  747. );
  748. }
  749. }
  750. //物流公司客服电话及公司名
  751. class CompanyInfo{
  752. bool success;
  753. int code;
  754. String msg;
  755. CompanyInfoChild data;
  756. CompanyInfo({
  757. this.success,
  758. this.code,
  759. this.msg,
  760. this.data
  761. });
  762. factory CompanyInfo.fromJson(Map<String,dynamic> json){
  763. CompanyInfoChild data = CompanyInfoChild.fromJson(json['data']);
  764. return CompanyInfo(
  765. success:json['success'],
  766. code:json['code'],
  767. msg:json['msg'],
  768. data:data
  769. );
  770. }
  771. }
  772. class CompanyInfoChild{
  773. String customerPhone;
  774. String name;
  775. CompanyInfoChild({
  776. this.customerPhone,
  777. this.name
  778. });
  779. factory CompanyInfoChild.fromJson(Map<String,dynamic> json){
  780. return CompanyInfoChild(
  781. customerPhone:json['customerPhone'],
  782. name:json['name']
  783. );
  784. }
  785. }