| | |
| | | package com.ruoyi.order.controller; |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.DecimalFormat; |
| | |
| | | import com.ruoyi.common.core.dto.ChargingOrderGroup; |
| | | import com.ruoyi.common.core.dto.ChargingPercentProvinceDto; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.log.enums.OperatorType; |
| | |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.integration.api.model.PageChargingOrderAndUploadRealTimeMonitoringDataDto; |
| | | import com.ruoyi.integration.api.model.UploadRealTimeMonitoringData; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.integration.api.feignClient.UploadRealTimeMonitoringDataClient; |
| | | import com.ruoyi.integration.api.model.ChargingOrderAndUploadRealTimeMonitoringDataDto; |
| | | import com.ruoyi.integration.api.model.UploadRealTimeMonitoringPageData; |
| | | import com.ruoyi.order.api.dto.ChargingStatisticeDTO; |
| | | import com.ruoyi.order.api.model.*; |
| | | import com.ruoyi.order.api.query.ChargingOrderQuery; |
| | |
| | | import com.ruoyi.order.dto.MyChargingOrderList; |
| | | import com.ruoyi.order.dto.OrderEvaluateVo; |
| | | import com.ruoyi.order.dto.*; |
| | | import com.ruoyi.order.export.PayOrderExport; |
| | | import com.ruoyi.order.export.EnterpriseChargingDetailExport; |
| | | import com.ruoyi.order.service.*; |
| | | import com.ruoyi.order.util.PreviousSixMonths; |
| | | import com.ruoyi.order.util.mongodb.service.UploadRealTimeMonitoringDataService; |
| | | import com.ruoyi.order.vo.EndOfChargePageInfo; |
| | | import com.ruoyi.order.vo.ChargingSimulationVO; |
| | | import com.ruoyi.order.vo.IcbcAdminSubOrderVO; |
| | | import com.ruoyi.order.vo.StatisticsOfBatteryVO; |
| | | import com.ruoyi.order.vo.UpdateOrderPaymentAmountDto; |
| | | import com.ruoyi.order.vo.WatchChargingOrderVo; |
| | | import com.ruoyi.other.api.feignClient.RoleSiteClient; |
| | | import com.ruoyi.other.api.feignClient.UserSiteClient; |
| | | import com.ruoyi.payment.api.feignClient.AliPaymentClient; |
| | | import com.ruoyi.payment.api.feignClient.WxPaymentClient; |
| | | import com.ruoyi.payment.api.vo.AliQueryOrder; |
| | | import com.ruoyi.payment.api.vo.IcbcPaymentResp; |
| | | import com.ruoyi.payment.api.vo.IcbcRefundResp; |
| | | import com.ruoyi.payment.api.vo.IcbcSubOrderRefundResp; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import com.ruoyi.system.api.feignClient.SysUserRoleClient; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.WebUtils; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Resource |
| | | private TOrderInvoiceService invoiceService; |
| | | @Resource |
| | | private UploadRealTimeMonitoringDataClient uploadRealTimeMonitoringDataClient; |
| | | private UploadRealTimeMonitoringDataService uploadRealTimeMonitoringDataService; |
| | | @Resource |
| | | private PartnerClient partnerClient; |
| | | @Resource |
| | |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/chargingUserAnalysis"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PostMapping(value = "/enterprise/charging/analysis") |
| | | @ApiOperation(value = "企业用户充电分析", tags = {"管理后台-数据分析-企业用户充电分析"}) |
| | | public R<PageInfo<EnterpriseChargingAnalysisVO>> enterpriseChargingAnalysis(@RequestBody EnterpriseChargingAnalysisQuery query) { |
| | | return chargingOrderService.enterpriseChargingAnalysis(query); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/chargingUserAnalysis"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PostMapping(value = "/enterprise/charging/detail") |
| | | @ApiOperation(value = "企业用户充电明细", tags = {"管理后台-数据分析-企业用户充电分析"}) |
| | | public R<PageInfo<EnterpriseChargingDetailVO>> enterpriseChargingDetail(@RequestBody EnterpriseChargingAnalysisQuery query) { |
| | | return chargingOrderService.enterpriseChargingDetail(query); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/chargingUserAnalysis"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PutMapping(value = "/enterprise/charging/detail/export") |
| | | @ApiOperation(value = "企业用户充电明细导出", tags = {"管理后台-数据分析-企业用户充电分析"}) |
| | | public void exportEnterpriseChargingDetail(@RequestBody EnterpriseChargingAnalysisQuery query) { |
| | | List<EnterpriseChargingDetailVO> records = chargingOrderService.enterpriseChargingDetailExport(query); |
| | | List<EnterpriseChargingDetailExport> exports = records.stream().map(this::buildEnterpriseChargingDetailExport).collect(Collectors.toList()); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), EnterpriseChargingDetailExport.class, exports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("企业用户充电明细.xls", "utf-8")); |
| | | try (ServletOutputStream outputStream = response.getOutputStream()) { |
| | | workbook.write(outputStream); |
| | | } |
| | | workbook.close(); |
| | | } catch (IOException e) { |
| | | log.error("导出企业用户充电明细失败", e); |
| | | } |
| | | } |
| | | |
| | | private EnterpriseChargingDetailExport buildEnterpriseChargingDetailExport(EnterpriseChargingDetailVO dto) { |
| | | EnterpriseChargingDetailExport export = new EnterpriseChargingDetailExport(); |
| | | export.setCode(dto.getCode()); |
| | | export.setOrderType(formatEnterpriseOrderType(dto.getOrderType())); |
| | | export.setOrderClassification(formatOrderClassification(dto.getOrderClassification())); |
| | | export.setSiteName(dto.getSiteName()); |
| | | export.setTerminalName(dto.getTerminalName()); |
| | | export.setStatus(formatPayOrderStatus(1, dto.getStatus())); |
| | | export.setChargingSecond(dto.getChargingSecond()); |
| | | export.setTotalAmount(dto.getTotalAmount()); |
| | | export.setCouponDiscountAmount(dto.getCouponDiscountAmount()); |
| | | export.setVipDiscountAmount(dto.getVipDiscountAmount()); |
| | | export.setPaymentAmount(dto.getPaymentAmount()); |
| | | export.setRefundAmount(dto.getRefundAmount()); |
| | | export.setPartnerName(dto.getPartnerName()); |
| | | export.setPhone(dto.getPhone()); |
| | | export.setOrderSource(formatOrderSource(dto.getOrderSource())); |
| | | export.setStartTime(dto.getStartTime() == null ? null : DateUtils.localDateTimeToString(dto.getStartTime())); |
| | | export.setEndTime(dto.getEndTime() == null ? null : DateUtils.localDateTimeToString(dto.getEndTime())); |
| | | return export; |
| | | } |
| | | |
| | | private String formatEnterpriseOrderType(Integer type) { |
| | | if (type == null) { |
| | | return "-"; |
| | | } |
| | | if (type == 1) { |
| | | return "充电订单(小程序)"; |
| | | } |
| | | if (type == 2) { |
| | | return "充电订单(刷卡)"; |
| | | } |
| | | return "充电订单"; |
| | | } |
| | | |
| | | private String formatOrderClassification(Integer type) { |
| | | if (type == null) { |
| | | return "-"; |
| | | } |
| | | return type == 1 ? "线上订单" : "线下订单"; |
| | | } |
| | | |
| | | private String formatOrderSource(Integer source) { |
| | | if (source == null) { |
| | | return "-"; |
| | | } |
| | | if (source == 0) { |
| | | return "自有平台"; |
| | | } |
| | | if (source == 1) { |
| | | return "第三方平台"; |
| | | } |
| | | if (source == 2) { |
| | | return "引流平台"; |
| | | } |
| | | return "其他"; |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/invoiceManagement/select_order", "/paymentOrder/order"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PostMapping(value = "/pay/order/list") |
| | | @ApiOperation(value = "列表", tags = {"管理后台-支付订单-订单信息"}) |
| | | public R<PageInfo<PayOrderDto>> payOrderList(@RequestBody PayOrderQueryDto payOrderQueryDto) { |
| | | Integer pageCurr = payOrderQueryDto.getPageCurr(); |
| | | Integer pageSize = payOrderQueryDto.getPageSize(); |
| | | payOrderQueryDto.setPageCurr(1); |
| | | payOrderQueryDto.setPageSize(10000999); |
| | | PageInfo<PayOrderDto> data = chargingOrderService.payOrderQuery(payOrderQueryDto).getData(); |
| | | List<PayOrderDto> res = new ArrayList<>(); |
| | | // 查询当前登陆人按钮权限 |
| | | SysUser sysUser = sysUserClient.getSysUser(tokenService.getLoginUser().getUserid()).getData(); |
| | | Integer roleType = sysUser.getRoleType(); |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | //如果没传siteId,获取当前登陆人所有的siteIds |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | if (userId != null){ |
| | | List<GetSiteListDTO> data2 = siteClient.getSiteListByUserId(userId).getData(); |
| | | for (GetSiteListDTO datum : data2) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | } |
| | | if (siteIds.isEmpty()){ |
| | | siteIds.add(-1); |
| | | } |
| | | List<TChargingOrder> list = chargingOrderService.list(); |
| | | List<TParkingRecord> parkingRecord = parkingLotClient.getSiteIdAll().getData(); |
| | | for (PayOrderDto record : data.getRecords()) { |
| | | if (record.getType() == 1){ |
| | | TChargingOrder chargingOrder = list.stream().filter(e -> e.getId().equals(Long.valueOf(record.getId()))).findFirst().orElse(null); |
| | | if (chargingOrder!=null){ |
| | | record.setSiteId(chargingOrder.getSiteId()); |
| | | } |
| | | } |
| | | if (record.getType()==4){ |
| | | TParkingRecord tParkingRecord = parkingRecord.stream().filter(e -> e.getId().equals(Long.valueOf(record.getId()))).findFirst().orElse(null); |
| | | if (tParkingRecord!=null){ |
| | | record.setSiteId(tParkingRecord.getSiteId()); |
| | | } |
| | | } |
| | | if (roleType==1||(record.getType()!=1&&record.getType()!=4)){ |
| | | res.add(record); |
| | | continue; |
| | | } |
| | | if (roleType==2 && (record.getType()==1||record.getType()==4) && siteIds.contains(record.getSiteId())){ |
| | | res.add(record); |
| | | } |
| | | return chargingOrderService.payOrderQuery(payOrderQueryDto); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/invoiceManagement/select_order", "/invoiceManagement/export", "/paymentOrder/order"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PutMapping(value = "/pay/order/export") |
| | | @ApiOperation(value = "导出查看订单列表", tags = {"管理后台-支付订单-订单信息"}) |
| | | @Log(title = "发票管理查看订单导出", businessType = BusinessType.EXPORT) |
| | | public void exportPayOrder(@RequestBody PayOrderQueryDto payOrderQueryDto) { |
| | | payOrderQueryDto.setPageCurr(1); |
| | | payOrderQueryDto.setPageSize(10000); |
| | | R<PageInfo<PayOrderDto>> result = chargingOrderService.payOrderQuery(payOrderQueryDto); |
| | | List<PayOrderDto> records = result.getData() == null || result.getData().getRecords() == null |
| | | ? Collections.emptyList() : result.getData().getRecords(); |
| | | List<PayOrderExport> exports = records.stream().map(this::buildPayOrderExport).collect(Collectors.toList()); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), PayOrderExport.class, exports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("订单列表.xls", "utf-8")); |
| | | try (ServletOutputStream outputStream = response.getOutputStream()) { |
| | | workbook.write(outputStream); |
| | | } |
| | | workbook.close(); |
| | | } catch (IOException e) { |
| | | log.error("导出查看订单列表失败", e); |
| | | } |
| | | List<PayOrderDto> res1 = testing5(res.size(), pageCurr, pageSize, res); |
| | | data.setTotal(res.size()); |
| | | data.setRecords(res1); |
| | | return R.ok(data); |
| | | } |
| | | |
| | | private PayOrderExport buildPayOrderExport(PayOrderDto dto) { |
| | | PayOrderExport export = new PayOrderExport(); |
| | | export.setCode(dto.getCode()); |
| | | export.setType(formatPayOrderType(dto.getType())); |
| | | export.setTitle(dto.getTitle()); |
| | | export.setPhone(dto.getPhone()); |
| | | export.setOrderStatus(dto.getPayTime() != null ? "订单支付成功" : "订单完成"); |
| | | export.setStatus(formatPayOrderStatus(dto.getType(), dto.getStatus())); |
| | | export.setRefundStatus(dto.getRefundStatus() != null && dto.getRefundStatus() == 1 ? "有退款" : "无退款"); |
| | | export.setRechargeAmount(dto.getRechargeAmount()); |
| | | export.setPaymentAmount(dto.getPaymentAmount()); |
| | | export.setFinalAmount(dto.getFinalAmount()); |
| | | export.setCreateTime(dto.getCreateTime() == null ? null : DateUtils.localDateTimeToString(dto.getCreateTime())); |
| | | export.setEndTime(dto.getEndTime() == null ? null : DateUtils.localDateTimeToString(dto.getEndTime())); |
| | | export.setPayTime(dto.getPayTime() == null ? null : DateUtils.localDateTimeToString(dto.getPayTime())); |
| | | return export; |
| | | } |
| | | |
| | | private String formatPayOrderType(Integer type) { |
| | | if (type == null || type < 1 || type > 4) { |
| | | return "-"; |
| | | } |
| | | return new String[]{"充电订单", "购物订单", "vip订单", "停车订单"}[type - 1]; |
| | | } |
| | | |
| | | private String formatPayOrderStatus(Integer type, Integer status) { |
| | | if (type == null) { |
| | | return "-"; |
| | | } |
| | | if (type == 3) { |
| | | return "支付成功"; |
| | | } |
| | | if (status == null) { |
| | | return "-"; |
| | | } |
| | | if (type == 1 && status >= 0 && status <= 5) { |
| | | return new String[]{"未知", "等待中", "启动中", "充电中", "停止中", "已结束"}[status]; |
| | | } |
| | | if (type == 2 && status >= 1 && status <= 4) { |
| | | return new String[]{"待发货", "待收货", "已完成", "已取消"}[status - 1]; |
| | | } |
| | | if (type == 4 && status >= 1 && status <= 3) { |
| | | return new String[]{"已进场", "已出场", "已缴费出场"}[status - 1]; |
| | | } |
| | | return "-"; |
| | | } |
| | | |
| | | |
| | |
| | | payOrderInfoDto.setRefundAmount(byId.getRefundAmount()); |
| | | payOrderInfoDto.setRechargeAmount(byId.getRechargeAmount()); |
| | | payOrderInfoDto.setFinalAmount(byId.getRechargeAmount().subtract(byId.getRefundAmount())); |
| | | payOrderInfoDto.setPayMethod(byId.getPayMethod()); |
| | | payOrderInfoDto.setBalancePayAmount(byId.getBalancePayAmount()); |
| | | payOrderInfoDto.setThirdPayAmount(byId.getThirdPayAmount()); |
| | | payOrderInfoDto.setBalanceRefundAmount(byId.getBalanceRefundAmount()); |
| | | payOrderInfoDto.setThirdRefundAmount(byId.getThirdRefundAmount()); |
| | | return R.ok(payOrderInfoDto); |
| | | case 2: |
| | | TShoppingOrder byId1 = shoppingOrderService.getById(orderId); |
| | |
| | | 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); |
| | |
| | | @PostMapping(value = "/chargingOrder") |
| | | @ApiOperation(value = "充电桩订单列表", tags = {"管理后台-订单管理"}) |
| | | public AjaxResult<TCharingOrderVO> chargingOrder(@RequestBody ChargingOrderQuery dto) { |
| | | List<Long> data = appUserClient.getUserIdsByPhone(dto.getPhone()).getData(); |
| | | dto.setUserIds(data); |
| | | TCharingOrderVO res = chargingOrderService.chargingOrder(dto); |
| | | return AjaxResult.success(res); |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/chargingPileOrder"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PostMapping(value = "/balanceIncomeDetail") |
| | | @ApiOperation(value = "充电桩订单余额收入明细", tags = {"管理后台-订单管理"}) |
| | | public AjaxResult<List<ChargingOrderBalanceIncomeDetailVO>> balanceIncomeDetail(@RequestBody ChargingOrderQuery dto) { |
| | | List<ChargingOrderBalanceIncomeDetailVO> res = chargingOrderService.balanceIncomeDetail(dto); |
| | | return AjaxResult.success(res); |
| | | } |
| | | |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | //从新排序 |
| | |
| | | public AjaxResult paymentChargingOrder(@RequestBody AddChargingOrder addChargingOrder) { |
| | | return chargingOrderService.paymentChargingOrder(addChargingOrder); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping(value = "/confirmIcbcPayment") |
| | | @ApiOperation(value = "主动确认工行充电支付结果", tags = {"小程序-扫一扫"}) |
| | | public AjaxResult confirmIcbcPayment(@RequestParam("orderCode") String orderCode) { |
| | | return chargingOrderService.confirmIcbcPayment(orderCode); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/chargingPileOrder", "/paymentOrder/refund"}, logical = Logical.AND) |
| | | @PostMapping("/icbc/fund/payment-query") |
| | | @ApiOperation(value = "管理后台查询工行支付订单", tags = {"后台-充电桩订单"}) |
| | | public AjaxResult<IcbcPaymentResp> queryIcbcAdminPayment(@RequestBody IcbcAdminFundOperationReq request) { |
| | | return AjaxResult.success(chargingOrderService.queryIcbcAdminPayment(request == null ? null : request.getOrderCode())); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/chargingPileOrder", "/paymentOrder/refund"}, logical = Logical.AND) |
| | | @PostMapping("/icbc/fund/refund") |
| | | @ApiOperation(value = "管理后台工行主订单退款", tags = {"后台-充电桩订单"}) |
| | | public AjaxResult<IcbcRefundResp> refundIcbcAdminPayment(@RequestBody IcbcAdminFundOperationReq request) { |
| | | return AjaxResult.success(chargingOrderService.refundIcbcAdminPayment(request)); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/chargingPileOrder", "/paymentOrder/refund"}, logical = Logical.AND) |
| | | @PostMapping("/icbc/fund/sub-orders") |
| | | @ApiOperation(value = "管理后台查询工行分账子订单", tags = {"后台-充电桩订单"}) |
| | | public AjaxResult<List<IcbcAdminSubOrderVO>> queryIcbcAdminSubOrders(@RequestBody IcbcAdminFundOperationReq request) { |
| | | return AjaxResult.success(chargingOrderService.queryIcbcAdminSubOrders(request == null ? null : request.getOrderCode())); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/chargingPileOrder", "/paymentOrder/refund"}, logical = Logical.AND) |
| | | @PostMapping("/icbc/fund/sub-order-refund") |
| | | @ApiOperation(value = "管理后台工行分账子订单退款", tags = {"后台-充电桩订单"}) |
| | | public AjaxResult<IcbcSubOrderRefundResp> refundIcbcAdminSubOrder(@RequestBody IcbcAdminFundOperationReq request) { |
| | | return AjaxResult.success(chargingOrderService.refundIcbcAdminSubOrder(request)); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/simulation/current") |
| | | @ApiOperation(value = "查询当前枪可模拟结算的已支付订单", tags = {"小程序-模拟充电"}) |
| | | public AjaxResult<ChargingSimulationVO> getCurrentSimulationOrder(@RequestParam("gunId") Integer gunId) { |
| | | return AjaxResult.success(chargingOrderService.getCurrentSimulationOrder(gunId)); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/simulation/complete") |
| | | @ApiOperation(value = "模拟完成充电并执行真实结算", tags = {"小程序-模拟充电"}) |
| | | public AjaxResult<ChargingSimulationVO> completeSimulation(@RequestBody ChargingSimulationReq request) { |
| | | return AjaxResult.success(chargingOrderService.completeSimulation(request)); |
| | | } |
| | | |
| | | /** |
| | | * 充电充值支付回调 |
| | |
| | | }) |
| | | public AjaxResult<PreChargeCheck> preChargeCheck(@PathVariable Integer id) { |
| | | String key = "AQJC_" + id; |
| | | Object cacheObject = redisService.getCacheObject(key); |
| | | PreChargeCheck cacheObject = redisService.getCacheObject(key); |
| | | if(null != cacheObject){ |
| | | if(LocalDateTime.now().minusMinutes(1).isAfter(cacheObject.getAddTime())){ |
| | | redisService.deleteObject(key); |
| | | cacheObject = null; |
| | | } |
| | | } |
| | | return AjaxResult.success(cacheObject); |
| | | } |
| | | |
| | |
| | | ChargingDetails chargingDetails = chargingOrderService.getChargingDetails(id); |
| | | return AjaxResult.success(chargingDetails); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Log(title = "【扫一扫】手动停止充电", businessType = BusinessType.STOP,operatorType = OperatorType.MOBILE) |
| | | @ResponseBody |
| | | @PutMapping(value = "/stopCharging/{id}") |
| | |
| | | @ApiImplicitParam(name = "id", value = "订单id", required = true) |
| | | }) |
| | | public AjaxResult stopCharging(@PathVariable String id) { |
| | | log.info("小程序主动发起停止充电,订单ID:{}", id); |
| | | return chargingOrderService.stopCharging(id); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "电站收入分析", tags = {"后台-数据分析-平台收入分析"}) |
| | | public R<List<SixChargingDto>> charge(Integer siteId) { |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | //如果没传siteId,获取当前登陆人所有的siteIds |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | if (siteId==null){ |
| | | List<GetSiteListDTO> data = siteClient.getSiteListByUserId(userId).getData(); |
| | | for (GetSiteListDTO datum : data) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | }else { |
| | | siteIds.add(siteId); |
| | | } |
| | | if (siteIds.isEmpty()){ |
| | | siteIds.add(-1); |
| | | } |
| | | SysUser sysUser = sysUserClient.getSysUser(userId).getData(); |
| | | boolean partnerView = isPartnerView(sysUser); |
| | | List<Integer> siteIds = resolvePlatformRevenueSiteIds(userId, sysUser, siteId); |
| | | LocalDate sixBefore = PreviousSixMonths.get(); |
| | | //通过siteIds进行sql查询统计 |
| | | List<SixChargingDto> sixChargingDtos = generateLastSixMonths(); |
| | | List<SixChargingDto> chargingDtos = chargingOrderService.charge(sixBefore, siteIds); |
| | | List<SixChargingDto> chargingDtos = chargingOrderService.charge(sixBefore, siteIds, partnerView); |
| | | for (SixChargingDto sixChargingDto : sixChargingDtos) { |
| | | for (SixChargingDto chargingDto : chargingDtos) { |
| | | if (sixChargingDto.getMonth().equals(chargingDto.getMonth())){ |
| | |
| | | @ApiOperation(value = "电站收入占比", tags = {"后台-数据分析-平台收入分析"}) |
| | | public R<List<SixCircleDto>> circle() { |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | //获取当前登录的siteIds |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | List<GetSiteListDTO> data = siteClient.getSiteListByUserId(userId).getData(); |
| | | for (GetSiteListDTO datum : data) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | //进行统计groupBySiteId |
| | | SysUser sysUser = sysUserClient.getSysUser(userId).getData(); |
| | | boolean partnerView = isPartnerView(sysUser); |
| | | List<Integer> siteIds = resolvePlatformRevenueSiteIds(userId, sysUser, null); |
| | | LocalDate sixBefore = PreviousSixMonths.get(); |
| | | if (siteIds.isEmpty()){ |
| | | siteIds.add(-1); |
| | | } |
| | | List<SixCircleDto> sixCircleDtos = chargingOrderService.circle(siteIds,sixBefore); |
| | | List<SixCircleDto> sixCircleDtos = chargingOrderService.circle(siteIds,sixBefore, partnerView); |
| | | for (SixCircleDto sixCircleDto : sixCircleDtos) { |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(sixCircleDto.getSiteId())).getData().get(0); |
| | | sixCircleDto.setSiteName(site.getName()); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询平台收入分析底部数据分类,充电订单金额由数据库聚合,避免全量订单和计费明细加载超时。 |
| | | */ |
| | | @RequiresPermissions(value = {"/platformRevenueAnalysis"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @GetMapping(value = "/six/total") |
| | |
| | | public R<Map<String,Object>> total() { |
| | | //count近6个月的数据 |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | //获取当前登录的siteIds |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | List<GetSiteListDTO> data9 = siteClient.getSiteListByUserId(userId).getData(); |
| | | for (GetSiteListDTO datum : data9) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | //进行统计groupBySiteId |
| | | if (siteIds.isEmpty()){ |
| | | siteIds.add(-1); |
| | | } |
| | | Map<String,Object> map = chargingOrderService.countAll(siteIds); |
| | | BigDecimal data = parkingLotClient.getRecordAmount().getData(); |
| | | if (map ==null){ |
| | | SysUser sysUser = sysUserClient.getSysUser(userId).getData(); |
| | | boolean partnerView = isPartnerView(sysUser); |
| | | List<Integer> siteIds = resolvePlatformRevenueSiteIds(userId, sysUser, null); |
| | | Map<String,Object> map = chargingOrderService.countAll(siteIds, partnerView); |
| | | if (map == null) { |
| | | map = new HashMap<String,Object>(); |
| | | } |
| | | map.put("parkingAmount",data); |
| | | BigDecimal data1 = shoppingOrderService.getSumAmount(); |
| | | map.put("shopAmount",data1); |
| | | BigDecimal data2 = vipOrderService.getSumAmout(); |
| | | map.put("vipAmount",data2); |
| | | List<TChargingOrder> list = chargingOrderService.lambdaQuery().eq(TChargingOrder::getStatus, 5).eq(TChargingOrder::getDelFlag, 0) |
| | | .eq(TChargingOrder::getRechargePaymentStatus, 2).list(); |
| | | BigDecimal sharingAmount = BigDecimal.ZERO; |
| | | BigDecimal commissionAmount = BigDecimal.ZERO; |
| | | //计算list中electrovalence的总和 |
| | | BigDecimal totalElectrovalence = BigDecimal.ZERO; |
| | | //计算list中serviceCharge的总和 |
| | | BigDecimal totalServiceCharge = BigDecimal.ZERO; |
| | | List<TChargingOrderAccountingStrategy> accountingStrategyList = chargingOrderAccountingStrategyService.list(); |
| | | for (TChargingOrder order : list) { |
| | | List<TChargingOrderAccountingStrategy> collect = accountingStrategyList.stream().filter(s -> s.getChargingOrderId().equals(order.getId())).collect(Collectors.toList()); |
| | | BigDecimal periodElectricPrice = collect.stream().map(TChargingOrderAccountingStrategy::getPeriodElectricPrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | BigDecimal periodServicePrice = collect.stream().map(TChargingOrderAccountingStrategy::getPeriodServicePrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | totalElectrovalence = totalElectrovalence.add(periodElectricPrice); |
| | | if(2 != order.getOrderSource()){ |
| | | totalServiceCharge = totalServiceCharge.add(periodServicePrice); |
| | | commissionAmount = commissionAmount.add((periodElectricPrice.add(periodServicePrice)).multiply(new BigDecimal("0.006"))); |
| | | }else{ |
| | | totalServiceCharge = totalServiceCharge.add(periodServicePrice.multiply(new BigDecimal("0.8"))); |
| | | sharingAmount = sharingAmount.add(periodServicePrice.multiply(new BigDecimal("0.2"))); |
| | | boolean platformVisible = !partnerView; |
| | | if(platformVisible){ |
| | | BigDecimal data = parkingLotClient.getRecordAmount().getData(); |
| | | map.put("parkingAmount",data); |
| | | BigDecimal data1 = shoppingOrderService.getSumAmount(); |
| | | map.put("shopAmount",data1); |
| | | BigDecimal data2 = vipOrderService.getSumAmout(); |
| | | map.put("vipAmount",data2); |
| | | }else{ |
| | | map.put("parkingAmount",0); |
| | | map.put("shopAmount",0); |
| | | map.put("vipAmount",0); |
| | | } |
| | | map.put("platformIncomeVisible", platformVisible); |
| | | return R.ok(map); |
| | | } |
| | | |
| | | @RequiresPermissions(value = {"/platformRevenueAnalysis"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @GetMapping(value = "/six/pay-type-circle") |
| | | @ApiOperation(value = "收入类型占比", tags = {"后台-数据分析-平台收入分析"}) |
| | | public R<List<SixIncomeCircleDto>> payTypeCircle() { |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserClient.getSysUser(userId).getData(); |
| | | boolean partnerView = isPartnerView(sysUser); |
| | | List<Integer> siteIds = resolvePlatformRevenueSiteIds(userId, sysUser, null); |
| | | LocalDate sixBefore = PreviousSixMonths.get(); |
| | | return R.ok(chargingOrderService.payTypeCircle(sixBefore, siteIds, partnerView)); |
| | | } |
| | | |
| | | private boolean isPartnerView(SysUser sysUser) { |
| | | return sysUser != null && Integer.valueOf(2).equals(sysUser.getRoleType()); |
| | | } |
| | | |
| | | /** |
| | | * 解析平台收入分析页面允许查看的站点范围。 |
| | | * 合作商使用授权站点,其他后台账号沿用用户站点列表;传入站点时需做授权校验。 |
| | | */ |
| | | private List<Integer> resolvePlatformRevenueSiteIds(Long userId, SysUser sysUser, Integer siteId) { |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | if (sysUser != null && Integer.valueOf(2).equals(sysUser.getRoleType())) { |
| | | Set<Integer> authSiteIds = partnerClient.authSite(sysUser.getObjectId(), SiteMenu.SITE_LIST.getValue()).getData(); |
| | | if (authSiteIds != null) { |
| | | siteIds.addAll(authSiteIds); |
| | | } |
| | | } else { |
| | | List<GetSiteListDTO> data = siteClient.getSiteListByUserId(userId).getData(); |
| | | if (data != null) { |
| | | for (GetSiteListDTO datum : data) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | } |
| | | } |
| | | map.put("service_charge",totalServiceCharge.setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | map.put("electrovalence",totalElectrovalence.setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | map.put("commission_amount",commissionAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | map.put("sharing_amount",sharingAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | return R.ok(map); |
| | | if (siteId != null) { |
| | | return siteIds.contains(siteId) ? Collections.singletonList(siteId) : Collections.singletonList(-1); |
| | | } |
| | | if (siteIds.isEmpty()) { |
| | | siteIds.add(-1); |
| | | } |
| | | return siteIds; |
| | | } |
| | | |
| | | |
| | |
| | | @GetMapping(value = "/watch/deletes") |
| | | @ApiOperation(value = "监控订单-删除", tags = {"管理后台-订单管理"}) |
| | | public R watchChargingOrder(@RequestParam String id) { |
| | | uploadRealTimeMonitoringDataClient.delete(id); |
| | | uploadRealTimeMonitoringDataService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/getOrderByCode/{code}") |
| | | public R<TChargingOrder> getOrderByCode(@PathVariable("code") String code){ |
| | | return R.ok(chargingOrderService.getOne(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .eq(TChargingOrder::getCode,code))); |
| | | TChargingOrder one = chargingOrderService.getOne(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .eq(TChargingOrder::getCode, code)); |
| | | one.setIdStr(one.getId().toString()); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | |
| | |
| | | } else { |
| | | siteIds.add(statisticsQueryDto.getSiteId()); |
| | | } |
| | | LocalDateTime selectDate = statisticsQueryDto.getSelectDate(); |
| | | LocalDateTime min = selectDate.with(LocalTime.MIN); |
| | | LocalDateTime max = selectDate.with(LocalTime.MAX); |
| | | |
| | | List<TChargingOrder> list = chargingOrderService.lambdaQuery().in(!siteIds.isEmpty(), TChargingOrder::getSiteId, siteIds) |
| | | .between(TChargingOrder::getCreateTime, min, max).eq(TChargingOrder::getStatus,5).eq(TChargingOrder::getDelFlag, 0) |
| | | .eq(TChargingOrder::getRechargePaymentStatus, 2) |
| | | .eq(statisticsQueryDto.getSiteId() != null, TChargingOrder::getSiteId, statisticsQueryDto.getSiteId()).list(); |
| | | String format = statisticsQueryDto.getSelectDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | Map<String, Object> stringObjectMap = chargingOrderService.getChargingOrderCount(siteIds, format); |
| | | //当日的订单总数 |
| | | int size = list.size(); |
| | | int size = 0; |
| | | //计算list中paymentAmount的总和 |
| | | BigDecimal totalPaymentAmount = BigDecimal.ZERO; |
| | | //计算list中electrovalence的总和 |
| | |
| | | BigDecimal totalServiceCharge = BigDecimal.ZERO; |
| | | //计算list中charging_capacity的总和 |
| | | BigDecimal totalChargingCapacity = BigDecimal.ZERO; |
| | | List<TChargingOrderAccountingStrategy> accountingStrategyList = chargingOrderAccountingStrategyService.list(); |
| | | for (TChargingOrder order : list) { |
| | | List<TChargingOrderAccountingStrategy> collect = accountingStrategyList.stream().filter(s -> s.getChargingOrderId().equals(order.getId())).collect(Collectors.toList()); |
| | | BigDecimal periodElectricPrice = collect.stream().map(TChargingOrderAccountingStrategy::getPeriodElectricPrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | BigDecimal periodServicePrice = collect.stream().map(TChargingOrderAccountingStrategy::getPeriodServicePrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | BigDecimal chargingCapacity = collect.stream().map(TChargingOrderAccountingStrategy::getChargingCapacity).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | totalElectrovalence = totalElectrovalence.add(periodElectricPrice); |
| | | totalChargingCapacity = totalChargingCapacity.add(chargingCapacity); |
| | | if(2 != order.getOrderSource()){ |
| | | totalServiceCharge = totalServiceCharge.add(periodServicePrice); |
| | | totalPaymentAmount = totalPaymentAmount.add(periodElectricPrice).add(periodServicePrice); |
| | | }else{ |
| | | totalServiceCharge = totalServiceCharge.add(periodServicePrice.multiply(new BigDecimal("0.8"))); |
| | | totalPaymentAmount = totalPaymentAmount.add(periodElectricPrice).add(periodServicePrice.multiply(new BigDecimal("0.8"))); |
| | | } |
| | | if(null != stringObjectMap){ |
| | | size = Integer.parseInt(stringObjectMap.get("num").toString()); |
| | | totalElectrovalence = new BigDecimal(stringObjectMap.get("electrovalence").toString()); |
| | | totalServiceCharge = new BigDecimal(stringObjectMap.get("servicecharge").toString()); |
| | | totalChargingCapacity = new BigDecimal(stringObjectMap.get("electricity").toString()); |
| | | totalPaymentAmount = totalElectrovalence.add(totalServiceCharge); |
| | | } |
| | | |
| | | TCharingWorkVO tCharingWorkVO = new TCharingWorkVO(); |
| | |
| | | /** |
| | | * 充电桩数据大屏 获取站点集合中总的充电量 |
| | | */ |
| | | @ResponseBody |
| | | @GetMapping("/getSumDegreeBySiteIds") |
| | | public R<BigDecimal> getSumDegreeBySiteIds(@RequestParam("siteIds") List<Integer> SiteIds){ |
| | | return R.ok(chargingOrderService.getSumDegreeBySiteIds(SiteIds)); |
| | | Double sumDegreeBySiteIds = chargingOrderService.getSumDegreeBySiteIds(SiteIds); |
| | | |
| | | return R.ok(new BigDecimal(sumDegreeBySiteIds)); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/addChargingOrder") |
| | | public R<Long> addChargingOrder(@RequestBody TChargingOrder chargingOrder){ |
| | | chargingOrderService.save(chargingOrder); |
| | | return R.ok(chargingOrder.getId()); |
| | | } |
| | | |
| | | |
| | |
| | | return R.ok(String.valueOf(chargingOrder.getId())); |
| | | } |
| | | |
| | | // @GetMapping(value = "/getOrderByCode") |
| | | // @ApiOperation(value = "H5通过编号查询订单", tags = {"H5-首页-用户充电订单信息"}) |
| | | // public R<String> getOrderByCode(@RequestParam("code") String code) { |
| | | // Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | // TChargingOrder chargingOrder = chargingOrderService.getOne(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | // .eq(TChargingOrder::getAppUserId, userId) |
| | | // .in(TChargingOrder::getStatus, Arrays.asList(1,2,3,4)) |
| | | // .orderByDesc(TChargingOrder::getCreateTime) |
| | | // .last("LIMIT 1")); |
| | | // if(Objects.isNull(chargingOrder)){ |
| | | // return R.ok(); |
| | | // } |
| | | // return R.ok(String.valueOf(chargingOrder.getId())); |
| | | // } |
| | | |
| | | /** |
| | | * 手动查询订单和退款数据,完善退款记录 |
| | | * @param orderId |
| | | * @param refund_out_trade_no |
| | | * @return |
| | | */ |
| | | @PostMapping("/orderQueryRefund") |
| | | public R<?> orderQueryRefund(@RequestParam("orderId") Long orderId, @RequestParam("refund_out_trade_no") String refund_out_trade_no){ |
| | | chargingOrderService.orderQueryRefund(orderId, refund_out_trade_no); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 手动查询订单和退款数据,批量完善退款记录 |
| | | * @return |
| | | */ |
| | | @PostMapping("/orderQueryRefundList") |
| | | public R<?> orderQueryRefundList(@RequestBody List<String> dto){ |
| | | for (String s : dto) { |
| | | String[] split = s.split(","); |
| | | chargingOrderService.orderQueryRefund(Long.valueOf(split[0]), split[1]); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 手动添加完善订单费用明细 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @PostMapping("/addOrderExpenseBreakdown") |
| | | public R<?> addOrderExpenseBreakdown(@RequestParam("orderId") Long orderId){ |
| | | chargingOrderService.addOrderExpenseBreakdown(orderId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 手动批量修改订单支付金额 |
| | | * @param dtos |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateOrderPaymentAmount") |
| | | public R<?> updateOrderPaymentAmount(@RequestBody List<UpdateOrderPaymentAmountDto> dtos){ |
| | | for (UpdateOrderPaymentAmountDto dto : dtos) { |
| | | chargingOrderService.update(new UpdateWrapper<TChargingOrder>().eq("id", dto.getOrderId()) |
| | | .set("payment_amount", dto.getPaymentAmount())); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |