package com.ahau.againstpestinfo.domain;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * 注释:
 *
 * @author fanchunchun
 * @date 2018/5/4
 */

public class PestEntity implements Serializable {
    private String pestname;
    private String purl,purl2="";

    private String date;
    private String latitude, longitude;
    private String areaid;
    private String pestfirstgrade,pestsecondgrade;
    private String researchpeople;
    private String remark,id;

    public PestEntity(JSONObject jsonobject) {
        try {
            if (!jsonobject.isNull("pestname")) {
                this.pestname =""+ jsonobject.getString("pestname");

            }
            if (!jsonobject.isNull("Id")) {
                this.id =""+ jsonobject.getString("Id");

            }
            if (!jsonobject.isNull("date")) {
                this.date = jsonobject.getString("date");

            }

            if (!jsonobject.isNull("pestpicurl1")) {
                this.purl = jsonobject.getString("pestpicurl1");

            }
            if (!jsonobject.isNull("pestpicurl2")) {
                this.purl2 = jsonobject.getString("pestpicurl2");

            }
            if (!jsonobject.isNull("Latitude")) {
                this.latitude = jsonobject.getString("Latitude");

            }
            if (!jsonobject.isNull("Longitude")) {
                this.longitude = jsonobject.getString("Longitude");

            }
            if (!jsonobject.isNull("adressid")) {
                this.areaid = jsonobject.getString("adressid");

            }
            if (!jsonobject.isNull("pestfirstgrade")) {
                this.pestfirstgrade = jsonobject.getString("pestfirstgrade");

            }
            if (!jsonobject.isNull("pestsecondgrade")) {
                this.pestsecondgrade = jsonobject.getString("pestsecondgrade");

            }
            if (!jsonobject.isNull("researchpeople")) {
                this.researchpeople = jsonobject.getString("researchpeople");

            }

            if (!jsonobject.isNull("remark")) {
                this.remark = jsonobject.getString("remark");
            }
        } catch (JSONException e) {
            e.printStackTrace();

        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPestname() {
        return pestname;
    }

    public void setPestname(String pestname) {
        this.pestname = pestname;
    }

    public String getPurl() {
        return purl;
    }

    public void setPurl(String purl) {
        this.purl = purl;
    }

    public String getPurl2() {
        return purl2;
    }

    public void setPurl2(String purl2) {
        this.purl2 = purl2;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getAreaid() {
        return areaid;
    }

    public void setAreaid(String areaid) {
        this.areaid = areaid;
    }

    public String getPestfirstgrade() {
        return pestfirstgrade;
    }

    public void setPestfirstgrade(String pestfirstgrade) {
        this.pestfirstgrade = pestfirstgrade;
    }

    public String getPestsecondgrade() {
        return pestsecondgrade;
    }

    public void setPestsecondgrade(String pestsecondgrade) {
        this.pestsecondgrade = pestsecondgrade;
    }

    public String getResearchpeople() {
        return researchpeople;
    }

    public void setResearchpeople(String researchpeople) {
        this.researchpeople = researchpeople;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
