Commit 86d918f9 authored by 周健威's avatar 周健威

修改预约时间相关

parent 285eb38b
......@@ -13,6 +13,7 @@ import java.util.List;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.DATE_TIME_LINE_FORMATTER;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.YMR_SLASH_FORMATTER;
@Data
public class AddRentVehicleDTO extends AddOrderCommonDTO{
......@@ -38,6 +39,18 @@ public class AddRentVehicleDTO extends AddOrderCommonDTO{
@ApiModelProperty(value = "预定目标日期(结束)", hidden = true)
private String bookEndDate;
/**
* 预定目标日期(开始)
*/
@ApiModelProperty(value = "预定目标时间(开始)", hidden = true)
private String bookStartDateTime;
/**
* 预定目标日期(结束)
*/
@ApiModelProperty(value = "预定目标时间(结束)", hidden = true)
private String bookEndDateTime;
//天数
@ApiModelProperty(value = "天数")
private Integer dayNum;
......@@ -113,12 +126,14 @@ public class AddRentVehicleDTO extends AddOrderCommonDTO{
public void setStartTime(Long startTime) {
this.startTime = startTime;
this.bookStartDate = DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneOffset.ofHours(8)));
this.bookStartDate = YMR_SLASH_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneOffset.ofHours(8)));
this.bookStartDateTime = DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneOffset.ofHours(8)));
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
this.bookEndDate = DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endTime), ZoneOffset.ofHours(8)));
this.bookEndDate = YMR_SLASH_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endTime), ZoneOffset.ofHours(8)));
this.bookEndDateTime = DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endTime), ZoneOffset.ofHours(8)));
}
public void setAccompanyStrs(List<String> accompanyStrs) {
......
......@@ -55,6 +55,7 @@ import java.util.*;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.DATE_TIME_LINE_FORMATTER;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.YMR_SLASH_FORMATTER;
@Controller
@RequestMapping("baseOrder")
......@@ -338,8 +339,10 @@ public class BackStageOrderController extends CommonBaseController implements Us
RentVehicleBO bo = BeanUtil.toBean(orderPageVO.getOrderRentVehicleDetail(), RentVehicleBO.class);
bo.setOrder(orderPageVO);
bo.setBookVehicleVO(new BookVehicleVO(){{
setBookStartDate(DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getStartTime()), ZoneOffset.ofHours(8))));
setBookEndDate(DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getEndTime()), ZoneOffset.ofHours(8))));
setBookStartDate(YMR_SLASH_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getStartTime()), ZoneOffset.ofHours(8))));
setBookEndDate(YMR_SLASH_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getEndTime()), ZoneOffset.ofHours(8))));
setBookStartDateTime(DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getStartTime()), ZoneOffset.ofHours(8))));
setBookEndDateTime(DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getEndTime()), ZoneOffset.ofHours(8))));
}});
List<OrderAccompanyDTO> oads = JSONUtil.toList(JSONUtil.parseArray(orderItemBiz.selectOne(new OrderItem(){{
......
......@@ -27,6 +27,18 @@ public class BookVehicleVO {
@ApiModelProperty("预定目标日期(结束)")
private String bookEndDate;
/**
* 预定目标日期(开始)
*/
@ApiModelProperty("预定目标时间(开始)")
private String bookStartDateTime;
/**
* 预定目标日期(结束)
*/
@ApiModelProperty("预定目标时间(结束)")
private String bookEndDateTime;
/**
* 取消预定目标日期(开始)
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment