| | |
| | | if(2 == addChargingOrder.getPaymentType()){ |
| | | AliPaymentReq req = new AliPaymentReq(); |
| | | req.setOutTradeNo(chargingOrder.getCode()); |
| | | req.setTotalAmount(chargingOrder.getPaymentAmount().toString()); |
| | | req.setTotalAmount(addChargingOrder.getPaymentAmount().toString()); |
| | | req.setSubject("充电充值"); |
| | | req.setBuyerOpenId(appUser.getAliOpenid()); |
| | | req.setBody("充电充值"); |
| | | req.setNotifyUrl("/payment/ali/callBack"); |
| | | AliPaymentResp data = aliPaymentClient.payment(req).getData(); |
| | | if(null != data){ |
| | | data.setNotifyUrl(data.getNotifyUrl() + "/order/t-charging-order/chargingOrderALICallback"); |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |
| | |
| | | dto.setRefundReason("充电失败,取消充电订单"); |
| | | RefundResp resp = aliPaymentClient.refund(dto).getData(); |
| | | if(null != resp){ |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE"); |
| | | AjaxResult success = chargingOrderStartupFailureWxRefund(resp.getOutTradeNo(), resp.getTradeNo(), "SUCCESS", sdf1.format(new Date())); |
| | | AjaxResult success = chargingOrderStartupFailureWxRefund(resp.getOutTradeNo(), resp.getTradeNo(), "SUCCESS", null); |
| | | if(success.isSuccess()){ |
| | | chargingOrderRefundService.save(chargingOrderRefund); |
| | | } |
| | |
| | | Integer h = Integer.valueOf(data.getCumulative_charging_time() / 60); |
| | | Integer m = Integer.valueOf(data.getCumulative_charging_time() % 60); |
| | | chargingDetails.setChargedTime(String.format("%02d", h) + ":" + String.format("%02d", m)); |
| | | } |
| | | //转换成UTC时间 |
| | | ChargingHandshake chargingHandshake = chargingHandshakeClient.getDataByOrderCode(one.getCode()).getData(); |
| | | 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); |
| | | chargingDetails.setEndurance(multiply); |
| | | if(null != one.getAppUserCarId()){ |
| | | TAppUserCar appUserCar = appUserCarClient.getCarById(one.getAppUserCarId().toString()).getData(); |
| | | // 续航 = 续航里程 * soc |
| | | BigDecimal multiply = new BigDecimal(data.getSoc()).divide(new BigDecimal(100)).multiply(new BigDecimal(appUserCar.getEndurance())); |
| | | chargingDetails.setEndurance(multiply.setScale(2, RoundingMode.HALF_EVEN)); |
| | | } |
| | | } |
| | | return chargingDetails; |
| | | } |
| | |
| | | if(1 == doubleIntegration){ |
| | | num1 *= 2; |
| | | } |
| | | |
| | | } |
| | | |
| | | GetInviteUser query = new GetInviteUser(); |
| | |
| | | BigDecimal income = new BigDecimal("0"); |
| | | BigDecimal electronicMoney = new BigDecimal("0"); |
| | | BigDecimal serviceMoney = new BigDecimal("0"); |
| | | BigDecimal commissionMoney = new BigDecimal("0"); |
| | | BigDecimal refundMoney = new BigDecimal("0"); |
| | | BigDecimal paymentMoney = new BigDecimal("0"); |
| | | for (ChargingOrderVO chargingOrderVO : list) { |
| | | chargingOrderVO.setCommissionAmount(chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006"))); |
| | | chargingOrderVO.setPlatFormMoney(chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006"))); |
| | | chargingOrderVO.setCommissionAmount(chargingOrderVO.getOrderAmount()!=null?chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006")):new BigDecimal("0")); |
| | | chargingOrderVO.setPlatFormMoney(chargingOrderVO.getOrderAmount()!=null?chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006")).setScale(2,BigDecimal.ROUND_DOWN):new BigDecimal("0")); |
| | | chargingOrderVO.setUid(chargingOrderVO.getId()+""); |
| | | TChargingGun data3 = chargingGunClient.getChargingGunById(chargingOrderVO.getChargingGunId()).getData(); |
| | | TChargingPile data2 = chargingPileClient.getChargingPileById(chargingOrderVO.getChargingPileId()).getData(); |
| | |
| | | } |
| | | } |
| | | for (ChargingOrderVO chargingOrderVO : list1) { |
| | | paymentMoney= paymentMoney.add(chargingOrderVO.getPaymentAmount()!=null?chargingOrderVO.getPaymentAmount():new BigDecimal("0")); |
| | | commissionMoney = commissionMoney.add(chargingOrderVO.getOrderAmount()!=null?chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006")):new BigDecimal("0")); |
| | | if (chargingOrderVO.getChargingCapacity()!=null){ |
| | | total = total.add(chargingOrderVO.getElectricity()); |
| | | } |
| | |
| | | chargingOrderVO.setChargingSecond(l); |
| | | time+=l; |
| | | } |
| | | electronicMoney = electronicMoney.add(chargingOrderVO.getElectrovalence()); |
| | | serviceMoney = serviceMoney.add(chargingOrderVO.getServiceCharge()); |
| | | |
| | | income = income.add(chargingOrderVO.getPaymentAmount()); |
| | | |
| | | |
| | | |
| | | List<TChargingOrderRefund> list2 = chargingOrderRefundService.lambdaQuery().eq(TChargingOrderRefund::getRefundStatus, 2) |
| | | .eq(TChargingOrderRefund::getChargingOrderId, chargingOrderVO.getId()).list(); |
| | | for (TChargingOrderRefund tChargingOrderRefund : list2) { |
| | | if (tChargingOrderRefund.getRefundStatus()==2){ |
| | | refundMoney = refundMoney.add(tChargingOrderRefund.getRefundTotalAmount()); |
| | | } |
| | | } |
| | | electronicMoney = electronicMoney.add(chargingOrderVO.getElectrovalence()!=null?chargingOrderVO.getElectrovalence():new BigDecimal("0")); |
| | | serviceMoney = serviceMoney.add(chargingOrderVO.getServiceCharge()!=null?chargingOrderVO.getServiceCharge():new BigDecimal("0")); |
| | | } |
| | | tCharingOrderVO.setTotal(total); |
| | | tCharingOrderVO.setTime(time); |
| | | tCharingOrderVO.setIncome(income); |
| | | tCharingOrderVO.setIncome(paymentMoney.subtract(commissionMoney)); |
| | | tCharingOrderVO.setElectronicMoney(electronicMoney); |
| | | tCharingOrderVO.setServiceMoney(serviceMoney); |
| | | pageInfo.setRecords(list); |
| | |
| | | chargingOrderListInfoVO.setStatus(chargingOrder.getStatus()); |
| | | BigDecimal bigDecimal = new BigDecimal("0.006"); |
| | | if (chargingOrder.getOrderAmount()!=null){ |
| | | chargingOrderListInfoVO.setCommissionAmount(chargingOrder.getOrderAmount().multiply(bigDecimal)); |
| | | BigDecimal multiply = chargingOrder.getPaymentAmount().multiply(bigDecimal); |
| | | chargingOrderListInfoVO.setCommissionAmount(multiply.setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | chargingOrderListInfoVO.setElectrovalence(chargingOrder.getElectrovalence()); |
| | | chargingOrderListInfoVO.setServiceCharge(chargingOrder.getServiceCharge()); |
| | |
| | | } |
| | | } |
| | | } |
| | | chargingOrderListInfoVO.setChargingCapacity(chargingOrder.getChargingCapacity()); |
| | | |
| | | chargingOrderListInfoVO.setEndMode(chargingOrder.getEndMode()); |
| | | |
| | |
| | | } |
| | | } |
| | | if (!data6.isEmpty()){ |
| | | // 第一条数据soc为开始 最后一条数据soc为结束soc |
| | | chargingOrderListInfoVO.setStartSoc(data6.get(data6.size()-1).getSoc().toString()); |
| | | chargingOrderListInfoVO.setEndSoc(data6.get(0).getSoc().toString()); |
| | | chargingOrderListInfoVO.setChargingCapacity(data6.get(data6.size()-1).getCharging_degree()); |
| | | int min = 100; |
| | | int max = 0; |
| | | for (UploadRealTimeMonitoringData uploadRealTimeMonitoringData : data6) { |
| | | if (uploadRealTimeMonitoringData.getSoc()>max){ |
| | | max = uploadRealTimeMonitoringData.getSoc(); |
| | | } |
| | | if (uploadRealTimeMonitoringData.getSoc()!=0 &&uploadRealTimeMonitoringData.getSoc()<min){ |
| | | min = uploadRealTimeMonitoringData.getSoc(); |
| | | } |
| | | } |
| | | chargingOrderListInfoVO.setEndSoc(max+""); |
| | | chargingOrderListInfoVO.setStartSoc(min+""); |
| | | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | for (UploadRealTimeMonitoringData uploadRealTimeMonitoringData : data6) { |
| | |
| | | } |
| | | |
| | | //已充电总度数 |
| | | BigDecimal electrovalenc = strategyDetail.getElectrovalence().multiply(sharp_peak_charge).setScale(2, RoundingMode.DOWN); |
| | | BigDecimal originalServicePrice = strategyDetail.getServiceCharge().multiply(sharp_peak_charge).setScale(2, RoundingMode.DOWN); |
| | | BigDecimal electrovalenc = strategyDetail.getElectrovalence().multiply(sharp_peak_charge); |
| | | BigDecimal originalServicePrice = strategyDetail.getServiceCharge().multiply(sharp_peak_charge); |
| | | BigDecimal serviceCharge = originalServicePrice; |
| | | BigDecimal vipDiscountAmount = BigDecimal.ZERO; |
| | | //计算优惠金额 |
| | | if(null != chargingOrder.getVipDiscount()){ |
| | | vipDiscountAmount = serviceCharge.multiply(new BigDecimal(1).subtract(chargingOrder.getVipDiscount())).setScale(2, RoundingMode.DOWN); |
| | | serviceCharge = serviceCharge.multiply(chargingOrder.getVipDiscount()).setScale(2, RoundingMode.DOWN); |
| | | vipDiscountAmount = serviceCharge.multiply(new BigDecimal(1).subtract(chargingOrder.getVipDiscount())); |
| | | serviceCharge = serviceCharge.multiply(chargingOrder.getVipDiscount()); |
| | | } |
| | | chargingOrderAccountingStrategy.setChargingCapacity(sharp_peak_charge); |
| | | chargingOrderAccountingStrategy.setPeriodElectricPrice(electrovalenc.setScale(2, RoundingMode.DOWN)); |
| | | chargingOrderAccountingStrategy.setPeriodServicePrice(serviceCharge.setScale(2, RoundingMode.DOWN)); |
| | | chargingOrderAccountingStrategy.setPeriodOriginalServicePrice(originalServicePrice.setScale(2, RoundingMode.DOWN)); |
| | | chargingOrderAccountingStrategy.setVipDiscountAmount(vipDiscountAmount.setScale(2, RoundingMode.DOWN)); |
| | | chargingOrderAccountingStrategy.setPeriodElectricPrice(electrovalenc.setScale(4, RoundingMode.HALF_EVEN)); |
| | | chargingOrderAccountingStrategy.setPeriodServicePrice(serviceCharge.setScale(4, RoundingMode.HALF_EVEN)); |
| | | chargingOrderAccountingStrategy.setPeriodOriginalServicePrice(originalServicePrice.setScale(4, RoundingMode.HALF_EVEN)); |
| | | chargingOrderAccountingStrategy.setVipDiscountAmount(vipDiscountAmount.setScale(4, RoundingMode.HALF_EVEN)); |
| | | chargingOrderAccountingStrategy.setCreateTime(LocalDateTime.now()); |
| | | chargingOrderAccountingStrategyService.save(chargingOrderAccountingStrategy); |
| | | |
| | | periodElectricPrice_total = periodElectricPrice_total.add(electrovalenc.setScale(2, RoundingMode.DOWN)); |
| | | periodServicePrice_total = periodServicePrice_total.add(originalServicePrice.setScale(2, RoundingMode.DOWN)); |
| | | total = total.add(electrovalenc.add(originalServicePrice.setScale(2, RoundingMode.DOWN))); |
| | | periodElectricPrice_total = periodElectricPrice_total.add(electrovalenc); |
| | | periodServicePrice_total = periodServicePrice_total.add(originalServicePrice); |
| | | total = total.add(electrovalenc.add(originalServicePrice)); |
| | | } |
| | | |
| | | |
| | |
| | | //总金额(充值金额+会员折扣金额) |
| | | BigDecimal decimal = rechargeAmount.add(vipDiscountAmount); |
| | | //退款金额(已经计算了折扣优惠部分) |
| | | //如果充电总金额未使用完,则需要退回费用=(原金额/总金额)*(总金额-实际充电金额) |
| | | BigDecimal refundAmount = rechargeAmount.divide(decimal, new MathContext(4, RoundingMode.HALF_EVEN)).multiply(decimal.subtract(total)); |
| | | BigDecimal orderAmount = BigDecimal.valueOf(total.doubleValue()); |
| | | BigDecimal payAmount = BigDecimal.valueOf(total.doubleValue()); |
| | |
| | | |
| | | //服务费折扣 |
| | | discountAmount = periodServicePrice_total.multiply((new BigDecimal(1).subtract(chargingOrder.getVipDiscount()))); |
| | | periodServicePrice_total = periodServicePrice_total.multiply(chargingOrder.getVipDiscount()); |
| | | |
| | | TVip vip = vipClient.getInfo1(appUser.getVipId()).getData(); |
| | | BigDecimal maximumDeduction = vip.getMaximumDeduction(); |
| | | //普通会员有最高优惠限制 |
| | |
| | | } |
| | | } |
| | | } |
| | | //会员折扣金额 |
| | | discountAmount = discountAmount.setScale(4, RoundingMode.HALF_EVEN); |
| | | payAmount = payAmount.subtract(discountAmount); |
| | | |
| | | periodServicePrice_total = periodServicePrice_total.subtract(discountAmount); |
| | | |
| | | TChargingOrder order = new TChargingOrder(); |
| | | order.setId(chargingOrder.getId()); |
| | | order.setAppUserId(chargingOrder.getAppUserId()); |
| | |
| | | }else{ |
| | | order.setEndMode(1); |
| | | } |
| | | order.setResidualAmount(rechargeAmount.subtract(total).setScale(2, RoundingMode.DOWN)); |
| | | order.setResidualAmount(rechargeAmount.subtract(total).setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setStartTime(LocalDateTime.parse(vo.getStart_time(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SS"))); |
| | | order.setEndTime(LocalDateTime.parse(vo.getEnd_time(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SS"))); |
| | | order.setStatus(5); |
| | | order.setOrderAmount(orderAmount.setScale(2, RoundingMode.DOWN)); |
| | | order.setVipDiscountAmount(discountAmount.setScale(2, RoundingMode.DOWN)); |
| | | order.setElectrovalence(periodElectricPrice_total.setScale(2, RoundingMode.DOWN)); |
| | | order.setOrderAmount(orderAmount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setVipDiscountAmount(discountAmount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setElectrovalence(periodElectricPrice_total.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setChargingCapacity(vo.getTotal_electricity()); |
| | | order.setElectricity(vo.getTotal_electricity()); |
| | | |
| | | //计算优惠券 |
| | | BigDecimal couponDiscount = BigDecimal.ZERO; |
| | | if(null != chargingOrder.getAppCouponId()){ |
| | | //判断实际充电金额是否满足优惠券使用条件,如果不满足则不适用优惠券。 |
| | | TAppCoupon appCoupon = appCouponClient.getAppCouponById(chargingOrder.getAppCouponId()).getData(); |
| | |
| | | BigDecimal couponDiscountAmount = tCoupon.getDiscountAmount(); |
| | | //如果优惠金额大于服务费金额,以服务费作为最大限制 |
| | | if(periodServicePrice_total.compareTo(couponDiscountAmount) < 0){ |
| | | refundAmount = refundAmount.add(periodServicePrice_total); |
| | | order.setCouponDiscountAmount(periodServicePrice_total); |
| | | payAmount = payAmount.subtract(periodServicePrice_total); |
| | | couponDiscount = periodServicePrice_total; |
| | | periodServicePrice_total = BigDecimal.ZERO; |
| | | }else{ |
| | | refundAmount = refundAmount.add(couponDiscountAmount); |
| | | order.setCouponDiscountAmount(couponDiscountAmount); |
| | | payAmount = payAmount.subtract(couponDiscountAmount); |
| | | periodServicePrice_total = periodServicePrice_total.subtract(couponDiscountAmount); |
| | | couponDiscount = couponDiscountAmount; |
| | | } |
| | | |
| | | appCoupon.setStatus(2); |
| | | appCouponClient.updateAppCoupon(appCoupon); |
| | | }else{ |
| | |
| | | divide = divide.compareTo(tCoupon.getMaximumDiscountAmount()) > 0 ? tCoupon.getMaximumDiscountAmount() : divide; |
| | | //如果优惠金额大于服务费金额,以服务费作为最大限制 |
| | | if(periodServicePrice_total.compareTo(divide) < 0){ |
| | | refundAmount = refundAmount.add(periodServicePrice_total); |
| | | order.setCouponDiscountAmount(periodServicePrice_total); |
| | | payAmount = payAmount.subtract(periodServicePrice_total); |
| | | couponDiscount = periodServicePrice_total; |
| | | periodServicePrice_total = BigDecimal.ZERO; |
| | | }else{ |
| | | refundAmount = refundAmount.add(divide); |
| | | order.setCouponDiscountAmount(divide); |
| | | payAmount = payAmount.subtract(divide); |
| | | periodServicePrice_total = periodServicePrice_total.subtract(divide); |
| | | couponDiscount = divide; |
| | | } |
| | | |
| | | appCoupon.setStatus(2); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | order.setServiceCharge(periodServicePrice_total.setScale(2, RoundingMode.DOWN)); |
| | | order.setPaymentAmount(payAmount.setScale(2, RoundingMode.DOWN)); |
| | | order.setRefundAmount(refundAmount.setScale(2, RoundingMode.DOWN)); |
| | | //优惠券优惠金额 |
| | | couponDiscount = couponDiscount.setScale(4, RoundingMode.HALF_EVEN); |
| | | refundAmount = refundAmount.add(couponDiscount); |
| | | payAmount = payAmount.subtract(couponDiscount); |
| | | if(periodServicePrice_total.compareTo(BigDecimal.ZERO) > 0){ |
| | | periodServicePrice_total = periodServicePrice_total.subtract(couponDiscount); |
| | | } |
| | | order.setCouponDiscountAmount(couponDiscount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setServiceCharge(periodServicePrice_total.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setPaymentAmount(payAmount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setRefundAmount(refundAmount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | order.setRefundStatus(1); |
| | | this.updateById(order); |
| | | chargingOrder = this.getById(order.getId()); |
| | |
| | | BigDecimal periodServicePrice = chargingOrderAccountingStrategy.getPeriodServicePrice(); |
| | | BigDecimal multiply = couponDiscountAmount.multiply(periodServicePrice.divide(reduce, new MathContext(4, RoundingMode.HALF_EVEN))); |
| | | periodServicePrice = periodServicePrice.subtract(multiply); |
| | | chargingOrderAccountingStrategy.setPeriodServicePrice(periodServicePrice.setScale(2, RoundingMode.DOWN)); |
| | | chargingOrderAccountingStrategy.setCouponDiscountAmount(multiply.setScale(2, RoundingMode.DOWN)); |
| | | chargingOrderAccountingStrategy.setPeriodServicePrice(periodServicePrice.setScale(2, RoundingMode.HALF_EVEN)); |
| | | chargingOrderAccountingStrategy.setCouponDiscountAmount(multiply.setScale(2, RoundingMode.HALF_EVEN)); |
| | | } |
| | | chargingOrderAccountingStrategyService.updateBatchById(list); |
| | | } |
| | |
| | | dto.setRefundReason("充电完成退款"); |
| | | RefundResp resp = aliPaymentClient.refund(dto).getData(); |
| | | if(null != resp){ |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE"); |
| | | AjaxResult success = chargingOrderStartupFailureWxRefund(resp.getOutTradeNo(), resp.getTradeNo(), "SUCCESS", sdf1.format(new Date())); |
| | | AjaxResult success = chargingOrderStartupFailureWxRefund(resp.getOutTradeNo(), resp.getTradeNo(), "SUCCESS", null); |
| | | if(success.isSuccess()){ |
| | | chargingOrderRefundService.save(chargingOrderRefund); |
| | | } |
| | |
| | | } |
| | | if (tChargingOrder.getPaymentAmount()!=null){ |
| | | paymentAmount = paymentAmount.add(tChargingOrder.getPaymentAmount()); |
| | | orderCommission = orderCommission.add(tChargingOrder.getPaymentAmount().multiply(new BigDecimal("0.006")) |
| | | .setScale(2,BigDecimal.ROUND_DOWN)); |
| | | } |
| | | |
| | | } |
| | | |
| | | // 三方交易手续费 三方收费*0.6% |
| | | commissionAmount = sharingAmount.multiply(new BigDecimal("0.006")); |
| | | // 订单手续费 订单支付金额 - 退款金额*0.6% |
| | | orderCommission = paymentAmount.multiply(new BigDecimal("0.006").setScale(2,RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setSharingAmount(sharingAmount.setScale(2, RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setCommissionAmount(commissionAmount.setScale(2, RoundingMode.HALF_DOWN)); |
| | | tSettlementConfirm.setElectrovalence(electrovalence.setScale(2, RoundingMode.HALF_DOWN)); |
| | |
| | | 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); |
| | |
| | | BigDecimal beforeCost= new BigDecimal("0"); |
| | | // 上月利润合计 |
| | | BigDecimal beforeIncome= new BigDecimal("0"); |
| | | int i = 0; |
| | | int i = 1; |
| | | for (TSettlementConfirm tSettlementConfirm : list1) { |
| | | tSettlementConfirm.setXuhao(i); |
| | | tSettlementConfirm.setMetering(tSettlementConfirm.getSupplyElectronic()); |
| | |
| | | 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); |