Commit 1c893bdb authored by 周健威's avatar 周健威

修改获取真实还车时间和预约天数

parent e817ddfc
...@@ -365,6 +365,14 @@ public class OrderRentVehicleDetail implements Serializable { ...@@ -365,6 +365,14 @@ public class OrderRentVehicleDetail implements Serializable {
} }
} }
// public Integer obtainRealDayNum() {
// if(null != getDelayAddDays()) {
// return (getDelayAddDays() + getDayNum());
// }else {
// return getDayNum();
// }
// }
public Integer obtainRealDayNum() { public Integer obtainRealDayNum() {
return this.dayNum + this.delayAddDays; return this.dayNum + this.delayAddDays;
} }
......
...@@ -342,8 +342,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements ...@@ -342,8 +342,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
DedDetailDTO dedDetailDTO = new DedDetailDTO(); DedDetailDTO dedDetailDTO = new DedDetailDTO();
//提前还车,结束时间大于当前时间 //提前还车,结束时间大于当前时间
Long nowTime = System.currentTimeMillis(); Long nowTime = System.currentTimeMillis();
Long endTime = (null == orderPageVO.getOrderRentVehicleDetail().getDelayAddEndTime()) ? Long endTime = orderPageVO.getOrderRentVehicleDetail().obtainRealEndTime();
orderPageVO.getOrderRentVehicleDetail().getEndTime() : orderPageVO.getOrderRentVehicleDetail().getDelayAddEndTime();
Long startTime = orderPageVO.getOrderRentVehicleDetail().getStartTime(); Long startTime = orderPageVO.getOrderRentVehicleDetail().getStartTime();
//设置使用天数 //设置使用天数
......
...@@ -519,13 +519,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> { ...@@ -519,13 +519,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
csv.setOverAmountList(inProgressVO.getOverAmountList()); csv.setOverAmountList(inProgressVO.getOverAmountList());
csv.setViolateAmountList(inProgressVO.getViolateAmountList()); csv.setViolateAmountList(inProgressVO.getViolateAmountList());
if(csv.getUsedDayNum() == orderMQDTO.getOrderRentVehicleDetail().getDayNum()) { if(csv.getUsedDayNum() == orderMQDTO.getOrderRentVehicleDetail().obtainRealDayNum()) {
csv.setType(CostDetailExtend.FINLISH_ONTIME); csv.setType(CostDetailExtend.FINLISH_ONTIME);
}else if(csv.getUsedDayNum() > orderMQDTO.getOrderRentVehicleDetail().getDayNum()){ }else if(csv.getUsedDayNum() > orderMQDTO.getOrderRentVehicleDetail().obtainRealDayNum()){
csv.setType(CostDetailExtend.FINLISH_DELAY); csv.setType(CostDetailExtend.FINLISH_DELAY);
}else if(csv.getUsedDayNum() < orderMQDTO.getOrderRentVehicleDetail().getDayNum()){ }else if(csv.getUsedDayNum() < orderMQDTO.getOrderRentVehicleDetail().obtainRealDayNum()){
csv.setType(CostDetailExtend.FINLISH_ADVANCE); csv.setType(CostDetailExtend.FINLISH_ADVANCE);
} }
......
...@@ -237,7 +237,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp ...@@ -237,7 +237,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
OrderRentVehicleDetail orderRentVehicleDetail = orderRentVehicleBiz.selectById(baseOrder.getDetailId()); OrderRentVehicleDetail orderRentVehicleDetail = orderRentVehicleBiz.selectById(baseOrder.getDetailId());
if (orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.DEPARTURE.getCode()) { if (orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.DEPARTURE.getCode()) {
boolean flag = getTodayTime(orderRentVehicleDetail.getStartTime(), orderRentVehicleDetail.getEndTime()); boolean flag = getTodayTime(orderRentVehicleDetail.getStartTime(), orderRentVehicleDetail.obtainRealEndTime());
if (!flag) { if (!flag) {
return ObjectRestResponse.createFailedResult(3502, "已超过预定还车时间,不能进行交车操作!"); return ObjectRestResponse.createFailedResult(3502, "已超过预定还车时间,不能进行交车操作!");
} }
......
...@@ -506,7 +506,7 @@ public class OrderMsgBiz { ...@@ -506,7 +506,7 @@ public class OrderMsgBiz {
private void handelSmsParam(OrderRentVehicleDetail orvd, BaseOrder baseOrder, List<String> smsParams, AppUserDTO appUserDTO, int handelType) { private void handelSmsParam(OrderRentVehicleDetail orvd, BaseOrder baseOrder, List<String> smsParams, AppUserDTO appUserDTO, int handelType) {
if(RENT_DELIVERY == handelType) { if(RENT_DELIVERY == handelType) {
smsParams.add(appUserDTO.getRealname()); smsParams.add(appUserDTO.getRealname());
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getEndTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.obtainRealEndTime())));
smsParams.add(orvd.getEndAddr()); smsParams.add(orvd.getEndAddr());
smsParams.add(baseOrder.getName()); smsParams.add(baseOrder.getName());
smsParams.add(appUserDTO.getUsername()); smsParams.add(appUserDTO.getUsername());
...@@ -516,8 +516,8 @@ public class OrderMsgBiz { ...@@ -516,8 +516,8 @@ public class OrderMsgBiz {
smsParams.add(orvd.getStartAddr()); smsParams.add(orvd.getStartAddr());
smsParams.add(orvd.getEndAddr()); smsParams.add(orvd.getEndAddr());
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime())));
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getEndTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.obtainRealEndTime())));
smsParams.add(orvd.getDayNum().toString()); smsParams.add(orvd.obtainRealDayNum().toString());
smsParams.add(appUserDTO.getUsername()); smsParams.add(appUserDTO.getUsername());
} }
} }
...@@ -657,8 +657,8 @@ public class OrderMsgBiz { ...@@ -657,8 +657,8 @@ public class OrderMsgBiz {
smsParams.add(eCompany.getName()); smsParams.add(eCompany.getName());
smsParams.add(eCompany.getVehiceServicePhone()); smsParams.add(eCompany.getVehiceServicePhone());
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime())));
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getEndTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.obtainRealEndTime())));
smsParams.add(orvd.getDayNum().toString()); smsParams.add(orvd.obtainRealDayNum().toString());
break; break;
case SmsTemplateDTO.PAY_D : case SmsTemplateDTO.PAY_D :
smsParams.add(appUserDTO.getRealname()); smsParams.add(appUserDTO.getRealname());
...@@ -667,13 +667,13 @@ public class OrderMsgBiz { ...@@ -667,13 +667,13 @@ public class OrderMsgBiz {
smsParams.add(sCompany.getName()); smsParams.add(sCompany.getName());
smsParams.add(eCompany.getName()); smsParams.add(eCompany.getName());
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime())));
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getEndTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.obtainRealEndTime())));
smsParams.add(orvd.getDayNum().toString()); smsParams.add(orvd.obtainRealDayNum().toString());
break; break;
case SmsTemplateDTO.PAY_E : case SmsTemplateDTO.PAY_E :
smsParams.add(appUserDTO.getRealname()); smsParams.add(appUserDTO.getRealname());
smsParams.add(appUserDTO.getUsername()); smsParams.add(appUserDTO.getUsername());
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getEndTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.obtainRealEndTime())));
smsParams.add(eCompany.getName()); smsParams.add(eCompany.getName());
smsParams.add(baseOrder.getName()); smsParams.add(baseOrder.getName());
break; break;
...@@ -684,8 +684,8 @@ public class OrderMsgBiz { ...@@ -684,8 +684,8 @@ public class OrderMsgBiz {
smsParams.add(sCompany.getName()); smsParams.add(sCompany.getName());
smsParams.add(eCompany.getName()); smsParams.add(eCompany.getName());
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getStartTime())));
smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.getEndTime()))); smsParams.add(DateUtil.formatDateTime(DateUtil.date(orvd.obtainRealEndTime())));
smsParams.add(orvd.getDayNum().toString()); smsParams.add(orvd.obtainRealDayNum().toString());
break; break;
case SmsTemplateDTO.PAY_H : case SmsTemplateDTO.PAY_H :
String realName = appUserDTO.getRealname(); String realName = appUserDTO.getRealname();
......
...@@ -434,9 +434,9 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -434,9 +434,9 @@ public class BackStageOrderController extends CommonBaseController implements Us
bo.setOrder(orderPageVO); bo.setOrder(orderPageVO);
bo.setBookVehicleVO(new BookVehicleVO() {{ bo.setBookVehicleVO(new BookVehicleVO() {{
setBookStartDate(YMR_SLASH_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getStartTime()), 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)))); setBookEndDate(YMR_SLASH_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.obtainRealEndTime()), ZoneOffset.ofHours(8))));
setBookStartDateTime(DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.getStartTime()), 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)))); setBookEndDateTime(DATE_TIME_LINE_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(bo.obtainRealEndTime()), ZoneOffset.ofHours(8))));
}}); }});
List<OrderAccompanyDTO> oads = JSONUtil.toList(JSONUtil.parseArray(orderItemBiz.selectOne(new OrderItem() {{ List<OrderAccompanyDTO> oads = JSONUtil.toList(JSONUtil.parseArray(orderItemBiz.selectOne(new OrderItem() {{
......
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