| | |
| | | import com.ruoyi.order.vo.ChargingSimulationVO; |
| | | import com.ruoyi.order.vo.IcbcAdminSubOrderVO; |
| | | import com.ruoyi.order.vo.StatisticsOfBatteryVO; |
| | | import com.ruoyi.order.vo.ReservationRecommendationVO; |
| | | import com.ruoyi.order.vo.UpdateOrderPaymentAmountDto; |
| | | import com.ruoyi.order.vo.WatchChargingOrderVo; |
| | | import com.ruoyi.other.api.feignClient.RoleSiteClient; |
| | |
| | | @Resource |
| | | private TOrderInvoiceService invoiceService; |
| | | @Resource |
| | | private TOrderInvoiceDetailService orderInvoiceDetailService; |
| | | @Resource |
| | | private UploadRealTimeMonitoringDataService uploadRealTimeMonitoringDataService; |
| | | @Resource |
| | | private PartnerClient partnerClient; |
| | |
| | | private OtherClient otherClient; |
| | | @Resource |
| | | private SysUserRoleClient sysUserRoleClient; |
| | | |
| | | @GetMapping("/reservationRecommendation") |
| | | @ApiOperation(value = "获取站点预约充电推荐时段", tags = {"管理后台-充电桩信息"}) |
| | | public R<ReservationRecommendationVO> getReservationRecommendation(@RequestParam Integer siteId) { |
| | | return R.ok(chargingOrderService.getReservationRecommendation(siteId)); |
| | | } |
| | | |
| | | /** 小程序加盟商看板:站点范围始终从登录账号绑定关系解析。 */ |
| | | @PostMapping("/app/franchisee/charge-data") |
| | |
| | | @PostMapping(value = "/pay/order/list") |
| | | @ApiOperation(value = "列表", tags = {"管理后台-支付订单-订单信息"}) |
| | | public R<PageInfo<PayOrderDto>> payOrderList(@RequestBody PayOrderQueryDto payOrderQueryDto) { |
| | | resolveInvoiceOrderIds(payOrderQueryDto); |
| | | return chargingOrderService.payOrderQuery(payOrderQueryDto); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "导出查看订单列表", tags = {"管理后台-支付订单-订单信息"}) |
| | | @Log(title = "发票管理查看订单导出", businessType = BusinessType.EXPORT) |
| | | public void exportPayOrder(@RequestBody PayOrderQueryDto payOrderQueryDto) { |
| | | resolveInvoiceOrderIds(payOrderQueryDto); |
| | | payOrderQueryDto.setPageCurr(1); |
| | | payOrderQueryDto.setPageSize(10000); |
| | | R<PageInfo<PayOrderDto>> result = chargingOrderService.payOrderQuery(payOrderQueryDto); |
| | |
| | | } catch (IOException e) { |
| | | log.error("导出查看订单列表失败", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查看开票订单时以数据库中的开票明细为准,避免前端遗漏或篡改订单 ID。 |
| | | */ |
| | | private void resolveInvoiceOrderIds(PayOrderQueryDto query) { |
| | | if (query == null || query.getInvoiceId() == null) { |
| | | return; |
| | | } |
| | | LambdaQueryWrapper<TOrderInvoiceDetail> wrapper = new LambdaQueryWrapper<TOrderInvoiceDetail>() |
| | | .eq(TOrderInvoiceDetail::getOrderInvoiceId, query.getInvoiceId()); |
| | | if (query.getType() != null) { |
| | | wrapper.eq(TOrderInvoiceDetail::getOrderType, query.getType()); |
| | | } |
| | | List<String> orderIds = orderInvoiceDetailService.list(wrapper).stream() |
| | | .map(TOrderInvoiceDetail::getOrderId) |
| | | .filter(Objects::nonNull) |
| | | .map(String::valueOf) |
| | | .collect(Collectors.toList()); |
| | | query.setIds(orderIds); |
| | | } |
| | | |
| | | private PayOrderExport buildPayOrderExport(PayOrderDto dto) { |
| | |
| | | } |
| | | boolean platformVisible = !partnerView; |
| | | if(platformVisible){ |
| | | BigDecimal data = parkingLotClient.getRecordAmount().getData(); |
| | | R<BigDecimal> parkingAmountResult = parkingLotClient.getRecordAmount(siteIds); |
| | | BigDecimal data = parkingAmountResult == null || parkingAmountResult.getData() == null |
| | | ? BigDecimal.ZERO : parkingAmountResult.getData(); |
| | | map.put("parkingAmount",data); |
| | | BigDecimal data1 = shoppingOrderService.getSumAmount(); |
| | | map.put("shopAmount",data1); |