Commit 24303dbf authored by 周健威's avatar 周健威

修改租车预约车辆时间

parent 238d8c9a
package com.xxfc.platform.vehicle.pojo; package com.xxfc.platform.vehicle.pojo;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.vo.PageParam; import com.github.wxiaoqi.security.common.vo.PageParam;
import com.xxfc.platform.vehicle.entity.VehiclePlatCata; import com.xxfc.platform.vehicle.entity.VehiclePlatCata;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -27,6 +28,10 @@ public class UsableVeicleDTO extends PageParam { ...@@ -27,6 +28,10 @@ public class UsableVeicleDTO extends PageParam {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
String endDate; String endDate;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
String startDateTime;
@ApiModelProperty(hidden = true)
String endDateTime;
@ApiModelProperty(hidden = true)
String startDateExtend; String startDateExtend;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
String endDateExtend; String endDateExtend;
...@@ -66,13 +71,15 @@ public class UsableVeicleDTO extends PageParam { ...@@ -66,13 +71,15 @@ public class UsableVeicleDTO extends PageParam {
public void setStartDateTamp(Long startDateTamp) { public void setStartDateTamp(Long startDateTamp) {
this.startDateTamp = startDateTamp; this.startDateTamp = startDateTamp;
this.startDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8))); this.startDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8)));
this.startDateTime = CommonConstants.DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8)));
this.startDateExtend = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8)).minusDays(1L)); this.startDateExtend = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8)).minusDays(1L));
} }
public void setEndDateTamp(Long endDateTamp) { public void setEndDateTamp(Long endDateTamp) {
this.endDateTamp = endDateTamp; this.endDateTamp = endDateTamp;
this.endDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8))); this.endDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8)));
this.endDateExtend = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8)).plusDays(1L)); this.endDateTime = CommonConstants.DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8)));
this.endDateExtend = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8)).plusDays(1L));
} }
// private Boolean isTest; // private Boolean isTest;
......
...@@ -1213,8 +1213,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -1213,8 +1213,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}else { }else {
notBookedDates = convertDatePeriod2List(dto.getStartDate(), notBookedDates = convertDatePeriod2List(dto.getStartDate(),
dto.getEndDate()); dto.getEndDate());
dto.setStartDateExtend(dto.getStartDate()); dto.setStartDateExtend(dto.getStartDateTime());
dto.setEndDateExtend(dto.getEndDate()); dto.setEndDateExtend(dto.getEndDateTime());
// dto.setStartDateExtend(dto.getStartDate());
// dto.setEndDateExtend(dto.getEndDate());
params = BeanUtil.beanToMap(dto); params = BeanUtil.beanToMap(dto);
} }
} }
...@@ -1249,8 +1251,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -1249,8 +1251,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
StringUtils.isNotBlank(dto.getBookEndDate())) { StringUtils.isNotBlank(dto.getBookEndDate())) {
notBookedDates = convertDatePeriod2List(dto.getBookStartDate(), notBookedDates = convertDatePeriod2List(dto.getBookStartDate(),
dto.getBookEndDate()); dto.getBookEndDate());
dto.setStartDateExtend(dto.getBookStartDate()); // dto.setStartDateExtend(dto.getBookStartDate());
dto.setEndDateExtend(dto.getBookEndDate()); // dto.setEndDateExtend(dto.getBookEndDate());
dto.setStartDateExtend(dto.getBookStartDateTime());
dto.setEndDateExtend(dto.getBookEndDateTime());
// notBookedDates = convertDatePeriod2List(dto.getStartDateExtend(), // notBookedDates = convertDatePeriod2List(dto.getStartDateExtend(),
// dto.getEndDateExtend()); // dto.getEndDateExtend());
......
...@@ -131,7 +131,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements ...@@ -131,7 +131,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
* @param dto * @param dto
* @return * @return
*/ */
@ApiOperation("可用车辆查询") @ApiOperation("后台可用车辆查询")
@RequestMapping(value = "/rent/back-stage/usable-vehicle", method = RequestMethod.GET) @RequestMapping(value = "/rent/back-stage/usable-vehicle", method = RequestMethod.GET)
@IgnoreUserToken @IgnoreUserToken
public ObjectRestResponse<PageDataVO<UsableVehicleModelVO>> rentBgUsableVehicle(UsableVeicleDTO dto) throws Exception { public ObjectRestResponse<PageDataVO<UsableVehicleModelVO>> rentBgUsableVehicle(UsableVeicleDTO dto) throws Exception {
......
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