| | |
| | | if(null != chargingHandshake && null != data && null != one.getAppUserCarId()){ |
| | | BigDecimal bms_battery_capacity = chargingHandshake.getBms_battery_capacity(); |
| | | TAppUserCar appUserCar = appUserCarClient.getCarByIds(Arrays.asList(one.getAppUserCarId())).getData().get(0); |
| | | // 续航 = 电池容量 / 续航里程 * soc |
| | | BigDecimal divide = bms_battery_capacity.divide(new BigDecimal(appUserCar.getEndurance())); |
| | | BigDecimal multiply = new BigDecimal(data.getSoc() / 100).multiply(divide); |
| | | // 续航 = 续航里程 * soc |
| | | BigDecimal multiply = new BigDecimal(data.getSoc() / 100).multiply(new BigDecimal(appUserCar.getEndurance())); |
| | | chargingDetails.setEndurance(multiply); |
| | | } |
| | | return chargingDetails; |
| | |
| | | } |
| | | tCharingOrderVO.setTotal(total); |
| | | tCharingOrderVO.setTime(time); |
| | | tCharingOrderVO.setIncome(income.subtract(commissionMoney)); |
| | | tCharingOrderVO.setIncome(paymentMoney.subtract(commissionMoney)); |
| | | tCharingOrderVO.setElectronicMoney(electronicMoney); |
| | | tCharingOrderVO.setServiceMoney(serviceMoney); |
| | | pageInfo.setRecords(list); |
| | |
| | | BigDecimal subtract = new BigDecimal("1").subtract(dto.getProportionPartner()); |
| | | BigDecimal subtract9 = new BigDecimal("1").subtract(dto.getServicePartner()); |
| | | // 总电损费用 |
| | | BigDecimal divide = tSettlementConfirm.getProportionMoney().divide(subtract, 2, RoundingMode.HALF_DOWN); |
| | | BigDecimal divide = tSettlementConfirm.getProportionMoney().divide(subtract, 2, BigDecimal.ROUND_DOWN); |
| | | // 平台承担电损 |
| | | BigDecimal subtract1 = divide.subtract(tSettlementConfirm.getProportionMoney()); |
| | | BigDecimal multiply = dto.getServiceMoney().multiply(subtract); |