From de42c7075ba5a474ba74d8833e9830dfa1312464 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期三, 28 八月 2024 15:20:17 +0800 Subject: [PATCH] 业务类型查询模板接口上传 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java | 30 +++++++++++++++++++++++++++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java index 270d46a..10c2d5c 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java @@ -403,7 +403,15 @@ @GetMapping(value = "/getAllAttributesByBtmId") @VciBusinessLog(operateName = "鏌ョ湅涓氬姟绫诲瀷鐨勫睘鎬�") public BaseResult<List<OsBtmTypeAttributeVO>> getAllAttributesByBtmId(String btmId){ - List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId); + List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = null; + try { + osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + throw new VciBaseException(exceptionMessage); + } return BaseResult.dataList(osBtmTypeAttributeVOS); } @@ -457,7 +465,15 @@ String hasDefaultAttr = baseQueryObject.getConditionMap().getOrDefault("hasDefaultAttr","false"); String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):""; String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : ""; - List<OsBtmTypeAttributeVO> boAttrs = btmService.listAttributeByBtmId(btmTypeId); + List<OsBtmTypeAttributeVO> boAttrs = null; + try { + boAttrs = btmService.listAttributeByBtmId(btmTypeId); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + throw new VciBaseException(exceptionMessage); + } if(boAttrs == null){ boAttrs = new ArrayList<>(); } @@ -505,7 +521,15 @@ String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):""; String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : ""; OsBtmTypeVO btmTypeVO = btmService.selectByOid(btmTypeOid); - List<OsBtmTypeAttributeVO> boAttrs = btmService.listAttributeByBtmId(btmTypeVO.getId()); + List<OsBtmTypeAttributeVO> boAttrs = null; + try { + boAttrs = btmService.listAttributeByBtmId(btmTypeVO.getId()); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + throw new VciBaseException(exceptionMessage); + } List<OsBtmTypeAttributeVO> attrList = boAttrs.stream().filter(s->{ boolean usedFlag = true; if(StringUtils.isNotBlank(attrId) && !s.getId().contains(attrId)){ -- Gitblit v1.9.3