haungxing
2 years ago
17 changed files with 317 additions and 176 deletions
@ -0,0 +1,137 @@ |
|||||||
|
package com.hnac.hzims.operational.main.controller; |
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
||||||
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
||||||
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
||||||
|
import com.hnac.hzims.operational.main.service.IHomePageService; |
||||||
|
import com.hnac.hzims.operational.main.vo.*; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.log.annotation.ApiLog; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ysj |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping("/homePage") |
||||||
|
@Api(value = "水电站-首页", tags = "水电站-首页") |
||||||
|
@AllArgsConstructor |
||||||
|
public class HomePageController extends BladeController { |
||||||
|
|
||||||
|
@NotNull |
||||||
|
private final IHomePageService homePageService; |
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("服务厂站统计") |
||||||
|
@GetMapping("/stationCensus") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
public R<List<StationCountVo>> stationCount(@ApiParam(value = "站点服务类型:1、云服务站点; 2、代运维服务站点", required = true) Integer serveType, Long deptId) { |
||||||
|
List<StationCountVo> stationList = homePageService.getStationCount(deptId,serveType); |
||||||
|
return R.data(stationList); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("关键指标:水电站、风电站、光伏站") |
||||||
|
@GetMapping("/powerStation") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
public R<List<PowerTargetVo>> powerStation(@ApiParam(value = "站点服务类型:1、云服务站点; 2、代运维服务站点", required = true)Integer serveType,Long deptId) { |
||||||
|
List<PowerTargetVo> powerTargetVoList = homePageService.powerTarget(serveType,deptId); |
||||||
|
return R.data(powerTargetVoList); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("关键指标:储能站、水利") |
||||||
|
@GetMapping("/storageConservancy") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
public R<List<StorageConservancyVo>> storageConservancy(@ApiParam(value = "站点服务类型:1、云服务站点; 2、代运维服务站点", required = true) Integer serveType,Long deptId) { |
||||||
|
List<StorageConservancyVo> crucialTargetVoList = homePageService.storageConservancy(serveType,deptId); |
||||||
|
return R.data(crucialTargetVoList); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("关键指标:暂定其他站") |
||||||
|
@GetMapping("/waterAffairs") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
public R<OtherStationVo> waterAffairs(@ApiParam(value = "站点服务类型:1、云服务站点; 2、代运维服务站点", required = true) Integer serveType,Long deptId) { |
||||||
|
OtherStationVo waterAffairsVoList = homePageService.otherStation(serveType,deptId); |
||||||
|
return R.data(waterAffairsVoList); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("水电站数据获取") |
||||||
|
@GetMapping("/getHydropowerData") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
public R<List<HydropowerScoreVo>> getHydropowerData(@ApiParam(value = "区域id", required = true) Long deptId) { |
||||||
|
List<HydropowerScoreVo> hydropowerScoreVoList = homePageService.getHydropowerData(deptId); |
||||||
|
return R.data(hydropowerScoreVoList); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("年计划发电完成趋势") |
||||||
|
@GetMapping("/planAactualTrend") |
||||||
|
@OperationAnnotation(moduleName = "演示大屏",title = "演示大屏", operatorType = OperatorType.MOBILE, |
||||||
|
businessType = BusinessType.GENCODE,action = "年计划发电完成趋势") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
public R<List<PowerMonthVo>> planActualTrend(@ApiParam(value = "区域机构ID") Long deptId) { |
||||||
|
return R.data(homePageService.planActualTrend(deptId)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("计划发电趋势") |
||||||
|
@GetMapping("/planGenerationTrend") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
public R<Map<Long, List<PlanGenerationTrendVo>>> planGenerationTrend(@ApiParam(value = "区域机构ID") Long deptId) { |
||||||
|
return homePageService.planGenerationTrend(deptId, 0, 2); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("区域发电占比") |
||||||
|
@GetMapping("/areaGenerationMakeUp") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
public R<Map<Long, List<AreaGenerationMakeUpVo>>> areaGenerationMakeUp(@ApiParam(value = "区域机构ID") Long deptId) { |
||||||
|
return homePageService.areaGenerationMakeUp(deptId, 0, 2); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("统计") |
||||||
|
@GetMapping("/getCount") |
||||||
|
@ApiOperationSupport(order = 10) |
||||||
|
public R<Map<Long, List<HomePageCountVo>>> getCount(@ApiParam(value = "区域机构ID") Long deptId) { |
||||||
|
return homePageService.getCount(deptId, 0, 2); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("获取区域") |
||||||
|
@GetMapping("/getArea") |
||||||
|
@ApiOperationSupport(order = 11) |
||||||
|
public R<List<AreaVo>> getArea(@ApiParam(value = "区域机构ID") Long deptId) { |
||||||
|
return homePageService.getArea(deptId); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@ApiLog |
||||||
|
@ApiOperation("站点首页") |
||||||
|
@GetMapping("/stationHome") |
||||||
|
@ApiOperationSupport(order = 11) |
||||||
|
public R<List<AreaVo>> homeStation(@ApiParam(value = "区域机构ID") Long deptId) { |
||||||
|
return R.data(homePageService.homeStation(deptId)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,55 +0,0 @@ |
|||||||
package com.hnac.hzims.operational.main.controller; |
|
||||||
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
||||||
import com.hnac.hzims.operational.main.service.HydropowerService; |
|
||||||
import com.hnac.hzims.operational.main.vo.HydropowerStationVo; |
|
||||||
import com.hnac.hzims.operational.main.vo.HydropowerUnitVo; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import io.swagger.annotations.ApiParam; |
|
||||||
import lombok.AllArgsConstructor; |
|
||||||
import org.springblade.core.boot.ctrl.BladeController; |
|
||||||
import org.springblade.core.log.annotation.ApiLog; |
|
||||||
import org.springblade.core.tool.api.R; |
|
||||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.RestController; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author ysj |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/webHome") |
|
||||||
@Api(value = "app首页", tags = "app-首页") |
|
||||||
@AllArgsConstructor |
|
||||||
public class WebHomeController extends BladeController { |
|
||||||
|
|
||||||
private final HydropowerService service; |
|
||||||
|
|
||||||
@ApiLog |
|
||||||
@ApiOperation("水电站站点统计") |
|
||||||
@GetMapping("/webStation") |
|
||||||
@ApiOperationSupport(order = 1) |
|
||||||
public R<HydropowerStationVo> hydropowerStation(@ApiParam(value = "站点机构ID") Long deptId) { |
|
||||||
HydropowerStationVo response = service.station(deptId); |
|
||||||
return R.data(response); |
|
||||||
} |
|
||||||
@ApiLog |
|
||||||
@ApiOperation("水电站机组列表") |
|
||||||
@GetMapping("/getPumpList") |
|
||||||
@ApiOperationSupport(order = 2) |
|
||||||
public R<List<HydropowerUnitVo>> hydropowerDevice(@ApiParam(value = "站点机构ID") Long deptId) { |
|
||||||
List<HydropowerUnitVo> list = service.hydropowerDevice(deptId); |
|
||||||
return R.data(list); |
|
||||||
} |
|
||||||
@ApiLog |
|
||||||
@ApiOperation("水电站站点列表") |
|
||||||
@GetMapping("/webStationList") |
|
||||||
@ApiOperationSupport(order = 2) |
|
||||||
public R<List<HydropowerStationVo>> webStationList(@ApiParam(value = "站点机构ID") Long deptId) { |
|
||||||
return R.data(service.webStationList(deptId)); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue