From 0c553fadbaa50a322fbe283ef66cd32d8d26f98b Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期五, 29 十一月 2024 17:38:56 +0800 Subject: [PATCH] 1、获取当前业务类型下的数据权限相关信息接口。 2、保存数据权限数据接口。 3、删除数据权限接口。 4、使用当前用户的类型查询用户接口。 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java index b8724f9..43a3303 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java @@ -762,7 +762,14 @@ attributes.stream().forEach( t -> { int index = indexMap.get("index"); - Map<String,Object> columnData = attributeToWordMap(t,index); + Map<String,Object> columnData = null; + try { + columnData = attributeToWordMap(t,index); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = "灏嗗睘鎬у璞℃嫹璐濆埌word鏁版嵁瀵硅薄涓椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + } indexMap.put("index",index+1); columnDataList.add(columnData); }); @@ -804,7 +811,14 @@ indexMap.put("index",1); attributes.stream().forEach( t -> { int index = indexMap.get("index"); - Map<String,Object> columnData = attributeToWordMap(t,index); + Map<String,Object> columnData = null; + try { + columnData = attributeToWordMap(t,index); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = "灏嗗睘鎬у璞℃嫹璐濆埌word鏁版嵁瀵硅薄涓椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + } indexMap.put("index",index+1); columnDataList.add(columnData); }); @@ -851,7 +865,13 @@ if(!CollectionUtils.isEmpty(btmTypeVOList)) { btmTypeVOList.stream().forEach(btmTypeVO -> { String btmId = btmTypeVO.getId(); - List<OsBtmTypeAttributeVO> attributeVOS = btmService.listAttributeByBtmId(btmId); + List<OsBtmTypeAttributeVO> attributeVOS = null; + try { + attributeVOS = btmService.listAttributeByBtmId(btmId); + } catch (PLException e) { + e.printStackTrace(); + throw new VciBaseException(VciBaseUtil.getExceptionMessage(e)); + } //鍏堟槸鍚嶇О int rowIndex = index[0]; WriteExcelData idED = new WriteExcelData(rowIndex, 0, btmId); @@ -914,7 +934,15 @@ if(!CollectionUtils.isEmpty(linkTypeVOList)){ linkTypeVOList.stream().forEach(linkTypeVO->{ String linkTypeId = linkTypeVO.getId(); - List<OsLinkTypeAttributeVO> attributeVOS = linkTypeService.listAttributeByLinkId(linkTypeId); + List<OsLinkTypeAttributeVO> attributeVOS = null; + try { + attributeVOS = linkTypeService.listAttributeByLinkId(linkTypeId); + } catch (PLException e) { + e.printStackTrace(); + String errorLog = "鏌ヨ閾炬帴绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e); + logger.error(errorLog); + throw new VciBaseException(errorLog); + } //鍏堟槸鍚嶇О int rowIndex = index[0]; WriteExcelData idED = new WriteExcelData(rowIndex, 0, linkTypeId); @@ -1057,7 +1085,7 @@ * @param index 绱㈠紩 * @return 鏁版嵁鏄犲皠,key 鏄痺ord閲岀殑鍩熷瓧娈碉紝value鏄搴旂殑鍊� */ - private Map<String,Object> attributeToWordMap(OsBtmTypeAttributeVO btmTypeAttributeVO,int index){ + private Map<String,Object> attributeToWordMap(OsBtmTypeAttributeVO btmTypeAttributeVO,int index) throws PLException { Map<String,Object> columnData = new HashMap<>(); if(StringUtils.isNotBlank(wordFieldProperties.getColumnIndex())) { columnData.put(wordFieldProperties.getColumnIndex(), index); -- Gitblit v1.9.3