| | |
| | | payOrderChargingInfo.setChargingName(data1.getName()); |
| | | TChargingGun data2 = chargingGunClient.getChargingGunById(byId.getChargingGunId()).getData(); |
| | | payOrderChargingInfo.setGunName(data2.getName()); |
| | | if (byId.getAppUserCarId()!=null) { |
| | | List<TAppUserCar> data3 = appUserCarClient.getCarByIds(Collections.singletonList(byId.getAppUserCarId())).getData(); |
| | | payOrderChargingInfo.setCarNum(data3.get(0).getLicensePlate()); |
| | | }else{ |
| | | payOrderChargingInfo.setCarNum(byId.getPlateNum()); |
| | | } |
| | | payOrderChargingInfo.setCarNum(byId.getPlateNum()); |
| | | payOrderChargingInfo.setTChargingOrder(byId); |
| | | |
| | | Long count = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId).count(); |
| | | payOrderChargingInfo.setPeriodCount(count); |
| | | if (byId.getAppUserCarId()!=null) { |
| | | if (byId.getAppUserCarId()!=null && 0 != byId.getAppUserCarId()) { |
| | | List<Long> carid = new ArrayList<>(); |
| | | carid.add(byId.getAppUserCarId()); |
| | | R<List<TAppUserCar>> carByIds = appUserCarClient.getCarByIds(carid); |
| | |
| | | } |
| | | tChargingOrderAccountingStrategy.setStartTime(format+" "+tChargingOrderAccountingStrategy.getStartTime()); |
| | | tChargingOrderAccountingStrategy.setEndTime(format+" "+tChargingOrderAccountingStrategy.getEndTime()); |
| | | if (byId.getVipDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ |
| | | BigDecimal multiply = byId.getVipDiscountAmount().divide(byId.getServiceCharge(), 2) |
| | | .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); |
| | | tChargingOrderAccountingStrategy.setVipDiscount(multiply); |
| | | } |
| | | if (byId.getCouponDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ |
| | | BigDecimal multiply = byId.getCouponDiscountAmount().divide(byId.getServiceCharge(), 2) |
| | | .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); |
| | | tChargingOrderAccountingStrategy.setCouponDiscount(multiply); |
| | | // if (byId.getVipDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ |
| | | // BigDecimal multiply = byId.getVipDiscountAmount().divide(byId.getServiceCharge(), 2) |
| | | // .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); |
| | | // tChargingOrderAccountingStrategy.setVipDiscount(multiply); |
| | | // } |
| | | // if (byId.getCouponDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ |
| | | // BigDecimal multiply = byId.getCouponDiscountAmount().divide(byId.getServiceCharge(), 2) |
| | | // .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); |
| | | // tChargingOrderAccountingStrategy.setCouponDiscount(multiply); |
| | | // } |
| | | if(null == tChargingOrderAccountingStrategy.getCouponDiscount()){ |
| | | tChargingOrderAccountingStrategy.setCouponDiscount(BigDecimal.ZERO); |
| | | } |
| | | } |
| | | //从新排序 |