package com.pqs9000.util;

import com.njcn.utils.PubUtils;

import java.io.Serializable;
import java.util.Date;

public class TransformTime implements Serializable {
    private static final long serialVersionUID = 1L;
    private String startTime;
    private String endTime;
    private Date start;
    private Date end;

    public TransformTime(String startTime, String endTime) {
        this.startTime = startTime;
        this.endTime = endTime;
    }

    public void string2Date() throws Exception {
        startTime += " 00:00:00";
        endTime += " 23:59:59";

        start = PubUtils.string2Date(startTime, "yyyy-MM-dd HH:mm:ss");
        end = PubUtils.string2Date(endTime, "yyyy-MM-dd HH:mm:ss");
    }

    public Date getStart() {
        return start;
    }

    public Date getEnd() {
        return end;
    }




    public TransformTime(String startTime, String endTime, Date start, Date end) {
        this.startTime = startTime;
        this.endTime = endTime;
        this.start = start;
        this.end = end;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public void setStart(Date start) {
        this.start = start;
    }

    public void setEnd(Date end) {
        this.end = end;
    }
}
