From b40353af5bbe2c1e9fe5ca216ce026bf0348320c Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 25 七月 2025 16:43:25 +0800 Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java index 56faece..a13432a 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java @@ -81,8 +81,8 @@ @PostMapping(value = "/getGreenElectricity") @ResponseBody - public R<BigDecimal> getGreenElectricity(@RequestBody List<Integer> siteIds){ - BigDecimal greenElectricity = screenContentMapper.getGreenElectricity(siteIds); + public R<BigDecimal> getGreenElectricity(){ + BigDecimal greenElectricity = screenContentMapper.getGreenElectricity(Arrays.asList(26,25)); return R.ok(greenElectricity); } @@ -102,4 +102,17 @@ HashMap<String, Object> carportData = screenContentMapper.getCarportData(); return R.ok(carportData); } + @GetMapping(value = "/reset") + @ResponseBody + public void reset(@RequestParam("electricity") String electricity){ + TSystemConfiguration sysConfig = tSystemConfigurationService.getOne(new LambdaQueryWrapper<TSystemConfiguration>() + .eq(TSystemConfiguration::getType,5)); + sysConfig.setContent(electricity.split("_")[0]); + tSystemConfigurationService.updateById(sysConfig); + + TSystemConfiguration sysConfig1 = tSystemConfigurationService.getOne(new LambdaQueryWrapper<TSystemConfiguration>() + .eq(TSystemConfiguration::getType,4)); + sysConfig1.setContent(electricity.split("_")[1]); + tSystemConfigurationService.updateById(sysConfig1); + } } -- Gitblit v1.7.1