From 65866894f615d7a1386cd7f030307322996450de Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 24 十月 2024 16:17:37 +0800
Subject: [PATCH] 文件柜导出接口上传,ui定义导出界面传参调整。

---
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PRMDTO.java                         |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java     |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsPvolumesController.java    |   51 +++++++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java          |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPvolumesServiceI.java         |   26 +++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java |   59 ++++++-----
 Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js                                                        |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java           |    5 +
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPvolumesServiceImpl.java |  104 +++++++++++++++++---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java  |    9 -
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java   |    1 
 11 files changed, 211 insertions(+), 52 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PRMDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PRMDTO.java
index edca04d..c77b9c8 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PRMDTO.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PRMDTO.java
@@ -2,7 +2,7 @@
 
 import java.util.List;
 
-public class PRMDTO implements   java.io.Serializable {
+public class PRMDTO implements java.io.Serializable {
 
     private static final long serialVersionUID = -9069714336905186990L;
     /**
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsPvolumesController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsPvolumesController.java
index 35c5619..7fff70c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsPvolumesController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsPvolumesController.java
@@ -3,11 +3,15 @@
 import com.vci.corba.common.PLException;
 import com.vci.corba.framework.data.PvolumeInfo;
 import com.vci.dto.*;
+import com.vci.starter.web.annotation.log.VciBusinessLog;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseResult;
+import com.vci.starter.web.util.ControllerUtil;
 import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.web.service.OsActionServiceI;
 import com.vci.web.service.OsPvolumesServiceI;
+import com.vci.web.util.Func;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -15,6 +19,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -55,7 +60,7 @@
      * @param dto 鍗风殑浼犺緭淇℃伅
      * @return 淇濆瓨缁撴灉
      */
-    @GetMapping("/savePvolume")
+    @PostMapping("/savePvolume")
     public BaseResult savePvolume(@RequestBody OsPvolumeDTO dto){
         try {
             return osPvolumesServiceI.savePvolume(dto);
@@ -72,7 +77,7 @@
      * @param dto 鍗风殑浼犺緭淇℃伅
      * @return 淇敼缁撴灉
      */
-    @GetMapping("/updatePvolume")
+    @PostMapping("/updatePvolume")
     public BaseResult updatePvolume(@RequestBody OsPvolumeDTO dto){
         try {
             return osPvolumesServiceI.updatePvolume(dto);
@@ -100,4 +105,46 @@
             return objectBaseResult;
         }
     }
+
+    /**
+     * 涓烘枃浠舵煖鍒嗛厤鎴愬憳
+     * @param pvolumId
+     * @param userIds
+     * @return
+     */
+    @PostMapping("/savePvolumeUser")
+    public BaseResult savePvolumeUser(String pvolumId ,String[] userIds){
+        try {
+            return osPvolumesServiceI.savePvolumeUser(pvolumId,userIds) ? BaseResult.success("鏂囦欢鏌滃垎閰嶆垚鍛樻垚鍔燂紒"):BaseResult.fail("鏂囦欢鏌滃垎閰嶆垚鍛樺け璐ワ紒");
+        } catch (PLException e) {
+            BaseResult objectBaseResult = new BaseResult<>();
+            objectBaseResult.setCode(Integer.parseInt(e.code));
+            objectBaseResult.setMsg(Arrays.toString(e.messages));
+            return objectBaseResult;
+        }
+    }
+
+    /**
+     * 瀵煎嚭閫変腑鐨勬枃浠舵煖淇℃伅
+     * @param exportFileName 瀵煎嚭鐨勬枃浠跺悕
+     * @param pvolumeIds 闇�瑕佸鍑虹殑灞炴�ц嫳鏂囧悕绉�
+     * @param response
+     */
+    @GetMapping( "/exportPvolumes")
+    @VciBusinessLog(operateName = "瀵煎嚭閫変腑鐨勬枃浠舵煖淇℃伅")
+    public void exportPvolumes(String exportFileName, String pvolumeIds, HttpServletResponse response){
+        try {
+            String excelPath = osPvolumesServiceI.exportPvolumes(exportFileName,pvolumeIds);
+            ControllerUtil.writeFileToResponse(response,excelPath);
+        } catch (Exception e) {
+            String msg = "瀵煎嚭鏂囦欢鏌滄椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e);
+            try {
+                e.printStackTrace();
+                ControllerUtil.writeDataToResponse(response,"error_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss") + ".txt", StringUtils.isNotBlank(msg)?msg.getBytes():new byte[0],null);
+            } catch (IOException ioException) {
+                ioException.printStackTrace();
+            }
+        }
+    }
+
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
index 45b0f76..052bdbb 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
@@ -535,7 +535,7 @@
      * @param  tabButtonVO
      * @return 淇敼缁撴灉
      */
-    @PutMapping("/updateTabbutton")
+    @PutMapping("/updateTabButton")
     public BaseResult updateTabButton(@RequestBody PLTabButtonVO tabButtonVO){
         try {
             return uiManagerService.updateTabButton(tabButtonVO);
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java
index e29f5fe..b7d4522 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java
@@ -44,6 +44,11 @@
      */
     BaseResult getOperatingUsers() throws PLException;
 
+    /**
+     * 瀵煎嚭鏃ュ織
+     * @param dto 瀵煎嚭鐨勬枃浠跺悕
+     * @return
+     */
     String exportLogs(LogQueryCriteriaDTO dto) throws PLException;
 
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPvolumesServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPvolumesServiceI.java
index b2511e0..548da33 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPvolumesServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPvolumesServiceI.java
@@ -1,13 +1,18 @@
 package com.vci.web.service;
 
 import com.vci.corba.common.PLException;
+import com.vci.corba.framework.data.PvolumeInfo;
 import com.vci.dto.*;
 import com.vci.starter.web.pagemodel.BaseResult;
+import com.vci.web.util.Func;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 鏂囦欢鏌滅鐞嗙殑鏈嶅姟
@@ -40,4 +45,25 @@
      * @return 鍒犻櫎缁撴灉
      */
     BaseResult deletePvolume(String[] ids) throws PLException;
+    /**
+     * 鏂囦欢鏌滃鍑�
+     * @param exportFileName 瀵煎嚭鐨勬枃浠跺悕
+     * @param pvolumeIds 瀵煎嚭閫変腑鐨勫嵎id
+     * @return
+     * @throws PLException
+     */
+    String exportPvolumes(String exportFileName,String pvolumeIds) throws PLException;
+    /**
+     * 鏍规嵁鍗穒d鏌ヨ鍗�
+     * @param ids
+     * @return
+     */
+    List<PvolumeInfo> getPvolumeInfoByIds(List<String> ids) throws PLException;
+    /**
+     * 涓烘枃浠舵煖鍒嗛厤鎴愬憳
+     * @param pvolumId
+     * @param userIds
+     * @return
+     */
+    boolean savePvolumeUser(String pvolumId ,String[] userIds) throws PLException;
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
index 114058c..2b9dda6 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
@@ -175,7 +175,7 @@
      * @param tabButtonVO
      * @return
      */
-    boolean saveOrUpdateTapButton(PLTabButtonVO tabButtonVO,boolean isAdd);
+    boolean saveOrUpdateTabButton(PLTabButtonVO tabButtonVO,boolean isAdd);
 
     /**
      * 鍒犻櫎鍗曚釜鎸夐挳閰嶇疆
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java
index 96b9519..3dd6390 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java
@@ -239,7 +239,6 @@
         if(Func.isEmpty(logList)){
             excelDataList.add(new WriteExcelData(1,1, "瀵煎嚭鐨勬棩蹇楀垪琛ㄤ负绌猴紒"));
         }else{
-            //鍏堟寜鐓у睘鎬х被鍨嬫帓搴忥紝涓嶅悓灞炴�х被鍨嬪鍑虹殑鏁版嵁涔辩殑鏁堟灉
             AtomicInteger i = new AtomicInteger();
             Arrays.stream(logList).forEach(log->{
                 excelDataList.add(new WriteExcelData(i.get() +1,0, log.username));
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
index 0cb6b97..b1486a2 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
@@ -573,6 +573,7 @@
         }
         return BaseResult.success("瀵煎叆鎴愬姛");
     }
+
     private String readLines(String filePath){
         StringBuffer sb=new StringBuffer();
         FileInputStream prmFile=null;
@@ -590,6 +591,7 @@
         }
         return sb.toString();
     }
+
     /**
      * 鎷疯礉鏁版嵁鍒皐ord妯℃澘涓�
      * @param fileName 瑕佸啓鍏ョ殑鏁版嵁
@@ -620,6 +622,7 @@
         }
         return filePath;
     }
+
     public List<PortalVIDTO> listByIds(Collection idList){
         List<PortalVIDTO> portalVIVOList=new ArrayList<>();
         if(CollectionUtils.isEmpty(idList)){
@@ -637,13 +640,15 @@
         portalVIVOList=  portalVIO2DTOS(portalVIList);
         return portalVIVOList;
     }
-    private BaseResult savePortalVIDTO(PortalVIDTO portalVIDTO,boolean isEdit)  {
 
+    private BaseResult savePortalVIDTO(PortalVIDTO portalVIDTO,boolean isEdit)  {
         boolean _isBtm=false;
         boolean flag = false;
         String labelName=PortalVIType.Form.getName();
         try {
-            VciBaseUtil.alertNotNull(portalVIDTO.getViName(),"鍚嶇О");
+            VciBaseUtil.alertNotNull(
+                    portalVIDTO.getViName(),"鍚嶇О"
+                    ,portalVIDTO.getPrm().getFormQtName(),"缁戝畾琛ㄥ崟");
             if(portalVIDTO.getPrm()==null||portalVIDTO.getPrm().getPrmItemList()==null||portalVIDTO.getPrm().getPrmItemList().size()==0){
                 throw  new Throwable(labelName+"锛屾湭璁剧疆");
             }
@@ -706,6 +711,7 @@
         }
         return  BaseResult.success("淇濆瓨"+labelName+"鎴愬姛!");
     }
+
     @Override
     public Map<String, PortalVIVO> selectAllPortalVIMap() throws VciBaseException {
         return null;
@@ -757,7 +763,6 @@
         return "";
     }
 
-
     /**
      * 鏋氫妇鐨勬暟鎹璞¤浆鎹负鏄剧ず瀵硅薄
      *
@@ -773,6 +778,7 @@
         });
         return portalVIVOS;
     }
+
     /**
      * 琛ㄥ崟鐨勬暟鎹璞¤浆鎹负鏄剧ず瀵硅薄
      * @param portalVIDTOS 琛ㄥ崟鐨勫璞�
@@ -787,6 +793,7 @@
         });
         return portalVIS;
     }
+
     /**
      * 琛ㄥ崟鐨勬暟鎹璞¤浆鎹负鏄剧ず瀵硅薄
      * @param PortalVIS 琛ㄥ崟鐨勫璞�
@@ -811,13 +818,13 @@
      */
     @Override
     public  PortalVI portalVIDTOO2VI(PortalVIDTO portalVIDTO) {
-        PortalVI portalVI=new PortalVI();
-        portalVI.id=portalVIDTO.getId();
-        portalVI.typeFlag= portalVIDTO.getTypeFlag();
-        portalVI.typeName=portalVIDTO.getTypeName();
-        portalVI.viName=portalVIDTO.getViName();
-        portalVI.viType=portalVIDTO.getViType();
-        short viType =portalVIDTO.getViType();
+        PortalVI portalVI = new PortalVI();
+        portalVI.id = portalVIDTO.getId();
+        portalVI.typeFlag = portalVIDTO.getTypeFlag();
+        portalVI.typeName = portalVIDTO.getTypeName();
+        portalVI.viName = portalVIDTO.getViName();
+        portalVI.viType = portalVIDTO.getViType();
+        short viType = portalVIDTO.getViType();
         PRMDO prmdo = prmDOO2VIS(portalVIDTO.getPrm(),viType);
         try {
             portalVI.prm=UITools.getPRMText(prmdo);
@@ -826,6 +833,7 @@
         }
         return portalVI;
     }
+
     /**
      * 琛ㄥ崟鐨勬暟鎹璞¤浆鎹负鏄剧ず瀵硅薄
      * @param portalVI
@@ -844,6 +852,7 @@
         portalVIDTO.setPrm(prmDOO2DTOS(prmdo,viType));
         return portalVIDTO;
     }
+
     /**
      * 琛ㄥ崟鏁版嵁瀵硅薄杞崲
      * @param prmdto
@@ -1210,25 +1219,25 @@
 
         prmItemDO.setItemOutFields(VciBaseUtil.array2String(prmItemDTO.getItemOutFieldList().toArray(new String[]{})));//闇�瑕佷娇鐢ㄧ殑瀛楁
         prmItemDO.setItemKeyFields(CollectionUtils.isEmpty(prmItemDTO.getItemKeyFieldList())?"":VciBaseUtil.array2String(prmItemDTO.getItemKeyFieldList().toArray(new String[]{})));//闇�瑕佹悳绱㈢殑瀛楁
-       List<String> newItemFieldWidthList=prmItemDTO.getItemFieldWidthList().stream().map(KeyValue::getValue).distinct().collect(Collectors.toList());
+       List<String> newItemFieldWidthList = prmItemDTO.getItemFieldWidthList().stream().map(KeyValue::getValue).distinct().collect(Collectors.toList());
        prmItemDO.setItemFieldWidth(VciBaseUtil.array2String(newItemFieldWidthList.toArray(new String[]{}),":"));//瀛楁瀹藉害
-       List<ItemSeniorQueryBO> itemSeniorQueryBOS=  prmItemDTO.getItemSeniorQueryBOS();
-       List<String> itemSeniorQueryColsList=new ArrayList<>();
+       List<ItemSeniorQueryBO> itemSeniorQueryBOS = prmItemDTO.getItemSeniorQueryBOS();
+       List<String> itemSeniorQueryColsList = new ArrayList<>();
        List<String> itemSeniorQueryColsCountsList=new ArrayList<>();
-       List<String> itemQuerySqlList=new ArrayList<>();
+       List<String> itemQuerySqlList = new ArrayList<>();
        itemSeniorQueryBOS.stream().forEach(itemSeniorQueryBO -> {
-           String itemSeniorQueryCols= itemSeniorQueryBO.getItemSeniorQueryCols();
-           String itemSeniorQueryColsCounts=itemSeniorQueryBO.getItemSeniorQueryColsCounts();
-           String itemQuerySql=itemSeniorQueryBO.getItemQuerySql();
+           String itemSeniorQueryCols = itemSeniorQueryBO.getItemSeniorQueryCols();
+           String itemSeniorQueryColsCounts = itemSeniorQueryBO.getItemSeniorQueryColsCounts();
+           String itemQuerySql = itemSeniorQueryBO.getItemQuerySql();
            if(StringUtils.isNotBlank(itemSeniorQueryCols)) {
                itemSeniorQueryColsList.add(itemSeniorQueryCols);
            }
-            if(StringUtils.isNotBlank(itemSeniorQueryColsCounts)) {
-                itemSeniorQueryColsCountsList.add(itemSeniorQueryColsCounts);
-            }
-            if(StringUtils.isNotBlank(itemQuerySql)){
-                itemQuerySqlList.add(itemQuerySql);
-            }
+           if(StringUtils.isNotBlank(itemSeniorQueryColsCounts)) {
+               itemSeniorQueryColsCountsList.add(itemSeniorQueryColsCounts);
+           }
+           if(StringUtils.isNotBlank(itemQuerySql)){
+               itemQuerySqlList.add(itemQuerySql);
+           }
         });
         prmItemDO.setItemSeniorQueryCols(VciBaseUtil.array2String(itemSeniorQueryColsList.toArray(new String[]{})));
         prmItemDO.setItemSeniorQueryColsCounts(VciBaseUtil.array2String(itemSeniorQueryColsCountsList.toArray(new String[]{})));
@@ -1241,8 +1250,8 @@
      */
     private List<KeyValue>  initItemFieldWidthList(String itemOutFields,String itemFieldWidth){
         List<KeyValue> keyValueList=new ArrayList<>();
-        List<String>itemOutFieldList=   VciBaseUtil.str2List(itemOutFields);
-        List<String>itemFieldWidthList=  VciBaseUtil.str2List(itemFieldWidth,",");
+        List<String>itemOutFieldList = VciBaseUtil.str2List(itemOutFields);
+        List<String>itemFieldWidthList =VciBaseUtil.str2List(itemFieldWidth,",");
         if(itemOutFieldList.size()>0) {
             for (int i = 0; i < itemOutFieldList.size(); i++) {
                 KeyValue keyValue = new KeyValue();
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPvolumesServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPvolumesServiceImpl.java
index d4ba423..2bfe725 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPvolumesServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPvolumesServiceImpl.java
@@ -1,39 +1,26 @@
 package com.vci.web.service.impl;
 
-import cn.hutool.core.io.FileUtil;
-import com.vci.constant.FrameWorkLangCodeConstant;
 import com.vci.corba.common.PLException;
 import com.vci.corba.common.data.UserEntityInfo;
 import com.vci.corba.framework.data.PvolumeInfo;
-import com.vci.corba.portal.data.Constraint;
-import com.vci.corba.portal.data.PLAction;
-import com.vci.corba.portal.data.PLActionCls;
-import com.vci.corba.portal.data.PLActionParam;
 import com.vci.dto.*;
 import com.vci.starter.poi.bo.WriteExcelData;
 import com.vci.starter.poi.bo.WriteExcelOption;
 import com.vci.starter.poi.util.ExcelUtil;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseResult;
-import com.vci.starter.web.util.ControllerUtil;
 import com.vci.starter.web.util.LangBaseUtil;
 import com.vci.starter.web.util.LocalFileUtil;
-import com.vci.web.enumpck.ActionEnum;
-import com.vci.web.enumpck.PlTypetypeEnum;
-import com.vci.web.other.ExportActionLogBean;
-import com.vci.web.other.ExportBeans;
-import com.vci.web.service.OsActionServiceI;
+import com.vci.starter.web.util.VciBaseUtil;
+import com.vci.starter.web.util.WebThreadLocalUtil;
 import com.vci.web.service.OsPvolumesServiceI;
 import com.vci.web.util.Func;
-import com.vci.web.util.PinyinCommon;
 import com.vci.web.util.PlatformClientUtil;
 import com.vci.web.util.WebUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
 
-import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -133,6 +120,7 @@
         }
         return BaseResult.success("淇敼鎴愬姛锛�");
     }
+
     /**
      * 鍒犻櫎鍗�
      * @param ids 涓婚敭闆嗗悎
@@ -160,6 +148,92 @@
     }
 
     /**
+     * 鏂囦欢鏌滃鍑�
+     * @param exportFileName 瀵煎嚭鐨勬枃浠跺悕
+     * @param pvolumeIds 瀵煎嚭閫変腑鐨勫嵎id
+     * @return
+     * @throws PLException
+     */
+    @Override
+    public String exportPvolumes(String exportFileName, String pvolumeIds) throws PLException {
+        if(Func.isBlank(pvolumeIds)){
+            throw new PLException("500",new String[]{"璇峰嬀閫夎瀵煎嚭鐨勬暟鎹�!"});
+        }
+        //鐣岄潰娌′紶鍚嶇О锛屼娇鐢ㄩ粯璁ゅ鍑哄悕绉�
+        exportFileName = Func.isBlank(exportFileName) ?  "鏂囦欢鏌滃鍑篲" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss"):exportFileName;
+        //璁剧疆鍒楀悕
+        List<String> columns = new ArrayList<>(Arrays.asList("鍗峰悕","鏈哄櫒绫诲瀷","璺緞鍚嶇О","棣栭�夎矾寰�","鏈嶅姟鍣�","鍗锋湇鍔�"));
+
+        //鍐檈xcel
+        String excelPath = LocalFileUtil.getDefaultTempFolder() + File.separator + exportFileName +  ".xls";
+        try {
+            new File(excelPath).createNewFile();
+        } catch (Throwable e) {
+            throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelPath}, e);
+        }
+        //璁剧疆鍒�
+        List<WriteExcelData> excelDataList = new ArrayList<>();
+        //璁剧疆鍒楀ご
+        for (int index = 0; index < columns.size(); index++) {
+            excelDataList.add(new WriteExcelData(0,index, columns.get(index)));
+        }
+        //鎸夌収鏂囦欢鏌淚D鏌ヨ鏂囦欢鏌�
+        List<String> pvolumeIdList = Func.toStrList(pvolumeIds);
+        List<PvolumeInfo> pvolumeInfoList = this.getPvolumeInfoByIds(pvolumeIdList);
+
+        if(Func.isEmpty(pvolumeInfoList)){
+            excelDataList.add(new WriteExcelData(1,1, "鏈幏鍙栧埌瑕佸鍑虹殑鏂囦欢鏌滀俊鎭紝璇峰埛鏂板悗灏濊瘯閲嶆柊瀵煎嚭锛�"));
+        }else{
+            for (int i = 0; i < pvolumeInfoList.size(); i++) {
+                PvolumeInfo pvolumeInfo = pvolumeInfoList.get(i);
+                excelDataList.add(new WriteExcelData(i+1,0, pvolumeInfo.name));
+                excelDataList.add(new WriteExcelData(i+1,1, pvolumeInfo.type));
+                excelDataList.add(new WriteExcelData(i+1,2, pvolumeInfo.path));
+                excelDataList.add(new WriteExcelData(i+1,3, pvolumeInfo.isvalid));
+                excelDataList.add(new WriteExcelData(i+1,4, pvolumeInfo.host));
+                excelDataList.add(new WriteExcelData(i+1,5, pvolumeInfo.service));
+            }
+        }
+        WriteExcelOption excelOption = new WriteExcelOption(excelDataList);
+        ExcelUtil.writeDataToFile(excelPath, excelOption);
+        return excelPath;
+    }
+
+    /**
+     * 鏍规嵁鍗穒d鏌ヨ鍗�
+     * @param ids
+     * @return
+     */
+    @Override
+    public List<PvolumeInfo> getPvolumeInfoByIds(List<String> ids) throws PLException {
+        List<PvolumeInfo> pvolumeInfos = new ArrayList<>();
+        if(Func.isEmpty(ids)){
+            return pvolumeInfos;
+        }
+        PvolumeInfo[] allPvolumes = platformClientUtil.getFrameworkService().getAllPvolumes();
+        if (Func.isEmpty(allPvolumes)){
+            return pvolumeInfos;
+        }
+        pvolumeInfos = Arrays.stream(allPvolumes).filter(pvolumeInfo -> ids.contains(pvolumeInfo.id)).collect(Collectors.toList());
+        return pvolumeInfos;
+    }
+
+    /**
+     * 涓烘枃浠舵煖鍒嗛厤鎴愬憳----杩欎釜鍔熻兘鐜板湪娌$敤涓婏紝骞冲彴鐨勪繚瀛樻柟娉曟槸娉ㄩ噴鎺夌殑
+     * @param pvolumId
+     * @param userIds
+     * @return
+     */
+    @Override
+    public boolean savePvolumeUser(String pvolumId, String[] userIds) throws PLException {
+        VciBaseUtil.alertNotNull(pvolumId,"鏂囦欢鏌滀富閿�",userIds,"鐢ㄦ埛涓婚敭闆嗗悎");
+        UserEntityInfo userEntityInfo = new UserEntityInfo();
+        userEntityInfo.setUserName(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId());
+        boolean resBoolean = platformClientUtil.getFrameworkService().savePvolumeUser(pvolumId, userIds, userEntityInfo);
+        return resBoolean;
+    }
+
+    /**
      * 鍗� 浠嶤orba绔浆鍒癏ibernate瀵硅薄绔�
      * @param pvoInfo
      * @return
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
index 2dd03e2..37a13ae 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -1368,7 +1368,7 @@
      */
     @Override
     public BaseResult addTabButton(PLTabButtonVO tabButtonVO) {
-        boolean res = this.saveOrUpdateTapButton(tabButtonVO, true);
+        boolean res = this.saveOrUpdateTabButton(tabButtonVO, true);
         return res ? BaseResult.success("鎸夐挳閰嶇疆娣诲姞鎴愬姛锛�"):BaseResult.success("鎸夐挳閰嶇疆娣诲姞澶辫触锛�");
     }
 
@@ -1379,7 +1379,7 @@
      */
     @Override
     public BaseResult updateTabButton(PLTabButtonVO tabButtonVO) {
-        boolean res = this.saveOrUpdateTapButton(tabButtonVO, false);
+        boolean res = this.saveOrUpdateTabButton(tabButtonVO, false);
         return res ? BaseResult.success("鎸夐挳閰嶇疆淇敼鎴愬姛锛�"):BaseResult.success("鎸夐挳閰嶇疆淇敼澶辫触锛�");
     }
 
@@ -1389,11 +1389,10 @@
      * @return
      */
     @Override
-    public boolean saveOrUpdateTapButton(PLTabButtonVO tabButtonVO,boolean isAdd){
-        VciBaseUtil.alertNotNull(tabButtonVO,"鎸夐挳閰嶇疆瀵硅薄",tabButtonVO.getLabel(),"鍙傛暟鍚嶇О");
+    public boolean saveOrUpdateTabButton(PLTabButtonVO tabButtonVO,boolean isAdd){
+        VciBaseUtil.alertNotNull(tabButtonVO,"鎸夐挳閰嶇疆瀵硅薄",tabButtonVO.getLabel(),"鍙傛暟鍚嶇О",tabButtonVO.getTableOId(),"椤甸潰瀹氫箟涓婚敭");
         //妫�鏌ュ綋鍓嶆坊鍔犵殑鍒楄〃鏄惁閲嶅锛屼絾鏄繖鍎垮彧鏀寔鍗曟潯鏁版嵁淇濆瓨锛屾墍鏈夊綋鍓嶅垪琛ㄥ垽閲嶅彲浠ュ墠绔潵鍋�
         //String btnParamValidate = this.geCheckRes();
-
         if (tabButtonVO.getSeq() < 1 || tabButtonVO.getSeq() > 63) {
             throw new VciBaseException("鎸夊簭鍙疯秴鍑鸿寖鍥达紝璇蜂慨鏀癸紝鎸夐挳銆愮紪鍙枫�戝彧鑳藉湪銆�1-63銆戣寖鍥村唴銆�");
         }
diff --git a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
index 8e90762..8a6bec0 100644
--- a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
+++ b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
@@ -72,7 +72,7 @@
     method: 'post',
     responseType: 'blob',
     data: {
-      params
+      ...params
     }
   })
 }

--
Gitblit v1.9.3