|
@@ -7,6 +7,7 @@ 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.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/** 数智双碳----双碳概览
|
|
@@ -20,6 +21,9 @@ public class CarbonController {
|
|
|
@Autowired
|
|
|
private CarbonService carbonService;
|
|
|
|
|
|
+ @Value("${spring.profiles.active}")
|
|
|
+ private String active;
|
|
|
+
|
|
|
@ApiOperation("核心指标")
|
|
|
@PostMapping("/getCarbonCoreIndicators")
|
|
|
public ReturnMsg getFloorCoreIndicators(@RequestBody IocParam iocParam){
|
|
@@ -29,21 +33,19 @@ public class CarbonController {
|
|
|
@ApiOperation("碳排放分析")
|
|
|
@PostMapping("/getCarbonInfo")
|
|
|
public ReturnMsg getCarbonInfo(@RequestBody IocParam iocParam){
|
|
|
- return carbonService.getCarbonInfo(iocParam);
|
|
|
- //return carbonService.getCarbonInfoData(iocParam);
|
|
|
+ if (active.equals("publish")){
|
|
|
+ return carbonService.getCarbonInfoData(iocParam);
|
|
|
+ }else{
|
|
|
+ return carbonService.getCarbonInfo(iocParam);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("碳配额构成")
|
|
|
@PostMapping("/getCarbonQuotaComposition")
|
|
|
public ReturnMsg getCarbonQuotaComposition(@RequestBody IocParam iocParam){
|
|
|
return carbonService.getCarbonQuotaComposition(iocParam);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("双碳新闻")
|
|
|
@PostMapping("/getCarbonNews")
|
|
|
public ReturnMsg getCarbonNews(@RequestBody IocParam iocParam){
|
|
@@ -53,11 +55,11 @@ public class CarbonController {
|
|
|
@ApiOperation("碳排放占比")
|
|
|
@PostMapping("/getCarbonProportion")
|
|
|
public ReturnMsg getCarbonProportion(@RequestBody IocParam iocParam){
|
|
|
- // return carbonService.getCarbonProportion(iocParam);
|
|
|
- return carbonService.getCarbonProportionData(iocParam);
|
|
|
+ if (active.equals("publish")){
|
|
|
+ return carbonService.getCarbonProportionData(iocParam);
|
|
|
+ }else{
|
|
|
+ return carbonService.getCarbonProportion(iocParam);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|