package com.changhong.epc.bean.form;
|
|
import com.iemsoft.framework.cloud.core.tools.DateTool;
|
import lombok.Data;
|
import lombok.EqualsAndHashCode;
|
|
import java.io.Serializable;
|
import java.util.Objects;
|
|
@Data
|
@EqualsAndHashCode(exclude = {"flag","chooseForm","fundata","relevanCesourceType","singleSetValue"})
|
public class CpnVal implements Serializable {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 1L;
|
|
|
private String tagId;
|
private String tagName;
|
private String tagType;
|
|
private String columnOrderNum;
|
private String parentsubFormNum;
|
private String mdCode;
|
/**
|
* 日期类型
|
*/
|
private String dateType;
|
|
private String alias;
|
private Object valCode;
|
private boolean flag = false;
|
private String chooseForm;
|
private String fundata;
|
private String relevanCesourceType;
|
private String singleSetValue;
|
|
public String getDate(String date, String time){
|
if(Objects.equals(dateType, "Y-m-d H:i")){
|
return date + " " + time;
|
}else if(Objects.equals(dateType, "Y-m-d")){
|
return date;
|
}else if(Objects.equals(dateType, "Y-m")){
|
return DateTool.dateToString(DateTool.stringToDate(date, "yyyy-MM-dd"), "yyyy-MM");
|
}else if(Objects.equals(dateType, "Y")){
|
return DateTool.dateToString(DateTool.stringToDate(date, "yyyy-MM-dd"), "yyyy");
|
}else{
|
return date;
|
}
|
}
|
}
|