Commit c19c70b8 authored by hanfeng's avatar hanfeng

Merge branch 'dev' of http://10.5.52.3/youjj/cloud-platform into dev2

parents edd4536f 4ee0c367
...@@ -5,20 +5,16 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -5,20 +5,16 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.tour.biz.TourGoodVerificationBiz; import com.xxfc.platform.tour.biz.TourGoodVerificationBiz;
import com.xxfc.platform.tour.common.TourBaseController;
import com.xxfc.platform.tour.entity.TourGoodVerification; import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.vo.TourGoodOrderFindVo; import com.xxfc.platform.tour.vo.TourGoodOrderFindVo;
import com.xxfc.platform.tour.vo.TourGoodOrderVo; import com.xxfc.platform.tour.vo.TourGoodOrderVo;
import com.xxfc.platform.tour.vo.TourVerificationInfoVo;
import com.xxfc.platform.vehicle.feign.VehicleFeign;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping("/tourGood/verfication") @RequestMapping("/tourGood/verfication")
@IgnoreClientToken @IgnoreClientToken
public class TourGoodVerificationController extends TourBaseController<TourGoodVerificationBiz> { public class TourGoodVerificationController extends BaseController<TourGoodVerificationBiz, TourGoodVerification> {
/** /**
......
...@@ -23,6 +23,7 @@ public enum ResCode { ...@@ -23,6 +23,7 @@ public enum ResCode {
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED(103001,"车辆预定申请已被审批"), VEHICLE_BOOKED_RECORD_ALREADY_CHANGED(103001,"车辆预定申请已被审批"),
VEHICLE_BOOKED_RECORD_STATUS_CHANGED(103002,"车辆预定申请状态已变更"), VEHICLE_BOOKED_RECORD_STATUS_CHANGED(103002,"车辆预定申请状态已变更"),
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED(103003,"请输入仪表盘内当前显示的公里数"), VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED(103003,"请输入仪表盘内当前显示的公里数"),
VEHICLE_BOOKED_RECORD_NOT_EXIST(103004, "预定记录不存在"),
CHECKUSER_AND_PHONE_NOT_NULL(103999, "收车或交车人姓名和电话不能为空"), CHECKUSER_AND_PHONE_NOT_NULL(103999, "收车或交车人姓名和电话不能为空"),
USERNAME_AND_TELE_NOT_NULL(104000, "使用人和电话不能为空"), USERNAME_AND_TELE_NOT_NULL(104000, "使用人和电话不能为空"),
......
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.time.Instant; import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.util.List; import java.util.List;
...@@ -94,7 +95,7 @@ public class RentVehicleBookDTO extends PageParam { ...@@ -94,7 +95,7 @@ public class RentVehicleBookDTO extends PageParam {
this.bookStartDate = bookStartDate; this.bookStartDate = bookStartDate;
//首次设置 //首次设置
if(null == this.startDateExtend) { if(null == this.startDateExtend) {
this.startDateExtend = YMR_SLASH_FORMATTER.format(LocalDateTime.parse(bookStartDate, YMR_SLASH_FORMATTER).minusDays(1L)); this.startDateExtend = YMR_SLASH_FORMATTER.format(LocalDate.parse(bookStartDate, YMR_SLASH_FORMATTER).minusDays(1L));
} }
} }
...@@ -102,7 +103,7 @@ public class RentVehicleBookDTO extends PageParam { ...@@ -102,7 +103,7 @@ public class RentVehicleBookDTO extends PageParam {
this.bookEndDate = bookEndDate; this.bookEndDate = bookEndDate;
//首次设置 //首次设置
if(null == this.endDateExtend) { if(null == this.endDateExtend) {
this.endDateExtend = YMR_SLASH_FORMATTER.format(LocalDateTime.parse(bookEndDate, YMR_SLASH_FORMATTER).plusDays(1L)); this.endDateExtend = YMR_SLASH_FORMATTER.format(LocalDate.parse(bookEndDate, YMR_SLASH_FORMATTER).plusDays(1L));
} }
} }
} }
\ No newline at end of file
...@@ -458,9 +458,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -458,9 +458,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
vehicleBookRecordBiz.save(vehicleBookRecord); vehicleBookRecordBiz.save(vehicleBookRecord);
} else { } else {
vehicleBookRecord = vehicleBookRecordBiz.selectById(bookVehicleVo.getVehicleBookRecordId()); vehicleBookRecord = vehicleBookRecordBiz.selectById(bookVehicleVo.getVehicleBookRecordId());
vehicleBookRecord.setBookStartDate(startDay.toDate()); if(vehicleBookRecord == null) {
vehicleBookRecord.setBookEndDate(endDay.toDate()); throw new BaseException(ResCode.VEHICLE_BOOKED_RECORD_NOT_EXIST.getDesc(), ResCode.VEHICLE_BOOKED_RECORD_NOT_EXIST.getCode());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord); } else {
//先取消预定,然后再修改
bookVehicleVo.setUnbookStartDate(bookVehicleVo.getBookStartDate());
bookVehicleVo.setUnbookEndDate(bookVehicleVo.getBookEndDate());
unbookVehicle(bookVehicleVo);
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord);
}
} }
// //添加预定时间记录 // //添加预定时间记录
......
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