Browse Source

采集swagger注解

xusl 1 năm trước cách đây
mục cha
commit
182170573e
12 tập tin đã thay đổi với 487 bổ sung2 xóa
  1. 88 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/EquipmentAttributeController.java
  2. 34 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/EquipmentDataTemplateController.java
  3. 23 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ForecastForSendAttributeController.java
  4. 22 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ImpactOnContainerOperationController.java
  5. 3 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/PowerStationDataPackerController.java
  6. 8 1
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ProtocolDataContainerController.java
  7. 79 1
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ProtocolGatherDataPointController.java
  8. 85 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ProtocolSenderDataPointController.java
  9. 34 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/SendLogController.java
  10. 48 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/TemplatePointController.java
  11. 55 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/TunnelInfoController.java
  12. 8 0
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/WindTowerStatusDataController.java

+ 88 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/EquipmentAttributeController.java

@@ -7,10 +7,15 @@ import com.jiayue.ipfcst.common.data.constant.enums.EquipmentTypeEnum;
 import com.jiayue.ipfcst.common.data.entity.ElectricField;
 import com.jiayue.ipfcst.common.data.entity.EquipmentAttribute;
 import com.jiayue.ipfcst.common.data.entity.ProtocolGatherDataPoint;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.console.service.ElectricFieldService;
 import com.jiayue.ipfcst.dataexchange.service.EquipmentAttributeService;
 import com.jiayue.ipfcst.dataexchange.service.ProtocolGatherDataPointService;
 import com.jiayue.ipfcst.dataexchange.service.equipmentstatusdata.EquipmentInfoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +35,7 @@ import java.util.Map;
 @Slf4j
 @RequestMapping("dataExchange")
 @RestController
