diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 97031c7..308c744 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,183 +5,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -224,8 +69,8 @@
-
-
+
+
@@ -236,30 +81,21 @@
+
+
+
+
-
-
-
-
+
+
-
-
-
-
-
-
-
@@ -357,6 +193,14 @@
+
+
+
+
+
+
+
+
diff --git a/bonus-modules/bonus-protection/bonus-protection.iml b/bonus-modules/bonus-protection/bonus-protection.iml
index 58bd392..dcd399e 100644
--- a/bonus-modules/bonus-protection/bonus-protection.iml
+++ b/bonus-modules/bonus-protection/bonus-protection.iml
@@ -11,12 +11,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -373,7 +373,7 @@
-
+
@@ -382,7 +382,7 @@
-
+
@@ -391,7 +391,7 @@
-
+
@@ -400,7 +400,7 @@
-
+
@@ -409,7 +409,7 @@
-
+
@@ -418,7 +418,7 @@
-
+
@@ -427,7 +427,7 @@
-
+
diff --git a/bonus-modules/bonus-protection/pom.xml b/bonus-modules/bonus-protection/pom.xml
index 379b207..efacc20 100644
--- a/bonus-modules/bonus-protection/pom.xml
+++ b/bonus-modules/bonus-protection/pom.xml
@@ -9,10 +9,10 @@
4.0.0
- bonus-zjgl
+ bonus-protection
- bonus-modules-smart-canteen智慧食堂
+ bonus-modules-smart-canteen保护定值
diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/BonusProtectionApplication.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/BonusProtectionApplication.java
index cc420fd..1e0475d 100644
--- a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/BonusProtectionApplication.java
+++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/BonusProtectionApplication.java
@@ -17,7 +17,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableCustomConfig
@EnableCustomSwagger2
@EnableScheduling
-@EnableRyFeignClients
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class BonusProtectionApplication
{
diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionAppManageController.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionAppManageController.java
new file mode 100644
index 0000000..c771659
--- /dev/null
+++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionAppManageController.java
@@ -0,0 +1,133 @@
+package com.bonus.canteen.core.protection.controller;
+
+import com.bonus.canteen.core.protection.service.ProtectionManageService;
+import com.bonus.canteen.core.protection.vo.ProtectionVo;
+import com.bonus.canteen.core.protection.vo.SubstationVo;
+import com.bonus.common.core.web.controller.BaseController;
+import com.bonus.common.core.web.domain.AjaxResult;
+import com.bonus.common.core.web.page.TableDataInfo;
+import com.bonus.common.log.annotation.SysLog;
+import com.bonus.common.log.enums.OperaType;
+import com.bonus.common.security.utils.SecurityUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Api(tags = "App保护定值接口")
+@RestController
+@RequestMapping("/protection_app_manage")
+public class ProtectionAppManageController extends BaseController {
+ @Resource
+ private ProtectionManageService protectionManageService;
+
+ /**
+ * 查询变电站信息列表
+ */
+ @ApiOperation(value = "查询变电站信息列表")
+ @GetMapping("/substation/list")
+ public Map list(SubstationVo substationVo) {
+ Map map=new HashMap<>();
+ List list=null;
+ try {
+ list= protectionManageService.selectSubstationList(substationVo);
+ map.put("data",list);
+ map.put("code",200);
+ map.put("res","成功");
+ }catch (Exception e){
+ map.put("data",list);
+ map.put("code",400);
+ map.put("res","失败");
+ }
+ return map;
+ }
+ /**
+ * 新增变电站信息
+ */
+ @ApiOperation(value = "新增变电站信息")
+ @SysLog(title = "变电站信息", businessType = OperaType.INSERT, logType = 1,module = "变电站管理->新增变电站信息")
+ @PostMapping("/substation/add")
+ public AjaxResult add(@RequestBody SubstationVo substationVo) {
+ String username = SecurityUtils.getUsername();
+ String userId=SecurityUtils.getUserId()+"";
+ Map map=new HashMap<>();
+ try {
+ substationVo.setCreateBy(userId);
+ return toAjax(protectionManageService.insertSubstation(substationVo));
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+ /**
+ * 编辑变电站信息
+ */
+ @ApiOperation(value = "编辑变电站信息")
+ @SysLog(title = "变电站信息", businessType = OperaType.INSERT, logType = 1,module = "变电站管理->编辑变电站信息")
+ @PostMapping("/substation/edit")
+ public AjaxResult edit(@RequestBody SubstationVo substationVo) {
+ Map map=new HashMap<>();
+ try {
+ return toAjax(protectionManageService.updateSubstation(substationVo));
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+ @ApiOperation(value = "删除变电站信息")
+ @SysLog(title = "变电站信息", businessType = OperaType.DELETE, logType = 1,module = "变电站管理->删除变电站信息")
+ @PostMapping("/substation/del")
+ public AjaxResult remove(@RequestBody SubstationVo substationVo) {
+ AjaxResult ar=new AjaxResult();
+ System.out.println(substationVo.getSubstationIds().toString());
+ Map map=new HashMap<>();
+ map=protectionManageService.deleteSubstation(substationVo.getSubstationIds());
+ int code=(int)map.get("code");
+ if(code==1){
+ return AjaxResult.success((String)map.get("msg"));
+ }else{
+ return AjaxResult.error((String)map.get("msg"));
+ }
+ }
+
+ /**
+ * 查询保护定值单信息列表
+ */
+ @ApiOperation(value = "查询保护定值单信息列表")
+ @GetMapping("/protectionOrder/list")
+ public Map orderlist(ProtectionVo protectionVo) {
+ Map map=new HashMap<>();
+ List list=null;
+ try {
+ list= protectionManageService.selectProtectionOrderList(protectionVo);
+ map.put("data",list);
+ map.put("code",200);
+ map.put("res","成功");
+ }catch (Exception e){
+ map.put("data",list);
+ map.put("code",400);
+ map.put("res","失败");
+ }
+ return map;
+ }
+
+ /**
+ * 新增/编辑保护定值单信息
+ */
+ @ApiOperation(value = "编辑保护定值单信息")
+ @SysLog(title = "保护定值单信息", businessType = OperaType.INSERT, logType = 1,module = "保护定值单管理->新增/编辑保护定值单信息")
+ @PostMapping("/protectionOrder/edit")
+ public AjaxResult editProtection(@RequestBody ProtectionVo protectionVo) {
+ Map map=new HashMap<>();
+ try {
+ return null;
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+}
diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionManageController.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionManageController.java
new file mode 100644
index 0000000..6d27edd
--- /dev/null
+++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionManageController.java
@@ -0,0 +1,167 @@
+package com.bonus.canteen.core.protection.controller;
+
+import com.bonus.canteen.core.certificate.vo.CertificateInfo;
+import com.bonus.canteen.core.protection.service.ProtectionManageService;
+import com.bonus.canteen.core.protection.vo.ProtectionVo;
+import com.bonus.canteen.core.protection.vo.SubstationVo;
+import com.bonus.common.core.web.controller.BaseController;
+import com.bonus.common.core.web.domain.AjaxResult;
+import com.bonus.common.core.web.page.TableDataInfo;
+import com.bonus.common.log.annotation.SysLog;
+import com.bonus.common.log.enums.OperaType;
+import com.bonus.common.security.utils.SecurityUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Api(tags = "保护定值接口")
+@RestController
+@RequestMapping("/protection_manage")
+public class ProtectionManageController extends BaseController {
+ @Resource
+ private ProtectionManageService protectionManageService;
+
+ /**
+ * 查询变电站信息列表
+ */
+ @ApiOperation(value = "查询变电站信息列表")
+ @GetMapping("/substation/list")
+ public TableDataInfo list(SubstationVo substationVo) {
+ startPage();
+ List list = protectionManageService.selectSubstationList(substationVo);
+ return getDataTable(list);
+ }
+ /**
+ * 新增变电站信息
+ */
+ @ApiOperation(value = "新增变电站信息")
+ @SysLog(title = "变电站信息", businessType = OperaType.INSERT, logType = 1,module = "变电站管理->新增变电站信息")
+ @PostMapping("/substation/add")
+ public AjaxResult add(@RequestBody SubstationVo substationVo) {
+ String username = SecurityUtils.getUsername();
+ String userId=SecurityUtils.getUserId()+"";
+ Map map=new HashMap<>();
+ try {
+ substationVo.setCreateBy(userId);
+ return toAjax(protectionManageService.insertSubstation(substationVo));
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+ /**
+ * 编辑变电站信息
+ */
+ @ApiOperation(value = "编辑变电站信息")
+ @SysLog(title = "变电站信息", businessType = OperaType.INSERT, logType = 1,module = "变电站管理->编辑变电站信息")
+ @PostMapping("/substation/edit")
+ public AjaxResult edit(@RequestBody SubstationVo substationVo) {
+ Map map=new HashMap<>();
+ try {
+ return toAjax(protectionManageService.updateSubstation(substationVo));
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+ @ApiOperation(value = "删除变电站信息")
+ @SysLog(title = "变电站信息", businessType = OperaType.DELETE, logType = 1,module = "变电站管理->删除变电站信息")
+ @PostMapping("/substation/del")
+ public AjaxResult remove(@RequestBody SubstationVo substationVo) {
+ AjaxResult ar=new AjaxResult();
+ System.out.println(substationVo.getSubstationIds().toString());
+ Map map=new HashMap<>();
+ map=protectionManageService.deleteSubstation(substationVo.getSubstationIds());
+ int code=(int)map.get("code");
+ if(code==1){
+ return AjaxResult.success((String)map.get("msg"));
+ }else{
+ return AjaxResult.error((String)map.get("msg"));
+ }
+ }
+
+ /**
+ * 查询保护定值单信息列表
+ */
+ @ApiOperation(value = "查询保护定值单信息列表")
+ @GetMapping("/protectionOrder/list")
+ public TableDataInfo orderlist(ProtectionVo protectionVo) {
+ startPage();
+ List list = protectionManageService.selectProtectionOrderList(protectionVo);
+ return getDataTable(list);
+ }
+
+ /**
+ * 查询保护定值单信息列表
+ */
+ @ApiOperation(value = "查询保护定值单信息详情")
+ @GetMapping("/protectionOrder/detail")
+ public Map detail(ProtectionVo protectionVo) {
+ Map map = protectionManageService.getDetail(protectionVo);
+ return map;
+ }
+
+ /**
+ * 新增/编辑保护定值单信息
+ */
+ @ApiOperation(value = "编辑保护定值单信息")
+ @SysLog(title = "保护定值单信息", businessType = OperaType.INSERT, logType = 1,module = "保护定值单管理->新增/编辑保护定值单信息")
+ @PostMapping("/protectionOrder/edit")
+ public Map editProtection(@RequestBody ProtectionVo protectionVo) {
+ Map map=new HashMap<>();
+ try {
+ map=protectionManageService.editProtection(protectionVo);
+ return map;
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+
+ /**
+ * 删除保护定值单信息
+ */
+ @ApiOperation(value = "删除保护定值单信息")
+ @SysLog(title = "保护定值单信息", businessType = OperaType.INSERT, logType = 1,module = "保护定值单管理->删除保护定值单信息")
+ @PostMapping("/protectionOrder/del")
+ public AjaxResult delProtection(@RequestBody ProtectionVo protectionVo) {
+ try {
+ return toAjax(protectionManageService.delProtection(protectionVo));
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+
+ /**
+ * 屏幕识别
+ */
+ @ApiOperation(value = "屏幕识别")
+ @SysLog(title = "屏幕识别", businessType = OperaType.INSERT, logType = 1,module = "保护定值单管理->屏幕识别")
+ @PostMapping("/protectionAnalysis/check")
+ public AjaxResult check(@RequestBody ProtectionVo protectionVo) {
+ Map map=new HashMap<>();
+ try {
+ return toAjax(protectionManageService.analysisCheck(protectionVo));
+ } catch (Exception e) {
+ return error(e.getMessage());
+ }
+ }
+
+ /**
+ * 查询保护定值单识别信息列表
+ */
+ @ApiOperation(value = "查询保护定值单识别信息列表")
+ @GetMapping("/protectionAnalysis/list")
+ public TableDataInfo analysislist(ProtectionVo protectionVo) {
+ startPage();
+ List list = protectionManageService.selectProtectionAnalysisList(protectionVo);
+ return getDataTable(list);
+ }
+
+}
diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/mapper/ProtectionManageMapper.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/mapper/ProtectionManageMapper.java
new file mode 100644
index 0000000..c72164e
--- /dev/null
+++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/mapper/ProtectionManageMapper.java
@@ -0,0 +1,72 @@
+package com.bonus.canteen.core.protection.mapper;
+
+import com.bonus.canteen.core.certificate.vo.CertificateInfo;
+import com.bonus.canteen.core.certificate.vo.CertificateRecord;
+import com.bonus.canteen.core.certificate.vo.UserInfo;
+import com.bonus.canteen.core.protection.vo.ProtectionResultVo;
+import com.bonus.canteen.core.protection.vo.ProtectionVo;
+import com.bonus.canteen.core.protection.vo.SubstationVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 证件信息Mapper接口
+ *
+ * @author xsheng
+ * @date 2025-05-25
+ */
+public interface ProtectionManageMapper {
+
+ /**
+ * 查询变电站信息列表
+ *
+ * @param substationVo 变电站信息
+ * @return 变电站信息集合
+ */
+ public List selectSubstationList(SubstationVo substationVo);
+
+ public List selectSubstationListByName(SubstationVo substationVo);
+
+ public int insertSubstation(SubstationVo substationVo);
+
+ public int updateSubstation(SubstationVo substationVo);
+
+ public int deleteSubstation(@Param("substationIds") String[] substationIds);
+
+ public List getProtectionBySubstationIds(@Param("substationIds") String[] substationIds);
+
+ public int editProtection(ProtectionVo protectionVo);
+
+ public int deleteProtectionInfo(@Param("protectionId") String protectionId);
+ public int deleteHeadInfo(@Param("protectionId") String protectionId);
+ public int deleteDeviceInfo(@Param("protectionId") String protectionId);
+ public int deleteBhdzInfo(@Param("protectionId") String protectionId);
+ public int deleteBhdzValueInfo(@Param("protectionId") String protectionId);
+ public int deleteKzzInfo(@Param("protectionId") String protectionId);
+ public int deleteKzzValueInfo(@Param("protectionId") String protectionId);
+ public int deleteImgInfo(@Param("protectionId") String protectionId);
+
+ public List selectProtectionOrderList(ProtectionVo protectionVo);
+
+ public int insertProtectionOrder(ProtectionVo protectionVo);
+ public int updateProtectionOrder(ProtectionVo protectionVo);
+ public int insertProtectionImg(ProtectionVo protectionVo);
+
+ public int insertProtectionHead(ProtectionVo protectionVo);
+ public int insertProtectionSbcs(ProtectionVo protectionVo);
+
+ public int insertProtectionBhdz(ProtectionVo protectionVo);
+ public int insertProtectionBhdzValue(ProtectionVo protectionVo);
+
+ public int insertProtectionKzz(ProtectionVo protectionVo);
+ public int insertProtectionKzzValue(ProtectionVo protectionVo);
+
+ public List selectDetailByHead(ProtectionVo protectionVo);
+ public List selectDetailBySbcs(ProtectionVo protectionVo);
+ public List selectDetailByBhdz(ProtectionVo protectionVo);
+ public List selectDetailByKzz(ProtectionVo protectionVo);
+
+ public List selectProtectionAnalysisList(ProtectionVo protectionVo);
+
+}
diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/ProtectionManageService.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/ProtectionManageService.java
new file mode 100644
index 0000000..ec1aacd
--- /dev/null
+++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/ProtectionManageService.java
@@ -0,0 +1,47 @@
+package com.bonus.canteen.core.protection.service;
+
+import com.bonus.canteen.core.certificate.vo.CertificateInfo;
+import com.bonus.canteen.core.certificate.vo.CertificateRecord;
+import com.bonus.canteen.core.protection.vo.ProtectionVo;
+import com.bonus.canteen.core.protection.vo.SubstationVo;
+import com.bonus.common.core.web.domain.AjaxResult;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 证件信息Service接口
+ *
+ * @author xsheng
+ * @date 2025-05-25
+ */
+public interface ProtectionManageService {
+
+ /**
+ * 查询变电站信息列表
+ *
+ * @param substationVo 证件信息
+ * @return 证件信息集合
+ */
+ public List selectSubstationList(SubstationVo substationVo);
+
+ public int insertSubstation(SubstationVo substationVo);
+
+ public int updateSubstation(SubstationVo substationVo);
+
+ public Map deleteSubstation(String[] substationIds);
+
+ public List selectProtectionOrderList(ProtectionVo protectionVo);
+
+ public Map getDetail(ProtectionVo protectionVo);
+
+ public Map editProtection(ProtectionVo protectionVo);
+
+ public int delProtection(ProtectionVo protectionVo);
+
+ public int analysisCheck(ProtectionVo protectionVo);
+
+ public List selectProtectionAnalysisList(ProtectionVo protectionVo);
+
+}
diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/imp/ProtectionManageServiceImpl.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/imp/ProtectionManageServiceImpl.java
new file mode 100644
index 0000000..e93c7e5
--- /dev/null
+++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/imp/ProtectionManageServiceImpl.java
@@ -0,0 +1,417 @@
+package com.bonus.canteen.core.protection.service.imp;
+
+import com.bonus.canteen.core.certificate.vo.CertificateInfo;
+import com.bonus.canteen.core.protection.mapper.ProtectionManageMapper;
+import com.bonus.canteen.core.protection.service.ProtectionManageService;
+import com.bonus.canteen.core.protection.vo.ProtectionResultVo;
+import com.bonus.canteen.core.protection.vo.ProtectionVo;
+import com.bonus.canteen.core.protection.vo.SubstationVo;
+import com.bonus.canteen.core.utils.BnsUtils;
+import com.bonus.canteen.core.utils.ImgAnalysisUtils;
+import com.bonus.canteen.core.utils.OcrService;
+import com.bonus.common.core.exception.ServiceException;
+import com.bonus.common.core.utils.DateUtils;
+import com.bonus.common.security.utils.SecurityUtils;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.util.*;
+
+/**
+ * 证件信息Service业务层处理
+ *
+ * @author xsheng
+ * @date 2025-05-25
+ */
+@Service
+public class ProtectionManageServiceImpl implements ProtectionManageService {
+ @Resource
+ private ProtectionManageMapper protectionManageMapper;
+ @Resource
+ private OcrService ocrService;
+
+ /**
+ * 查询变电站信息
+ *
+ * @param substationVo
+ * @return 变电站信息
+ */
+ @Override
+ public List selectSubstationList(SubstationVo substationVo) {
+ return protectionManageMapper.selectSubstationList(substationVo);
+ }
+
+ @Override
+ public int insertSubstation(SubstationVo substationVo) {
+ int num=0;
+ try{
+ substationVo.setCreateTime(DateUtils.getNowDate());
+ substationVo.setUpdateTime(DateUtils.getNowDate());
+ Long userid = SecurityUtils.getUserId();
+ substationVo.setCreateBy(String.valueOf(userid));
+ num=protectionManageMapper.insertSubstation(substationVo);
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ return num;
+ }
+
+ @Override
+ public int updateSubstation(SubstationVo substationVo) {
+ int num=0;
+ try{
+ substationVo.setUpdateTime(DateUtils.getNowDate());
+ Long userid = SecurityUtils.getUserId();
+ substationVo.setUpdateBy(String.valueOf(userid));
+ checkSubstation(substationVo);
+ num=protectionManageMapper.updateSubstation(substationVo);
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ return num;
+ }
+ void checkSubstation(SubstationVo substationVo) {
+ List list=protectionManageMapper.selectSubstationListByName(substationVo);
+ if(list!=null&&list.size()>0){
+ throw new ServiceException("变电站已存在");
+ }
+ }
+ /**
+ * 批量删除变电站信息
+ *
+ * @param substationIds 需要删除的变电站信息主键
+ * @return 结果
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Map deleteSubstation(String[] substationIds) {
+ Map map=new HashMap<>();
+ try{
+ List list=protectionManageMapper.getProtectionBySubstationIds(substationIds);
+ if(list!=null&&list.size()>0){
+ map.put("code",0);
+ String msg="";
+ for(SubstationVo vo:list){
+ msg=msg+vo.getSubstationName()+"("+vo.getProtectionName()+") ";
+ }
+ msg=msg+"。以上变电站已存储无法删除!";
+ map.put("msg",msg);
+ }else{
+ int d=protectionManageMapper.deleteSubstation(substationIds);
+ map.put("code",1);
+ map.put("msg","删除成功!");
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ map.put("code",0);
+ map.put("msg",e.getMessage());
+ }
+ return map;
+ }
+
+ /**
+ * 查询定值单信息
+ *
+ * @param protectionVo
+ * @return 定值单信息
+ */
+ @Override
+ public List selectProtectionOrderList(ProtectionVo protectionVo) {
+ return protectionManageMapper.selectProtectionOrderList(protectionVo);
+ }
+ /**
+ * 查询定值单详情信息
+ *
+ * @param protectionVo
+ * @return 定值单详情信息
+ */
+ @Override
+ public Map getDetail(ProtectionVo protectionVo) {
+ Map map=new HashMap<>();
+ try{
+ List headlist=protectionManageMapper.selectDetailByHead(protectionVo);
+ List sbcslist=protectionManageMapper.selectDetailBySbcs(protectionVo);
+ List bhdzlist=protectionManageMapper.selectDetailByBhdz(protectionVo);
+ List kzzlist=protectionManageMapper.selectDetailByKzz(protectionVo);
+ map.put("head",headlist);
+ map.put("sbcs",sbcslist);
+ map.put("bhdz",bhdzlist);
+ map.put("kzz",kzzlist);
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ return map;
+ }
+ @Override
+ public Map editProtection(ProtectionVo protectionVo) {
+ int num=0;
+ Map resMap=new HashMap<>();
+ resMap.put("code",400);
+ ObjectMapper objectMapper = new ObjectMapper();
+ Long userid = SecurityUtils.getUserId();
+ String substationId="";
+ ProtectionVo pvo=new ProtectionVo();
+ int headflage=0;
+ int sbcsflage=0;
+ Map bhdzcheckmap=new HashMap<>();
+ Map kzzcheckmap=new HashMap<>();
+ int bhdzflage=0;
+ int kzzflage=0;
+ try{
+ if(protectionVo.getCheckUrlList()!=null&&protectionVo.getCheckUrlList().length>0){
+ for(int n=0;n allObject = objectMapper.readValue(restr, new TypeReference