package com.rongwei.bsentity.vo;

import lombok.Data;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Trj
 */
@Data
public class SrmActionPlanVo {

    /**
     * PSL主表ID
     */
    private String id;

    /**
     * 最晚实际完成时间
     */
    private Date realEdDate;


    /**
     * 初始计划完成时间
     */
    private Date targetCompletionDate;


    /**
     * 车间/部门
     */
    private String fullName;


    /**
     * 车间/部门ID
     */
    private String fullNameId;







    public Date getRealEdDate() {
        if (realEdDate != null) {
            SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
            try{
                sf.parse(sf.format(realEdDate));
            }catch (Exception e){
                e.printStackTrace();
            }
        }

        return realEdDate;
    }

    public Date getTargetCompletionDate() {
        if (targetCompletionDate != null) {
            SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
            try{
                sf.parse(sf.format(targetCompletionDate));
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        return targetCompletionDate;
    }

}
