|
@@ -5,10 +5,14 @@ import com.jiayue.ipfcst.common.data.constant.enums.ChannelStatusEnum;
|
|
|
import com.jiayue.ipfcst.common.data.constant.enums.FileStatusEnum;
|
|
|
import com.jiayue.ipfcst.common.data.constant.enums.FileTypeEnum;
|
|
|
import com.jiayue.ipfcst.common.data.entity.*;
|
|
|
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
|
|
|
import com.jiayue.ipfcst.service.DashboardService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
@@ -21,6 +25,7 @@ import java.util.*;
|
|
|
@RestController
|
|
|
@RequestMapping("/dashboard")
|
|
|
@Slf4j
|
|
|
+@Api(value = "DashboardController", tags = "首页controller")
|
|
|
public class DashboardController {
|
|
|
private final DashboardService dashboardService;
|
|
|
|
|
@@ -34,6 +39,15 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/getChannelStatus")
|
|
|
+ @ApiOperation(value = "获取上报对象状态", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入Map</p>"+
|
|
|
+ "<p>key:uploadList=>上报对象状态</p>"+
|
|
|
+ "<p>key:analysisList=>解析状态</p>"+
|
|
|
+ "<p>key:callBackList=>回传通道状态</p>"+
|
|
|
+ "<p>key:dataexchangeList=>接入通道状态</p>"+
|
|
|
+ "<p>key:dataexchangeList=>接入通道状态</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getChannelStatus() {
|
|
|
return ResponseVO.success(dashboardService.getChannelStatus());
|
|
|
}
|
|
@@ -44,6 +58,12 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/getUploadFileInfo")
|
|
|
+ @ApiOperation(value = "获取上报文件信息", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入Map</p>"+
|
|
|
+ "<p>key:uploadObjectRateList=>上报率</p>"+
|
|
|
+ "<p>key:notUploadSortResultList=>未上报文件集</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getUploadFileInfo() {
|
|
|
return ResponseVO.success(dashboardService.getDashboardUploadFileInfo());
|
|
|
}
|
|
@@ -54,6 +74,12 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/getEquipmentInfo")
|
|
|
+ @ApiOperation(value = "获取环境设备信息", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入Map</p>"+
|
|
|
+ "<p>key:uploadObjectRateList=>上报率</p>"+
|
|
|
+ "<p>key:notUploadSortResultList=>未上报文件集</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getEquipmentInfo() {
|
|
|
return ResponseVO.success(dashboardService.getEquipmentInfo());
|
|
|
}
|
|
@@ -64,6 +90,10 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getEquipmentDataType/{equipmentId}")
|
|
|
+ @ApiOperation(value = "根据设备ID获取在首页显示的数据类型", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入List<DashboardEquipmentDto></p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getEquipmentDataType(@PathVariable final String equipmentId) {
|
|
|
return ResponseVO.success(dashboardService.getEquipmentDataType(equipmentId));
|
|
|
}
|
|
@@ -73,6 +103,14 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getCompositeData/{efiType}")
|
|
|
+ @ApiOperation(value = "获取首页短期、超短期、实际功率数据", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入Map<String, List></p>"+
|
|
|
+ "<p>key:sjList=>实际功率</p>"+
|
|
|
+ "<p>key:dqList=>短期</p>"+
|
|
|
+ "<p>key:cdqList=>超短期</p>"+
|
|
|
+ "<p>key:timeList=>时间</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getCompositeData(@PathVariable final String efiType) {
|
|
|
if ("E1".equals(efiType)){
|
|
|
return ResponseVO.success(dashboardService.getCompositeData());
|
|
@@ -87,6 +125,10 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/getFileStatusEnum")
|
|
|
+ @ApiOperation(value = "获取上报文件状态枚举", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入List,对FileStatusEnum枚举的name和message获取</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getFileStatusEnum(){
|
|
|
List list = new ArrayList<>();
|
|
|
for (FileStatusEnum fileStatusEnum : FileStatusEnum.values()) {
|
|
@@ -103,6 +145,10 @@ public class DashboardController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/getFileTypeEnum")
|
|
|
+ @ApiOperation(value = "上报文件类型枚举", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入List,对FileTypeEnum枚举的name和message获取</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getFileTypeEnum(){
|
|
|
List list = new ArrayList<>();
|
|
|
for (FileTypeEnum fileTypeEnum : FileTypeEnum.values()) {
|
|
@@ -118,6 +164,10 @@ public class DashboardController {
|
|
|
* @return 结果集
|
|
|
*/
|
|
|
@GetMapping(value = "/getChannelDisconLog")
|
|
|
+ @ApiOperation(value = "获取首页当天通道断开日志", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入List<ChannelDisconLog></p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getChannelDisconLog(){
|
|
|
List<ChannelDisconLog> list = new ArrayList<>();
|
|
|
try{
|
|
@@ -133,6 +183,7 @@ public class DashboardController {
|
|
|
* @return 结果集
|
|
|
*/
|
|
|
@GetMapping(value = "/getPowerLimitPlanSign")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO getPowerLimitPlanSign(){
|
|
|
try{
|
|
|
return ResponseVO.success(dashboardService.getPowerLimitPlanSign());
|
|
@@ -149,6 +200,7 @@ public class DashboardController {
|
|
|
* @return 执行结果
|
|
|
*/
|
|
|
@PostMapping(value = "/savePowerLimitPlanSign")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO savePowerLimitPlanSign(@RequestBody PowerLimitPlanSign powerLimitPlanSign) {
|
|
|
try {
|
|
|
this.dashboardService.savePowerLimitPlanSign(powerLimitPlanSign);
|
|
@@ -163,6 +215,7 @@ public class DashboardController {
|
|
|
* 获取首页通道告警不提示
|
|
|
*/
|
|
|
@GetMapping(value = "/getChannelAlarmInfo")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO getChannelAlarmInfo(){
|
|
|
try{
|
|
|
return ResponseVO.success(dashboardService.getChannelAlarmInfo());
|
|
@@ -178,6 +231,7 @@ public class DashboardController {
|
|
|
*
|
|
|
*/
|
|
|
@PostMapping(value = "/saveAllChannelAlarmInfo")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO saveChannelAlarmInfo(@RequestBody List<ChannelAlarmInfo> channelAlarmInfos){
|
|
|
try{
|
|
|
dashboardService.saveChannelAlarmInfoAll(channelAlarmInfos);
|
|
@@ -191,6 +245,7 @@ public class DashboardController {
|
|
|
* 获取系统版本号
|
|
|
*/
|
|
|
@GetMapping(value = "/getSysVersion")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO getSysVersion(){
|
|
|
try{
|
|
|
return ResponseVO.success(dashboardService.getSysVersion());
|
|
@@ -204,6 +259,7 @@ public class DashboardController {
|
|
|
* 获取系统版本号
|
|
|
*/
|
|
|
@GetMapping(value = "/getIsAbnormal")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO getIsAbnormal(){
|
|
|
try{
|
|
|
return ResponseVO.success(dashboardService.getIsAbnormal());
|
|
@@ -217,6 +273,7 @@ public class DashboardController {
|
|
|
* @return 结果集
|
|
|
*/
|
|
|
@GetMapping(value = "/getServerTime")
|
|
|
+ @ApiIgnore
|
|
|
public ResponseVO getServerTime(){
|
|
|
try{
|
|
|
Date d = new Date();
|
|
@@ -231,6 +288,10 @@ public class DashboardController {
|
|
|
*获取上报对象中的上报文件类型
|
|
|
*/
|
|
|
@GetMapping(value = "/getUploadFileType")
|
|
|
+ @ApiOperation(value = "获取上报对象中的上报文件类型", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入FileTypeEnum的list</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getUploadFileType() {
|
|
|
return ResponseVO.success(dashboardService.getUploadFileType());
|
|
|
}
|
|
@@ -243,6 +304,10 @@ public class DashboardController {
|
|
|
*/
|
|
|
@SneakyThrows
|
|
|
@GetMapping(value = "/sysParameterKey/{sysKey}")
|
|
|
+ @ApiOperation(value = "根据参数标识获取系统参数", httpMethod = "GET",
|
|
|
+ notes = "<p>返回ResponseVO对象,data属性存入SysParameter实体</p>"
|
|
|
+ )
|
|
|
+ @ApiMyResponse
|
|
|
public ResponseVO getById(@PathVariable("sysKey") String sysKey) {
|
|
|
return ResponseVO.success(dashboardService.getParameterBySysKey(sysKey));
|
|
|
}
|