class LiftItem {
	String createDate;
	String creatorId;
	String updateDate;
	String updateId;
	String id;
	String registrationCode;
	int category;
	int liftType;
	String liftCode;
	String manufactureDate;
	String factoryCode;
	int deviceUsage;
	String liftBrand;
	String liftBrandName;
	String installCompany;
	String liftModel;
	String pulleyDiameter;
	String ropeNum;
	String lockModel;
	String ratedLoad;
	String promoteHeight;
	String stepWidth;
	String sidewalkLength;
	String tiltAngle;
	String motorPower;
	String ratedSpeed;
	String layerStationDoor;
	int clampType;
	String reformCompany;
	String devicePosition;
	String coordinate;
	String remarks;
	String steelBelt;
	String cylinderType;
	String cylinderNum;
	String topType;
	String controlType;
	String mpa;
	String factory;
	String customNumber;
	String useCompanyCode;
	String devicePositionCode;
	String agency;
	String reformDate;
	String installDate;
	String innerFloor;
	String annualInspectionDate;
	String areaCode;
	String deviceId;
	String deviceType;
	String liftStatus;
	String workerName;
	String workerId;
	String relevanceId;
	bool liftLocked;

	LiftItem(
			{this.createDate="",
				this.creatorId="",
				this.updateDate="",
				this.updateId="",
				this.id="",
				this.registrationCode="",
				this.category=0,
				this.liftType=0,
//				this.categoryName = "",
				this.liftCode="",
				this.manufactureDate="",
				this.factoryCode="",
				this.deviceUsage=0,
//				this.deviceUsageName="",
				this.liftBrand="",
				this.liftBrandName="",
				this.installCompany="",
				this.liftModel="",
				this.pulleyDiameter="",
				this.ropeNum="",
				this.lockModel="",
				this.ratedLoad="",
				this.promoteHeight="",
				this.stepWidth="",
				this.sidewalkLength="",
				this.tiltAngle="",
				this.motorPower="",
				this.ratedSpeed="",
				this.layerStationDoor="",
				this.clampType=0,
				this.reformCompany="",
				this.devicePosition="",
				this.coordinate="",
				this.remarks="",
				this.steelBelt="",
				this.cylinderType="",
				this.cylinderNum="",
				this.topType="",
				this.controlType="",
				this.mpa="",
				this.factory="",
				this.customNumber="",
				this.useCompanyCode="",
				this.devicePositionCode="",
				this.agency="",
				this.reformDate="",
				this.installDate="",
				this.innerFloor="",
				this.annualInspectionDate="",
				this.areaCode="",
				this.deviceId="",
				this.deviceType="",
				this.liftStatus="",
				this.workerName="",
				this.workerId = "",
				this.liftLocked = true,
				this.relevanceId});

	String getCategoryName(){
		print("category:${category}");
		String str = "";
		switch(category){
			case 1:
				str = "曳引梯";
				break;
			case 2:
				str = "液压梯";
				break;
			case 3:
				str = "杂物梯";
				break;
			case 4:
				str = "自动扶梯";
				break;
			case 5:
				str = "自动人行道";
				break;
		}
		return str;
	}
	String getDeviceUsageName(){
		String str = "";
		switch(deviceUsage){
			case 11:
				str = "货梯";
				break;
			case 12:
				str = "客梯";
				break;
			case 13:
				str = "医梯";
				break;
			case 14:
				str = "观光梯";
				break;
			case 15:
				str = "杂物梯";
				break;
			case 16:
				str = "别墅梯";
				break;
			case 21:
				str = "自动扶梯";
				break;
			case 21:
				str = "自动人行道";
				break;
		}
		return str;
	}

