重寫toString

ZHOU_VIP發表於2019-03-06
/** **/
package com.zte.claa.inficombo.dataaccess.dao.mysql.impl;

import java.io.Serializable;

@SuppressWarnings("serial")
public class ProjectPlace implements Serializable {
    /**
     * 
     */
    private String placeid;
    
    /**
     *  父場所編號
     */
    private String pid;

    /**
     * 
     */
    private String placename;

    /**
     * 
     */
    private String province;

    /**
     * 
     */
    private String city;

    /**
     * 
     */
    private String county;

    /**
     * 
     */
    private String town;

    /**
     * 
     */
    private String addr;

    /**
     * 
     */
    private String contractor;

    /**
     * 
     */
    private String contractorphone;

    /**
     * 
     */
    private String manager;

    /**
     * 
     */
    private String managerphone;

    /**
     * 
     */
    private String respunit;

    /**
     * 
     */
    private String remark;
    
    /**
     * 專案編號 
     */
    private String projectid;
    
    /**
     * 
     * @return placeid 
     */
    public String getPlaceid() {
        return placeid;
    }

    /**
     * 
     * @param placeid 
     */
    public void setPlaceid(String placeid) {
        this.placeid = placeid;
    }

    
    public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	/**
     * 
     * @return placename 
     */
    public String getPlacename() {
        return placename;
    }

    /**
     * 
     * @param placename 
     */
    public void setPlacename(String placename) {
        this.placename = placename;
    }

    /**
     * 
     * @return province 
     */
    public String getProvince() {
        return province;
    }

    /**
     * 
     * @param province 
     */
    public void setProvince(String province) {
        this.province = province;
    }

    /**
     * 
     * @return city 
     */
    public String getCity() {
        return city;
    }

    /**
     * 
     * @param city 
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * 
     * @return county 
     */
    public String getCounty() {
        return county;
    }

    /**
     * 
     * @param county 
     */
    public void setCounty(String county) {
        this.county = county;
    }

    /**
     * 
     * @return town 
     */
    public String getTown() {
        return town;
    }

    /**
     * 
     * @param town 
     */
    public void setTown(String town) {
        this.town = town;
    }

    /**
     * 
     * @return addr 
     */
    public String getAddr() {
        return addr;
    }

    /**
     * 
     * @param addr 
     */
    public void setAddr(String addr) {
        this.addr = addr;
    }

    /**
     * 
     * @return contractor 
     */
    public String getContractor() {
        return contractor;
    }

    /**
     * 
     * @param contractor 
     */
    public void setContractor(String contractor) {
        this.contractor = contractor;
    }

    /**
     * 
     * @return contractorphone 
     */
    public String getContractorphone() {
        return contractorphone;
    }

    /**
     * 
     * @param contractorphone 
     */
    public void setContractorphone(String contractorphone) {
        this.contractorphone = contractorphone;
    }

    /**
     * 
     * @return manager 
     */
    public String getManager() {
        return manager;
    }

    /**
     * 
     * @param manager 
     */
    public void setManager(String manager) {
        this.manager = manager;
    }

    /**
     * 
     * @return managerphone 
     */
    public String getManagerphone() {
        return managerphone;
    }

    /**
     * 
     * @param managerphone 
     */
    public void setManagerphone(String managerphone) {
        this.managerphone = managerphone;
    }

    /**
     * 
     * @return respunit 
     */
    public String getRespunit() {
        return respunit;
    }

    /**
     * 
     * @param respunit 
     */
    public void setRespunit(String respunit) {
        this.respunit = respunit;
    }

    /**
     * 
     * @return remark 
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 
     * @param remark 
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    /**
     * 
     * @return
     */
    public String getProjectid() {
	    return projectid;
    }

    /**
     * 
     * @param projectid 
     */
    public void setProjectid(String projectid) {
        this.projectid = projectid;
    }

