fix 筹备列表 开店时间错误,导出也是

This commit is contained in:
shuo.wang
2024-11-14 11:41:48 +08:00
parent 3e35884669
commit 9e1e02aac1
9 changed files with 65 additions and 18 deletions

View File

@@ -36,5 +36,5 @@ public class PreparationDTO {
private String supervisorUserId;
private Date createTime;
}

View File

@@ -59,16 +59,22 @@ public class PreparationScheduleVO {
private Long lineId;
@ApiModelProperty("督导")
private String supervisionName;
@ApiModelProperty("开业活动完成时间")
private Date openingActivityEndTime;
@ApiModelProperty("门店创建时间")
private Date shopCreateTime;
public void setDays() {
if (this.planOpenTime==null|| this.ContractCompletionTime==null){
return;
if (this.openingActivityEndTime==null){
long between = ChronoUnit.SECONDS.between(new Date().toInstant(), this.shopCreateTime.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());
double days = (double) between / (24*60*60);
this.days = String.format("%.1f", days);
}
long between = ChronoUnit.SECONDS.between(this.ContractCompletionTime.toInstant(), this.planOpenTime.toInstant());
double days = (double) between / (24*60*60);
this.days = String.format("%.1f", days);
}
}