From 3b695d4f48018197f2e70a43f542cb0528755deb Mon Sep 17 00:00:00 2001 From: jiask <1069621233@qq.com> Date: Wed, 29 Oct 2025 14:43:36 +0800 Subject: [PATCH] jsk --- .idea/workspace.xml | 232 ++-------- .../bonus-protection/bonus-protection.iml | 26 +- bonus-modules/bonus-protection/pom.xml | 4 +- .../core/BonusProtectionApplication.java | 1 - .../ProtectionAppManageController.java | 133 ++++++ .../ProtectionManageController.java | 167 +++++++ .../mapper/ProtectionManageMapper.java | 72 +++ .../service/ProtectionManageService.java | 47 ++ .../imp/ProtectionManageServiceImpl.java | 417 ++++++++++++++++++ .../protection/vo/ProtectionResultVo.java | 15 + .../core/protection/vo/ProtectionVo.java | 65 +++ .../core/protection/vo/SubstationVo.java | 20 + .../bonus/canteen/core/utils/BnsUtils.java | 59 ++- .../canteen/core/utils/ImgAnalysisUtils.java | 260 +++++++++++ .../bonus/canteen/core/utils/OcrService.java | 180 ++++++++ .../resources/bootstrap-protection_local.yml | 13 +- .../src/main/resources/logback.xml | 2 +- .../protection/ProtectionManageMapper.xml | 417 ++++++++++++++++++ .../classes/bootstrap-protection_local.yml | 13 +- .../bonus/canteen/core/utils/BnsUtils.class | Bin 5558 -> 7849 bytes .../target/classes/logback.xml | 2 +- .../app/feign/OtherServiceClient.java | 2 +- bonus-modules/pom.xml | 2 +- 23 files changed, 1926 insertions(+), 223 deletions(-) create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionAppManageController.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/controller/ProtectionManageController.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/mapper/ProtectionManageMapper.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/ProtectionManageService.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/service/imp/ProtectionManageServiceImpl.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionResultVo.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionVo.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/SubstationVo.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/ImgAnalysisUtils.java create mode 100644 bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/OcrService.java create mode 100644 bonus-modules/bonus-protection/src/main/resources/mapper/protection/ProtectionManageMapper.xml 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + - - - 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>(){}); + Map headmap=(Map)allObject.get("head"); + if (headmap != null && !headmap.isEmpty()) { + if (headmap != null && !headmap.isEmpty()&&headflage==0) { + List headList=new ArrayList<>(); + for (Map.Entry entry : headmap.entrySet()) { + String keyname=entry.getKey(); + String valuename=entry.getValue().toString(); + ProtectionVo headvo=new ProtectionVo(); + headvo.setKeyName(keyname); + headvo.setValueName(valuename); + headList.add(headvo); + if("设备所属".equals(keyname)){ + SubstationVo sub=new SubstationVo(); + sub.setSubstationName(valuename); + List subs=protectionManageMapper.selectSubstationListByName(sub); + if(subs!=null&&subs.size()>0){ + substationId=subs.get(0).getSubstationId(); + }else{ + sub.setCreateTime(DateUtils.getNowDate()); + sub.setUpdateTime(DateUtils.getNowDate()); + sub.setCreateBy(String.valueOf(userid)); + protectionManageMapper.insertSubstation(sub); + substationId=sub.getSubstationId(); + } + } + } + for(ProtectionVo vo:headList){ + if("通知书名称".equals(vo.getKeyName())){ + pvo.setProtectionName(vo.getValueName()); + } + if("定值单编号".equals(vo.getKeyName())){ + pvo.setProtectionCode(vo.getValueName()); + } + if("日期".equals(vo.getKeyName())){ + pvo.setProtectionDate(vo.getValueName()); + } + if("页码".equals(vo.getKeyName())){ + pvo.setProtectionDate(vo.getValueName()); + } + if("设备所属".equals(vo.getKeyName())){ + pvo.setDeviceName(vo.getValueName()); + } + if("一次设备名称".equals(vo.getKeyName())){ + pvo.setOneDevice(vo.getValueName()); + } + if("保护装置名称".equals(vo.getKeyName())){ + pvo.setProtectionDevice(vo.getValueName()); + } + if("保护装置型号".equals(vo.getKeyName())){ + pvo.setProtectionDeviceModel(vo.getValueName()); + } + if("装置版本".equals(vo.getKeyName())){ + pvo.setProtectionDeviceVersion(vo.getValueName()); + } + if("备注".equals(vo.getKeyName())){ + pvo.setRemark(vo.getValueName()); + } + } + //录入订单 + pvo.setCreateTime(DateUtils.getNowDate()); + pvo.setUpdateTime(DateUtils.getNowDate()); + pvo.setCreateBy(String.valueOf(userid)); + pvo.setSubstationId(substationId); + pvo.setImgUrl(protectionVo.getCheckUrlList()[0]); + pvo.setImgName(protectionVo.getCheckUrlNameList()[0]); + pvo.setProtectionId(protectionVo.getProtectionId()); + pvo.setType(protectionVo.getType()); + if(protectionVo.getProtectionId()!=null&&!"".equals(protectionVo.getProtectionId())){ + protectionManageMapper.updateProtectionOrder(pvo); + }else{ + protectionManageMapper.insertProtectionOrder(pvo); + } + protectionManageMapper.deleteHeadInfo(protectionVo.getProtectionId()); + protectionManageMapper.deleteDeviceInfo(protectionVo.getProtectionId()); + protectionManageMapper.deleteBhdzInfo(protectionVo.getProtectionId()); + protectionManageMapper.deleteBhdzValueInfo(protectionVo.getProtectionId()); + protectionManageMapper.deleteKzzInfo(protectionVo.getProtectionId()); + protectionManageMapper.deleteKzzValueInfo(protectionVo.getProtectionId()); + protectionManageMapper.deleteImgInfo(protectionVo.getProtectionId()); + //录入头部 + for(ProtectionVo vo:headList){ + vo.setProtectionId(pvo.getProtectionId()); + vo.setAttributeValue(vo.getValueName()); + vo.setAttributeKey(vo.getKeyName()); + vo.setCreateTime(DateUtils.getNowDate()); + vo.setUpdateTime(DateUtils.getNowDate()); + vo.setCreateBy(String.valueOf(userid)); + headflage=protectionManageMapper.insertProtectionHead(vo); + } + } + if(headflage>0){ + ProtectionVo imgvo=new ProtectionVo(); + imgvo.setProtectionId(pvo.getProtectionId()); + imgvo.setImgUrl(protectionVo.getCheckUrlList()[n]); + imgvo.setCreateTime(DateUtils.getNowDate()); + imgvo.setUpdateTime(DateUtils.getNowDate()); + imgvo.setCreateBy(String.valueOf(userid)); + protectionManageMapper.insertProtectionImg(imgvo); + //录入设备参数 + Map sbcsmap=(Map)allObject.get("sbcs"); + if (sbcsmap != null && !sbcsmap.isEmpty()&&sbcsflage==0){ + for (Map.Entry entry : sbcsmap.entrySet()) { + String keyname=entry.getKey(); + String valuename=entry.getValue().toString(); + ProtectionVo vo=new ProtectionVo(); + vo.setProtectionId(pvo.getProtectionId()); + vo.setAttributeValue(valuename); + vo.setAttributeKey(keyname); + vo.setCreateTime(DateUtils.getNowDate()); + vo.setUpdateTime(DateUtils.getNowDate()); + vo.setCreateBy(String.valueOf(userid)); + sbcsflage=protectionManageMapper.insertProtectionSbcs(vo); + } + } + //录入保护定值 + List> bhdzmaps=(List>)allObject.get("bhdz"); + if (bhdzmaps != null && !bhdzmaps.isEmpty()){ + int k=1; + for(Map bhdzmap:bhdzmaps){ + int kk=1; + for (Map.Entry entry : bhdzmap.entrySet()) { + String keyname=entry.getKey(); + String valuename=entry.getValue().toString(); + ProtectionVo keyvo=new ProtectionVo(); + keyvo.setProtectionId(pvo.getProtectionId()); + keyvo.setAttributeKey(keyname); + keyvo.setOrderNum(kk+""); + keyvo.setCreateBy(String.valueOf(userid)); + keyvo.setType("1"); + if(k==1&&bhdzflage==0){ + protectionManageMapper.insertProtectionBhdz(keyvo); + bhdzcheckmap.put(keyname,keyvo.getAttributeId()); + } + kk++; + ProtectionVo vo=new ProtectionVo(); + vo.setAttributeId((String)bhdzcheckmap.get(keyname)); + vo.setAttributeValue(valuename); + vo.setBelong(k+""); + vo.setProtectionId(pvo.getProtectionId()); + vo.setCreateBy(String.valueOf(userid)); + protectionManageMapper.insertProtectionBhdzValue(vo); + } + bhdzflage=1; + k++; + } + } + //录入控制字 + List> kzzmaps=(List>)allObject.get("kzz"); + if (kzzmaps != null && !kzzmaps.isEmpty()){ + int j=1; + for(Map kzzmap:kzzmaps){ + int jj=1; + for (Map.Entry entry : kzzmap.entrySet()) { + String keyname=entry.getKey(); + String valuename=entry.getValue().toString(); + ProtectionVo keyvo=new ProtectionVo(); + keyvo.setProtectionId(pvo.getProtectionId()); + keyvo.setAttributeKey(keyname); + keyvo.setOrderNum(jj+""); + keyvo.setCreateBy(String.valueOf(userid)); + keyvo.setType("2"); + if(j==1&&kzzflage==0){ + protectionManageMapper.insertProtectionKzz(keyvo); + kzzmap.put(keyname,keyvo.getAttributeId()); + } + jj++; + ProtectionVo vo=new ProtectionVo(); + vo.setAttributeId((String)kzzmap.get(keyname)); + vo.setAttributeValue(valuename); + vo.setBelong(j+""); + vo.setProtectionId(pvo.getProtectionId()); + vo.setCreateBy(String.valueOf(userid)); + protectionManageMapper.insertProtectionKzzValue(vo); + } + kzzflage=1; + j++; + } + } + } + }else{ + resMap.put("msg","模型错误"); + } + } + resMap.put("code",200); + resMap.put("msg","操作成功!"); + }else{ + return resMap; + } + num=1; + }catch (Exception e){ + resMap.put("msg",e.getMessage()); + e.printStackTrace(); + } + return resMap; + } + + @Override + public int delProtection(ProtectionVo protectionVo) { + int num = 0; + try { + String[] protectionIds=protectionVo.getProtectionIds(); + for(int i=0;i0) { + for (int n = 0; n < protectionVo.getCheckUrlList().length; n++) { + protectionVo.setImgUrl(protectionVo.getCheckUrlList()[n]); + File file = BnsUtils.getFile(protectionVo.getImgUrl(), protectionVo.getCheckUrlNameList()[n]); + String restr = ocrService.callOcrServiceApp(file); + System.err.println(restr); + Map allObject = objectMapper.readValue(restr, new TypeReference>() {}); + } + } + num=1; + }catch (Exception e){ + e.printStackTrace(); + } + return num; + } + + @Override + public List selectProtectionAnalysisList(ProtectionVo protectionVo) { + return protectionManageMapper.selectProtectionAnalysisList(protectionVo); + } +} diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionResultVo.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionResultVo.java new file mode 100644 index 0000000..b2daf92 --- /dev/null +++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionResultVo.java @@ -0,0 +1,15 @@ +package com.bonus.canteen.core.protection.vo; + +import com.bonus.canteen.core.common.utils.FileUrlUtil; +import com.bonus.common.core.web.domain.BaseEntity; +import lombok.Data; +import lombok.ToString; + +import java.util.List; + +@Data +@ToString +public class ProtectionResultVo { + private String attributeKey; + private String attributeValue; +} diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionVo.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionVo.java new file mode 100644 index 0000000..00d1e68 --- /dev/null +++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/ProtectionVo.java @@ -0,0 +1,65 @@ +package com.bonus.canteen.core.protection.vo; + +import com.bonus.canteen.core.common.utils.FileUrlUtil; +import com.bonus.common.core.web.domain.BaseEntity; +import lombok.Data; +import lombok.ToString; + +import java.util.List; + +@Data +@ToString +public class ProtectionVo extends BaseEntity { + + private String id; + /** 变电站ID */ + private String substationId; + /** 变电站名称 */ + private String substationName; + /** 保护定值单ID */ + private String protectionId; + /** 保护定值单名称 */ + private String protectionName; + /** 保护定值单编号 */ + private String protectionCode; + /** 保护定值单日期 */ + private String protectionDate; + private String deviceName; + /** 一次设备 */ + private String oneDevice; + /** 保护设备 */ + private String protectionDevice; + /** 保护设备型号 */ + private String protectionDeviceModel; + /** 保护设备版本 */ + private String protectionDeviceVersion; + /** 备注 */ + private String remark; + /** 说明 */ + private String description; + private String pageNo; + private String imgUrl; + private String imgName; + private String[] checkUrlList; + private String[] checkUrlNameList; + + private String keyName; + private String valueName; + + private String attributeKey; + private String attributeValue; + private String attributeId; + private List protectionVos; + + private String belong; + private String orderNum; + private String valueId; + private String keyWord; + private String type; + private String analysisDate; + private String[] protectionIds; + + public String getImgUrl() { + return FileUrlUtil.getFileUrl(this.imgUrl); + } +} diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/SubstationVo.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/SubstationVo.java new file mode 100644 index 0000000..319a303 --- /dev/null +++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/protection/vo/SubstationVo.java @@ -0,0 +1,20 @@ +package com.bonus.canteen.core.protection.vo; + +import com.bonus.common.core.web.domain.BaseEntity; +import lombok.Data; +import lombok.ToString; + +@Data +@ToString +public class SubstationVo extends BaseEntity { + + private String substationId; + private String substationName; + private String runTime; + private String remark; + private String keyWord; + private String[] substationIds; + private String userId; + private String protectionName; + +} diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/BnsUtils.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/BnsUtils.java index 275864f..a0206b9 100644 --- a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/BnsUtils.java +++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/BnsUtils.java @@ -7,7 +7,10 @@ import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import java.beans.PropertyDescriptor; -import java.io.IOException; +import java.io.*; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; import java.util.Calendar; import java.util.HashSet; import java.util.Set; @@ -166,4 +169,58 @@ public class BnsUtils { } } + public static File getFile(String url, String fileName) throws Exception { + //对本地文件命名 + File file = null; + String prefix=""; + String suffix=""; + prefix = fileName.substring(0,fileName.lastIndexOf(".")); + suffix = fileName.substring(fileName.lastIndexOf("."),fileName.length()); + URL urlfile; + InputStream inStream = null; + OutputStream os = null; + try { + file = File.createTempFile(prefix,suffix); + //下载 + urlfile = new URL(url); + inStream = urlfile.openStream(); + os = new FileOutputStream(file); + + int bytesRead = 0; + byte[] buffer = new byte[8192]; + while ((bytesRead = inStream.read(buffer, 0, 8192)) != -1) { + os.write(buffer, 0, bytesRead); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (null != os) { + os.close(); + } + if (null != inStream) { + inStream.close(); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + return file; + } + + + public static File downloadImageToTempFile(String imageUrl) throws IOException { + URL url = new URL(imageUrl); + String suffix=""; + suffix = imageUrl.substring(imageUrl.lastIndexOf("."),imageUrl.length()); + // 创建临时文件 + File tempFile = File.createTempFile("temp-image", suffix); + + try (InputStream in = url.openStream()) { + // 复制URL输入流到临时文件 + Files.copy(in, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING); + } + return tempFile; + } } diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/ImgAnalysisUtils.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/ImgAnalysisUtils.java new file mode 100644 index 0000000..8f65c13 --- /dev/null +++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/ImgAnalysisUtils.java @@ -0,0 +1,260 @@ +package com.bonus.canteen.core.utils; + +import com.alibaba.fastjson.JSONObject; +import com.bonus.common.core.exception.ServiceException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import okhttp3.*; +import org.json.JSONArray; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.BeanWrapper; +import org.springframework.beans.BeanWrapperImpl; + +import java.beans.PropertyDescriptor; +import java.util.*; + +/** + * @author jsk + * @date 2025/10/25 17:25 + */ +public class ImgAnalysisUtils { + public static Map getImgAnalysis(String imgUrl){ + Map map=new HashMap<>(); + try{ + String headstr=getHeadString(); + // 创建ObjectMapper对象 + ObjectMapper objectMapper = new ObjectMapper(); + // 将json字符串转换成Map + Map headObject = objectMapper.readValue(headstr, new TypeReference>(){}); + map.put("head",headObject); + + String sbcsstr=getSbcsString(); + Map sbcsObject = objectMapper.readValue(sbcsstr, new TypeReference>(){}); + map.put("sbcs",sbcsObject.get("设备参数")); + + String bhdzstr=getBhdzString(); + JSONArray jsonArray = new JSONArray(bhdzstr); + List> bhdzlist = new ArrayList<>(); + for (int i = 0; i < jsonArray.length(); i++) { + org.json.JSONObject jsonObjectd = jsonArray.getJSONObject(i); + Map Objectd = objectMapper.readValue(jsonObjectd.toString(), new TypeReference>(){}); + bhdzlist.add(Objectd); + } + map.put("bhdz",bhdzlist); + + String kzzstr=getKzzString(); + JSONArray jsonArray2 = new JSONArray(kzzstr); + List> kzzlist = new ArrayList<>(); + for (int i = 0; i < jsonArray2.length(); i++) { + org.json.JSONObject jsonObjectd = jsonArray2.getJSONObject(i); + Map Objectd = objectMapper.readValue(jsonObjectd.toString(), new TypeReference>(){}); + kzzlist.add(Objectd); + } + map.put("kzz",kzzlist); + }catch (Exception e){ + e.printStackTrace(); + } + return map; + } + static String getHeadString(){ + return "{\n" + + " \"通知书名称\": \"阜阳电网继电保护装置整定值通知书\",\n" + + " \"定值单编号\": \"FY425143\",\n" + + " \"页码\": \"第1页 共2页\",\n" + + " \"日期\": \"2025年6月8日\",\n" + + " \"设备所属\": \"居士变\",\n" + + " \"一次设备名称\": \"1#电容器\",\n" + + " \"保护装置名称\": \"微机电容器保护\",\n" + + " \"保护装置型号\": \"PAC-8231B-GZK\",\n" + + " \"装置版本\": \"V2.00\",\n" + + " \"备注\": \"新设备投运\"\n" + + "}"; + } + static String getSbcsString(){ + return "{\n" + + " \"设备参数\": {\n" + + " \"不平衡保护CT一次值(安)\": \"1\",\n" + + " \"定值区号\": \"1\",\n" + + " \"被保护设备\": \"1#电容器\",\n" + + " \"不平衡保护CT二次值(安)\": \"5\",\n" + + " \"PT一次值(千伏)\": \"10\",\n" + + " \"零序CT一次值(安)\": \"1\",\n" + + " \"不平衡保护PT一次值(千伏)\": \"10\",\n" + + " \"零序CT二次值(安)\": \"5\",\n" + + " \"不平衡保护PT二次值(伏)\": \"100\",\n" + + " \"保护CT一次值(安)\": \"1000\",\n" + + " \"保护CT二次值(安)\": \"5\"\n" + + " }\n" + + "}"; + } + static String getBhdzString(){ + return "[\n" + + " {\n" + + " \"序号\": \"1\",\n" + + " \"定值名称\": \"过流I段定值(安)\",\n" + + " \"一次值\": \"989.75\",\n" + + " \"二次值\": \"4.95\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"2\",\n" + + " \"定值名称\": \"过流I段时间(秒)\",\n" + + " \"一次值\": \"0.2\",\n" + + " \"二次值\": \"0.2\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"3\",\n" + + " \"定值名称\": \"过流Ⅱ段定值(安)\",\n" + + " \"一次值\": \"395.9\",\n" + + " \"二次值\": \"1.98\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"4\",\n" + + " \"定值名称\": \"过流ⅡI段时间(秒)\",\n" + + " \"一次值\": \"0.5\",\n" + + " \"二次值\": \"0.5\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"5\",\n" + + " \"定值名称\": \"零序过流1段定值(安)\",\n" + + " \"一次值\": \"60\",\n" + + " \"二次值\": \"0.3\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"6\",\n" + + " \"定值名称\": \"零序过流I段时间(秒)\",\n" + + " \"一次值\": \"1.6\",\n" + + " \"二次值\": \"1.6\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"7\",\n" + + " \"定值名称\": \"零序过流Ⅱ段定值(安)\",\n" + + " \"一次值\": \"40\",\n" + + " \"二次值\": \"0.2\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"8\",\n" + + " \"定值名称\": \"零序过流Ⅱ段时间(秒)\",\n" + + " \"一次值\": \"1.8\",\n" + + " \"二次值\": \"1.8\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"9\",\n" + + " \"定值名称\": \"过电压定值(伏)\",\n" + + " \"一次值\": \"\",\n" + + " \"二次值\": \"115.5\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"10\",\n" + + " \"定值名称\": \"过电压时间(秒)\",\n" + + " \"一次值\": \"3\",\n" + + " \"二次值\": \"3\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"11\",\n" + + " \"定值名称\": \"低电压定值(伏)\",\n" + + " \"一次值\": \"\",\n" + + " \"二次值\": \"52.5\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"12\",\n" + + " \"定值名称\": \"低电压时间(秒)\",\n" + + " \"一次值\": \"1\",\n" + + " \"二次值\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"13\",\n" + + " \"定值名称\": \"低电压闭锁电流定值(安)\",\n" + + " \"一次值\": \"118.7\",\n" + + " \"二次值\": \"0.59\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"14\",\n" + + " \"定值名称\": \"不平衡电压定值(伏)\",\n" + + " \"二次值\": \"1.8\",\n" + + " \"一次值\": \"\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"15\",\n" + + " \"定值名称\": \"不平衡电压时间(秒)\",\n" + + " \"一次值\": \"0.2\",\n" + + " \"二次值\": \"0.2\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"16\",\n" + + " \"定值名称\": \"不平衡电流定值(安)\",\n" + + " \"二次值\": \"20\",\n" + + " \"一次值\": \"\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"17\",\n" + + " \"定值名称\": \"不平衡电流时间(秒)\",\n" + + " \"一次值\": \"10\",\n" + + " \"二次值\": \"10\"\n" + + " }\n" + + "]"; + } + static String getKzzString(){ + return "[\n" + + " {\n" + + " \"序号\": \"1\",\n" + + " \"控制字名称\": \"过流1段\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"2\",\n" + + " \"控制字名称\": \"过流1段\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"3\",\n" + + " \"控制字名称\": \"零序电流采用自产零流\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"4\",\n" + + " \"控制字名称\": \"零序过流1段\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"5\",\n" + + " \"控制字名称\": \"零序过流Ⅱ段\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"6\",\n" + + " \"控制字名称\": \"过电压保护\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"7\",\n" + + " \"控制字名称\": \"低电压保护\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"8\",\n" + + " \"控制字名称\": \"不平衡电压保护\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"9\",\n" + + " \"控制字名称\": \"不平衡电流保护\",\n" + + " \"状态\": \"0\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"10\",\n" + + " \"控制字名称\": \"零序过流告警\",\n" + + " \"状态\": \"1\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"11\",\n" + + " \"控制字名称\": \"闭锁简易母线保护\",\n" + + " \"状态\": \"0\"\n" + + " },\n" + + " {\n" + + " \"序号\": \"12\",\n" + + " \"控制字名称\": \"PT断线自检\",\n" + + " \"状态\": \"1\"\n" + + " }\n" + + "]"; + } +} diff --git a/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/OcrService.java b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/OcrService.java new file mode 100644 index 0000000..977756e --- /dev/null +++ b/bonus-modules/bonus-protection/src/main/java/com/bonus/canteen/core/utils/OcrService.java @@ -0,0 +1,180 @@ +package com.bonus.canteen.core.utils; + +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.HttpEntity; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.content.FileBody; +import org.apache.http.entity.ContentType; + +import java.io.File; +import java.io.FileInputStream; +import java.nio.charset.StandardCharsets; +import java.io.IOException; +import java.util.Map; + +/** + * @className:OcrService + * @author:cwchen + * @date:2025-10-16-10:35 + * @version:1.0 + * @description: OCR服务实现类 + */ +@Service(value = "OcrService") +@Slf4j +public class OcrService { + + + @Value("${ocr.service.url}") + private String ocrServiceUrl; + + @Value("${ocr.service.urlApp}") + private String ocrAppServiceUrl; + + @Value("${ocr.service.timeout}") + private int timeout; + + private final CloseableHttpClient httpClient; + + private final ObjectMapper objectMapper; + + public OcrService() { + // 配置HTTP客户端 + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(timeout) + .setSocketTimeout(timeout) + .setConnectionRequestTimeout(timeout) + .build(); + this.httpClient = HttpClients.custom() + .setDefaultRequestConfig(requestConfig) + .build(); + this.objectMapper = new ObjectMapper(); + } + /** + * 调用OCR服务 + */ + public String callOcrService(File file) throws IOException { + HttpPost httpPost = new HttpPost(ocrServiceUrl); + String res="0"; + try { + // 创建 multipart entity builder + MultipartEntityBuilder builder = MultipartEntityBuilder.create(); + builder.setCharset(StandardCharsets.UTF_8); + builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); + // 添加文件字段 + builder.addPart("file", + new FileBody(file, ContentType.MULTIPART_FORM_DATA, file.getName())); + // 设置请求实体 - 注意:这里会自动设置正确的 Content-Type 和 boundary + httpPost.setEntity(builder.build()); + // 设置 Accept 头 + httpPost.setHeader("Accept", "application/json"); + log.info("OCR服务开始定值单识别"); + // 执行请求 + try (CloseableHttpResponse response = httpClient.execute(httpPost)) { + HttpEntity entity = response.getEntity(); + String responseBody = EntityUtils.toString(entity, "UTF-8"); + log.info("OCR服务响应状态: {}", response.getStatusLine().getStatusCode()); + log.info("OCR服务响应内容: {}", responseBody); + res=responseBody; + } + } catch (Exception e) { + log.error("调用OCR服务失败", e); + } finally { + // 清理临时文件 +// if (file != null && file.exists()) { +// boolean deleted = file.delete(); +// if (!deleted) { +// log.warn("临时文件删除失败: {}", file.getAbsolutePath()); +// } +// } + httpPost.releaseConnection(); + } + return res; + } + + /** + * 调用OCR服务 + */ + public String callOcrServiceApp(File file) throws IOException { + HttpPost httpPost = new HttpPost(ocrAppServiceUrl); + String res="0"; + try { + // 创建 multipart entity builder + MultipartEntityBuilder builder = MultipartEntityBuilder.create(); + builder.setCharset(StandardCharsets.UTF_8); + builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); + // 添加文件字段 + builder.addPart("file", + new FileBody(file, ContentType.MULTIPART_FORM_DATA, file.getName())); + // 设置请求实体 - 注意:这里会自动设置正确的 Content-Type 和 boundary + httpPost.setEntity(builder.build()); + // 设置 Accept 头 + httpPost.setHeader("Accept", "application/json"); + log.info("OCR服务开始屏幕识别"); + // 执行请求 + try (CloseableHttpResponse response = httpClient.execute(httpPost)) { + HttpEntity entity = response.getEntity(); + String responseBody = EntityUtils.toString(entity, "UTF-8"); + log.info("OCR服务响应状态: {}", response.getStatusLine().getStatusCode()); + log.info("OCR服务响应内容: {}", responseBody); + res=responseBody; + } + } catch (Exception e) { + log.error("调用OCR服务失败", e); + } finally { + // 清理临时文件 +// if (file != null && file.exists()) { +// boolean deleted = file.delete(); +// if (!deleted) { +// log.warn("临时文件删除失败: {}", file.getAbsolutePath()); +// } +// } + httpPost.releaseConnection(); + } + return res; + } + + /** + * 关闭HTTP客户端 + */ + public void close() { + try { + httpClient.close(); + } catch (IOException e) { + log.error("关闭HTTP客户端失败", e); + } + } + + public String uploadFileToServer(File file) throws IOException { + String targetUrl=ocrServiceUrl; + try (CloseableHttpClient httpClient = HttpClients.createDefault()) { + HttpPost uploadFile = new HttpPost(targetUrl); + + // 创建multipart请求实体 + MultipartEntityBuilder builder = MultipartEntityBuilder.create(); + // 添加文件参数,这里假设接口需要的参数名为"file",如果不同请修改 + builder.addBinaryBody( + "file", + new FileInputStream(file), + ContentType.APPLICATION_OCTET_STREAM, + file.getName() + ); + HttpEntity multipart = builder.build(); + uploadFile.setEntity(multipart); + // 执行请求并获取响应 + try (CloseableHttpResponse response = httpClient.execute(uploadFile)) { + HttpEntity responseEntity = response.getEntity(); + return EntityUtils.toString(responseEntity, "UTF-8"); + } + } + } +} diff --git a/bonus-modules/bonus-protection/src/main/resources/bootstrap-protection_local.yml b/bonus-modules/bonus-protection/src/main/resources/bootstrap-protection_local.yml index 82b5007..deba19c 100644 --- a/bonus-modules/bonus-protection/src/main/resources/bootstrap-protection_local.yml +++ b/bonus-modules/bonus-protection/src/main/resources/bootstrap-protection_local.yml @@ -1,11 +1,16 @@ # Tomcat server: - port: 48388 + port: 38388 system: sysfile: - prefixOffline: http://localhost:9000/lnyst - prefixOnline: http://localhost:9000/lnyst - bucket: /lnyst + prefixOffline: http://192.168.0.44:9090/jsk + prefixOnline: http://192.168.0.44:9090/jsk + bucket: /jsk +ocr: + service: + url: http://192.168.0.143:8000/ocr/process + timeout: 10000 + urlApp: http://192:168:0:143:8001/ocr/process_screen # Spring spring: cloud: diff --git a/bonus-modules/bonus-protection/src/main/resources/logback.xml b/bonus-modules/bonus-protection/src/main/resources/logback.xml index 983b780..4278c92 100644 --- a/bonus-modules/bonus-protection/src/main/resources/logback.xml +++ b/bonus-modules/bonus-protection/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/bonus-modules/bonus-protection/src/main/resources/mapper/protection/ProtectionManageMapper.xml b/bonus-modules/bonus-protection/src/main/resources/mapper/protection/ProtectionManageMapper.xml new file mode 100644 index 0000000..4dde4a5 --- /dev/null +++ b/bonus-modules/bonus-protection/src/main/resources/mapper/protection/ProtectionManageMapper.xml @@ -0,0 +1,417 @@ + + + + + + + + insert into bm_substation + + substation_name, + run_time, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{substationName}, + #{runTime}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + update bm_substation + + substation_name = #{substationName}, + run_time = #{runTime}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where substation_id = #{substationId} + + + + + delete from bm_substation a + where 1=1 + and a.substation_id in + + #{substationId} + + + + + + + insert into bm_protection_order + + substation_id, + protection_name, + protection_code, + img_url, + img_name, + protection_date, + page_no, + device_name, + one_device, + protection_device, + protection_device_model, + protection_device_version, + remark, + description, + type, + create_by, + create_time, + update_by, + update_time, + + + #{substationId}, + #{protectionName}, + #{protectionCode}, + #{imgUrl}, + #{imgName}, + #{protectionDate}, + #{pageNo}, + #{deviceName}, + #{oneDevice}, + #{protectionDevice}, + #{protectionDeviceModel}, + #{protectionDeviceVersion}, + #{remark}, + #{description}, + #{type}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update bm_protection_order + + protection_name = #{protectionName}, + protection_code = #{protectionCode}, + img_url = #{imgUrl}, + img_name = #{imgName}, + protection_date = #{protectionDate}, + device_name = #{deviceName}, + one_device = #{oneDevice}, + protection_device = #{protectionDevice}, + protection_device_model = #{protectionDeviceModel}, + protection_device_version = #{protectionDeviceVersion}, + remark = #{remark}, + description = #{description}, + type = #{type}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where protection_id = #{protectionId} + + + + insert into bm_protection_order_imaga + + protection_id, + img_url, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{imgUrl}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + insert into bm_protection_head + + protection_id, + attribute_key, + attribute_value, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{attributeKey}, + #{attributeValue}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + insert into bm_protection_device + + protection_id, + attribute_key, + attribute_value, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{attributeKey}, + #{attributeValue}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + insert into bm_protection_seting + + protection_id, + attribute_key, + order_num, + type, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{attributeKey}, + #{orderNum}, + #{type}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + insert into bm_protection_seting_value + + protection_id, + attribute_id, + attribute_value, + belong, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{attributeId}, + #{attributeValue}, + #{belong}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + insert into bm_protection_seting + + protection_id, + attribute_key, + order_num, + type, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{attributeKey}, + #{orderNum}, + #{type}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + insert into bm_protection_seting_value + + protection_id, + attribute_id, + attribute_value, + belong, + create_by, + create_time, + update_by, + update_time, + + + #{protectionId}, + #{attributeId}, + #{attributeValue}, + #{belong}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update bm_substation + + substation_name = #{substationName}, + run_time = #{runTime}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where substation_id = #{substationId} + + + delete from bm_protection_order where protection_id=#{protectionId} + + + delete from bm_protection_head where protection_id=#{protectionId} + + + delete from bm_protection_device where protection_id=#{protectionId} + + + delete from bm_protection_seting where protection_id=#{protectionId} + + + delete from bm_protection_seting_value where protection_id=#{protectionId} + + + delete from bm_protection_seting where protection_id=#{protectionId} + + + delete from bm_protection_seting_value where protection_id=#{protectionId} + + + delete from bm_protection_order_imaga where protection_id=#{protectionId} + + + + + + + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-protection/target/classes/bootstrap-protection_local.yml b/bonus-modules/bonus-protection/target/classes/bootstrap-protection_local.yml index 82b5007..deba19c 100644 --- a/bonus-modules/bonus-protection/target/classes/bootstrap-protection_local.yml +++ b/bonus-modules/bonus-protection/target/classes/bootstrap-protection_local.yml @@ -1,11 +1,16 @@ # Tomcat server: - port: 48388 + port: 38388 system: sysfile: - prefixOffline: http://localhost:9000/lnyst - prefixOnline: http://localhost:9000/lnyst - bucket: /lnyst + prefixOffline: http://192.168.0.44:9090/jsk + prefixOnline: http://192.168.0.44:9090/jsk + bucket: /jsk +ocr: + service: + url: http://192.168.0.143:8000/ocr/process + timeout: 10000 + urlApp: http://192:168:0:143:8001/ocr/process_screen # Spring spring: cloud: diff --git a/bonus-modules/bonus-protection/target/classes/com/bonus/canteen/core/utils/BnsUtils.class b/bonus-modules/bonus-protection/target/classes/com/bonus/canteen/core/utils/BnsUtils.class index e2d9269d20811dffc07cc8bf1748101a944be98f..6fca2aaf8f29bbc30b3ab592b32c492afbcbfb05 100644 GIT binary patch delta 4175 zcmai033yc175>j`_syF}%tl~9SzIt1CPD-q2uLsqgV{&|5(C0OCJ;y_F`2Mvb*x&f zwJtbapeSNp&@L850*Hu}f)$HmYt>c@*lKI3wsu!bP5=95G6ZYCvfOvxd1v|0dZ(}8 z(bCwVPoH`QK#5#yq5=C%)Z*I*REBg6Ug{uwxOyN}%+1O{`=O$jm>n7g7FBIN1;n(VZ95oU1TZwCIZ zpa0OuKTS-)M+zV7=O>!;FB2#6Z+(2KUt|3|h4GveF~nhr(-4;-ZbLkVDE-Ya#Ve)~ zpNTRY;31ZhAtuTt&6G1F-INT;vAu^$Np^_qlG8kK+M%t4}QpM=RRe!-A5y zc(dZ`o&H!`XOU)25qOuZjfQ*b!=V;hUeepz8txW2n#%;Lx4XU7)=R5e5n2^0iiD#@ zbL*?9WN3a(sDn0Lr-_`h>*?wax3;aJ(Hx@uuSWD;XNPB0fCD;*K7H;fp z40m+tCCES~Ol7pA;u8ST3*qCslix!vs~qe*=w=fpR=N2fPpu7wbm zC^^?cvz!+{>~8Zk$~Zw@e6uksex+x~C5>`Et6@p5)jPm?cG0Y{`W(A-=_v?UIR765r*yV5nSV$t0PqX_5(+Tq(_h%u}Jv47G3!~Ftla6?(LLRJcf+q`54 z4X(U}Mrmi=E$NU5i*HG%bg}ljKI83rS#q_oZ4(wEG@+ZaXl7^E+FIQlh1BY?Br3g1 zR#~!I*o|4XH@hJkmv?ur4lQXX>a}uBJlE*0OW;dl84y0bTLswzfCqyeEL@xF&h49w zPIpY;YY+8AgOQf-n%Y)D+ER`~G<>R0&CafHYDk9V=A~Nn^eM?mwsR8Sl)QPILz?0U ztK8u;1{x8-P~?{vznz)Col z)7d<BF^ycp&;kr|3d5VqzojV0GyX@Nr z6uB8+q6!%FI^4piroK#y7c8@KD=CK^9BbK6zfOg(B>q7ZZgbJ`S8=-?)SVem+Cfz? z@4#$2y_{*R!dXmU5$bRu`)wlAI+-;qWw%u@+0_KSkbTv`&bp3WbvNI>#YErFzR(?{ z0|Oqw9X7U!O#hukEws^&yRe?vN(t(2@|?7{unBQHsA`)28Ywr;Rp9HSJajP$-yo&v zXdJ#t%CG|)3C~E$>L=}GU<_)5*na@!q4$l%qvv8|R=pivK6?zzjDyMd(P$3aWE2}@ zEE}VcjZuOqi`L6xt+6A>XO45|Y7_3EPGO1y%XhCGm4ijyNH~ePFyK6iv6880V{^hc z{e8grobmUwmJFJa>uK)>Vz`m^Zz6`9iD4Z*+(Hbu62oo8a0k8I#fDkWG{kK@B}~fa z;VDb@f}Yr53R&eKWENZ}k*T4TvGRm>U$XGWvg-z=W)orELs*;X=03vOLRjA>tOp3| zA;Nl?C41!mq-J^wK`f zNlih5Ea*cqUjr@)c=(HAyx+A8GphHXtSNsdW(M4TcONbbc=n*YscO-JxI4+%&wOko zM?VkXO&leEKPmn0gx<4{QBj``{D2*?jVXN`L-7PR?UUTHJNR`cx8`oHi>J6`_Ha`7 za)zIw?mlkKXX*4Hm(25ADKD_&Vuy(4W#T!^R(pwac7*PqW7F>^h=Z*8^Y|_WAIBkr ze3@ns)8tDubHs*qfHE&q<_Kk8qs*I>IZB!1lzErj_wb6{F?S%1AjYwu^z>fA-TVL^ zB=q%q#pz9E5br{^*~5I_l;Z74QOA>%kFlRfZM+lM${6??n2sL7qkOvQ_B-S`Y5Z+M zzlBYf%YeRz?{k$DFb9t@Z;DF;%*Gl0F@iA%R^zq-;&Fv16t;7xJPCY^QKqRUr=K>B z0g3m64#H)63fz9z_&!v*_M*DU`2=bjcA<8@-*pgk{qBPp=6BgW zJS*VwyLCU$*@~%2UI}>~>U;JDlvWr^g;+`>o4xGTeNPR;*6^!+XKQf& z^6_UT`c6 z>#;-EV~4Mj$1MKuM^>_Mrwj4Zw1lLqpT=E-?a=%{&7S7By?l3YihjkX{?+AYRByri EA4CjlDF6Tf delta 1937 zcmai!d016N7{-5dFWfoz++!jj2qb1|C0Q7fR*DPeR+$!MD;Aj`hDd^Di(zSInQ7h@ zEzPZcFI#Qj)5@~d7Te3LY+uc!cMfL!(euQ^GxN=yZ@zc=X70@;_wU`fcKhnbfMV0Z zr$6(2`Z3?B75Q=G_VIVU^Fl+~;#Y55#$phb*go zI=LzjyZI3}JnHipkGsStEKm9r@RUy)PrKn6k7wQdoEx6^DdGjo8aJK6qdcDVM9QecAv@0}f||<-LHRyq}zHt78M$Xy}?;=XW_~*o3;8fB}4d>8ONKUjV=WGC0R%1*xQFfAuxtdt%(FCYEqK9@vg&DO)N0hZF+%;voSC}rG|`uX$+b=W^7$U^~Bo1B&6O1 zB5qo-$zTcsvx{jRm^3yArj1EY&W~qz&M=vQX=}2q$qr0AlM|R+_c_n(>Xz*Tlh0Yn z7vs6f1%AEhB-ip+O-US{T1H1*%l^8i;9=xpsm6g?6>2t`Qwtuz+^rzO!5U-XW(I>4 z2h9l#W{6gCb!M1$1}0agcOT+%({;lkONFy_1#`$JFFco}TF`+*I8?KX4pU?pt~iBA zW?Z$@?XXsEMq{I^)st2l^Yx{JyIZsq@jQ0dsxw{bLU;C{ggr%nFP-hoQFP-Z_6hMS z^{Be*>`0E#TPvXrM+(o==_1OM8B^uj9c z6k95AL^&#g33|xLVshDEMS4nNFFncw)SmHAYQ~Fut{Qb3HNq}b8BLr_T*4&k0u%m$jY-`s zE)3OGWFHx-E6^Q7&P8N(LJnog;C!*^D092X*kU=_Tb}lni%vm-=(v|Ln~QX&+s+6* z!HYvx5jAv{=rq3zkLWf!nsoOz<}_og$`%oc|^LYb?#a;a>XAMz5jYLUhJ@)%!agJ7Lc-ybVsdJofo}Jb~L_A z&d3(lEEKIpqIHd67K_#r(ON26%S3C1XsuMsuKyov`t2l8(t^N0)_6jgE1D6>x?Qu6 M@${>63%3#f8;VOq)c^nh diff --git a/bonus-modules/bonus-protection/target/classes/logback.xml b/bonus-modules/bonus-protection/target/classes/logback.xml index 983b780..4278c92 100644 --- a/bonus-modules/bonus-protection/target/classes/logback.xml +++ b/bonus-modules/bonus-protection/target/classes/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/bonus-modules/bonus-shared-station/src/main/java/com/bonus/sharedstation/app/feign/OtherServiceClient.java b/bonus-modules/bonus-shared-station/src/main/java/com/bonus/sharedstation/app/feign/OtherServiceClient.java index 7e7641d..5aeeb38 100644 --- a/bonus-modules/bonus-shared-station/src/main/java/com/bonus/sharedstation/app/feign/OtherServiceClient.java +++ b/bonus-modules/bonus-shared-station/src/main/java/com/bonus/sharedstation/app/feign/OtherServiceClient.java @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod; * Date: 2025/2/20 下午4:08 * Description: */ -@FeignClient(value="bonus-zjgl") +@FeignClient(value="bonus-protection") @Service @Component public interface OtherServiceClient { diff --git a/bonus-modules/pom.xml b/bonus-modules/pom.xml index 7bf267d..a058f33 100644 --- a/bonus-modules/pom.xml +++ b/bonus-modules/pom.xml @@ -11,7 +11,7 @@ - bonus-zjgl + bonus-protection bonus-shared-station