    public String toString() {
	    StringBuffer sb = new StringBuffer();
	    sb.append("placename").append(placename).append(", ");
	    sb.append("province").append(province).append(", ");
	    sb.append("city").append(city).append(", ");
	    sb.append("county").append(county).append(", ");
	    sb.append("town").append(town).append(", ");
	    sb.append("addr").append(addr).append(", ");
	    sb.append("contractor").append(contractor).append(", ");
	    sb.append("contractorphone").append(contractorphone).append(", ");
	    sb.append("manager").append(manager).append(", ");
	    sb.append("managerphone").append(managerphone).append(", ");
	    sb.append("respunit").append(respunit).append(", ");
	    sb.append("remark").append(remark).append(", ");
	    sb.append("projectid").append(projectid);
	    return sb.toString();
    }
}
package com.zte.claa.inficombo.app.model.appext.ff.inspect;

import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zte.claa.inficombo.api.Constants;


public class InspectOpLog {
	public static final int DEV_ST_OK = 0;
	public static final int DEV_ST_ABNORMAL = 1;
	
	@JsonFormat(pattern=Constants.DATETIME_FORMAT, timezone = Constants.TIME_ZONE)
	private Timestamp optime; 	    //巡更時間	Timestamp
	
	private String oplogid; 	    //日誌ID	VARCHAR(200);
	private String planid; 		    //計劃編號	VARCHAR(200)
	private String planname;            //關聯查詢;
	private String devid; 		    //裝置/設施編號	VARCHAR(50)
	private String devname;             //關聯查詢;
	private String operatorid; 	    //執行人編號	VARCHAR(200)
	private String operatorname;        //執行人姓名	VARCHAR(50)
	private String detail; 		    //巡檢結果描述	VARCHAR(400)
	private int devstate = DEV_ST_OK;   //裝置狀態	Int
	private String projectid; 	    //專案ID	VARCHAR(200)
	private String remark; 		    //備註	VARCHAR(200)
	
	public InspectOpLog(){
		
	}

	public Timestamp getOptime() {
		return optime;
	}

	public void setOptime(Timestamp optime) {
		this.optime = optime;
	}

	public String getPlanid() {
		return planid;
	}

	public void setPlanid(String planid) {
		this.planid = planid;
	}

	public String getDevid() {
		return devid;
	}

	public void setDevid(String devid) {
		this.devid = devid;
	}

	public String getOperatorid() {
		return operatorid;
	}

	public void setOperatorid(String operatorid) {
		this.operatorid = operatorid;
	}

	public String getOperatorname() {
		return operatorname;
	}

	public void setOperatorname(String operatorname) {
		this.operatorname = operatorname;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public int getDevstate() {
		return devstate;
	}

	public void setDevstate(int devstate) {
		this.devstate = devstate;
	}

	public String getProjectid() {
		return projectid;
	}

	public void setProjectid(String projectid) {
		this.projectid = projectid;
	}

	public String getRemark() {
		return remark;
	}

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

	public void setOplogid(String oplogid) {
		this.oplogid = oplogid;
	}

	public String getPlanname() {
		return planname;
	}

	public void setPlanname(String planname) {
		this.planname = planname;
	}

	public String getDevname() {
		return devname;
	}

	public void setDevname(String devname) {
		this.devname = devname;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("oplogid=").append(oplogid).append(", ");
		sb.append("optime=").append(optime).append(", ");
		sb.append("planid=").append(planid).append(", ");
		sb.append("planname=").append(planname).append(", ");
		sb.append("devid=").append(devid).append(", ");
		sb.append("devname=").append(devname).append(", ");
		sb.append("operatorid=").append(operatorid).append(", ");
		sb.append("operatorname=").append(operatorname).append(", ");
		sb.append("detail=").append(detail).append(", ");
		sb.append("devstate=").append(devstate).append(", ");
		sb.append("projectid=").append(projectid).append(", ");
		sb.append("remark=").append(remark);
		return sb.toString();
	}
}

 

相關文章