From 787eeb2b2880490bcf2705dc8d35c9dd230dba35 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期三, 04 十二月 2024 10:44:39 +0800 Subject: [PATCH] 本地代码提交 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java index cb3bc49..1ae1fc1 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java @@ -92,7 +92,15 @@ String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):""; String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : ""; OsLinkTypeVO linkTypeVO = linkTypeService.selectByOid(linkTypeOid); - List<OsLinkTypeAttributeVO> boAttrs = linkTypeService.listAttributeByLinkId(linkTypeVO.getId()); + List<OsLinkTypeAttributeVO> boAttrs = null; + try { + boAttrs = linkTypeService.listAttributeByLinkId(linkTypeVO.getId()); + }catch (Exception e){ + e.printStackTrace(); + String errorLog = "鏌ヨ閾炬帴绫诲瀷鍏宠仈鐨勫睘鎬ф椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e); + logger.error(errorLog); + throw new VciBaseException(errorLog); + } List<OsLinkTypeAttributeVO> attrList = boAttrs.stream().filter(s->{ boolean usedFlag = true; if(StringUtils.isNotBlank(attrId) && !s.getId().contains(attrId)){ @@ -279,4 +287,28 @@ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); } } + + + /** + * 鑾峰彇璁剧疆鎺掑簭瀛楁鐨勬帓搴忓瓧娈� + * @param linkType 閾炬帴绫诲瀷鐨勭紪鍙� + * @param btmType 涓氬姟绫诲瀷鐨勭紪鍙� + * @param direction 姝�/鍙嶅悜 + * @return 灞炴�х殑淇℃伅 + */ + @GetMapping("/getAllOrderbyAttributeByLink") + public BaseResult<List<String>> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction){ + + try { + List<String> osLinkTypeAttributes = linkTypeService.getAllOrderbyAttributeByLink(linkType, btmType, direction); + return BaseResult.dataList(osLinkTypeAttributes); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } catch (ParseException e) { + throw new RuntimeException(e); + } + } } -- Gitblit v1.9.3