fix 筹备列表 开店时间错误,导出也是
This commit is contained in:
@@ -45,7 +45,7 @@ public class PreparationScheduleDTO {
|
||||
@ApiModelProperty("计划开店时间")
|
||||
private String planOpenTime;
|
||||
|
||||
@ExcelProperty("开店时长(小时)")
|
||||
@ExcelProperty("开店时长(天)")
|
||||
@ColumnWidth(30)
|
||||
@ApiModelProperty("开店时长")
|
||||
private String days;
|
||||
|
||||
@@ -68,13 +68,14 @@ public class PreparationScheduleVO {
|
||||
private Date shopCreateTime;
|
||||
public void setDays() {
|
||||
if (this.openingActivityEndTime==null){
|
||||
long between = ChronoUnit.SECONDS.between(new Date().toInstant(), this.shopCreateTime.toInstant());
|
||||
long between = ChronoUnit.SECONDS.between(this.shopCreateTime.toInstant(), new Date().toInstant());
|
||||
double days = (double) between / (24*60*60);
|
||||
this.days=String.format("%.1f", days);
|
||||
}else{
|
||||
long between = ChronoUnit.SECONDS.between(this.openingActivityEndTime.toInstant(), this.shopCreateTime.toInstant());
|
||||
long between = ChronoUnit.SECONDS.between(this.shopCreateTime.toInstant(), this.openingActivityEndTime.toInstant());
|
||||
double days = (double) between / (24*60*60);
|
||||
this.days = String.format("%.1f", days);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user