package com.casic.missiles.modular.system.dto;

import com.casic.missiles.modular.system.model.BusWellInfo;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BusWellInfoDto {
    private Long id;
    private String wellCode;
    private String wellName;
    private String wellType;
    private String wellTypeName;
    private String deptid;
    private String deptName;
    private String owner;
    private Float deep;
    private String position;
    private String coordinateX;
    private String coordinateY;
    private String lngBaidu;
    private String latBaidu;
    private String lngGaode;
    private String latGaode;
    private String photos;
    private String notes;
    private String bfzt;
    private String bfztName;
    private String area;
    private String staff;
    private String tel;
    private String valid;
    private String ts;
    private String wellFlag;
    private List<WatchDataDto> watchData;

    Map<String, Object> map = new HashMap<String, Object>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
        map.put("id", id);
    }

    public String getWellCode() {
        return wellCode;
    }

    public void setWellCode(String wellCode) {
        this.wellCode = wellCode;
        map.put("wellCode", wellCode);
    }

    public String getWellName() {
        return wellName;
    }

    public void setWellName(String wellName) {
        this.wellName = wellName;
        map.put("wellName", wellName);
    }

    public String getWellType() {
        return wellType;
    }

    public void setWellType(String wellType) {
        this.wellType = wellType;
        map.put("wellType", wellType);
    }

    public String getWellTypeName() {
        return wellTypeName;
    }

    public void setWellTypeName(String wellTypeName) {
        this.wellTypeName = wellTypeName;
        map.put("wellTypeName", wellTypeName);
    }

    public String getDeptid() {
        return deptid;
    }

    public void setDeptid(String deptid) {
        this.deptid = deptid;
        map.put("deptid", deptid);
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
        map.put("deptName", deptName);
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
        map.put("owner", owner);
    }

    public Float getDeep() {
        return deep;
    }

    public void setDeep(Float deep) {
        this.deep = deep;
        map.put("deep", deep);
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
        map.put("position", position);
    }

    public String getCoordinateX() {
        return coordinateX;
    }

    public void setCoordinateX(String coordinateX) {
        this.coordinateX = coordinateX;
        map.put("coordinateX", coordinateX);
    }

    public String getCoordinateY() {
        return coordinateY;
    }

    public void setCoordinateY(String coordinateY) {
        this.coordinateY = coordinateY;
        map.put("coordinateY", coordinateY);
    }

    public String getLngBaidu() {
        return lngBaidu;
    }

    public void setLngBaidu(String lngBaidu) {
        this.lngBaidu = lngBaidu;
        map.put("lngBaidu", lngBaidu);
    }

    public String getLatBaidu() {
        return latBaidu;
    }

    public void setLatBaidu(String latBaidu) {
        this.latBaidu = latBaidu;
        map.put("latBaidu", latBaidu);
    }

    public String getLngGaode() {
        return lngGaode;
    }

    public void setLngGaode(String lngGaode) {
        this.lngGaode = lngGaode;
        map.put("lngGaode", lngGaode);
    }

    public String getLatGaode() {
        return latGaode;
    }

    public void setLatGaode(String latGaode) {
        this.latGaode = latGaode;
        map.put("latGaode", latGaode);
    }

    public String getPhotos() {
        return photos;
    }

    public void setPhotos(String photos) {
        this.photos = photos;
        map.put("photos", photos);
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
        map.put("notes", notes);
    }

    public String getBfzt() {
        return bfzt;
    }

    public void setBfzt(String bfzt) {
        this.bfzt = bfzt;
        map.put("bfzt", bfzt);
    }

    public String getBfztName() {
        return bfztName;
    }

    public void setBfztName(String bfztName) {
        this.bfztName = bfztName;
        map.put("bfztName", bfztName);
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
        map.put("area", area);
    }

    public String getStaff() {
        return staff;
    }

    public void setStaff(String staff) {
        this.staff = staff;
        map.put("staff", staff);
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
        map.put("tel", tel);
    }

    public String getValid() {
        return valid;
    }

    public void setValid(String valid) {
        this.valid = valid;
        map.put("valid", valid);
    }

    public String getTs() {
        return ts;
    }

    public void setTs(String ts) {
        this.ts = ts;
        map.put("ts", ts);
    }

    public String getWellFlag() {
        return wellFlag;
    }

    public void setWellFlag(String wellFlag) {
        this.wellFlag = wellFlag;
        map.put("wellFlag", wellFlag);
    }

    public List<WatchDataDto> getWatchData() {
        return watchData;
    }

    public void setWatchData(List<WatchDataDto> watchData) {
        this.watchData = watchData;
        map.put("watchData", watchData);
    }

    public void convertBusWellInfo(BusWellInfo busWellInfo) {
        this.setId(busWellInfo.getId());
        this.setWellCode(busWellInfo.getWellCode());
        this.setWellName(busWellInfo.getWellName());
        this.setWellType(busWellInfo.getWellType());
        this.setDeptid(busWellInfo.getDeptid());
        this.setOwner(busWellInfo.getOwner());
        this.setDeep(busWellInfo.getDeep());
        this.setCoordinateX(busWellInfo.getCoordinateX());
        this.setCoordinateY(busWellInfo.getCoordinateY());
        this.setLngBaidu(busWellInfo.getLngBaidu());
        this.setLatBaidu(busWellInfo.getLatBaidu());
        this.setLngGaode(busWellInfo.getLngGaode());
        this.setLatGaode(busWellInfo.getLatGaode());
        this.setArea(busWellInfo.getArea());
        this.setPhotos(busWellInfo.getPhotos());
        this.setNotes(busWellInfo.getNotes());
        this.setBfzt(busWellInfo.getBfzt());
        this.setPosition(busWellInfo.getPosition());
        this.setStaff(busWellInfo.getStaff());
        this.setTel(busWellInfo.getTel());
        this.setWellFlag(busWellInfo.getWellFlag());
        if (null != busWellInfo.getTs()) {
            DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
            this.setTs(fmt.print(busWellInfo.getTs().getTime()));
        }
        this.setValid(busWellInfo.getValid());
    }

    public Map<String, Object> toMap() {
        return map;
    }
}
