Commit 147831dc authored by 周健威's avatar 周健威

Merge branch 'master-modify-cutAmount' into dev

parents 5ff67cbe 5d951dc2
......@@ -1024,8 +1024,10 @@ public class AppPermissionService {
}
Map<Integer, AppUserDetail> userIdAndAppUserDetail = appUserDetailBiz.findUserIdAndUserDetailMapByMemberIds(Arrays.asList(appUserLogin.getId()));
AppUserDetail appUserDetail = userIdAndAppUserDetail.get(appUserLogin.getId());
if (appUserDetail != null) {
imiVo.setNickname(appUserDetail.getNickname());
imiVo.setHeadimgurl(appUserDetail.getHeadimgurl());
}
return imiVo;
}
......
......@@ -371,7 +371,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//剩余押金 = 押金 - 违章保证金 - 定损金额
oad.setDepositAmount(oad.getDepositAmount().subtract(illegalReserve).subtract(csv.getDamagesAmount()));
handleCrosstownDetail(crosstown, oad);
handleCrosstownDetail(crosstown, oad, csv);
//退款
BigDecimal refundAmont = oad.getDepositAmount().add(oad.getOrderAmount());
......@@ -437,15 +437,15 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
return refundDesc;
}
private void handleCrosstownDetail(OrderVehicleCrosstown crosstown, OrderAccountDetail oad) {
private void handleCrosstownDetail(OrderVehicleCrosstown crosstown, OrderAccountDetail oad, CancelStartedVO csv) {
try{
if(null != crosstown.getViolateDetail()) {
DedDetailDTO vio = JSONUtil.toBean(crosstown.getViolateDetail(), DedDetailDTO.class);
if(OrderViolateEnum.BEFORE.getCode().equals(vio.getType())) {
handleViolateDetail(DeductionTypeEnum.VIOLATE_ADVANCE, oad, vio);
handleViolateDetail(DeductionTypeEnum.VIOLATE_ADVANCE, oad, vio, csv);
}else if(OrderViolateEnum.AFTER.getCode().equals(vio.getType())) {
handleViolateDetail(DeductionTypeEnum.VIOLATE_DELAY, oad, vio);
handleViolateDetail(DeductionTypeEnum.VIOLATE_DELAY, oad, vio, csv);
}
}
}catch (Exception e) {
......@@ -453,7 +453,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
private void handleViolateDetail(DeductionTypeEnum dte, OrderAccountDetail oad, DedDetailDTO vio) {
private void handleViolateDetail(DeductionTypeEnum dte, OrderAccountDetail oad, DedDetailDTO vio, CancelStartedVO csv) {
for(OrderAccountDeduction deduction : oad.getDeductions()) {
if(dte.getCode().equals(deduction.getType())) {
deduction.setName(vio.getDeductions());
......@@ -461,6 +461,10 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//修改归还押金金额
oad.setDepositAmount(oad.getDepositAmount().subtract(diff));
deduction.setAmount(vio.getCost());
//设置订单明细参数
csv.setViolateAmount(deduction.getAmount());
csv.setViolateDesc(deduction.getName());
}
}
}
......
......@@ -193,7 +193,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
if (vehicle.getMileageLastUpdate() != null) {
//判断车辆公里数
if (orderVehicleCrosstownDto.getMileage() == null || orderVehicleCrosstownDto.getMileage() <= vehicle.getMileageLastUpdate()) {
if (orderVehicleCrosstownDto.getMileage() == null || orderVehicleCrosstownDto.getMileage() < vehicle.getMileageLastUpdate()) {
return ObjectRestResponse.createFailedResult(ResCode.VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED.getCode(), ResCode.VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED.getDesc());
}
}
......
......@@ -144,15 +144,6 @@ public class OrderCancelBiz {
setOrderId(baseOrder.getId());
}});
// List<OrderItem> otherOrderItems = orderItemBiz.selectByExample(new Example.Builder(OrderItem.class)
// .where(WeekendSqls.<OrderItem>custom().andNotEqualTo(OrderItem::getType, ItemTypeEnum.VEHICLE_MODEL.getCode())).build()
// );
//原退还押金
Integer freeDays = (null == orderItem.getCutNum())?0 :orderItem.getCutNum();
// BigDecimal freeDayAmount = BigDecimal.ZERO;
//如果超过出发时间,不能取消订单
//根据时间处理goodsAmount
//获取出发时间 到现在 距离时间
......@@ -205,9 +196,6 @@ public class OrderCancelBiz {
}else {
// //没到出车时间
// //判断是否使用免费天数,并且进行扣款
// if(freeDays > 0) {
// freeDayAmount = orderItem.getUnitPrice().multiply(new BigDecimal(orvd.getFreeDays()+ ""));
// }
//违约金封顶 租车身份价 * 2天
BigDecimal topAmount = orderItem.getUnitPrice().multiply(new BigDecimal(2+ ""));
......
......@@ -217,7 +217,6 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
BigDecimal vehicleAmount = BigDecimal.ZERO;
BigDecimal driverAmount = BigDecimal.ZERO;
BigDecimal damageSafeAmount = BigDecimal.ZERO;
// BigDecimal modelAmount = BigDecimal.ZERO;
BigDecimal couponAmount = BigDecimal.ZERO;
String couponDesc = "";
Integer vehicleDayNum = 0;
......
......@@ -7,6 +7,15 @@ public class DictionaryKey {
*/
public static final String APP_ORDER ="APP_ORDER";
/**
* IM类型
*/
public static final String IM_TYPE ="IM_TYPE";
/**
* IM限制条数
*/
public static final String MSG_LIMIT_NUMBER ="MSG_LIMIT_NUMBER";
/**
* 支付
*/
......
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