ids) {
+ String methodDescribe = getMethodDescribe("removeSubstation");
+ boolean save = substationExpendService.removeByIds(ids);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,save, methodDescribe);
}
}
diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/ledgerManger/SubstationRelationController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/ledgerManger/SubstationRelationController.java
index c72e7dd00..014112359 100644
--- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/ledgerManger/SubstationRelationController.java
+++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/ledgerManger/SubstationRelationController.java
@@ -4,26 +4,22 @@ package com.njcn.device.pms.controller.ledgerManger;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
-import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
-import com.njcn.device.pms.pojo.po.SubstationExpend;
+import com.njcn.device.pms.pojo.param.SubstationExpendParam;
import com.njcn.device.pms.pojo.po.SubstationRelation;
+import com.njcn.device.pms.pojo.vo.SubstationExpendVO;
+import com.njcn.device.pms.pojo.vo.SubstationRelationVO;
import com.njcn.device.pms.service.ISubstationRelationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.RestController;
import com.njcn.web.controller.BaseController;
-import java.util.List;
-import java.util.Map;
/**
*
@@ -51,5 +47,25 @@ public class SubstationRelationController extends BaseController {
Boolean result = substationRelationService.saveSubstationRelation(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/getRelation")
+ @ApiOperation("查询变电站拓扑图")
+ @ApiImplicitParam(name = "param", value = "查询变电站拓扑图", required = true)
+ public HttpResult getRelation(@RequestBody SubstationExpendParam.Relation param) {
+ String methodDescribe = getMethodDescribe("getRelation");
+ SubstationRelationVO relation = substationRelationService.getRelation(param);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, relation, methodDescribe);
+ }
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/removeRelation")
+ @ApiOperation("删除变电站拓扑图")
+ @ApiImplicitParam(name = "id", value = "删除变电站拓扑图", required = true)
+ public HttpResult removeRelation(@RequestParam String id) {
+ String methodDescribe = getMethodDescribe("removeRelation");
+ boolean b = substationRelationService.removeById(id);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
+ }
+
}
diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SubstationExpendMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SubstationExpendMapper.java
index ddadcc45e..bbb9a18cb 100644
--- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SubstationExpendMapper.java
+++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SubstationExpendMapper.java
@@ -3,6 +3,7 @@ package com.njcn.device.pms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
+import com.njcn.device.pms.pojo.vo.SubstationExpendVO;
import com.njcn.device.pms.pojo.po.SubstationExpend;
import org.apache.ibatis.annotations.Param;
@@ -18,5 +19,5 @@ import java.util.List;
*/
public interface SubstationExpendMapper extends BaseMapper {
- List getSubList(@Param("list") List list, @Param("param") StatisticsBizBaseParam param);
+ List getSubList(@Param("list") List list, @Param("param") StatisticsBizBaseParam param);
}
diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SubstationExpendMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SubstationExpendMapper.xml
index 25945a459..6fcddf5a2 100644
--- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SubstationExpendMapper.xml
+++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SubstationExpendMapper.xml
@@ -3,7 +3,7 @@
-