Bladeren bron

API接口文档(apiFox)

malijun 1 jaar geleden
bovenliggende
commit
d7f45e944a

+ 15 - 0
electricity/meter/.apifox-helper.properties

@@ -0,0 +1,15 @@
+# 使用 tag `folder` 设置接口所在目录
+folder.name=#folder
+
+# 忽略的API
+ignore=#ignore
+
+#一个模块一个apiFox项目
+module=#module
+
+# 默认注释第一行作为API名称
+api.name=#api.name
+
+#接口说明
+method.doc[#deprecated]=groovy:"\n「接口说明」" + it.doc("deprecated")
+method.doc[@java.lang.Deprecated]=「接口说明」

+ 0 - 84
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/BaseInfoController.java

@@ -1,84 +0,0 @@
-package com.gyee.gaia.meter.controller;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.gyee.gaia.meter.entity.*;
-import com.gyee.gaia.meter.service.impl.*;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-/**
- * Author: malijun
- * Data  : 2023: 04: 27
- **/
-@CrossOrigin
-@RestController
-@RequestMapping("/baseInfo")
-public class BaseInfoController {
-
-    @Resource
-    PowerStationServiceImpl powerStationService;
-
-    @Resource
-    ProjectServiceImpl projectService;
-
-    @Resource
-    LineServiceImpl lineService;
-
-    @Resource
-    EquipmentServiceImpl equipmentService;
-
-    @Resource
-    TestingPointServiceImpl testingPointService;
-
-
-    @GetMapping("/powerstation")
-    public void getBaseInfoPowerStation() {
-        QueryWrapper<PowerStation> wrapper = new QueryWrapper<>();
-        wrapper.eq("code", "MHS_FDC");
-        List<PowerStation> list = powerStationService.list(wrapper);
-        System.out.println(list);
-
-    }
-
-    @GetMapping("/project")
-    public void getBaseInfoProject() {
-        QueryWrapper<Project> wrapper = new QueryWrapper<>();
-        wrapper.eq("code", "MHS02_GC");
-        List<Project> list = projectService.list(wrapper);
-        System.out.println(list);
-
-    }
-
-    @GetMapping("/line")
-    public void getBaseInfoLine() {
-        QueryWrapper<Line> wrapper = new QueryWrapper<>();
-        wrapper.eq("code", "MHS02_XL");
-        List<Line> list = lineService.list(wrapper);
-        System.out.println(list);
-
-    }
-
-    @GetMapping("/equipment")
-    public void getBaseInfoEquipment() {
-        QueryWrapper<Equipment> wrapper = new QueryWrapper<>();
-        wrapper.eq("code", "SG01_01");
-        List<Equipment> list = equipmentService.list(wrapper);
-        System.out.println(list);
-
-    }
-
-    @GetMapping("/testingpoint")
-    public void getBaseInfotestingpoint() {
-        QueryWrapper<TestingPoint> wrapper = new QueryWrapper<>();
-        wrapper.eq("uniform_code", "DI178").eq("thing_id", "NX_GDDL_SBQ_F_WT_0010_EQ");
-        List<TestingPoint> list = testingPointService.list(wrapper);
-        System.out.println(list);
-
-    }
-
-}

+ 17 - 1
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/ConfigController.java

@@ -6,6 +6,11 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+/**
+ * 配置控制器
+ * 配置基础信息,appConfig
+ * @module 配置控制器
+ */
 @RestController
 @RequestMapping("/config")
 public class ConfigController {
@@ -13,12 +18,23 @@ public class ConfigController {
     @Autowired
     AppConfig appConfig;
 
-
+    /**
+     * 获取配置信息字符串
+     * 获取详细配置信息字符串
+     * @folder 配置控制器/appConfig
+     * @return 配置好的场站范围字符串
+     */
     @GetMapping("/all")
     public String getConfigString() {
         return appConfig.toString();
     }
 
+    /**
+     * 获取配置信息
+     * 获取详细配置信息
+     * @folder 配置控制器/appConfig
+     * @return 配置好的场站范围
+     */
     @GetMapping("")
     public AppConfig getConfig() {
         return appConfig;

+ 29 - 25
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/GetTypeController.java

@@ -2,7 +2,6 @@ package com.gyee.gaia.meter.controller;
 
 import com.gyee.gaia.meter.entity.vo.MeterInfoVo;
 import com.gyee.gaia.meter.entity.vo.Result;
-import com.gyee.gaia.meter.service.meterInfo.GetMeterInfo;
 import com.gyee.gaia.meter.service.meterInfo.GetPowerstation_Type_Class_Name;
 import org.springframework.web.bind.annotation.*;
 
@@ -10,10 +9,11 @@ import javax.annotation.Resource;
 import java.util.*;
 
 /**
- * 获取前端下拉框选择类型
- * Author: malijun
- * Data  : 2023: 05: 24
- **/
+ * 数据查询页
+ * 前端下拉框选择传递的参数
+ *
+ * @module 数据查询
+ */
 @RestController
 @CrossOrigin(origins = "*")
 @RequestMapping("/meter")
@@ -24,7 +24,9 @@ public class GetTypeController {
 
 
     /**
-     * @return 所有风+光的name和nem_code, 已经排序
+     * 获取所有场站分类
+     * @folder 数据查询/下拉框选择类型
+     * @return 所有场站的name和nem_code, 已经排序
      */
     @GetMapping("/infoall")
     public Result<Object> getPowerstation() {
@@ -39,17 +41,18 @@ public class GetTypeController {
 
     /**
      * 获取计算点分类
+     * @folder 数据查询/下拉框选择类型
      *
-     * @param windId     风场nem_code
-     * @param type       meter_type 一级类型
-     * @param meterClass meter_class 二级分类
+     * @param windId     风场编码(nem_code)
+     * @param type       一级类型(meter_type)
+     * @param meterClass 二级分类(meter_class)
      * @return 根据nem_code返回meter_type;
      * 根据nem_code,meter_type返回meter_class;
      * 根据nem_code,meter_type,meter_class返回name;
      */
     @GetMapping("/getMeterTypeCalculating")
     public Result<Object> getMeterTypeCalculating(
-            @RequestParam(required = false) String windId,
+            @RequestParam(required = true) String windId,
             @RequestParam(required = false) String type,
             @RequestParam(required = false) String meterClass
     ) {
@@ -62,18 +65,19 @@ public class GetTypeController {
 
 
     /**
-     * 获取底码表分类
+     * 获取底码点分类
+     * @folder 数据查询/下拉框选择类型
      *
-     * @param windId     风场nem_code
-     * @param type       meter_type 一级类型
-     * @param meterClass meter_class 二级分类
+     * @param windId     风场编码(nem_code)
+     * @param type       一级类型(meter_type)
+     * @param meterClass 二级分类(meter_class)
      * @return 根据nem_code返回meter_type;
      * 根据nem_code,meter_type返回meter_class;
      * 根据nem_code,meter_type,meter_class返回name;
      */
     @GetMapping("/getMeterTypeBottom")
     public Result<Object> getMeterTypeBottom(
-            @RequestParam(required = false) String windId,
+            @RequestParam(required = true) String windId,
             @RequestParam(required = false) String type,
             @RequestParam(required = false) String meterClass
     ) {
@@ -87,14 +91,15 @@ public class GetTypeController {
 
 
     /**
-     * 获取风机编号
+     * 获取设备编号
+     * @folder 数据查询/下拉框选择类型
      *
-     * @param windId 风场nem_code
-     * @return 场站下每台风机的编号
+     * @param windId 风场编码(nem_code)
+     * @return 场站下每台设备的编号
      */
     @GetMapping("/getEquipmentId")
     public Result<Object> getEquipmentId(
-            @RequestParam(required = false) String windId
+            @RequestParam(required = true) String windId
     ) {
         List<MeterInfoVo> equipmentId = getPowerstationTypeClassName.getEquipmentId(windId);
         Map<String, Object> response = new HashMap<>();
@@ -105,16 +110,15 @@ public class GetTypeController {
 
 
     /**
-     * 获取线路
+     * 获取线路名称
+     * @folder 数据查询/下拉框选择类型
      *
-     * @param windId     风场nem_code
-     * @return 根据nem_code返回meter_type;
-     * 根据nem_code,meter_type返回meter_class;
-     * 根据nem_code,meter_type,meter_class返回name;
+     * @param windId     风场编码(nem_code)
+     * @return 根据nem_code返回lime_name;
      */
     @GetMapping("/getLinename")
     public Result<Object> getLineName(
-            @RequestParam(required = false) String windId
+            @RequestParam(required = true) String windId
 
     ) {
         List<MeterInfoVo> meterTypeListVo = getPowerstationTypeClassName.getLineName(windId);

+ 11 - 4
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/MeterController.java

@@ -14,9 +14,8 @@ import java.util.HashMap;
 import java.util.List;
 
 /**
- * 宁夏SIS数据接口
- * Author: malijun
- * Data  : 2023: 05: 21
+ * 宁夏SIS展示数据
+ * @module 宁夏SIS升级
  **/
 @RestController
 @CrossOrigin(origins = "*")
@@ -34,7 +33,12 @@ public class MeterController {
     GetView getView;
 
 
-    //首页驾驶舱展示数据
+    /**
+     * 首页驾驶舱
+     * @folder 宁夏SIS展示数据/首页驾驶舱
+     * @param id 0全部,-1风电,-2光伏
+     * @return 发电量等数据
+     */
     @GetMapping("")
     public Result<Object> getMeterInfoFDC(String id) {
 
@@ -139,7 +143,10 @@ public class MeterController {
     }
 
     /**
+     * sisView展示数据
+     * @folder 宁夏SIS展示数据/sisView展示数据
      * @return sisView页面展示数据
+     * @deprecated 简单介绍
      */
     @GetMapping("/sisView")
     public Result<Object> getView() {

+ 22 - 12
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/MeterInfoController.java

@@ -12,9 +12,9 @@ import javax.annotation.Resource;
 import java.util.*;
 
 /**
- * 数据查询页面接口
- * Author: malijun
- * Data  : 2023: 05: 24
+ * 数据查询
+ * 数据查询页,日月年的底码表数据场站指标等
+ * @module 数据查询
  **/
 @RestController
 @CrossOrigin(origins = "*")
@@ -23,7 +23,8 @@ public class MeterInfoController {
     @Resource
     GetMeterInfo getMeterInfo;
     /**
-     * 获取根据传入不同参数获取线路小时发电量
+     * 集电线路每小时发电量
+     * @folder 数据查询/日
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型
@@ -65,7 +66,8 @@ public class MeterInfoController {
     }
 
     /**
-     * 获取根据传入不同参数获取每日底码信息
+     * 每日底码信息
+     * @folder 数据查询/日
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型
@@ -108,7 +110,8 @@ public class MeterInfoController {
 
 
     /**
-     * 获取风机日发电量
+     * 每日风机发电量
+     * @folder 数据查询/日
      *
      * @param windId    风场ID
      * @param id        风机ID
@@ -146,7 +149,8 @@ public class MeterInfoController {
 
 
     /**
-     * 每日场站指标数据(计算点)
+     * 每日场站指标
+     * @folder 数据查询/日
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型
@@ -187,7 +191,8 @@ public class MeterInfoController {
     }
 
     /**
-     * 每月场站指标数据(计算点)
+     * 每月场站指标
+     * @folder 数据查询/月
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型
@@ -228,7 +233,8 @@ public class MeterInfoController {
     }
 
     /**
-     * 获取风机月发电量
+     * 每月风机发电量
+     * @folder 数据查询/月
      *
      * @param windId    风场ID
      * @param id        风机ID
@@ -267,6 +273,7 @@ public class MeterInfoController {
 
     /**
      * 每月底码信息
+     * @folder 数据查询/月
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型
@@ -308,7 +315,8 @@ public class MeterInfoController {
 
 
     /**
-     * 获取风机年发电量
+     * 每年风机发电量
+     * @folder 数据查询/年
      *
      * @param windId    风场ID
      * @param id        风机ID
@@ -346,7 +354,8 @@ public class MeterInfoController {
 
 
     /**
-     * 获取根据传入不同参数获取每年底码信息
+     * 每年底码信息
+     * @folder 数据查询/年
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型
@@ -389,7 +398,8 @@ public class MeterInfoController {
 
 
     /**
-     * 获取根据传入不同参数获取每年场站指标数据(计算点)
+     * 每年场站指标
+     * @folder 数据查询/年
      *
      * @param windId     风场ID
      * @param meterType  测点一级类型

+ 15 - 1
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/NacosController.java

@@ -8,7 +8,10 @@ import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-
+/**
+ * 配置控制器
+ * @module 配置控制器
+ */
 @RestController
 @RequestMapping("/nacos")
 public class NacosController {
@@ -16,11 +19,22 @@ public class NacosController {
     @Autowired
     NacosConfig nacosConfig;
 
+    /**
+     * 获取nacos测试配置信息
+     * @folder 配置控制器/nacos
+     * @return nacos配置中test的属性
+     */
     @RequestMapping("/get")
     public String get() {
         return nacosConfig.getTestttt();
     }
 
+    /**
+     * 路径传参
+     * @folder 配置控制器/nacos
+     * @param string 任意字符串
+     * @return hello加任意字符串
+     */
     @GetMapping("/echo/{string}")
     public String echo(@PathVariable String string) {
         return "Hello Nacos Discovery " + string;