123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- class RepairListEntity {
- int pageNum;
- int pageCount;
- int total;
- int pageSize;
- bool hasNext;
- bool hasPrev;
- List<RepairItem> rows;
- RepairListEntity.fromJsonMap(Map<String, dynamic> map):
- pageNum = map["pageNum"],
- pageCount = map["pageCount"],
- total = map["total"],
- pageSize = map["pageSize"],
- hasNext = map["hasNext"],
- hasPrev = map["hasPrev"],
- rows = List<RepairItem>.from(map["rows"].map((it) => RepairItem.fromJsonMap(it)));
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['pageNum'] = pageNum;
- data['pageCount'] = pageCount;
- data['total'] = total;
- data['pageSize'] = pageSize;
- data['hasNext'] = hasNext;
- data['hasPrev'] = hasPrev;
- data['rows'] = rows != null ?
- this.rows.map((v) => v.toJson()).toList()
- : null;
- return data;
- }
- }
- class RepairItem {
- String createDate;
- String creatorId;
- String updateDate;
- String updateId;
- String id;
- String mtCompanyId;
- String liftId;
- String projectId;
- int isTrapped;
- int isCritical;
- String callerFaultDescription;
- int source;
- String callerId;
- String callerName;
- String callerTel;
- String callerDate;
- String stopDate;
- String assignTime;
- String takingTime;
- String arriveTime;
- String recoveryDate;
- String sparepart;
- String charge;
- String workerFaultDescription;
- String fieldDescription;
- String repairProcedure;
- String workerId;
- String workerTel;
- String position;
- int status;
- String readTime;
- int repairReason;
- String partsCost;
- String safetyConfirm;
- String workerId1;
- String costTotal;
- String closeReason;
- String faultPart;
- String faultReason;
- String faultHandle;
- String faultNature;
- String faultDuty;
- String mainSign;
- String secondSign;
- int hasEvaluate;
- String areaName;
- String projectName;
- String projectCode;
- String registrationCode;
- String devicePosition;
- String useCompanyCode;
- int liftCategory;
- String liftCode;
- String workerName;
- String createName;
- String liftCompanyStatus;
- // List<Object> erRecordCosts;
- int repairDiff;
- String repairDuration;
- List<FaultItem> faultParts;
- List<FaultItem> faultReasons;
- List<FaultItem> faultHandles;
- List<FaultItem> faultNatures;
- List<FaultItem> faultDuties;
- Evaluation evaluation;
- List<ErRecordImgs> erRecordImgs;
- String getLiftCategory(){
- String str = "";
- switch(liftCategory){
- case 1:
- str = "曳引梯";
- break;
- case 2:
- str = "液压梯";
- break;
- case 3:
- str = "杂物梯";
- break;
- case 4:
- str = "自动扶梯";
- break;
- case 5:
- str = "自动人行道";
- break;
- }
- return str;
- }
- RepairItem.fromJsonMap(Map<String, dynamic> map):
- createDate = map["createDate"],
- creatorId = map["creatorId"],
- updateDate = map["updateDate"],
- updateId = map["updateId"],
- id = map["id"],
- mtCompanyId = map["mtCompanyId"],
- liftId = map["liftId"],
- projectId = map["projectId"]??"",
- isTrapped = map["isTrapped"]??0,
- isCritical = map["isCritical"]??0,
- callerFaultDescription = map["callerFaultDescription"]??"",
- source = map["source"]??0,
- callerId = map["callerId"]??"",
- callerName = map["callerName"]??"",
- callerTel = map["callerTel"],
- callerDate = map["callerDate"]??"",
- stopDate = map["stopDate"]??"",
- assignTime = map["assignTime"]??"",
- takingTime = map["takingTime"]??"",
- arriveTime = map["arriveTime"]??"",
- recoveryDate = map["recoveryDate"]??"",
- sparepart = map["sparepart"],
- charge = map["charge"],
- workerFaultDescription = map["workerFaultDescription"],
- fieldDescription = map["fieldDescription"],
- repairProcedure = map["repairProcedure"],
- workerId = map["workerId"],
- workerTel = map["workerTel"],
- position = map["position"],
- status = map["status"],
- readTime = map["readTime"],
- repairReason = map["repairReason"],
- partsCost = "${map["partsCost"]}",
- safetyConfirm = map["safetyConfirm"],
- workerId1 = map["workerId1"],
- costTotal = "${map["costTotal"]}",
- closeReason = map["closeReason"],
- faultPart = map["faultPart"],
- faultReason = map["faultReason"],
- faultHandle = map["faultHandle"],
- faultNature = map["faultNature"],
- faultDuty = map["faultDuty"],
- mainSign = map["mainSign"],
- secondSign = map["secondSign"],
- hasEvaluate = map["hasEvaluate"],
- areaName = map["areaName"],
- projectName = map["projectName"],
- projectCode = map["projectCode"],
- registrationCode = map["registrationCode"],
- devicePosition = map["devicePosition"],
- useCompanyCode = map["useCompanyCode"],
- liftCategory = map["liftCategory"],
- liftCode = map["liftCode"],
- workerName = map["workerName"],
- createName = map["createName"],
- liftCompanyStatus = map["liftCompanyStatus"],
- repairDiff = map["repairDiff"],
- repairDuration = map["repairDuration"],
- faultParts = List<FaultItem>.from((map["faultParts"]??[]).map((it) => FaultItem.fromJsonMap(it))),
- faultReasons = List<FaultItem>.from((map["faultReasons"]??[]).map((it) => FaultItem.fromJsonMap(it))),
- faultHandles =List<FaultItem>.from((map["faultHandles"]??[]).map((it) => FaultItem.fromJsonMap(it))),
- faultNatures =List<FaultItem>.from((map["faultNatures"]??[]).map((it) => FaultItem.fromJsonMap(it))),
- faultDuties = List<FaultItem>.from((map["faultDuties"]??[]).map((it) => FaultItem.fromJsonMap(it))),
- evaluation = Evaluation.fromJsonMap(map["evaluation"]??{}),
- erRecordImgs = List<ErRecordImgs>.from((map["erRecordImgs"]??[]).map((it) => ErRecordImgs.fromJsonMap(it)));
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['createDate'] = createDate;
- data['creatorId'] = creatorId;
- data['updateDate'] = updateDate;
- data['updateId'] = updateId;
- data['id'] = id;
- data['mtCompanyId'] = mtCompanyId;
- data['liftId'] = liftId;
- data['projectId'] = projectId;
- data['isTrapped'] = isTrapped;
- data['isCritical'] = isCritical;
- data['callerFaultDescription'] = callerFaultDescription;
- data['source'] = source;
- data['callerId'] = callerId;
- data['callerName'] = callerName;
- data['callerTel'] = callerTel;
- data['callerDate'] = callerDate;
- data['stopDate'] = stopDate;
- data['assignTime'] = assignTime;
- data['takingTime'] = takingTime;
- data['arriveTime'] = arriveTime;
- data['recoveryDate'] = recoveryDate;
- data['sparepart'] = sparepart;
- data['charge'] = charge;
- data['workerFaultDescription'] = workerFaultDescription;
- data['fieldDescription'] = fieldDescription;
- data['repairProcedure'] = repairProcedure;
- data['workerId'] = workerId;
- data['workerTel'] = workerTel;
- data['position'] = position;
- data['status'] = status;
- data['readTime'] = readTime;
- data['repairReason'] = repairReason;
- data['partsCost'] = partsCost;
- data['safetyConfirm'] = safetyConfirm;
- data['workerId1'] = workerId1;
- data['costTotal'] = costTotal;
- data['closeReason'] = closeReason;
- data['faultPart'] = faultPart;
- data['faultReason'] = faultReason;
- data['faultHandle'] = faultHandle;
- data['faultNature'] = faultNature;
- data['faultDuty'] = faultDuty;
- data['mainSign'] = mainSign;
- data['secondSign'] = secondSign;
- data['hasEvaluate'] = hasEvaluate;
- data['areaName'] = areaName;
- data['projectName'] = projectName;
- data['projectCode'] = projectCode;
- data['registrationCode'] = registrationCode;
- data['devicePosition'] = devicePosition;
- data['useCompanyCode'] = useCompanyCode;
- data['liftCategory'] = liftCategory;
- data['liftCode'] = liftCode;
- data['workerName'] = workerName;
- data['createName'] = createName;
- data['liftCompanyStatus'] = liftCompanyStatus;
- data['repairDiff'] = repairDiff;
- data['repairDuration'] = repairDuration;
- data['faultParts'] = faultParts;
- data['faultReasons'] = faultReasons;
- data['faultHandles'] = faultHandles;
- data['faultNatures'] = faultNatures;
- data['faultDuties'] = faultDuties;
- data['evaluation'] = evaluation;
- data['erRecordImgs'] = erRecordImgs != null ?
- this.erRecordImgs.map((v) => v.toJson()).toList()
- : null;
- return data;
- }
- }
- class ErRecordImgs {
- String id;
- String erRecordId;
- String imgUrl;
- int sort;
- ErRecordImgs.fromJsonMap(Map<String, dynamic> map):
- id = map["id"],
- erRecordId = map["erRecordId"],
- imgUrl = map["imgUrl"],
- sort = map["sort"];
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = id;
- data['erRecordId'] = erRecordId;
- data['imgUrl'] = imgUrl;
- data['sort'] = sort;
- return data;
- }
- }
- class FaultItem {
- String id;
- String code;
- int liftCategory;
- String faultCategory;
- String faultType;
- String faultDesc;
- FaultItem.fromJsonMap(Map<String, dynamic> map):
- id = map["id"],
- code = map["code"],
- liftCategory = map["liftCategory"],
- faultCategory = map["faultCategory"],
- faultType = map["faultType"],
- faultDesc = map["faultDesc"];
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = id;
- data['code'] = code;
- data['liftCategory'] = liftCategory;
- data['faultCategory'] = faultCategory;
- data['faultType'] = faultType;
- data['faultDesc'] = faultDesc;
- return data;
- }
- }
- class Evaluation{
- String id;
- String liftId;
- String recordId;
- int source;
- int type;
- String advice;
- int serviceLevel;
- int starLevel;
- String imgUrl;
- String postDate;
- String userId;
- Evaluation(
- {this.id,
- this.liftId,
- this.recordId,
- this.source,
- this.type,
- this.advice,
- this.serviceLevel,
- this.starLevel,
- this.imgUrl,
- this.postDate,
- this.userId});
- Evaluation.fromJsonMap(Map<String, dynamic> json) {
- id = json['id'];
- liftId = json['liftId'];
- recordId = json['recordId'];
- source = json['source'];
- type = json['type'];
- advice = json['advice'];
- serviceLevel = json['serviceLevel'];
- starLevel = json['starLevel'];
- imgUrl = json['imgUrl'];
- postDate = json['postDate'];
- userId = json['userId'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = this.id;
- data['liftId'] = this.liftId;
- data['recordId'] = this.recordId;
- data['source'] = this.source;
- data['type'] = this.type;
- data['advice'] = this.advice;
- data['serviceLevel'] = this.serviceLevel;
- data['starLevel'] = this.starLevel;
- data['imgUrl'] = this.imgUrl;
- data['postDate'] = this.postDate;
- data['userId'] = this.userId;
- return data;
- }
- }
- class RepairCreateItem {
- String projectId;
- String projectName;
- String registrationCode;
- String liftId;
- String callerName;
- String callerTel;
- String callerDate;
- String callerFaultDescription;
- int isTrapped;//是否关人(0 否;1 是)
- int isCritical;//是否紧急(0 否;1 是)
- int repairReason;//急修原因(0 其他;1 停电;2 故障)
- RepairCreateItem({
- this.projectId="",
- this.projectName="",
- this.registrationCode="",
- this.liftId="",
- this.callerName="",
- this.callerTel="",
- this.callerDate="",
- this.callerFaultDescription="",
- this.isTrapped=0,
- this.isCritical=0,
- this.repairReason=0,
- });
- }
|