lift_item.dart 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. class LiftItem {
  2. String createDate;
  3. String creatorId;
  4. String updateDate;
  5. String updateId;
  6. String id;
  7. String registrationCode;
  8. int category;
  9. int liftType;
  10. String liftCode;
  11. String manufactureDate;
  12. String factoryCode;
  13. int deviceUsage;
  14. String liftBrand;
  15. String liftBrandName;
  16. String installCompany;
  17. String liftModel;
  18. String pulleyDiameter;
  19. String ropeNum;
  20. String lockModel;
  21. String ratedLoad;
  22. String promoteHeight;
  23. String stepWidth;
  24. String sidewalkLength;
  25. String tiltAngle;
  26. String motorPower;
  27. String ratedSpeed;
  28. String layerStationDoor;
  29. int clampType;
  30. String reformCompany;
  31. String devicePosition;
  32. String coordinate;
  33. String remarks;
  34. String steelBelt;
  35. String cylinderType;
  36. String cylinderNum;
  37. String topType;
  38. String controlType;
  39. String mpa;
  40. String factory;
  41. String customNumber;
  42. String useCompanyCode;
  43. String devicePositionCode;
  44. String agency;
  45. String reformDate;
  46. String installDate;
  47. String innerFloor;
  48. String annualInspectionDate;
  49. String areaCode;
  50. String deviceId;
  51. String deviceType;
  52. String liftStatus;
  53. String workerName;
  54. String workerId;
  55. String relevanceId;
  56. bool liftLocked;
  57. LiftItem(
  58. {this.createDate="",
  59. this.creatorId="",
  60. this.updateDate="",
  61. this.updateId="",
  62. this.id="",
  63. this.registrationCode="",
  64. this.category=0,
  65. this.liftType=0,
  66. // this.categoryName = "",
  67. this.liftCode="",
  68. this.manufactureDate="",
  69. this.factoryCode="",
  70. this.deviceUsage=0,
  71. // this.deviceUsageName="",
  72. this.liftBrand="",
  73. this.liftBrandName="",
  74. this.installCompany="",
  75. this.liftModel="",
  76. this.pulleyDiameter="",
  77. this.ropeNum="",
  78. this.lockModel="",
  79. this.ratedLoad="",
  80. this.promoteHeight="",
  81. this.stepWidth="",
  82. this.sidewalkLength="",
  83. this.tiltAngle="",
  84. this.motorPower="",
  85. this.ratedSpeed="",
  86. this.layerStationDoor="",
  87. this.clampType=0,
  88. this.reformCompany="",
  89. this.devicePosition="",
  90. this.coordinate="",
  91. this.remarks="",
  92. this.steelBelt="",
  93. this.cylinderType="",
  94. this.cylinderNum="",
  95. this.topType="",
  96. this.controlType="",
  97. this.mpa="",
  98. this.factory="",
  99. this.customNumber="",
  100. this.useCompanyCode="",
  101. this.devicePositionCode="",
  102. this.agency="",
  103. this.reformDate="",
  104. this.installDate="",
  105. this.innerFloor="",
  106. this.annualInspectionDate="",
  107. this.areaCode="",
  108. this.deviceId="",
  109. this.deviceType="",
  110. this.liftStatus="",
  111. this.workerName="",
  112. this.workerId = "",
  113. this.liftLocked = true,
  114. this.relevanceId});
  115. String getCategoryName(){
  116. print("category:${category}");
  117. String str = "";
  118. switch(category){
  119. case 1:
  120. str = "曳引梯";
  121. break;
  122. case 2:
  123. str = "液压梯";
  124. break;
  125. case 3:
  126. str = "杂物梯";
  127. break;
  128. case 4:
  129. str = "自动扶梯";
  130. break;
  131. case 5:
  132. str = "自动人行道";
  133. break;
  134. }
  135. return str;
  136. }
  137. String getDeviceUsageName(){
  138. String str = "";
  139. switch(deviceUsage){
  140. case 11:
  141. str = "货梯";
  142. break;
  143. case 12:
  144. str = "客梯";
  145. break;
  146. case 13:
  147. str = "医梯";
  148. break;
  149. case 14:
  150. str = "观光梯";
  151. break;
  152. case 15:
  153. str = "杂物梯";
  154. break;
  155. case 16:
  156. str = "别墅梯";
  157. break;
  158. case 21:
  159. str = "自动扶梯";
  160. break;
  161. case 21:
  162. str = "自动人行道";
  163. break;
  164. }
  165. return str;
  166. }
  167. LiftItem.fromJsonMap(Map<String, dynamic> json) {
  168. createDate = json['createDate']??"";
  169. creatorId = json['creatorId']??"";
  170. updateDate = json['updateDate']??"";
  171. updateId = json['updateId']??"";
  172. id = json['id']??"";
  173. registrationCode = json['registrationCode']??"";
  174. category = json['category']??0;
  175. liftType = json['liftType']??0;
  176. liftCode = json['liftCode']??"";
  177. manufactureDate = json['manufactureDate']??"";
  178. factoryCode = json['factoryCode']??"";
  179. deviceUsage =json['deviceUsage']??"";
  180. liftBrand = "${json['liftBrand']??""}";
  181. liftBrandName = "${json['liftBrandName']??""}";
  182. installCompany = "${json['installCompany']??""}";
  183. liftModel = "${json['liftModel']??""}";
  184. pulleyDiameter = "${json['pulleyDiameter']??""}";
  185. ropeNum = "${json['ropeNum']??""}";
  186. lockModel = "${json['lockModel']??""}";
  187. ratedLoad = "${json['ratedLoad']??""}";
  188. promoteHeight = "${json['promoteHeight']??""}";
  189. stepWidth = "${json['stepWidth']}";
  190. sidewalkLength = "${json['sidewalkLength']??""}";
  191. tiltAngle = "${json['tiltAngle']??""}";
  192. motorPower = "${json['motorPower']??""}";
  193. ratedSpeed = "${json['ratedSpeed']??""}";
  194. layerStationDoor = "${json['layerStationDoor']??""}";
  195. clampType = json['clampType'];
  196. reformCompany = "${json['reformCompany']??""}";
  197. devicePosition = "${json['devicePosition']??""}";
  198. coordinate = "${json['coordinate']??""}";
  199. remarks = "${json['remarks']??""}";
  200. steelBelt = "${json['steelBelt']??""}";
  201. cylinderType = "${json['cylinderType']??""}";
  202. cylinderNum = "${json['cylinderNum']??""}";
  203. topType = "${json['topType']??""}";
  204. controlType = "${json['controlType']??""}";
  205. mpa = "${json['mpa']??""}";
  206. factory = "${json['factory']??""}";
  207. customNumber = "${json['customNumber']??""}";
  208. useCompanyCode = "${json['useCompanyCode']??""}";
  209. devicePositionCode = "${json['devicePositionCode']??""}";
  210. agency = "${json['agency']??""}";
  211. reformDate = "${json['reformDate']??""}";
  212. installDate = "${json['installDate']??""}";
  213. innerFloor = "${json['innerFloor']??""}";
  214. annualInspectionDate = "${json['annualInspectionDate']??""}";
  215. areaCode = "${json['areaCode']??""}";
  216. deviceId = "${json['deviceId']??""}";
  217. deviceType = "${json['deviceType']??""}";
  218. liftStatus = "${json['liftStatus']??""}";
  219. workerName = "${json['workerName']??""}";
  220. relevanceId = "${json['relevanceId']??""}";
  221. liftLocked = json['liftLocked']??true;
  222. workerId = "${json['workerId']}";
  223. }
  224. Map<String, dynamic> toJson() {
  225. final Map<String, dynamic> data = new Map<String, dynamic>();
  226. data['createDate'] = this.createDate;
  227. data['creatorId'] = this.creatorId;
  228. data['updateDate'] = this.updateDate;
  229. data['updateId'] = this.updateId;
  230. data['id'] = this.id;
  231. data['registrationCode'] = this.registrationCode;
  232. data['category'] = this.category;
  233. data['liftType'] = this.liftType;
  234. data['liftCode'] = this.liftCode;
  235. data['manufactureDate'] = this.manufactureDate;
  236. data['factoryCode'] = this.factoryCode;
  237. data['deviceUsage'] = this.deviceUsage;
  238. data['liftBrand'] = this.liftBrand;
  239. data['liftBrandName'] = this.liftBrandName;
  240. data['installCompany'] = this.installCompany;
  241. data['liftModel'] = this.liftModel;
  242. data['pulleyDiameter'] = this.pulleyDiameter;
  243. data['ropeNum'] = this.ropeNum;
  244. data['lockModel'] = this.lockModel;
  245. data['ratedLoad'] = this.ratedLoad;
  246. data['promoteHeight'] = this.promoteHeight;
  247. data['stepWidth'] = this.stepWidth;
  248. data['sidewalkLength'] = this.sidewalkLength;
  249. data['tiltAngle'] = this.tiltAngle;
  250. data['motorPower'] = this.motorPower;
  251. data['ratedSpeed'] = this.ratedSpeed;
  252. data['layerStationDoor'] = this.layerStationDoor;
  253. data['clampType'] = this.clampType;
  254. data['reformCompany'] = this.reformCompany;
  255. data['devicePosition'] = this.devicePosition;
  256. data['coordinate'] = this.coordinate;
  257. data['remarks'] = this.remarks;
  258. data['steelBelt'] = this.steelBelt;
  259. data['cylinderType'] = this.cylinderType;
  260. data['cylinderNum'] = this.cylinderNum;
  261. data['topType'] = this.topType;
  262. data['controlType'] = this.controlType;
  263. data['mpa'] = this.mpa;
  264. data['factory'] = this.factory;
  265. data['customNumber'] = this.customNumber;
  266. data['useCompanyCode'] = this.useCompanyCode;
  267. data['devicePositionCode'] = this.devicePositionCode;
  268. data['agency'] = this.agency;
  269. data['reformDate'] = this.reformDate;
  270. data['installDate'] = this.installDate;
  271. data['innerFloor'] = this.innerFloor;
  272. data['annualInspectionDate'] = this.annualInspectionDate;
  273. data['areaCode'] = this.areaCode;
  274. data['deviceId'] = this.deviceId;
  275. data['deviceType'] = this.deviceType;
  276. data['liftStatus'] = this.liftStatus;
  277. data['workerName'] = this.workerName;
  278. data['workerId'] = this.workerId;
  279. data['relevanceId'] = this.relevanceId;
  280. return data;
  281. }
  282. }