models.dart 24 KB

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