| | |
| | | electronicMoney = electronicMoney.add(chargingOrderVO.getElectrovalence()); |
| | | serviceMoney = serviceMoney.add(chargingOrderVO.getServiceCharge()); |
| | | |
| | | income = income.add(chargingOrderVO.getOrderAmount()); |
| | | income = income.add(chargingOrderVO.getPaymentAmount()); |
| | | |
| | | |
| | | |
| | |
| | | return null; |
| | | } |
| | | TChargingOrder one = this.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserCarId, appUserCar.getId()) |
| | | .eq(TChargingOrder::getDelFlag, 0).gt(TChargingOrder::getStartTime, query.getStartTime()) |
| | | .eq(TChargingOrder::getRechargePaymentStatus, 2).ne(TChargingOrder::getStatus, 5)); |
| | | .eq(TChargingOrder::getDelFlag, 0).between(TChargingOrder::getStartTime, query.getStartTime(), LocalDateTime.now()) |
| | | .eq(TChargingOrder::getRechargePaymentStatus, 2).in(TChargingOrder::getStatus, Arrays.asList(4, 5))); |
| | | return one; |
| | | } |
| | | |
| | |
| | | couponDiscount = couponDiscount.add(tChargingOrder.getCouponDiscountAmount()); |
| | | } |
| | | if (tChargingOrder.getPaymentAmount()!=null){ |
| | | paymentAmount = paymentAmount.add(tChargingOrder.getOrderAmount()); |
| | | paymentAmount = paymentAmount.add(tChargingOrder.getPaymentAmount()); |
| | | } |
| | | |
| | | } |
| | |
| | | // 三方交易手续费 三方收费*0.6% |
| | | commissionAmount = sharingAmount.multiply(new BigDecimal("0.006")); |
| | | // 订单手续费 订单支付金额 - 退款金额*0.6% |
| | | orderCommission = paymentAmount.multiply(new BigDecimal("0.006").setScale(2,RoundingMode.HALF_DOWN)); |
| | | orderCommission = paymentAmount.multiply(new BigDecimal("0.006")); |
| | | tSettlementConfirm.setSharingAmount(sharingAmount.setScale(2, RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setCommissionAmount(commissionAmount.setScale(2, RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setElectrovalence(electrovalence.setScale(2, RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setServiceCharge(serviceCharge.subtract(orderCommission).setScale(2, RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setOrderCommission(orderCommission); |
| | | tSettlementConfirm.setOrderCommission(orderCommission.setScale(2,BigDecimal.ROUND_DOWN)); |
| | | tSettlementConfirm.setVipDiscount(vipDiscount); |
| | | tSettlementConfirm.setCouponDiscount(couponDiscount); |
| | | tSettlementConfirm.setSiteId(dto.getSiteId()); |
| | |
| | | BigDecimal beforeCost= new BigDecimal("0"); |
| | | // 上月利润合计 |
| | | BigDecimal beforeIncome= new BigDecimal("0"); |
| | | int i = 1; |
| | | for (TSettlementConfirm tSettlementConfirm : list1) { |
| | | tSettlementConfirm.setXuhao(i); |
| | | tSettlementConfirm.setMetering(tSettlementConfirm.getSupplyElectronic()); |
| | | List<Site> data1 = siteClient.getSiteByIds(Arrays.asList(tSettlementConfirm.getSiteId())).getData(); |
| | | if (!data1.isEmpty()){ |
| | |
| | | |
| | | |
| | | for (TSettlementConfirm settlementConfirm : list2) { |
| | | int value = parse.getMonth().getValue(); |
| | | settlementConfirm.setMonth(value); |
| | | settlementConfirm.setIncome(settlementConfirm.getElectrovalence().add(settlementConfirm.getServiceCharge())); |
| | | tSettlementConfirm.setMetering(tSettlementConfirm.getSupplyElectronic()); |
| | | if (tSettlementConfirm.getSiteId().equals(settlementConfirm.getSiteId())){ |
| | |
| | | tSettlementConfirm.setTotalPercentage(bigDecimal1+"%"); } |
| | | beforeCost = beforeCost.add(settlementConfirm.getCost()); |
| | | beforeIncome = beforeIncome.add(settlementConfirm.getIncome()); |
| | | |
| | | |
| | | } |
| | | i++; |
| | | } |
| | | TSettlementConfirm tSettlementConfirm = new TSettlementConfirm(); |
| | | tSettlementConfirm.setMonth(parse.getMonthValue()); |
| | | tSettlementConfirm.setMeteringElectronic(meteringElectronic); |
| | | tSettlementConfirm.setChargingElectronic(chargingElectronic); |
| | | tSettlementConfirm.setLossElectronic(lossElectronic); |