Commit eeac15a4 authored by jiaorz's avatar jiaorz

Merge branch 'master-arrival-bug' into dev

parents f98c7a45 ac8678b1
...@@ -250,7 +250,8 @@ public class VehicleActiveService { ...@@ -250,7 +250,8 @@ public class VehicleActiveService {
bookVehicleVo.setUnbookStartDate(actualArrivalDate.toString(DATE_TIME_FORMATTER)); bookVehicleVo.setUnbookStartDate(actualArrivalDate.toString(DATE_TIME_FORMATTER));
bookVehicleVo.setUnbookEndDate(arrivalDate.toString(DATE_TIME_FORMATTER)); bookVehicleVo.setUnbookEndDate(arrivalDate.toString(DATE_TIME_FORMATTER));
bookVehicleVo.setRemark(bookVehicleVo.getRemark()==null?"": bookVehicleVo.getRemark()+ " 用户提前还车,取消剩余天数, 初始预定结束时间是," + new DateTime(vehicleBookRecord.getBookEndDate()).toString(DATE_TIME_FORMATTER)); bookVehicleVo.setRemark(bookVehicleVo.getRemark()==null?"": bookVehicleVo.getRemark()+ " 用户提前还车,取消剩余天数, 初始预定结束时间是," + new DateTime(vehicleBookRecord.getBookEndDate()).toString(DATE_TIME_FORMATTER));
vehicleBookRecord.setRemark(bookVehicleVo.getRemark()); vehicleBookRecord.setBookEndDate(new Date());
vehicleBookRecord.setRemark(bookVehicleVo.getRemark());
try { try {
Boolean hasSuc = vehicleBiz.unbookVehicle(bookVehicleVo); Boolean hasSuc = vehicleBiz.unbookVehicle(bookVehicleVo);
if (!hasSuc) { if (!hasSuc) {
......
...@@ -992,6 +992,9 @@ ...@@ -992,6 +992,9 @@
, vbre.ret_company as to_lift_company , vbre.ret_company as to_lift_company
, vbrs.lift_company as to_return_company , vbrs.lift_company as to_return_company
from from
<!--
查询开始时间 前面的最后一条 预约记录
查询结束时间 后面的第一条 预约记录 -->
(select vehicle_id, max(if(book_end_date &lt; #{startDateExtend}, book_end_date, null)) as max_book_end_date, min(if(book_start_date &gt; #{endDateExtend}, book_start_date, null)) as min_book_start_date from vehicle_book_record where status != 4 and status != 6 group by vehicle_id) sevbr (select vehicle_id, max(if(book_end_date &lt; #{startDateExtend}, book_end_date, null)) as max_book_end_date, min(if(book_start_date &gt; #{endDateExtend}, book_start_date, null)) as min_book_start_date from vehicle_book_record where status != 4 and status != 6 group by vehicle_id) sevbr
left join vehicle_book_record vbre left join vehicle_book_record vbre
on sevbr.vehicle_id = vbre.vehicle_id and sevbr.max_book_end_date = vbre.book_end_date and vbre.status != 4 and vbre.status != 6 on sevbr.vehicle_id = vbre.vehicle_id and sevbr.max_book_end_date = vbre.book_end_date and vbre.status != 4 and vbre.status != 6
......
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