中车电站数据融合

This commit is contained in:
2026-03-25 09:42:46 +08:00
parent a7f21789f7
commit 911c5efec9
6 changed files with 420 additions and 6 deletions

View File

@ -0,0 +1,47 @@
package com.ho.business.controller;
import com.ho.business.service.BoulderEnergyService;
import com.ho.common.tools.annotation.TokenIgnore;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.exception.DataResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping(ContextConstant.BUSINESS + "boulderEnergyStation")
@RestController
@Api(tags = "业务模块-中车能源电站管理")
@Slf4j
public class BoulderEnergyController {
@Autowired
BoulderEnergyService boulderEnergyService;
@PostMapping("getToken")
@ApiOperation(value = "获取token")
@TokenIgnore
public DataResult<String> getToken() {
return DataResult.success(boulderEnergyService.getToken());
}
@PostMapping("getBoulderEleIncome")
@ApiOperation(value = "中车-统计缓存充放电、及收益数据")
@TokenIgnore
public DataResult getBoulderEleIncome(@RequestBody(required = false) String beginTime) {
log.info("参数: {} ", beginTime);
// beginTime ==null 时统计昨日充放电、及收益数据
// beginTime =null 时统计beginTime充放电、及收益数据
boulderEnergyService.getBoulderEleIncome(beginTime);
if(beginTime!=null){
//beginTime =null 缓存中车电站累计数据
boulderEnergyService.getCacheBoulderData();
}
return DataResult.success();
}
}