| | |
| | | |
| | | @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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |