Commit 4c3db1b4 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/feature-delay-add' into feature-delay-add

parents f8aae1bf 433174c1
...@@ -8,6 +8,7 @@ public enum OrderViolateEnum { ...@@ -8,6 +8,7 @@ public enum OrderViolateEnum {
BEFORE(1, "提前"), BEFORE(1, "提前"),
AFTER(2, "延期"), AFTER(2, "延期"),
CHANGE(3, "更换还车公司"), CHANGE(3, "更换还车公司"),
DELAY_VEHICLE(4, "延长还车不计免赔")
; ;
/** /**
* 编码 * 编码
......
...@@ -112,6 +112,12 @@ public class OrderVehicleCrosstown { ...@@ -112,6 +112,12 @@ public class OrderVehicleCrosstown {
@Column(name = "violate_amount_detail") @Column(name = "violate_amount_detail")
private String violateDetail; private String violateDetail;
/**
* 延期还车,不计免赔额计算
*/
@Column(name = "delay_vehicle_detail")
private String delayVehicleDetail;
/** /**
* 1、交车, 2、还车, 3、定损还车 * 1、交车, 2、还车, 3、定损还车
*/ */
......
...@@ -33,6 +33,7 @@ public class DedDetailDTO { ...@@ -33,6 +33,7 @@ public class DedDetailDTO {
//作为:DedDetail :2、车辆损坏 3、其他 //作为:DedDetail :2、车辆损坏 3、其他
//作为:violate_amount_detail 1--提前还车 2--延期还车 3--更换还车公司费用 //作为:violate_amount_detail 1--提前还车 2--延期还车 3--更换还车公司费用
//作为:delay_vehicle_detail
Integer type; Integer type;
//小雨都不知道什么东西 //小雨都不知道什么东西
......
...@@ -40,6 +40,8 @@ public class OrderPageVO extends BaseOrder { ...@@ -40,6 +40,8 @@ public class OrderPageVO extends BaseOrder {
private String positionName; private String positionName;
//订单违约金 //订单违约金
private String dedDetailDTO; private String dedDetailDTO;
//订单延长还车,不计免赔额
private String delayVehicleDetail;
/** /**
* 車輛編碼 * 車輛編碼
*/ */
......
...@@ -348,6 +348,18 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp ...@@ -348,6 +348,18 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
} }
} }
} }
//延期扣除费用
if (StringUtils.isNotBlank(orderVehicleCrosstownDto.getDelayVehicleDetail())) {
JSONArray jsonArray = JSONArray.parseArray(orderVehicleCrosstownDto.getDelayVehicleDetail());
if (jsonArray != null && jsonArray.size() > 0) {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = JSONObject.parseObject(jsonArray.get(i).toString());
if (jsonObject.getString("cost") != null) {
cost += Double.parseDouble(jsonObject.getString("cost"));
}
}
}
}
orderVehicleCrosstownDto.setUserLicenseImg(orderVehicleCrosstownDto.getLicenseImg()); orderVehicleCrosstownDto.setUserLicenseImg(orderVehicleCrosstownDto.getLicenseImg());
//扣除费用,每次都是重新计算 //扣除费用,每次都是重新计算
BigDecimal amount = new BigDecimal(cost.toString()).divide(new BigDecimal("1"), 2, BigDecimal.ROUND_UP); BigDecimal amount = new BigDecimal(cost.toString()).divide(new BigDecimal("1"), 2, BigDecimal.ROUND_UP);
......
package com.xxfc.platform.vehicle.feign; package com.xxfc.platform.vehicle.feign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.vo.GoodDataVO; import com.github.wxiaoqi.security.common.vo.GoodDataVO;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
...@@ -16,7 +15,9 @@ import org.springframework.cloud.openfeign.FeignClient; ...@@ -16,7 +15,9 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.*; import java.util.List;
import java.util.Map;
import java.util.Set;
/** /**
* Created by ace on 2017/9/15. * Created by ace on 2017/9/15.
...@@ -200,4 +201,12 @@ public interface VehicleFeign { ...@@ -200,4 +201,12 @@ public interface VehicleFeign {
@RequestParam(value = "endDate") Long endDate, @RequestParam(value = "endDate") Long endDate,
@RequestParam(value = "vehicleModelId") Integer vehicleModelId, @RequestParam(value = "vehicleModelId") Integer vehicleModelId,
@RequestParam(value = "userId") Integer userId); @RequestParam(value = "userId") Integer userId);
/**
* 订单修改订单时间,同时需要修改预定记录
* * @param bookVehicleVo
* @return
*/
@RequestMapping(value = "/vehicleInfo/bookRecord/order-update", method = RequestMethod.POST)
public RestResponse updateOrderBookRecord(@RequestBody BookVehicleVO bookVehicleVo) throws Exception;
} }
...@@ -229,6 +229,24 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use ...@@ -229,6 +229,24 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
return RestResponse.suc(); return RestResponse.suc();
} }
/**
* 订单修改订单时间,同时需要修改预定记录
* * @param bookVehicleVo
* @return
*/
@RequestMapping(value = "/bookRecord/order-update", method = RequestMethod.POST)
@ApiOperation(value = "订单修改订单时间")
public RestResponse updateOrderBookRecord(@RequestBody BookVehicleVO bookVehicleVo) throws Exception {
Integer operatorId = Integer.parseInt(BaseContextHandler.getUserID());
String userName = BaseContextHandler.getName();
bookVehicleVo.setStatus(VehicleBookRecordStatus.APPROVE.getCode());
bookVehicleVo.setNotCheckTimeLegal(Boolean.FALSE);
baseBiz.applyVehicle(operatorId, bookVehicleVo, userName);
return RestResponse.suc();
}
/** /**
* 申请预定车辆 需要审核 * 申请预定车辆 需要审核
* *
......
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