+@Api(value = "EquipmentAttributeController", tags = "设备属性类的对外http接口controller")
 public class EquipmentAttributeController {
 
   /**
@@ -53,6 +59,13 @@ public class EquipmentAttributeController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping(value = "equipmentAttribute")
+  @ApiOperation(value = "根据条件查询设备属性", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltEquipmentAttribute&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentAttribute",value = "EquipmentAttribute实体",dataType="EquipmentAttribute")
+  })
+  @ApiMyResponse
   public ResponseVO get(@RequestBody EquipmentAttribute equipmentAttribute) {
     return ResponseVO.success(equipmentAttributeService.get(equipmentAttribute));
   }
@@ -64,6 +77,13 @@ public class EquipmentAttributeController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping(value = "getByEquipmentType/{equipmentType}")
+  @ApiOperation(value = "根据设备类型查设备属性", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltEquipmentAttribute&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentType",value = "设备类型",dataType="String")
+  })
+  @ApiMyResponse
   public ResponseVO getByEquipmentType(@PathVariable String equipmentType) throws BusinessException {
     if (!StringUtils.isNotBlank(equipmentType)) {
       throw new BusinessException("必须传入设备类型");
@@ -84,6 +104,10 @@ public class EquipmentAttributeController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping(value = "equipmentInfo")
+  @ApiOperation(value = "获取到所有的设备信息", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入设备信息集合</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getAllEquipmentInfo() {
     List list = new ArrayList();
     List<AbstractEquipmentInfo> info = equipmentInfoService.getAllEquipmentInfo();
@@ -106,6 +130,10 @@ public class EquipmentAttributeController {
    * @return {@link ResponseVO}
    */
   @GetMapping(value = "getAll")
+  @ApiOperation(value = "获取到所有的设备属性", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入设备属性集合</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getAll() {
     try {
       return ResponseVO.success(this.equipmentAttributeService.getAll());
@@ -122,6 +150,14 @@ public class EquipmentAttributeController {
    * @return {@link ResponseVO}
    */
   @GetMapping(value = "getAllByPage/{page}/{size}")
+  @ApiOperation(value = "分页所有设备属性", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入Page&ltEquipmentAttribute&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "page",value = "页码",dataType="Integer"),
+    @ApiImplicitParam(name= "size",value = "条数",dataType="Integer")
+  })
+  @ApiMyResponse
   public ResponseVO getAllByPage(@PathVariable("page") Integer page, @PathVariable("size") Integer size) {
     try {
       return ResponseVO.success(this.equipmentAttributeService.getAllByPage(page,size));
@@ -141,6 +177,13 @@ public class EquipmentAttributeController {
    * @throws BusinessException 业务异常
    */
   @GetMapping(value = "equipmentInfo/{equipmentType}")
+  @ApiOperation(value = "根据设备类型找设备获取设备信息", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltAbstractEquipmentInfo&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentType",value = "设备类型",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO getEquipmentInfo(@PathVariable String equipmentType) throws BusinessException {
     if (!StringUtils.isNotBlank(equipmentType)) {
       throw new BusinessException("必须传入设备类型");
@@ -166,6 +209,10 @@ public class EquipmentAttributeController {
    * @return
    */
   @GetMapping("/getEquipmentTypeEnum")
+  @ApiOperation(value = "获取设备类型状态枚举", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入EquipmentTypeEnum枚举</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getEquipmentTypeEnum(){
     List list = new ArrayList<>();
     for (EquipmentTypeEnum equipmentTypeEnum : EquipmentTypeEnum.values()) {
@@ -186,6 +233,10 @@ public class EquipmentAttributeController {
    * @return
    */
   @GetMapping("/getSubsidiaryEquipmentTypeEnum")
+  @ApiOperation(value = "获取设备类型状态枚举", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入EquipmentTypeEnum枚举</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getSubsidiaryEquipmentTypeEnum(){
     List list = new ArrayList<>();
     for (EquipmentTypeEnum equipmentTypeEnum : EquipmentTypeEnum.SUBSIDIARY_EQUIPMENT_TYPE) {
@@ -207,11 +258,27 @@ public class EquipmentAttributeController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping(value = "/{equipmentType}/{page}/{size}")
+  @ApiOperation(value = "分页根据设备类型查设备属性", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入Page&ltEquipmentAttribute&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentType",value = "设备类型",dataType="String"),
+    @ApiImplicitParam(name= "page",value = "页码",dataType="Integer"),
+    @ApiImplicitParam(name= "size",value = "条数",dataType="Integer")
+  })
+  @ApiMyResponse
   public ResponseVO findByEquipmentType(@PathVariable String equipmentType,@PathVariable Integer page,@PathVariable Integer size) {
     return ResponseVO.success(equipmentAttributeService.findByEquipmentType(equipmentType,page,size));
   }
 
   @GetMapping(value = "/dataPointById/{id}")
+  @ApiOperation(value = "根据ID获取点表", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolGatherDataPoint&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO dataPointById(@PathVariable Integer id) {
     ProtocolGatherDataPoint protocolGatherDataPoint = new ProtocolGatherDataPoint();
     EquipmentAttribute equipmentAttribute = new EquipmentAttribute();
@@ -222,11 +289,25 @@ public class EquipmentAttributeController {
   }
 
   @PostMapping
+  @ApiOperation(value = "保存设备属性", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentAttribute",value = "EquipmentAttribute实体",dataType="EquipmentAttribute"),
+  })
+  @ApiMyResponse
   public ResponseVO saveEquipmentAttribute(@RequestBody EquipmentAttribute equipmentAttribute){
     equipmentAttributeService.saveOrUpdateEquipmentAttribute(equipmentAttribute);
     return ResponseVO.success(1);
   }
   @PutMapping
+  @ApiOperation(value = "更新设备属性", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentAttribute",value = "EquipmentAttribute实体",dataType="EquipmentAttribute"),
+  })
+  @ApiMyResponse
   public ResponseVO UpdateEquipmentAttribute(@RequestBody EquipmentAttribute equipmentAttribute){
     equipmentAttributeService.saveOrUpdateEquipmentAttribute(equipmentAttribute);
     return ResponseVO.success(1);
@@ -235,6 +316,13 @@ public class EquipmentAttributeController {
    * 删除
    * */
   @DeleteMapping("/{id}")
+  @ApiOperation(value = "删除设备属性", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO delete(@PathVariable String id) throws BusinessException {
     equipmentAttributeService.delete(Integer.parseInt(id));
     return ResponseVO.success(1);

+ 34 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/EquipmentDataTemplateController.java

@@ -4,8 +4,13 @@ import com.alibaba.fastjson.JSONObject;
 import com.jiayue.ipfcst.aop.SaveValidate;
 import com.jiayue.ipfcst.common.core.exception.BusinessException;
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.domain.EquipmentDataTemplate;
 import com.jiayue.ipfcst.dataexchange.service.EquipmentDataTemplateService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -19,6 +24,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("dataExchange")
+@Api(value = "EquipmentDataTemplateController", tags = "设备模版的对外http接口controller")
 public class EquipmentDataTemplateController {
 
 
@@ -36,6 +42,13 @@ public class EquipmentDataTemplateController {
    * @return ResponseVO 统一返回值格式
    */
   @GetMapping(value = "/equipmentDataTemplate")
+  @ApiOperation(value = "查询符合条件对应的模版", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltEquipmentDataTemplate&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentDataTemplate",value = "EquipmentDataTemplate实体",dataType="EquipmentDataTemplate"),
+  })
+  @ApiMyResponse
   public ResponseVO get(@ModelAttribute() EquipmentDataTemplate equipmentDataTemplate) {
     return ResponseVO.success(equipmentDataTemplateService.get(equipmentDataTemplate));
   }
@@ -49,6 +62,13 @@ public class EquipmentDataTemplateController {
    */
   @DeleteMapping(value = "equipmentDataTemplate")
   @SaveValidate
+  @ApiOperation(value = "查询符合条件对应的模版", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentDataTemplateId",value = "主键ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO delete(@RequestParam Integer equipmentDataTemplateId) {
     //该操作将会删除该模版下所有的模版点位
     equipmentDataTemplateService.delete(equipmentDataTemplateId);
@@ -64,6 +84,13 @@ public class EquipmentDataTemplateController {
    */
   @PutMapping(value = "equipmentDataTemplate")
   @SaveValidate
+  @ApiOperation(value = "添加或修改模版", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象,data属性存入EquipmentDataTemplate实体</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentDataTemplateId",value = "主键ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO add(@RequestBody EquipmentDataTemplate equipmentDataTemplate) {
     return ResponseVO.success(equipmentDataTemplateService.saveOrUpdate(equipmentDataTemplate));
   }
@@ -77,6 +104,13 @@ public class EquipmentDataTemplateController {
    */
   @PostMapping(value = "/equipmentDataTemplate/generatePoint4Equipment")
   @SaveValidate
+  @ApiOperation(value = "通过模版生成设备点位", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "obj",value = "json对象",dataType="JSONObject"),
+  })
+  @ApiMyResponse
   public ResponseVO generatePoint4Equipment(@RequestBody JSONObject obj) throws BusinessException {
     if (obj.containsKey("equipmentDataTemplateId") && obj.containsKey("equipmentIds") && obj.containsKey("findAddressN")) {
       int equipmentDataTemplateId = obj.getInteger("equipmentDataTemplateId");

+ 23 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ForecastForSendAttributeController.java

@@ -2,7 +2,12 @@ package com.jiayue.ipfcst.dataexchange.controller;
 
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
 import com.jiayue.ipfcst.common.data.entity.ForecastForSendAttribute;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.repository.ForecastForSendAttributeRepository;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -21,6 +26,7 @@ import java.util.List;
 @Slf4j
 @RestController
 @RequestMapping("/dataExchange/ForecastForSendAttribute")
+@Api(value = "ForecastForSendAttributeController", tags = "转发点表controller")
 public class
 ForecastForSendAttributeController {
   private ForecastForSendAttributeRepository forecastForSendAttributeRepository;
@@ -38,6 +44,14 @@ ForecastForSendAttributeController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping(value = "/{forecastNode}/{forcastType}")
+  @ApiOperation(value = "根据预测功率的类型和预测节点查询点位", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltForecastForSendAttribute&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "forecastNode",value = "预测节点",dataType="Integer"),
+    @ApiImplicitParam(name= "forcastType",value = "预测类型",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO get(@PathVariable("forecastNode") Integer forecastNode, @PathVariable("forcastType") String forcastType1) {
     try {
       ForecastForSendAttribute.ForecastType forcastType = ForecastForSendAttribute.ForecastType.valueOf(forcastType1);
@@ -60,6 +74,15 @@ ForecastForSendAttributeController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping(value = "/getAttributeBypoint/{pointNumber}/{forecastNode}/{forcastType}")
+  @ApiOperation(value = "根据点位和预测功率类型查询预测属性的id", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltForecastForSendAttribute&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "pointNumber",value = "点号",dataType="Integer"),
+    @ApiImplicitParam(name= "forecastNode",value = "预测节点",dataType="Integer"),
+    @ApiImplicitParam(name= "forcastType",value = "预测类型",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO getAttributeByPoint(@PathVariable("pointNumber") Integer pointNumber, @PathVariable("forecastNode") Integer forecastNode, @PathVariable("forcastType") String forcastType1) {
     try {
       ForecastForSendAttribute.ForecastType forcastType = ForecastForSendAttribute.ForecastType.valueOf(forcastType1);

+ 22 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ImpactOnContainerOperationController.java

@@ -1,7 +1,12 @@
 package com.jiayue.ipfcst.dataexchange.controller;
 
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.service.ImpactOnContainerOperation;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -15,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
  */
 @RestController
 @RequestMapping("refreshContainer")
+@Api(value = "ImpactOnContainerOperationController", tags = "対池子内数据产生影响的操作触发controller")
 public class ImpactOnContainerOperationController {
 
   @Autowired
@@ -27,6 +33,10 @@ public class ImpactOnContainerOperationController {
    * @return {@link ResponseVO}
    */
   @GetMapping("allDataPoint")
+  @ApiOperation(value = "刷新所有数据点", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO refreshAllDataPoint() {
     impactOnContainerOperation.refreshAllDataPoint();
     return ResponseVO.success();
@@ -39,6 +49,10 @@ public class ImpactOnContainerOperationController {
    * @return {@link ResponseVO}
    */
   @GetMapping("allGatherTunnelDataPoint")
+  @ApiOperation(value = "刷新所有采集通道数据点", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO refreshAllGatherTunnelDataPoint() {
     impactOnContainerOperation.refreshAllGatherTunnelDataPoint();
     return ResponseVO.success();
@@ -51,6 +65,10 @@ public class ImpactOnContainerOperationController {
    * @return {@link ResponseVO}
    */
   @GetMapping("allSenderTunnelDataPoint")
+  @ApiOperation(value = "刷新所有转发通道数据点", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO refreshAllSenderTunnelDataPoint() {
     impactOnContainerOperation.refreshAllSenderTunnelDataPoint();
     return ResponseVO.success();
@@ -63,6 +81,10 @@ public class ImpactOnContainerOperationController {
    * @return {@link ResponseVO}
    */
   @GetMapping("allPackerDataPoint")
+  @ApiOperation(value = "刷新所有数据组装器数据点", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO refreshAllEquipmentDataPoint() {
     impactOnContainerOperation.refreshAllEquipmentDataPoint();
     return ResponseVO.success();

+ 3 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/PowerStationDataPackerController.java

@@ -3,9 +3,11 @@ package com.jiayue.ipfcst.dataexchange.controller;
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
 import com.jiayue.ipfcst.common.data.entity.PowerLimitPlanSign;
 import com.jiayue.ipfcst.dataexchange.dataprocesser.datapacker.iml.PowerStationDataPacker;
+import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
 
 /**
  * 审计
@@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
 @Slf4j
 @RequestMapping("powerStationDataPacker")
 @RestController
+@ApiIgnore
 public class PowerStationDataPackerController {
   @Autowired PowerStationDataPacker powerStationDataPacker;
 

+ 8 - 1
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ProtocolDataContainerController.java

@@ -2,8 +2,11 @@ package com.jiayue.ipfcst.dataexchange.controller;
 
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
 import com.jiayue.ipfcst.common.data.entity.ProtocolGatherDataPoint;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.container.ProtocolDataContainer;
 import com.jiayue.ipfcst.dataexchange.service.ProtocolGatherDataPointService;
+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.GetMapping;
@@ -16,14 +19,18 @@ import java.util.Map;
 @Slf4j
 @RestController
 @RequestMapping("/protocolDataContainer")
+@Api(value = "ProtocolDataContainerController", tags = "点表关联controller")
 public class ProtocolDataContainerController {
 
   ProtocolDataContainer protocolDataContainer = ProtocolDataContainer.getInstance();
   @Autowired ProtocolGatherDataPointService protocolGatherDataPointService;
 
   @GetMapping
+  @ApiOperation(value = "采集点表实时数据列查询", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入点表实时数据</p>"
+  )
+  @ApiMyResponse
   public ResponseVO realTimeData(){
-
     try {
       Map map = protocolDataContainer.realTimeData();
       return ResponseVO.success(map);

+ 79 - 1
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ProtocolGatherDataPointController.java

@@ -5,10 +5,15 @@ import com.googlecode.aviator.exception.ExpressionRuntimeException;
 import com.jiayue.ipfcst.aop.SaveValidate;
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
 import com.jiayue.ipfcst.common.data.entity.ProtocolGatherDataPoint;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.container.ProtocolDataContainer;
 import com.jiayue.ipfcst.dataexchange.repository.ProtocolGatherDataPointRepository;
 import com.jiayue.ipfcst.dataexchange.service.EquipmentAttributeService;
 import com.jiayue.ipfcst.dataexchange.service.ProtocolGatherDataPointService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -28,6 +33,7 @@ import java.util.regex.Pattern;
 @Slf4j
 @RestController
 @RequestMapping("/dataExchange/protocolDataPoint")
+@Api(value = "ProtocolGatherDataPointController", tags = "协议点位controller")
 public class ProtocolGatherDataPointController {
 
   private static final Pattern expr = Pattern.compile("(?<=P_).*?(?=_P)");
@@ -54,6 +60,13 @@ public class ProtocolGatherDataPointController {
    * @return ResponseVO gather data point
    */
   @GetMapping("/gatherDataPoint")
+  @ApiOperation(value = "查询符合点位实体描述的点位", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolGatherDataPoint&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "protocolGatherDataPoint",value = "ProtocolGatherDataPoint实体",dataType="ProtocolGatherDataPoint")
+  })
+  @ApiMyResponse
   public ResponseVO getGatherDataPoint(ProtocolGatherDataPoint protocolGatherDataPoint) {
     return ResponseVO.success(protocolGatherDataPointService.get(protocolGatherDataPoint));
   }
@@ -66,6 +79,13 @@ public class ProtocolGatherDataPointController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping("/getByTunnelId/{tunnelId}")
+  @ApiOperation(value = "查询通道下的点位", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolGatherDataPoint&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "tunnelId",value = "通道ID",dataType="String")
+  })
+  @ApiMyResponse
   public ResponseVO getByTunnelId(@PathVariable("tunnelId") String tunnelId) {
     List<ProtocolGatherDataPoint> list = protocolGatherDataPointService.getByTunnelId(tunnelId);
     return ResponseVO.success(list);
@@ -80,6 +100,15 @@ public class ProtocolGatherDataPointController {
    * @return ResponseVO 统一返回值
    */
   @GetMapping("/getBytunnelAndEquipment/{tunnelId}/{equipmentId}/{equipmentType}")
+  @ApiOperation(value = "根据通道和设备查询", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolGatherDataPoint&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "tunnelId",value = "通道ID",dataType="String"),
+    @ApiImplicitParam(name= "equipmentId",value = "设备ID",dataType="String"),
+    @ApiImplicitParam(name= "equipmentType",value = "设备类型",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO getByTunnelAndEquipment(@PathVariable("tunnelId") String tunnelId, @PathVariable("equipmentId") String equipmentId, @PathVariable("equipmentType") Integer equipmentType) {
     try {
       List<ProtocolGatherDataPoint> list = protocolGatherDataPointService.getProtocolGatherDataPoint(tunnelId, equipmentId, equipmentType);
@@ -99,6 +128,14 @@ public class ProtocolGatherDataPointController {
    * @return ResponseVO gather data point
    */
   @GetMapping("/getProtocolGatherDataPoint/{equipmentId}/{equipmentAttributeId}")
+  @ApiOperation(value = "根据设备id和设备属性查询采集点表", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolGatherDataPoint&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "equipmentId",value = "设备ID",dataType="Integer"),
+    @ApiImplicitParam(name= "equipmentAttributeId",value = "设备属性ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO getProtocolGatherDataPoint(@PathVariable("equipmentId") Integer equipmentId, @PathVariable("equipmentAttributeId") Integer equipmentAttributeId) {
     try {
       List<ProtocolGatherDataPoint> list = this.protocolGatherDataPointService.getProtocolGatherDataPoint(equipmentId, equipmentAttributeId);
@@ -117,6 +154,13 @@ public class ProtocolGatherDataPointController {
    * @return ResponseVO gather data point
    */
   @GetMapping("/getDataPointById/{id}")
+  @ApiOperation(value = "根据点表id查询点表", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolGatherDataPoint&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO getDataPointById(@PathVariable("id") Integer id) {
     try {
       List<ProtocolGatherDataPoint> list = new ArrayList();
@@ -138,6 +182,13 @@ public class ProtocolGatherDataPointController {
    */
   @PostMapping("/saveDataPoint")
   @SaveValidate
+  @ApiOperation(value = "储存采集点位", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象,data属性存入ProtocolGatherDataPoint实体</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "protocolDataPoint",value = "ProtocolGatherDataPoint实体",dataType="ProtocolGatherDataPoint"),
+  })
+  @ApiMyResponse
   public ResponseVO saveGatherDataPoint(@RequestBody ProtocolGatherDataPoint protocolDataPoint) {
     return ResponseVO.success(protocolGatherDataPointService.save(protocolDataPoint));
   }
@@ -150,6 +201,13 @@ public class ProtocolGatherDataPointController {
    * @return ResponseVO response vo
    */
   @GetMapping("/checkFormula")
+  @ApiOperation(value = "校验公式是否可以执行", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "formula",value = "公式",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO checkFormula(String formula) {
     try {
       HashMap<String, Object> calculatingParameters = new HashMap<>();
@@ -175,7 +233,6 @@ public class ProtocolGatherDataPointController {
       e.printStackTrace();
       return ResponseVO.fail();
     }
-
   }
 
 
@@ -187,6 +244,13 @@ public class ProtocolGatherDataPointController {
    */
   @PutMapping("/updateDataPoint")
   @SaveValidate
+  @ApiOperation(value = "储存采集点位", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象,data属性存入ProtocolGatherDataPoint实体</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "protocolDataPoint",value = "ProtocolGatherDataPoint实体",dataType="ProtocolGatherDataPoint"),
+  })
+  @ApiMyResponse
   public ResponseVO updateGatherDataPoint(@RequestBody ProtocolGatherDataPoint protocolDataPoint) {
     return ResponseVO.success(protocolGatherDataPointService.save(protocolDataPoint));
   }
@@ -198,6 +262,13 @@ public class ProtocolGatherDataPointController {
    */
   @DeleteMapping("/deleteById/{id}")
   @SaveValidate
+  @ApiOperation(value = "删除采集点表", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO deleteById(@PathVariable("id") Integer id) {
     try {
       protocolGatherDataPointService.deleteById(id);
@@ -211,6 +282,13 @@ public class ProtocolGatherDataPointController {
 
   @DeleteMapping("/batchDeleteGatherDataPoint/{pointIds}")
   @SaveValidate
+  @ApiOperation(value = "批量删除采集点表", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "pointIds",value = "主键ID",dataType="Integer[]"),
+  })
+  @ApiMyResponse
   public ResponseVO batchDeleteGatherDataPoint(@PathVariable Integer[] pointIds) {
     try {
       for (int i = 0; i < pointIds.length; i++) {

+ 85 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/ProtocolSenderDataPointController.java

@@ -11,6 +11,7 @@ import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
 import com.jiayue.ipfcst.common.data.abst.equipmentinfo.AbstractEquipmentInfo;
 import com.jiayue.ipfcst.common.data.constant.enums.DataSourceEnum;
 import com.jiayue.ipfcst.common.data.entity.*;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.container.ProtocolTunnelContainer;
 import com.jiayue.ipfcst.dataexchange.exception.DataExchangeException;
 import com.jiayue.ipfcst.dataexchange.repository.ForecastForSendAttributeRepository;
@@ -20,6 +21,10 @@ import com.jiayue.ipfcst.dataexchange.service.ProtocolSenderDataPointService;
 import com.jiayue.ipfcst.dataexchange.service.TunnelInfoService;
 import com.jiayue.ipfcst.dataexchange.service.equipmentstatusdata.EquipmentInfoService;
 import com.jiayue.ipfcst.dataexchange.tunnelworker.senders.DataSenderInterface;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,6 +47,7 @@ import java.util.*;
 @Slf4j
 @RestController
 @RequestMapping("/dataExchange/senderProtocolDataPoint")
+@Api(value = "ProtocolGatherDataPointController", tags = "转发点表controller")
 //TODO 路径名未符合驼峰
 public class ProtocolSenderDataPointController {
   @Autowired
@@ -64,6 +70,10 @@ public class ProtocolSenderDataPointController {
    * @return ResponseVO response vo
    */
   @GetMapping("/senderDataPoint")
+  @ApiOperation(value = "查询所有转发点位", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltProtocolSenderDataPoint&gt</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getSenderDataPoint() {
     try {
       return ResponseVO.success(protocolSenderDataPointService.get());
@@ -75,6 +85,10 @@ public class ProtocolSenderDataPointController {
   }
 
   @GetMapping("/DataPoint")
+  @ApiOperation(value = "查询所有转发点位及设备属性", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getDataPoint() {
     try {
       List list = new ArrayList();
@@ -110,6 +124,13 @@ public class ProtocolSenderDataPointController {
 
 
   @GetMapping("/maxProtocolNoInTunnel")
+  @ApiOperation(value = "获取最大协议号", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入Integer协议号</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "tunnelId",value = "通道Id",dataType="String")
+  })
+  @ApiMyResponse
   public ResponseVO getMaxProtocolNoInTunnel(String tunnelId) {
     return ResponseVO.success(protocolSenderDataPointService.getMaxProtocolNoInTunnel(tunnelId));
   }
@@ -121,6 +142,13 @@ public class ProtocolSenderDataPointController {
    * @return ProtocolSenderDataPoint  protocol data  point
    */
   @GetMapping("/findByTunnelId/{tunnelId}")
+  @ApiOperation(value = "通过通道id查询转发点表", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "tunnelId",value = "通道Id",dataType="String")
+  })
+  @ApiMyResponse
   public ResponseVO findByTunnelId(@PathVariable("tunnelId") String tunnelId) {
     try {
       List<Map> list = protocolSenderDataPointService.getPointByTunnelId(tunnelId);
@@ -141,6 +169,15 @@ public class ProtocolSenderDataPointController {
    * @return ProtocolSenderDataPoint  protocol data  point
    */
   @GetMapping("/findByTunnelIdAndGatherPoint/{tunnelId}/{equipmentId}/{equipmentType}")
+  @ApiOperation(value = "通过通道id和采集id查询转发表", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "tunnelId",value = "通道Id",dataType="String"),
+    @ApiImplicitParam(name= "equipmentId",value = "设备Id",dataType="String"),
+    @ApiImplicitParam(name= "equipmentType",value = "设备类型",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO findByTunnelIdAndGatherPoint(@PathVariable("tunnelId") String tunnelId, @PathVariable("equipmentId") String equipmentId, @PathVariable("equipmentType") Integer equipmentType) {
     //TODO 代码不合理  需郑媛修改   方法所放置的类也不对   @CreateBy 修唯
     try {
@@ -161,6 +198,13 @@ public class ProtocolSenderDataPointController {
    */
   @PostMapping("/saveDataPoint")
   @SaveValidate
+  @ApiOperation(value = "保存转发点位", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "protocolSenderDataPoint",value = "ProtocolSenderDataPoint实体",dataType="ProtocolSenderDataPoint"),
+  })
+  @ApiMyResponse
   public ResponseVO saveSenderDataPoint(@RequestBody ProtocolSenderDataPoint protocolSenderDataPoint) {
     try {
       return ResponseVO.success(protocolSenderDataPointService.save(protocolSenderDataPoint));
@@ -179,6 +223,13 @@ public class ProtocolSenderDataPointController {
    */
   @PostMapping("/batchSaveForecastPoint")
   @SaveValidate
+  @ApiOperation(value = "批量保存转发点位", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "param",value = "json对象",dataType="JSONObject"),
+  })
+  @ApiMyResponse
   public ResponseVO batchSaveSenderDataPoint(@RequestBody JSONObject param) throws BusinessException {
     String tunnelId = param.getString("tunnelId");
     String protocolPointType = param.getString("protocolPointType");
@@ -228,6 +279,13 @@ public class ProtocolSenderDataPointController {
    */
   @PutMapping("/updateDataPoint")
   @SaveValidate
+  @ApiOperation(value = "修改转发点表", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "protocolSenderDataPoint",value = "ProtocolSenderDataPoint实体",dataType="ProtocolSenderDataPoint"),
+  })
+  @ApiMyResponse
   public ResponseVO updateSenderDataPoint(@RequestBody ProtocolSenderDataPoint protocolSenderDataPoint) {
     try {
       return ResponseVO.success(protocolSenderDataPointService.save(protocolSenderDataPoint));
@@ -246,6 +304,13 @@ public class ProtocolSenderDataPointController {
    */
   @DeleteMapping("/deleteDataPoint/{id}")
   @SaveValidate
+  @ApiOperation(value = "删除转发点表", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="Integer"),
+  })
+  @ApiMyResponse
   public ResponseVO deleteById(@PathVariable("id") Integer id) {
     try {
       protocolSenderDataPointService.deleteById(id);
@@ -259,6 +324,13 @@ public class ProtocolSenderDataPointController {
 
   @DeleteMapping("/batchDeleteSenderDataPoint/{pointIds}")
   @SaveValidate
+  @ApiOperation(value = "批量删除转发点表", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "pointIds",value = "主键ID",dataType="Integer[]"),
+  })
+  @ApiMyResponse
   public ResponseVO batchDeleteGatherDataPoint(@PathVariable Integer[] pointIds) {
     try {
       for (int i = 0; i < pointIds.length; i++) {
@@ -282,6 +354,14 @@ public class ProtocolSenderDataPointController {
    * @return {@link ResponseVO}* @throws DataExchangeException 数据交换异常
    */
   @GetMapping("/setValueByManual/{pointId}/{value}")
+  @ApiOperation(value = "手动置数", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "pointId",value = "点位ID",dataType="Integer"),
+    @ApiImplicitParam(name= "value",value = "置数",dataType="Double"),
+  })
+  @ApiMyResponse
   @SaveValidate
   public ResponseVO setValueByManual(@PathVariable Integer pointId,@PathVariable Double value) throws DataExchangeException {
     ProtocolSenderDataPoint dataPoint=new ProtocolSenderDataPoint();
@@ -303,6 +383,11 @@ public class ProtocolSenderDataPointController {
   * 导出
   */
   @RequestMapping("/export")
+  @SaveValidate
+  @ApiOperation(value = "导出", httpMethod = "GET",
+    notes = "<p>返回字节流</p>"
+  )
+  @ApiMyResponse
   public void export(HttpServletResponse response) {
     try{
       ExcelWriter writer = ExcelUtil.getWriter();

+ 34 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/SendLogController.java

@@ -1,7 +1,12 @@
 package com.jiayue.ipfcst.dataexchange.controller;
 
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.service.SendLogService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -17,6 +22,7 @@ import java.util.Map;
 @Slf4j
 @RestController
 @RequestMapping("/sendLog")
+@Api(value = "SendLogController", tags = "回传日志controller")
 public class SendLogController {
   @Autowired SendLogService sendLogService;
 
@@ -29,6 +35,16 @@ public class SendLogController {
    * @return
    */
   @GetMapping("/{page}/{size}/{startTime}/{endTime}")
+  @ApiOperation(value = "分页获取数据", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入Page&ltSendLog&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "page",value = "页码",dataType="Integer"),
+    @ApiImplicitParam(name= "size",value = "条数",dataType="Integer"),
+    @ApiImplicitParam(name= "startTime",value = "开始时间",dataType="Long"),
+    @ApiImplicitParam(name= "endTime",value = "结束时间",dataType="Long"),
+  })
+  @ApiMyResponse
   public ResponseVO getAll(@PathVariable("page") Integer page,
     @PathVariable("size") Integer size,
     @PathVariable("startTime") Long startTime,
@@ -52,6 +68,17 @@ public class SendLogController {
    * @return
    */
   @GetMapping("/{page}/{size}/{startTime}/{endTime}/{tunnelId}")
+  @ApiOperation(value = "分页获取数据", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入Page&ltSendLog&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "page",value = "页码",dataType="Integer"),
+    @ApiImplicitParam(name= "size",value = "条数",dataType="Integer"),
+    @ApiImplicitParam(name= "startTime",value = "开始时间",dataType="Long"),
+    @ApiImplicitParam(name= "endTime",value = "结束时间",dataType="Long"),
+    @ApiImplicitParam(name= "tunnelId",value = "通道ID",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO getAll(@PathVariable("page") Integer page,
     @PathVariable("size") Integer size,
     @PathVariable("startTime") Long startTime,
@@ -70,6 +97,13 @@ public class SendLogController {
    * 详细回传信息
    */
   @GetMapping("/{startTime}/{tunnelId}")
+  @ApiOperation(value = "详细回传信息", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "startTime",value = "开始时间",dataType="Long"),
+  })
+  @ApiMyResponse
   public ResponseVO getProDataPoint(@PathVariable("startTime") Long startTime,
     @PathVariable("tunnelId") String tunnelId){
     try {

+ 48 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/TemplatePointController.java

@@ -2,8 +2,13 @@ package com.jiayue.ipfcst.dataexchange.controller;
 
 import com.jiayue.ipfcst.aop.SaveValidate;
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.domain.TemplatePoint;
 import com.jiayue.ipfcst.dataexchange.service.TemplatePointService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -17,6 +22,7 @@ import java.util.List;
  */
 @RequestMapping("dataExchange")
 @RestController
+@Api(value = "TemplatePointController", tags = "模版点位对外接口controller")
 public class TemplatePointController {
 
 
@@ -35,6 +41,13 @@ public class TemplatePointController {
    */
   @PutMapping(value = "templatePoints")
   @SaveValidate
+  @ApiOperation(value = "批量向模版中添加点位", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltTemplatePoint&gt实体</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "templatePoints",value = "TemplatePoint实体",dataType="List<TemplatePoint>")
+  })
+  @ApiMyResponse
   public ResponseVO addAll(@RequestBody List<TemplatePoint> templatePoints) {
     return ResponseVO.success(templatePointService.addAll(templatePoints));
   }
@@ -48,6 +61,13 @@ public class TemplatePointController {
    */
   @SaveValidate
   @PutMapping(value = "templatePoint")
+  @ApiOperation(value = "向模版中添加点位", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象,data属性存入TemplatePoint实体</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "templatePoint",value = "TemplatePoint实体",dataType="TemplatePoint")
+  })
+  @ApiMyResponse
   public ResponseVO add(@RequestBody TemplatePoint templatePoint) {
     return ResponseVO.success(templatePointService.add(templatePoint));
   }
@@ -60,6 +80,13 @@ public class TemplatePointController {
    * @return ResponseVO 统一返回值格式
    */
   @GetMapping(value = "templatePoint")
+  @ApiOperation(value = "获取模版信息", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltTemplatePoint&gt实体</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "templatePoint",value = "TemplatePoint实体",dataType="TemplatePoint")
+  })
+  @ApiMyResponse
   public ResponseVO get(@ModelAttribute() TemplatePoint templatePoint) {
     return ResponseVO.success(templatePointService.get(templatePoint));
   }
@@ -73,6 +100,13 @@ public class TemplatePointController {
    */
   @PostMapping(value = "templatePoint")
   @SaveValidate
+  @ApiOperation(value = "修改模版点位", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "templatePoint",value = "TemplatePoint实体",dataType="TemplatePoint")
+  })
+  @ApiMyResponse
   public ResponseVO update(@RequestBody TemplatePoint templatePoint) {
     return ResponseVO.success(templatePointService.update(templatePoint));
   }
@@ -86,6 +120,13 @@ public class TemplatePointController {
    */
   @DeleteMapping(value = "templatePointById")
   @SaveValidate
+  @ApiOperation(value = "根据ID删除模版点位", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "templatePointId",value = "模板ID",dataType="Integer")
+  })
+  @ApiMyResponse
   public ResponseVO deleteById(@RequestBody Integer templatePointId) {
     templatePointService.deleteById(templatePointId);
     return ResponseVO.success();
@@ -100,6 +141,13 @@ public class TemplatePointController {
    */
   @DeleteMapping(value = "templatePoint")
   @SaveValidate
+  @ApiOperation(value = "删除符合条件的模版点位", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "templatePoint",value = "TemplatePoint实体",dataType="TemplatePoint")
+  })
+  @ApiMyResponse
   public ResponseVO delete(@RequestBody TemplatePoint templatePoint) {
     templatePointService.delete(templatePoint);
     return ResponseVO.success();

+ 55 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/TunnelInfoController.java

@@ -6,9 +6,14 @@ import com.jiayue.ipfcst.common.core.exception.BusinessException;
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
 import com.jiayue.ipfcst.common.data.constant.enums.TunnelType;
 import com.jiayue.ipfcst.common.data.entity.BaseTunnelInfo;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.exception.DataExchangeException;
 import com.jiayue.ipfcst.dataexchange.service.ImpactOnContainerOperation;
 import com.jiayue.ipfcst.dataexchange.service.TunnelInfoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
 import net.sf.json.JSONObject;
@@ -27,6 +32,7 @@ import java.util.*;
 @RequestMapping("/TunnelInfo")
 @RestController
 @Slf4j
+@Api(value = "TunnelInfoController", tags = "通道对外接口controller")
 public class TunnelInfoController {
 
   @Autowired
@@ -41,6 +47,10 @@ public class TunnelInfoController {
    * @return ResponseVO  统一返回值格式
    */
   @GetMapping(value = "/getAllTunnel")
+  @ApiOperation(value = "获取所有的通道信息", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltBaseTunnelInfo&gt</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getAllTunnel() {
     try {
       List<BaseTunnelInfo> list = tunnelInfoService.getAllTunnel();
@@ -57,6 +67,13 @@ public class TunnelInfoController {
    */
   @SneakyThrows
   @GetMapping(value = "/getTunnel/{tunnelType}")
+  @ApiOperation(value = "根据通道类型来查询", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象,data属性存入List&ltBaseTunnelInfo&gt</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "tunnelType",value = "通道类型",dataType="String")
+  })
+  @ApiMyResponse
   public ResponseVO getTunnel(@PathVariable String tunnelType) {
     try {
       List list = tunnelInfoService.findByTunnelType(tunnelType);
@@ -73,6 +90,13 @@ public class TunnelInfoController {
    */
   @PostMapping
   @SaveValidate
+  @ApiOperation(value = "保存", httpMethod = "POST",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "baseTunnelInfo",value = "通道信息实体",dataType="JSONObject")
+  })
+  @ApiMyResponse
   public ResponseVO saveTunnelInfo(@RequestBody JSONObject baseTunnelInfo)
     throws DataExchangeException {
     String type = baseTunnelInfo.getString("tunnelType");
@@ -88,6 +112,13 @@ public class TunnelInfoController {
   /*修改*/
   @PutMapping
   @SaveValidate
+  @ApiOperation(value = "修改", httpMethod = "PUT",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "baseTunnelInfo",value = "通道信息实体",dataType="JSONObject")
+  })
+  @ApiMyResponse
   public ResponseVO updateTunnelInfo(@RequestBody JSONObject baseTunnelInfo)
     throws BusinessException {
     String type = baseTunnelInfo.getString("tunnelType");
@@ -104,6 +135,14 @@ public class TunnelInfoController {
   @SneakyThrows
   @DeleteMapping(value = "/{id}/{tunnelType}")
   @SaveValidate
+  @ApiOperation(value = "删除通道及池中信息", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="String"),
+    @ApiImplicitParam(name= "tunnelType",value = "通道类型",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO delete(@PathVariable("id") String id, @PathVariable("tunnelType") String tunnelType) {
     try {
       this.tunnelInfoService.delete(id, tunnelType);
@@ -123,6 +162,14 @@ public class TunnelInfoController {
   @SneakyThrows
   @DeleteMapping(value = "/deleteDataPointById/{id}/{tunnelType}")
   @SaveValidate
+  @ApiOperation(value = "删除", httpMethod = "DELETE",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiImplicitParams(value={
+    @ApiImplicitParam(name= "id",value = "主键ID",dataType="String"),
+    @ApiImplicitParam(name= "tunnelType",value = "通道类型",dataType="String"),
+  })
+  @ApiMyResponse
   public ResponseVO deleteDataPointById(@PathVariable("id") String id, @PathVariable("tunnelType") String tunnelType) {
     try {
       this.tunnelInfoService.deleteDataPointById(id, tunnelType);
@@ -140,6 +187,10 @@ public class TunnelInfoController {
    * @return
    */
   @GetMapping(value = "/getServerSerialPorts")
+  @ApiOperation(value = "获取服务器所有的串口名称", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getServerSerialPorts() {
     List<String> ports = new ArrayList<>();
     Enumeration enumeration = CommPortIdentifier.getPortIdentifiers();
@@ -158,6 +209,10 @@ public class TunnelInfoController {
    * @return
    */
   @GetMapping(value = "/findbyMaster")
+  @ApiOperation(value = "将接入通道封装成映射类型", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public ResponseVO getByMaster() {
     List<BaseTunnelInfo> baseTunnelInfos = tunnelInfoService.getAllGatherTunnel();
     List<Map<String, Object>> list = new ArrayList<>();

+ 8 - 0
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/dataexchange/controller/WindTowerStatusDataController.java

@@ -1,7 +1,10 @@
 package com.jiayue.ipfcst.dataexchange.controller;
 
 import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
+import com.jiayue.ipfcst.common.data.strategy.ApiMyResponse;
 import com.jiayue.ipfcst.dataexchange.service.equipmentstatusdata.WindTowerStatusDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -12,6 +15,7 @@ import java.util.Map;
 
 @RestController
 @RequestMapping("windTowerStatusData")
+@Api(value = "WindTowerStatusDataController", tags = "测风塔数据controller")
 public class WindTowerStatusDataController {
 
   @Autowired
@@ -24,6 +28,10 @@ public class WindTowerStatusDataController {
    * @return {@link ResponseVO}
    */
   @RequestMapping("/isAbnormal")
+  @ApiOperation(value = "获取测风塔数据是否是异常的数据", httpMethod = "GET",
+    notes = "<p>返回ResponseVO对象</p>"
+  )
+  @ApiMyResponse
   public Map<String,Object> isAbnormal(){
     Map<String,Object> map = new HashMap<>();
     Boolean isAbnormalData = windTowerStatusDataService.getIsAbnormalData();