	LiftItem.fromJsonMap(Map<String, dynamic> json) {
		createDate = json['createDate']??"";
		creatorId = json['creatorId']??"";
		updateDate = json['updateDate']??"";
		updateId = json['updateId']??"";
		id = json['id']??"";
		registrationCode = json['registrationCode']??"";
		category = json['category']??0;
		liftType = json['liftType']??0;
		liftCode = json['liftCode']??"";
		manufactureDate = json['manufactureDate']??"";
		factoryCode = json['factoryCode']??"";
		deviceUsage =json['deviceUsage']??"";
		liftBrand = "${json['liftBrand']??""}";
		liftBrandName = "${json['liftBrandName']??""}";
		installCompany = "${json['installCompany']??""}";
		liftModel = "${json['liftModel']??""}";
		pulleyDiameter = "${json['pulleyDiameter']??""}";
		ropeNum = "${json['ropeNum']??""}";
		lockModel = "${json['lockModel']??""}";
		ratedLoad = "${json['ratedLoad']??""}";
		promoteHeight = "${json['promoteHeight']??""}";
		stepWidth = "${json['stepWidth']}";
		sidewalkLength = "${json['sidewalkLength']??""}";
		tiltAngle = "${json['tiltAngle']??""}";
		motorPower = "${json['motorPower']??""}";
		ratedSpeed = "${json['ratedSpeed']??""}";
		layerStationDoor = "${json['layerStationDoor']??""}";
		clampType = json['clampType'];
		reformCompany = "${json['reformCompany']??""}";
		devicePosition = "${json['devicePosition']??""}";
		coordinate = "${json['coordinate']??""}";
		remarks = "${json['remarks']??""}";
		steelBelt = "${json['steelBelt']??""}";
		cylinderType = "${json['cylinderType']??""}";
		cylinderNum = "${json['cylinderNum']??""}";
		topType = "${json['topType']??""}";
		controlType = "${json['controlType']??""}";
		mpa = "${json['mpa']??""}";
		factory = "${json['factory']??""}";
		customNumber = "${json['customNumber']??""}";
		useCompanyCode = "${json['useCompanyCode']??""}";
		devicePositionCode = "${json['devicePositionCode']??""}";
		agency = "${json['agency']??""}";
		reformDate = "${json['reformDate']??""}";
		installDate = "${json['installDate']??""}";
		innerFloor = "${json['innerFloor']??""}";
		annualInspectionDate = "${json['annualInspectionDate']??""}";
		areaCode = "${json['areaCode']??""}";
		deviceId = "${json['deviceId']??""}";
		deviceType = "${json['deviceType']??""}";
		liftStatus = "${json['liftStatus']??""}";
		workerName = "${json['workerName']??""}";
		relevanceId = "${json['relevanceId']??""}";
		liftLocked = json['liftLocked']??true;
		workerId = "${json['workerId']}";
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['createDate'] = this.createDate;
		data['creatorId'] = this.creatorId;
		data['updateDate'] = this.updateDate;
		data['updateId'] = this.updateId;
		data['id'] = this.id;
		data['registrationCode'] = this.registrationCode;
		data['category'] = this.category;
		data['liftType'] = this.liftType;
		data['liftCode'] = this.liftCode;
		data['manufactureDate'] = this.manufactureDate;
		data['factoryCode'] = this.factoryCode;
		data['deviceUsage'] = this.deviceUsage;
		data['liftBrand'] = this.liftBrand;
		data['liftBrandName'] = this.liftBrandName;
		data['installCompany'] = this.installCompany;
		data['liftModel'] = this.liftModel;
		data['pulleyDiameter'] = this.pulleyDiameter;
		data['ropeNum'] = this.ropeNum;
		data['lockModel'] = this.lockModel;
		data['ratedLoad'] = this.ratedLoad;
		data['promoteHeight'] = this.promoteHeight;
		data['stepWidth'] = this.stepWidth;
		data['sidewalkLength'] = this.sidewalkLength;
		data['tiltAngle'] = this.tiltAngle;
		data['motorPower'] = this.motorPower;
		data['ratedSpeed'] = this.ratedSpeed;
		data['layerStationDoor'] = this.layerStationDoor;
		data['clampType'] = this.clampType;
		data['reformCompany'] = this.reformCompany;
		data['devicePosition'] = this.devicePosition;
		data['coordinate'] = this.coordinate;
		data['remarks'] = this.remarks;
		data['steelBelt'] = this.steelBelt;
		data['cylinderType'] = this.cylinderType;
		data['cylinderNum'] = this.cylinderNum;
		data['topType'] = this.topType;
		data['controlType'] = this.controlType;
		data['mpa'] = this.mpa;
		data['factory'] = this.factory;
		data['customNumber'] = this.customNumber;
		data['useCompanyCode'] = this.useCompanyCode;
		data['devicePositionCode'] = this.devicePositionCode;
		data['agency'] = this.agency;
		data['reformDate'] = this.reformDate;
		data['installDate'] = this.installDate;
		data['innerFloor'] = this.innerFloor;
		data['annualInspectionDate'] = this.annualInspectionDate;
		data['areaCode'] = this.areaCode;
		data['deviceId'] = this.deviceId;
		data['deviceType'] = this.deviceType;
		data['liftStatus'] = this.liftStatus;
		data['workerName'] = this.workerName;
		data['workerId'] = this.workerId;
		data['relevanceId'] = this.relevanceId;
		return data;
	}
}
