|
public class SysCountResultVo {
/**次数**/
private int times;
/**服务**/
private String isView;
/**年**/
private Integer year;
/**月**/
private Integer month;
/**日**/
private Integer day;
/**小时**/
private Integer hour;
/**时间**/
private String time;
private String isViewStr;
public int getTimes() {
return times;
}
public void setTimes(int times) {
this.times = times;
}
public String getIsView() {
return isView;
}
public void setIsView(String isView) {
this.isView = isView;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getDay() {
return day;
}
public void setDay(Integer day) {
this.day = day;
}
// 此处为重点,如果时>=16,则认为是下一天
public String getTime() {
try {
if (hour >= 16) {
return DateUtil.date2DateStr(DateUtil.addDay(DateUtil.dateStr2Date(this.getYear() + "-" + this.getMonth() + "-" + this.getDay(), DateUtil.PATTERN_DTSHORTLINE), 1), DateUtil.PATTERN_DTSHORTLINE);
}
return this.getYear() + "-" + this.getMonth() + "-" + this.getDay();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public Integer getHour() {
return hour;
}
public void setHour(Integer hour) {
this.hour = hour;
}
public void setTime(String time) {
this.time = time;
}
public String getIsViewStr() {
return Integer.valueOf(isView) == 1 ? "未查看" : Integer.valueOf(isView) == 2 ? "待沟通" : Integer.valueOf(isView) == 4 ? "已查看" : Integer.valueOf(isView) == 6 ? "不合适" : "其他";
}
public void setIsViewStr(String isViewStr) {
this.isViewStr = isViewStr;
}
@Override
public String toString() {
return "time:" + getTime() + ";times:" + getTimes() + ";isView:" + getIsView();
}
}
|
|
|