| | |
| | | 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.redis.service.RedisService; |
| | | import com.ruoyi.common.security.annotation.Logical; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | |
| | | 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.common.core.dto.MongoChargingOrderQuery; |
| | |
| | | private RoleSiteClient roleSiteClient; |
| | | @Resource |
| | | private SysUserRoleClient sysUserRoleClient; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 远程调用 监管平台查询前一天用能统计 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping(value = "/getChargingStatistics") |
| | | public R<List<TChargingOrder>> getChargingStatistics(@RequestBody ChargingStatisticeDTO dto) { |
| | | List<Long> collect = chargingOrderAccountingStrategyService.lambdaQuery().between(TChargingOrderAccountingStrategy::getCreateTime, dto.getStartTime(), dto.getEndTime()) |
| | | .list().stream().map(TChargingOrderAccountingStrategy::getChargingOrderId).collect(Collectors.toList()); |
| | | if (!collect.isEmpty()){ |
| | | List<TChargingOrder> list = chargingOrderService.lambdaQuery() |
| | | .in(TChargingOrder::getId,collect).list(); |
| | | return R.ok(list); |
| | | } |
| | | return R.ok(new ArrayList<TChargingOrder>()); |
| | | } |
| | | |
| | | /** |
| | | * 远程调用 增加管理后台赠送会员记录 |
| | |
| | | chargingOrderInfoVO.setList(list); |
| | | return AjaxResult.success(chargingOrderInfoVO); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Log(title = "【扫一扫】添加评价", businessType = BusinessType.INSERT,operatorType = OperatorType.MOBILE) |
| | | @ResponseBody |
| | | @PostMapping(value = "/addEvaluate") |
| | | @ApiOperation(value = "添加评价", tags = {"小程序-扫一扫"}) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Log(title = "【扫一扫】支付充电充值费用", businessType = BusinessType.UPDATE,operatorType = OperatorType.MOBILE) |
| | | @ResponseBody |
| | | @PostMapping(value = "/paymentChargingOrder") |
| | | @ApiOperation(value = "支付充电充值费用", tags = {"小程序-扫一扫"}) |
| | |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param code |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping(value = "/refund1") |
| | | public R refund1(@RequestParam(value = "code") String code, @RequestParam(value = "money") BigDecimal money){ |
| | | chargingOrderService.refund1(code, money); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 远程启动失败后退款回调 |
| | | */ |
| | | @ResponseBody |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping(value = "/preChargeCheck/{id}") |
| | | @ApiOperation(value = "获取安全检测数据", tags = {"小程序-扫一扫"}) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping(value = "/getChargingDetails/{id}") |
| | | @ApiOperation(value = "获取充电中页面数据", tags = {"小程序-扫一扫"}) |
| | |
| | | ChargingDetails chargingDetails = chargingOrderService.getChargingDetails(id); |
| | | return AjaxResult.success(chargingDetails); |
| | | } |
| | | |
| | | |
| | | |
| | | @Log(title = "【扫一扫】手动停止充电", businessType = BusinessType.STOP,operatorType = OperatorType.MOBILE) |
| | | @ResponseBody |
| | | @PutMapping(value = "/stopCharging/{id}") |
| | | @ApiOperation(value = "手动停止充电", tags = {"小程序-扫一扫"}) |
| | |
| | | return chargingOrderService.getNotPaymentChargingOrder(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 手动推送订单给三方平台 |
| | | * @param code |
| | | * @return |
| | | */ |
| | | @PostMapping("/pushOrderInfo") |
| | | public R pushOrderInfo(@RequestParam String code){ |
| | | return chargingOrderService.pushOrderInfo(code); |
| | | } |
| | | |
| | | } |