From 600c2ebb55b18d687ff848cb6c9d9a61b8bfa307 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 15 十一月 2024 17:52:48 +0800
Subject: [PATCH] 优化业务类型链接类型查询接口

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 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 7faff82..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);
                     });
@@ -920,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);
@@ -1063,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