models.dart 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  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. String stationId;
  30. LoginMap(
  31. {this.userId,
  32. this.avatarUrl,
  33. this.nickName,
  34. this.roleType,
  35. this.status,
  36. this.token,
  37. this.stationId});
  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. stationId: json['stationId'].toString());
  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. OrderDetailData(
  424. {
  425. this.createTime,
  426. this.orderNo,
  427. this.goods,
  428. this.goodsAgencyFund,
  429. this.goodsCategoryId,
  430. this.goodsCategoryName,
  431. this.goodsFlatCost,
  432. this.goodsFreight,
  433. this.goodsInsurance,
  434. this.goodsOtherFees,
  435. this.goodsPackingId,
  436. this.goodsPackingName,
  437. this.goodsPaymentMethod,
  438. this.goodsPriceProtection,
  439. this.goodsQuantity,
  440. this.goodsValue,
  441. this.goodsWeight,
  442. this.id,
  443. this.lineCode,
  444. this.lineId,
  445. this.lineName,
  446. this.memo,
  447. this.orderStatus,
  448. this.receiptCompanyAddress,
  449. this.receiptCompanyAreaCode,
  450. this.receiptCompanyAreaName,
  451. this.receiptCompanyPhone,
  452. this.receiptCompanyBankCard,
  453. this.receiptCompanyCityCode,
  454. this.receiptCompanyCityName,
  455. this.receiptCompanyName,
  456. this.receiptCompanyProvinceCode,
  457. this.receiptCompanyProvinceName,
  458. this.sendCompanyAddress,
  459. this.sendCompanyAreaCode,
  460. this.sendCompanyAreaName,
  461. this.sendCompanyBankCard,
  462. this.sendCompanyCityCode,
  463. this.sendCompanyCityName,
  464. this.sendCompanyId,
  465. this.sendCompanyName,
  466. this.sendCompanyCode,
  467. this.sendCompanyProvinceCode,
  468. this.sendCompanyProvinceName,
  469. this.senderIdCard,
  470. this.senderName,
  471. this.sendCompanyPhone,
  472. this.senderPhone,
  473. this.stationId,
  474. this.stationName
  475. });
  476. factory OrderDetailData.fromJson(Map<String, dynamic> json) {
  477. return OrderDetailData(
  478. createTime:json['createTime'],
  479. orderNo: json['orderNo'],
  480. goods: json['goods'],
  481. goodsAgencyFund: json['goodsAgencyFund'],
  482. goodsCategoryId:json['goodsCategoryId'],
  483. goodsCategoryName:json['goodsCategoryName'],
  484. goodsFlatCost: json['goodsFlatCost'],
  485. goodsFreight: json['goodsFreight'],
  486. goodsInsurance: json['goodsInsurance'],
  487. goodsOtherFees: json['goodsOtherFees'],
  488. goodsPackingId:json['goodsPackingId'],
  489. goodsPackingName:json['goodsPackingName'],
  490. goodsPriceProtection: json['goodsPriceProtection'],
  491. goodsPaymentMethod:json['goodsPaymentMethod'],
  492. goodsQuantity: json['goodsQuantity'],
  493. goodsValue: json['goodsValue'],
  494. goodsWeight: json['goodsWeight'],
  495. id: json['id'],
  496. lineCode:json['lineCode'],
  497. lineId:json['lineId'],
  498. lineName:json['lineName'],
  499. memo: json['memo'],
  500. orderStatus: json['orderStatus'],
  501. receiptCompanyAddress: json['receiptCompanyAddress'],
  502. receiptCompanyAreaCode: json['receiptCompanyAreaCode'],
  503. receiptCompanyAreaName: json['receiptCompanyAreaName'],
  504. receiptCompanyBankCard: json['receiptCompanyBankCard'],
  505. receiptCompanyCityCode: json['receiptCompanyCityCode'],
  506. receiptCompanyCityName: json['receiptCompanyCityName'],
  507. receiptCompanyName: json['receiptCompanyName'],
  508. receiptCompanyPhone: json['receiptCompanyPhone'],
  509. receiptCompanyProvinceCode: json['receiptCompanyProvinceCode'],
  510. receiptCompanyProvinceName: json['receiptCompanyProvinceName'],
  511. sendCompanyAddress: json['sendCompanyAddress'],
  512. sendCompanyAreaCode: json['sendCompanyAreaCode'],
  513. sendCompanyAreaName: json['sendCompanyAreaName'],
  514. sendCompanyBankCard: json['sendCompanyBankCard'],
  515. sendCompanyCityCode: json['sendCompanyCityCode'],
  516. sendCompanyCityName: json['sendCompanyCityName'],
  517. sendCompanyId: json['sendCompanyId'],
  518. sendCompanyName: json['sendCompanyName'],
  519. sendCompanyCode: json['sendCompanyCode'],
  520. sendCompanyProvinceCode: json['sendCompanyProvinceCode'],
  521. sendCompanyProvinceName: json['sendCompanyProvinceName'],
  522. senderIdCard: json['senderIdCard'],
  523. senderName: json['senderName'],
  524. senderPhone: json['senderPhone'],
  525. sendCompanyPhone:json['sendCompanyPhone'],
  526. stationId:json['stationId'],
  527. stationName:json['stationName']
  528. );
  529. }
  530. }
  531. //接单对象
  532. class OrderReception {
  533. bool success;
  534. int code;
  535. String msg;
  536. OrderReception({
  537. this.success,
  538. this.code,
  539. this.msg,
  540. });
  541. factory OrderReception.fromJson(Map<String, dynamic> json) {
  542. return OrderReception(
  543. success: json['success'],
  544. code: json['code'],
  545. msg: json['msg'],
  546. );
  547. }
  548. }
  549. //订单管理获取列表
  550. class FromStatusGetOrderObj {
  551. bool success;
  552. int code;
  553. String msg;
  554. FromStatusGetOrderData data;
  555. FromStatusGetOrderObj({this.success, this.code, this.msg, this.data});
  556. factory FromStatusGetOrderObj.fromJson(Map<String, dynamic> json) {
  557. return FromStatusGetOrderObj(
  558. success: json['success'],
  559. code: json['code'],
  560. msg: json['msg'],
  561. data: FromStatusGetOrderData.fromJson(json['data']));
  562. }
  563. }
  564. class FromStatusGetOrderData {
  565. bool hasNextPage;
  566. List<FromStatusGetOrderList> items;
  567. int limit;
  568. int page;
  569. int totalCount;
  570. int totalPage;
  571. FromStatusGetOrderData({
  572. this.hasNextPage,
  573. this.items,
  574. this.limit,
  575. this.page,
  576. this.totalCount,
  577. this.totalPage,
  578. });
  579. factory FromStatusGetOrderData.fromJson(Map<String, dynamic> json) {
  580. List list = json['items'] as List;
  581. List<FromStatusGetOrderList> tempList =
  582. list.map((i) => FromStatusGetOrderList.fromJson(i)).toList();
  583. return FromStatusGetOrderData(
  584. hasNextPage: json['hasNextPage'],
  585. items: tempList,
  586. limit: json['limit'],
  587. page: json['page'],
  588. totalCount: json['totalCount'],
  589. totalPage: json['totalPage'],
  590. );
  591. }
  592. }
  593. class FromStatusGetOrderList {
  594. int goodsAgencyFund;
  595. int goodsFreight;
  596. int goodsQuantity;
  597. int orderStatus;
  598. String orderNo;
  599. String goods;
  600. String receiptCompanyName;
  601. String sendCompanyName;
  602. FromStatusGetOrderList({
  603. this.goodsAgencyFund,
  604. this.goodsFreight,
  605. this.goodsQuantity,
  606. this.orderStatus,
  607. this.orderNo,
  608. this.goods,
  609. this.receiptCompanyName,
  610. this.sendCompanyName,
  611. });
  612. factory FromStatusGetOrderList.fromJson(Map<String, dynamic> json) {
  613. return FromStatusGetOrderList(
  614. goodsAgencyFund: json['goodsAgencyFund'],
  615. goodsFreight: json['goodsFreight'],
  616. goodsQuantity: json['goodsQuantity'],
  617. orderStatus: json['orderStatus'],
  618. orderNo: json['orderNo'],
  619. goods: json['goods'],
  620. receiptCompanyName: json['receiptCompanyName'],
  621. sendCompanyName: json['sendCompanyName'],
  622. );
  623. }
  624. }
  625. //提交改单、作废、寄件、拒收、签收后返回对象
  626. class OrderStatusReturnObj {
  627. bool success;
  628. int code;
  629. String msg;
  630. OrderStatusReturnObj({this.success, this.code, this.msg});
  631. factory OrderStatusReturnObj.fromJson(Map<String, dynamic> json) {
  632. return OrderStatusReturnObj(
  633. success: json['success'],
  634. code: json['code'],
  635. msg: json['msg'],
  636. );
  637. }
  638. }
  639. //模糊匹配订单号返回对象
  640. class LikeOrderNo {
  641. bool success;
  642. int code;
  643. String msg;
  644. List data;
  645. LikeOrderNo({
  646. this.success,
  647. this.code,
  648. this.msg,
  649. this.data,
  650. });
  651. factory LikeOrderNo.fromJson(Map<String, dynamic> json) {
  652. return LikeOrderNo(
  653. success: json['success'],
  654. code: json['code'],
  655. msg: json['msg'],
  656. data: json['data'],
  657. );
  658. }
  659. }
  660. //验证token是否过期返回对象
  661. class CheckToken {
  662. bool success;
  663. int code;
  664. String msg;
  665. String data;
  666. CheckToken({
  667. this.success,
  668. this.code,
  669. this.msg,
  670. this.data,
  671. });
  672. factory CheckToken.fromJson(Map<String, dynamic> json) {
  673. return CheckToken(
  674. success: json['success'],
  675. code: json['code'],
  676. msg: json['msg'],
  677. data: json['data'],
  678. );
  679. }
  680. }
  681. //蓝牙信息缓存对象
  682. class BtInfoList {
  683. List<BtInfoObj> btList;
  684. BtInfoList({this.btList});
  685. factory BtInfoList.fromJson(List json) {
  686. List tempList = json.map((i) => BtInfoObj.fromJson(i)).toList();
  687. return BtInfoList(btList: tempList);
  688. }
  689. }
  690. class BtInfoObj {
  691. String name;
  692. bool showLoadStauts;
  693. bool connectStatus;
  694. BtInfoObj({this.name, this.showLoadStauts, this.connectStatus});
  695. factory BtInfoObj.fromJson(Map<String, dynamic> json) {
  696. return BtInfoObj(
  697. name: json['name'],
  698. showLoadStauts: json['showLoadStauts'],
  699. connectStatus: json['connectStatus'],
  700. );
  701. }
  702. }
  703. //根据公司id获取线路
  704. class CompanyOfLine {
  705. bool success;
  706. int code;
  707. String msg;
  708. List<CompanyOfLineList> data;
  709. CompanyOfLine({
  710. this.success,
  711. this.code,
  712. this.msg,
  713. this.data
  714. });
  715. factory CompanyOfLine.fromJson(Map<String,dynamic> json){
  716. var list = json['data'] as List;
  717. List tempList = list.map((i) => CompanyOfLineList.fromJson(i)).toList();
  718. return CompanyOfLine(
  719. success:json['success'],
  720. code:json['code'],
  721. msg:json['msg'],
  722. data:tempList,
  723. );
  724. }
  725. }
  726. class CompanyOfLineList {
  727. int lineId;
  728. String lineName;
  729. int uzerCompanyId;
  730. bool checkedStatus = false;
  731. CompanyOfLineList({
  732. this.lineId,
  733. this.lineName,
  734. this.uzerCompanyId,
  735. });
  736. factory CompanyOfLineList.fromJson(Map<String, dynamic> json) {
  737. return CompanyOfLineList(
  738. lineId:json['lineId'],
  739. lineName:json['lineName'],
  740. uzerCompanyId:json['uzerCompanyId'],
  741. );
  742. }
  743. }