From e0fc8f7e2230b51e3bbe8dea43790cf11b7170e9 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期一, 04 十一月 2024 15:39:01 +0800 Subject: [PATCH] merge --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java index 08e5674..7db9f8c 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java @@ -1,6 +1,7 @@ package com.ruoyi.chargingPile.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ruoyi.chargingPile.api.dto.TParkingLotDTO; import com.ruoyi.chargingPile.api.model.TCarport; @@ -26,6 +27,8 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.math.BigDecimal; +import java.time.LocalDate; import java.util.Arrays; import java.util.List; @@ -77,7 +80,7 @@ /** * 添加停车场管理 */ - @Log(title = "添加停车场", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE) + @Log(title = "【停车场】添加停车场", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE) @ApiOperation(tags = {"后台-停车场"},value = "添加停车场") @PostMapping(value = "/add") public AjaxResult<Boolean> add(@RequestBody TParkingLotDTO dto) { @@ -87,7 +90,7 @@ /** * 修改停车场 */ - @Log(title = "修改停车场", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE) + @Log(title = "【停车场】修改停车场", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE) @ApiOperation(tags = {"后台-停车场"},value = "修改停车场") @PostMapping(value = "/update") public AjaxResult<Boolean> update(@RequestBody TParkingLotDTO dto) { @@ -106,7 +109,7 @@ /** * 删除停车场 */ - @Log(title = "删除停车场", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) + @Log(title = "【停车场】删除停车场", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) @ApiOperation(tags = {"后台-停车场"},value = "删除停车场") @DeleteMapping(value = "/deleteById") public AjaxResult<Boolean> deleteById(@RequestParam("id") Integer id) { @@ -122,7 +125,7 @@ /** * 批量删除停车场 */ - @Log(title = "批量删除停车场", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) + @Log(title = "【停车场】批量删除停车场", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) @ApiOperation(tags = {"后台-停车场"},value = "批量删除停车场") @DeleteMapping(value = "/deleteByIds") public AjaxResult<Boolean> deleteByIds(@RequestParam String ids) { @@ -145,9 +148,27 @@ .eq(TParkingLot::getSiteId, siteId))); } - @PostMapping(value = "/getRecordById") + @GetMapping(value = "/getRecordById") public R<TParkingRecord> getRecordById(@RequestParam("id") Long id){ return R.ok(parkingRecordService.getById(id)); } + @PostMapping(value = "/getRecordAmount") + public R<BigDecimal> getRecordAmount(@RequestParam("sixBefore") LocalDate sixBefore){ + BigDecimal sum = parkingRecordService.getSum(sixBefore); + return R.ok(sum); + } + + + /** + * 根据停车场标识查询停车场 + * @param appKey + * @return + */ + @PostMapping(value = "/getParkingLotByAppKey") + public R<TParkingLot> getParkingLotByAppKey(@RequestParam("appKey") String appKey){ + TParkingLot parkingLot = parkingLotService.getOne(new LambdaQueryWrapper<TParkingLot>() + .eq(TParkingLot::getAppKey, appKey).eq(TParkingLot::getDelFlag, 0)); + return R.ok(parkingLot); + } } -- Gitblit v1.7.1