From 9c7de90e010371d47da6c4e7de7cbf1c8c476372 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 22 八月 2024 17:49:51 +0800
Subject: [PATCH] 首页系统配置接口测试修改,菜单查询相关修改:PLMODULENO字段因平台已停用,所有将对象中的moduleNo删除。

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java                                   |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java                |  123 ++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java |   58 +
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java                                 |   19 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java                                           |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java        | 1028 ++++++++++++++++++++++++++++++++++++
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmFunctionForPlatform1.java                                    |   10 
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java                                                |   78 ++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/properties/JsonConfigReader.java                                     |   63 ++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java                 |    3 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java                             |  259 +++++++++
 11 files changed, 1,597 insertions(+), 48 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmFunctionForPlatform1.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmFunctionForPlatform1.java
index ee29c80..a240e31 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmFunctionForPlatform1.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmFunctionForPlatform1.java
@@ -52,9 +52,9 @@
     private String plsuffixb;
 
     /**
-     * 鍔熻兘缂栧彿
+     * 鍔熻兘缂栧彿 TODO:20240822纭骞冲彴宸茬粡鍘绘帀杩欎釜瀛楁浜嗭紝鎵�浠ヨ〃涓篃鍒犳帀浜嗚瀛楁骞跺皢杩欏効娉ㄩ噴鎺変簡
      */
-    private Integer plmoduleno;
+    //private Integer plmoduleno;
 
     /**
      * 鎻忚堪
@@ -152,13 +152,13 @@
         this.plsuffixb = plsuffixb == null ? null : plsuffixb.trim();
     }
 
-    public Integer getPlmoduleno() {
+    /*public Integer getPlmoduleno() {
         return plmoduleno;
     }
 
     public void setPlmoduleno(Integer plmoduleno) {
         this.plmoduleno = plmoduleno;
-    }
+    }*/
 
     public String getPldesc() {
         return pldesc;
@@ -234,7 +234,7 @@
                 ", plsuffixc='" + plsuffixc + '\'' +
                 ", plresourceb='" + plresourceb + '\'' +
                 ", plsuffixb='" + plsuffixb + '\'' +
-                ", plmoduleno=" + plmoduleno +
+                //", plmoduleno=" + plmoduleno +
                 ", pldesc='" + pldesc + '\'' +
                 ", plisvalid=" + plisvalid +
                 ", plimage='" + plimage + '\'' +
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java
index 473c411..09b7139 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java
@@ -2,6 +2,7 @@
 package com.vci.pagemodel;
 
 
+import java.io.Serializable;
 import java.util.HashMap;
 import java.util.List;
 
@@ -10,7 +11,7 @@
  *
  * @author Chill
  */
-public class MenuVO  {
+public class MenuVO implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/**
@@ -49,9 +50,24 @@
 	private String alias;
 
 	/**
-	 * 璇锋眰鍦板潃
+	 * 璇锋眰鍦板潃锛岀晫闈㈣矾寰�
 	 */
 	private String path;
+
+	/**
+	 * 瀹㈡埛绔湴鍧�
+	 */
+	private String pathC;
+
+	/**
+	 * resourceDotNet
+	 */
+	private String resourceDotNet;
+
+	/**
+	 * resourceDotMobile
+	 */
+	private String resourceMobile;
 
 	/**
 	 * 鑿滃崟璧勬簮
@@ -109,10 +125,68 @@
 	private String modeType;
 
 	/**
+	 * 鏄ā鍧椾笅瀛愬璞℃槸妯″潡杩樻槸鎿嶄綔锛�0琛ㄧず鏃犲瓙鑺傜偣锛�1琛ㄧず鏄ā鍧楋紝2琛ㄧず鏄搷浣�
+	 */
+	private Integer childType;
+
+	/**
+	 * 1鏈夋晥0鏃犳晥锛氭棤鏁堟椂锛屽湪鍔熻兘鏉冮檺鐣岄潰涓嶆樉绀�
+	 */
+	private Boolean isValid;
+
+	/**
 	 * 鍓嶇鏄惁闅愯棌
 	 */
 	private HashMap<String,Boolean> meta = new HashMap<>();
 
+	public void setPathC(String pathC) {
+		this.pathC = pathC;
+	}
+
+	public void setResourceDotNet(String resourceDotNet) {
+		this.resourceDotNet = resourceDotNet;
+	}
+
+	public void setResourceMobile(String resourceMobile) {
+		this.resourceMobile = resourceMobile;
+	}
+
+	public void setValid(Boolean valid) {
+		isValid = valid;
+	}
+
+	public String getPathC() {
+		return pathC;
+	}
+
+	public String getResourceDotNet() {
+		return resourceDotNet;
+	}
+
+	public String getResourceMobile() {
+		return resourceMobile;
+	}
+
+	public Boolean getValid() {
+		return isValid;
+	}
+
+	public void setIsValid(Boolean isValid) {
+		this.isValid = isValid;
+	}
+
+	public Boolean getIsValid() {
+		return isValid;
+	}
+
+	public void setChildType(Integer childType) {
+		this.childType = childType;
+	}
+
+	public Integer getChildType() {
+		return childType;
+	}
+
 	public String getModeType() {
 		return modeType;
 	}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java
index 8106ccf..1be0596 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java
@@ -56,11 +56,12 @@
     /**
      * 閫氳繃妯″潡ID鑾峰彇瀛愮骇鍒楄〃
      * @param parentId
+     * @param modeType 妯″潡绫诲瀷
      * @param isAll 鏄惁鍖呮嫭鏃犳晥鐨勬ā鍧楋紝true鍒欏寘鎷�
      * @return
      * @throws VciBaseException
      */
-    List<MenuVO> getSysModelTreeMenuByPID(String parentId,boolean isAll) throws VciBaseException;
+    List<MenuVO> getSysModelTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException;
 
     int checkChildObject(String moduleId) throws VciException;
 
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java
new file mode 100644
index 0000000..0685871
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java
@@ -0,0 +1,123 @@
+package com.vci.frameworkcore.compatibility;
+
+import com.vci.common.exception.VciException;
+import com.vci.corba.common.PLException;
+import com.vci.pagemodel.MenuVO;
+import com.vci.starter.web.exception.VciBaseException;
+import com.vci.starter.web.pagemodel.BaseResult;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 棣栭〉绯荤粺妯″潡閰嶇疆娣诲姞鎸夐挳銆佹坊鍔犳搷浣滅被鍨嬬瓑鎺ュ彛鏈嶅姟
+ * @author ludc
+ * @date 2024/8/19 12:42
+ */
+public interface SmHMSysModConfigServiceI {
+
+    /**
+     * 娣诲姞妯″潡
+     * @param menuVO
+     * @return
+     */
+    MenuVO addModule(MenuVO menuVO) throws VciBaseException;
+
+    /**
+     * 淇敼妯″潡
+     * @param menuVO
+     * @return
+     */
+    MenuVO updateModule(MenuVO menuVO) throws VciBaseException;
+
+    /**
+     * 鍒犻櫎妯″潡
+     * @param menuVO
+     * @return
+     */
+    boolean delModule(MenuVO menuVO);
+
+    /**
+     * 澧炲姞鎿嶄綔绫诲瀷
+     * @return
+     */
+    boolean addOperationType(List<MenuVO> menuVOList);
+
+    /**
+     * 鍒犻櫎闈炵郴缁熸ā鍧�
+     * @return
+     */
+    boolean delNonsysModule();
+
+    /**
+     * 鍒犻櫎涓氬姟妯″潡
+     * @return
+     */
+    boolean delBusinessModule();
+
+    /**
+     * 瀵煎嚭绠$悊鍔熻兘妯″潡鎴栨搷浣滅被鍨嬬鐞嗘ā鍧梥ql
+     * @param exportPath 瀵煎嚭璺緞
+     * @param isFunction 鏄惁鏄鍑虹鐞嗗姛鑳芥ā鍧梥ql
+     * @return
+     * @throws PLException
+     */
+    File exportFunctionSql(HttpServletResponse response,String exportPath,boolean isFunction/*鏄惁鏄鍑虹鐞嗗姛鑳芥ā鍧梥ql*/) throws PLException;
+
+    /**
+     * 瀵煎嚭
+     * @return
+     */
+    String exportModule(HttpServletResponse response) throws PLException, IOException;
+
+    /**
+     * 瀵煎叆
+     * @param files
+     * @return
+     * @throws PLException
+     */
+    BaseResult importModule(LinkedList<File> files) throws PLException, IOException;
+
+    /**
+     * 绠$悊鍔熻兘妯″潡銆佷笟鍔″姛鑳芥ā鍧椾笅鐨勫彾瀛愯妭鐐光�斾慨鏀规搷浣滃埆鍚嶆帴鍙�
+     * @param menuVO
+     * @return
+     * @throws VciException
+     */
+    boolean updateAlias(MenuVO menuVO) throws VciException;
+
+    //绯荤粺閰嶇疆鐩稿叧鎺ュ彛
+    /**
+     * 鏌ヨ绯荤粺閰嶇疆鍒嗙被
+     */
+    List<Object>getSysConfTree();
+
+    /**
+     * 澧炲姞绯荤粺閰嶇疆
+     * @return
+     */
+    boolean addSysConf();
+
+    /**
+     * 淇敼绯荤粺閰嶇疆
+     * @return
+     */
+    boolean updateSysConf();
+
+    /**
+     * 鍒犻櫎绯荤粺閰嶇疆
+     * @return
+     */
+    boolean delSysConf();
+
+    /**
+     * 瀵煎嚭绯荤粺閰嶇疆
+     * @param response
+     * @return
+     */
+    String exportSysConf(HttpServletResponse response);
+
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
index 1f6c4de..8cde4ca 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
@@ -2,6 +2,7 @@
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.JSONReader;
 import com.vci.client.ClientSession;
 import com.vci.common.exception.VciException;
 import com.vci.common.locale.LocaleDisplay;
@@ -176,7 +177,7 @@
     private SmFunctionVO functionForPlatform1ToFunctionVO(SmFunctionForPlatform1 functionForPlatform1){
         SmFunctionVO functionVO = new SmFunctionVO();
         functionVO.setOid(functionForPlatform1.getPloid());
-        functionVO.setId(String.valueOf(functionForPlatform1.getPlmoduleno()));
+        //functionVO.setId(String.valueOf(functionForPlatform1.getPlmoduleno()));
         functionVO.setName(functionForPlatform1.getPlname());
         functionVO.setLogName(functionForPlatform1.getPlaliasname());
         if(StringUtils.isNotBlank(functionForPlatform1.getPlresourceb())){
@@ -287,8 +288,10 @@
         //濡傛灉鏄紑鍙戞垨鑰呮祴璇曠敤鎴凤紝闇�鍝熻幏鍙栫郴缁熸ā鍧楅厤缃彍鍗�
         if(adminOrDeveloperOrRoot){
             //鑾峰彇棣栭〉绯荤粺妯″潡閰嶇疆鑿滃崟
-            MenuVO menuVO = JsonConfigReader.getMenuVO();
-            functionVOList.add(menuVO);
+            MenuVO menuVO = JsonConfigReader.getSysModuleConf().getSysModuleNode();
+            if(Func.isNotEmpty(menuVO)){
+                functionVOList.add(menuVO);
+            }
         }
         return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList());
     }
@@ -296,27 +299,30 @@
     /**
      * 閫氳繃妯″潡ID鑾峰彇瀛愮骇鍒楄〃
      * @param parentId
+     * @param modeType 妯″潡绫诲瀷
      * @param isAll 鏄惁鍖呮嫭鏃犳晥鐨勬ā鍧楋紝true鍒欏寘鎷�
      * @return
      * @throws VciBaseException
      */
     @Override
-    public List<MenuVO> getSysModelTreeMenuByPID(String parentId,boolean isAll) throws VciBaseException{
+    public List<MenuVO> getSysModelTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException{
         List<MenuVO> menuVOList = new ArrayList<>();
         if(Func.isBlank(parentId)){
             return menuVOList;
         }
-        if(parentId.equals("mangeModel") || parentId.equals("businessModel")){
-            if(parentId.equalsIgnoreCase("FunctionObject")){
+        boolean isFunctionObject = Func.isNotBlank(modeType) && modeType.equalsIgnoreCase("FunctionObject");
+        if(parentId.equals("systemManagmentNode") || parentId.equals("modelManagmentNode") || isFunctionObject){
+            int childType = this.checkChildObject(parentId);
+            if(isFunctionObject){
                 try {
                     /**鍒ゆ柇璇ユā鍧椾笅瀛愬璞℃槸妯″潡杩樻槸鎿嶄綔锛�0琛ㄧず鏃犲瓙鑺傜偣锛�1琛ㄧず鏄ā鍧楋紝2琛ㄧず鏄搷浣�**/
-                    int childType = this.checkChildObject(parentId);
                     if(childType == 2){
                         try{
                             FuncOperationInfo[] infos = platformClientUtil.getFrameworkService().getFuncOperationByModule(parentId, "", false);
                             for(int i = 0;i < infos.length ;i++){
                                 FuncOperationInfo info = infos[i];
                                 MenuVO menuVO = new MenuVO();
+                                menuVO.setChildType(childType);
                                 menuVO.setId(info.id);
                                 menuVO.setCode(info.funcId);
                                 menuVO.setId(info.operId);
@@ -325,7 +331,8 @@
                                 menuVO.setAlias(info.operAlias);
                                 menuVO.setRemark(info.operDesc);
                                 menuVO.setSort((int) info.number);
-                                //menuVO.setIsValid(info.isValid);
+                                menuVO.setModeType("FunctionObject");
+                                menuVO.setIsValid(info.isValid);
                                 menuVO.setHasChildren(false);
                                 menuVOList.add(menuVO);
                             }
@@ -339,6 +346,8 @@
                             for(int i = 0;i < funcInfos.length; i++){
                                 FunctionInfo funcInfo = funcInfos[i];
                                 MenuVO menuVO = this.functionInfoToMenuVO(funcInfo);
+                                menuVO.setChildType(childType);
+                                menuVO.setModeType("FunctionObject");
                                 menuVOList.add(menuVO);
                             }
                         }catch (PLException e) {
@@ -352,21 +361,36 @@
                 }
             }else{
                 try{
+                    MenuVO parentNode;
+                    //灏嗚繑鍥炵殑鑺傜偣澶栧眰濂椾笂褰撳墠鐖惰妭鐐�
+                    if(parentId.equals("systemManagmentNode")){
+                        parentNode = JsonConfigReader.getSysModuleConf().getSystemManagmentNode();
+                    }else{
+                        parentNode = JsonConfigReader.getSysModuleConf().getModelManagmentNode();
+                    }
+                    List<MenuVO> menuVOS = new ArrayList<>();
+                    //鏌ヨ鐨勪笁绾ц妭鐐�
                     FunctionInfo[] funcInfos = platformClientUtil.getFrameworkService().getModuleListByParentId(parentId, isAll);
                     for(int i = 0;i < funcInfos.length; i++){
                         FunctionInfo funcInfo = funcInfos[i];
                         MenuVO menuVO = this.functionInfoToMenuVO(funcInfo);
                         menuVO.setModeType("FunctionObject");
-                        menuVOList.add(menuVO);
+                        menuVO.setChildType(childType);
+                        menuVOS.add(menuVO);
                     }
+                    parentNode.setChildren(menuVOS);
+                    menuVOList.add(parentNode);
                 }catch (PLException e) {
                     e.printStackTrace();
                     throw new VciBaseException(String.valueOf(e.code),e.messages);
                 }
             }
-        }else if(parentId.equals("operateType")){
+        }else if(parentId.equals("sysOptionNode")){
             //鍔犺浇鎵�鏈夋搷浣�
             try{
+                //灏嗚繑鍥炵殑鑺傜偣澶栧眰濂椾笂褰撳墠鐖惰妭鐐�
+                MenuVO parentNode = JsonConfigReader.getSysModuleConf().getOperateNode();
+                List<MenuVO> menuVOS = new ArrayList<>();
                 OperateInfo[] operateInfos = platformClientUtil.getFrameworkService().getOperateTreeList(parentId);
                 for(int i = 0; i < operateInfos.length;i++ ){
                     OperateInfo operateInfo = operateInfos[i];
@@ -376,19 +400,22 @@
                     menuVO.setCode(operateInfo.identify);
                     menuVO.setAlias(operateInfo.alias);
                     menuVO.setCategory(2);
+                    menuVO.setChildType(0);
                     menuVO.setRemark(operateInfo.desc);
                     menuVO.getMeta().put("keepAlive",false);
                     menuVO.setSort((int) operateInfo.seq);
                     menuVO.setModeType("operateObject");
                     menuVO.setHasChildren(false);
-                    menuVOList.add(menuVO);
+                    menuVOS.add(menuVO);
                 }
+                parentNode.setChildren(menuVOS);
+                menuVOList.add(parentNode);
             }catch (PLException e) {
                 e.printStackTrace();
                 throw new VciBaseException(String.valueOf(e.code),new String[]{VciBaseUtil.getExceptionMessage(e)});
             }
         }
-        return menuVOList;
+        return menuVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList());
     }
 
     /**
@@ -399,10 +426,11 @@
     private MenuVO functionInfoToMenuVO(FunctionInfo funcInfo){
         MenuVO menuVO = new MenuVO();
         menuVO.setId(funcInfo.id);
+        menuVO.setValid(funcInfo.isValid);
         menuVO.setSource(funcInfo.image);
-        //if(StringUtils.isBlank(menu.resourceB)){
-        //    continue;
-        //}
+        menuVO.setPathC(funcInfo.resourceC);
+        menuVO.setResourceDotNet(funcInfo.resourceDotNet);
+        menuVO.setResourceMobile(funcInfo.resourceMobile);
         menuVO.setPath(funcInfo.resourceB);
         menuVO.setParentId(funcInfo.parentId);
         menuVO.setCode(funcInfo.aliasName);
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java
new file mode 100644
index 0000000..e3b50dc
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java
@@ -0,0 +1,1028 @@
+package com.vci.frameworkcore.compatibility.impl;
+
+import com.vci.client.common.excel.ExcelDocumentUtils;
+import com.vci.common.exception.VciException;
+import com.vci.common.locale.LocaleDisplay;
+import com.vci.common.utility.ObjectUtility;
+import com.vci.corba.common.PLException;
+import com.vci.corba.common.data.UserEntityInfo;
+import com.vci.corba.framework.data.FuncOperationInfo;
+import com.vci.corba.framework.data.FunctionInfo;
+import com.vci.corba.framework.data.OperateInfo;
+import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI;
+import com.vci.pagemodel.MenuVO;
+import com.vci.client.common.excel.SheetDataSet;
+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.pagemodel.SessionInfo;
+import com.vci.starter.web.util.LocalFileUtil;
+import com.vci.starter.web.util.VciBaseUtil;
+import com.vci.starter.web.util.WebThreadLocalUtil;
+import com.vci.web.util.Func;
+import com.vci.web.util.PlatformClientUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.util.*;
+
+/**
+ * 棣栭〉绯荤粺妯″潡閰嶇疆娣诲姞鎸夐挳銆佹坊鍔犳搷浣滅被鍨嬬瓑鎺ュ彛鏈嶅姟
+ * @author ludc
+ * @date 2024/8/19 12:42
+ */
+@Service
+public class SmHMSysModConfigServiceImpl implements SmHMSysModConfigServiceI {
+
+    @Autowired
+    private PlatformClientUtil platformClientUtil;
+
+    private List<FunctionInfo> fileFunctionDatas = new ArrayList<FunctionInfo>();
+
+    private int count = 0;
+
+    private static FunctionOperateDelegate foDelegate;
+
+    {
+        if(Func.isEmpty(foDelegate)){
+            foDelegate = new FunctionOperateDelegate();
+        }
+    }
+
+    /**
+     * 鏃ュ織
+     */
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    /**
+     * 娣诲姞妯″潡
+     * @param menuVO
+     * @return
+     */
+    @Override
+    public MenuVO addModule(MenuVO menuVO) throws VciBaseException {
+        VciBaseUtil.alertNotNull(menuVO,"鏂板鐨勬ā鍧楀璞�");
+        try {
+            //寰�鏁版嵁搴撻噷鎻掑叆鏂板缓妯″潡鏁版嵁
+            String puid = foDelegate.saveModule(menuVO);
+            /**
+             * 杩斿洖鍊硷細1锛岃〃绀烘ā鍧楀悕绉伴噸澶�
+             * 		   2锛岃〃绀烘ā鍧楁爣璇嗛噸澶�
+             *         3, 妯℃澘鍒悕瀛樺湪閲嶅
+             */
+            if(puid.equals("1")){
+                throw new VciBaseException("妯″潡鍚嶇О閲嶅锛岃淇敼锛�");
+            }else if(puid.equals("2")){
+                throw new VciBaseException("妯″潡鏍囪瘑閲嶅锛岃淇敼锛�");
+            }else if(puid.equals("3")) {
+                throw new VciBaseException("妯″潡鍒悕閲嶅锛岃淇敼锛�");
+            }
+            menuVO.setId(puid);
+            return menuVO;
+        } catch (Exception e) {
+            e.printStackTrace();
+            String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            throw new VciBaseException(exceptionMessage);
+        }
+    }
+
+    /**
+     * 淇敼妯″潡
+     * @param menuVO
+     * @return
+     */
+    @Override
+    public MenuVO updateModule(MenuVO menuVO) throws VciBaseException {
+        VciBaseUtil.alertNotNull(menuVO,"淇敼鐨勬ā鍧楀璞�");
+        try {
+            String res = "";
+            //鏇存柊鏁版嵁搴�
+            res = foDelegate.updateMod(menuVO);
+            /**
+             * 杩斿洖锛�1琛ㄧず妯″潡鍚嶉噸澶嶃��
+             *       2琛ㄧず妯″潡鏍囪瘑閲嶅銆�
+             *       3鏍囩ず妯″潡鍒悕閲嶅銆�
+             */
+            if(res.equals("1")){
+                throw new VciBaseException("妯″潡鍚嶇О閲嶅锛岃淇敼锛�");
+            }else if(res.equals("2")){
+                throw new VciBaseException("妯″潡鏍囪瘑閲嶅锛岃淇敼锛�");
+            }else if(res.equals("3")) {
+                throw new VciBaseException("妯″潡鍒悕閲嶅锛岃淇敼锛�");
+            }/* else if (res.equals("4")) {
+                throw new VciBaseException("妯″潡缂栧彿閲嶅锛岃淇敼锛�");
+            }*/
+            return menuVO;
+        } catch (VciBaseException e) {
+            e.printStackTrace();
+            String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            throw new VciBaseException(exceptionMessage);
+        }
+    }
+
+    /**
+     * 鍒犻櫎妯″潡
+     * @param menuVO
+     * @return
+     */
+    @Override
+    public boolean delModule(MenuVO menuVO) {
+        VciBaseUtil.alertNotNull(menuVO,"娣诲姞鎿嶄綔绫诲瀷鐨勫垪琛�");
+        String res = "";
+        try {
+            String puid = "";
+            if("FunctionObject".equals(menuVO.getModeType())) {
+                puid = menuVO.getId();
+            }else if("modelManagmentNode".equals(menuVO.getId())) {
+                puid = "modelManagmentNode";
+            }else if("systemManagmentNode".equals(menuVO.getId())) {
+                puid = "systemManagmentNode";
+            }
+            if(Func.isBlank(puid)){
+                throw new VciBaseException("鏈壘鍒拌鍒犻櫎鐨勬ā鍧楋紒");
+            }
+            res = foDelegate.deleteModule(puid);
+            /**
+             * 杩斿洖鍊硷細1琛ㄧず妯″潡鍦ㄦ潈闄愭ā鍧楀凡缁忔湁鎺堟潈淇℃伅锛屾棤娉曞垹闄�
+             */
+            if(res.equals("1")){
+               throw new VciBaseException("褰撳墠妯″潡锛堟垨涓嬬骇妯″潡锛夊凡缁忓瓨鍦ㄦ巿鏉冧俊鎭紝鏃犳硶鍒犻櫎銆�");
+            }
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            throw new VciBaseException(exceptionMessage);
+        }
+    }
+
+    /**
+     * 澧炲姞鎿嶄綔绫诲瀷
+     * @return
+     */
+    @Override
+    public boolean addOperationType(List<MenuVO> menuVOList) {
+        VciBaseUtil.alertNotNull(menuVOList,"娣诲姞鎿嶄綔绫诲瀷鐨勫垪琛�");
+        List<FuncOperationInfo> objs = new ArrayList<>();
+        //灏嗘搷浣滅被鍨嬬粍瑁呮垚闇�瑕佸瓨鍌ㄧ殑瀵硅薄
+        menuVOList.stream().forEach(menuVO -> {
+            FuncOperationInfo info = new FuncOperationInfo();
+            //info.id = menuVO.getId() == null ? "" : menuVO.getId();
+            info.funcId = menuVO.getParentId() == null ? "" : menuVO.getParentId();
+            info.operId = menuVO.getId() == null ? "" : menuVO.getId();
+            info.operName = menuVO.getName() == null ? "" : menuVO.getName();
+            //info.operIndentify = menuVO.getOperIndentify() == null ? "" : menuVO.getOperIndentify();
+            info.operAlias = menuVO.getAlias() == null ? "" : menuVO.getAlias();
+            info.operDesc = menuVO.getRemark() == null ? "" : menuVO.getRemark();
+            info.number = -1;
+            info.isValid = true;
+            /*VCIBaseTreeNode node = (VCIBaseTreeNode)treePaths[i].getLastPathComponent();
+            OperateObject operateObject = (OperateObject) node.getObj();
+            obj.setFuncId(funcObj.getId());
+            obj.setOperId(operateObject.getId());
+            obj.setOperName(operateObject.getName());
+            obj.setOperIndentify(operateObject.getIdentify());
+            obj.setOperAlias(operateObject.getAlias());
+            obj.setNumber(-1);
+            obj.setIsValid(true);*/
+            objs.add(info);
+        });
+
+        //鎵ц淇濆瓨
+        boolean res = true;
+        try {
+            res = this.saveFuncOperation(objs.toArray(new FuncOperationInfo[objs.size()]));
+        } catch (Exception e) {
+            res = false;
+            e.printStackTrace();
+            String exceptionMessage = "澧炲姞鎿嶄綔绫诲瀷澶辫触锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            throw new VciBaseException(exceptionMessage);
+        }
+        return res;
+    }
+
+    /**
+     * 鍒犻櫎闈炵郴缁熸ā鍧�
+     * @return
+     */
+    @Override
+    public boolean delNonsysModule() {
+        try {
+            if(platformClientUtil.getFrameworkService().deleteModules("nonsys")){
+                return true;
+            }
+        } catch (PLException e) {
+            e.printStackTrace();
+            String exceptionMessage = "鍒犻櫎闈炵郴缁熸ā鍧楀け璐�,鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            throw new VciBaseException(exceptionMessage);
+        }
+        return false;
+    }
+
+    /**
+     * 鍒犻櫎涓氬姟妯″潡
+     * @return
+     */
+    @Override
+    public boolean delBusinessModule() {
+        try {
+            if(platformClientUtil.getFrameworkService().deleteModules("business")){
+                return true;
+            }
+        } catch (PLException e) {
+            e.printStackTrace();
+            String exceptionMessage = "鍒犻櫎涓氬姟妯″潡澶辫触,鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            throw new VciBaseException(exceptionMessage);
+        }
+        return false;
+    }
+
+    /**
+     * 瀵煎嚭sql
+     * @return
+     */
+    @Override
+    public File exportFunctionSql(HttpServletResponse response,String exportPath,boolean isFunction) throws PLException {
+        String dir = Func.isBlank(exportPath) ?  LocalFileUtil.getDefaultTempFolder():exportPath;
+        String[][] allDatas;
+        int size;
+        if(isFunction){
+            size = (int)platformClientUtil.getFrameworkService().getAllModelManagementNum();
+            allDatas = this.getAllDatas(size);
+        }else{
+            size = (int)platformClientUtil.getFrameworkService().getAllOperitionsNum();
+            allDatas = this.getAllOperitions(size);
+        }
+        File file = expData(dir,isFunction, allDatas);
+        return file;
+    }
+
+    /**
+     * 瀵煎嚭
+     * @return
+     */
+    @Override
+    public String exportModule(HttpServletResponse response) throws IOException {
+        String defaultTempFolder = LocalFileUtil.getDefaultTempFolder();
+        //鍐檈xcel
+        String excelPath = defaultTempFolder + File.separator + "module.xls";
+        final List<String> columns = new ArrayList<String>(Arrays.asList("PLNAME","PLRESOURCEC","PLSUFFIXC","PLRESOURCEB",
+                "PLSUFFIXB","PLMODULENO","PLDESC","PLISVALID","PLIMAGE","PLMODULESEQUENCE","PLALIASNAME",
+                "PLMODULENAME","PLRESOURCEDOTNET","PLRESOURCEMOBIL","绾у埆","鍒悕","PLNO","PLISVALID",
+                "PLNAME","PLUNIQUEFLAG","PLDESC","PLALIAS","PLSEQUENCE"));// 璁剧疆琛ㄥ崟鍒楀悕
+        //int count = transmitTreeObject.getCurrentTreeNode().getChildCount();
+        new File(excelPath).createNewFile();
+        //璁剧疆鍒�
+        List<WriteExcelData> excelDataList = new ArrayList<>(10000);
+        //璁剧疆鍒楀ご
+        for (int index = 0; index < columns.size(); index++) {
+            excelDataList.add(new WriteExcelData(0,index, columns.get(index)));
+        }
+        //鏌ヨ瑕佸鍑虹殑鏁版嵁
+        String[][] firstLevel = new String[3000][23];
+        try {
+            firstLevel = this.checkLevel();
+        } catch (VciBaseException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        String[][] datas = new String[10000][columns.size()];
+        for(int i=0;i<firstLevel.length;i++){
+            datas[i] =firstLevel[i];
+        }
+        if(Func.isEmpty(datas)){
+            excelDataList.add(new WriteExcelData(1,1, "瀵煎嚭鐨勫垪琛ㄤ负绌猴紝璇峰埛鏂板悗灏濊瘯閲嶆柊瀵煎嚭锛�"));
+        }else{
+            for (int i = 0; i < firstLevel.length; i++) {
+                int row = i + 1;
+                excelDataList.add(new WriteExcelData(row,0, ""+datas[i][0]));
+                excelDataList.add(new WriteExcelData(row,1, ""+datas[i][1]));
+                excelDataList.add(new WriteExcelData(row,2, ""+datas[i][2]));
+                excelDataList.add(new WriteExcelData(row,3, ""+datas[i][3]));
+                excelDataList.add(new WriteExcelData(row,4, ""+datas[i][4]));
+                excelDataList.add(new WriteExcelData(row,5, ""+datas[i][5]));
+                excelDataList.add(new WriteExcelData(row,6, ""+datas[i][6]));
+                excelDataList.add(new WriteExcelData(row,7, ""+datas[i][7]));
+                excelDataList.add(new WriteExcelData(row,8, ""+datas[i][8]));
+                excelDataList.add(new WriteExcelData(row,9, ""+datas[i][9]));
+                excelDataList.add(new WriteExcelData(row,10,""+datas[i][10]));
+                excelDataList.add(new WriteExcelData(row,11,""+datas[i][11]));
+                excelDataList.add(new WriteExcelData(row,12,""+datas[i][12]));
+                excelDataList.add(new WriteExcelData(row,13,""+datas[i][13]));
+                excelDataList.add(new WriteExcelData(row,14,""+datas[i][14]));
+                excelDataList.add(new WriteExcelData(row,15,""+datas[i][15]));
+                excelDataList.add(new WriteExcelData(row,16,""+datas[i][16]));
+                excelDataList.add(new WriteExcelData(row,17,""+datas[i][17]));
+                excelDataList.add(new WriteExcelData(row,18,""+datas[i][18]));
+                excelDataList.add(new WriteExcelData(row,19,""+datas[i][19]));
+                excelDataList.add(new WriteExcelData(row,20,""+datas[i][20]));
+                excelDataList.add(new WriteExcelData(row,21,""+datas[i][21]));
+                excelDataList.add(new WriteExcelData(row,22,""+datas[i][22]));
+            }
+        }
+        WriteExcelOption excelOption = new WriteExcelOption(excelDataList);
+        ExcelUtil.writeDataToFile(excelPath, excelOption);
+        return excelPath;
+    }
+
+    /**
+     * 瀵煎叆
+     * @param files
+     * @return
+     * @throws PLException
+     */
+    @Override
+    public BaseResult importModule(LinkedList<File> files) throws PLException, IOException {
+        logger.info("姝e湪鏀堕泦琛ㄥ崟鏁版嵁......");
+        boolean isSuccess = collectionDatas(files);
+        logger.info("姝e湪瀵煎叆琛ㄥ崟浜哄憳淇℃伅......");
+        logger.info("count==="+count);
+        boolean resBoolean = false;
+        if(isSuccess == false){
+            resBoolean = importExcelData(count);
+        }
+        return resBoolean ? BaseResult.success("瀵煎叆鎴愬姛锛�"):BaseResult.fail("瀵煎叆澶辫触锛�");
+    }
+
+    /**
+     * 绠$悊鍔熻兘妯″潡銆佷笟鍔″姛鑳芥ā鍧椾笅鐨勫彾瀛愯妭鐐光�斾慨鏀规搷浣滃埆鍚嶆帴鍙�
+     * @return
+     */
+    @Override
+    public boolean updateAlias(MenuVO menuVO) throws VciException {
+        String alias = menuVO.getAlias();
+        if ("".equals(alias)){
+            throw new VciBaseException("璇峰~鍐欐搷浣滃埆鍚�!");
+        }
+        boolean isValid = menuVO.getIsValid();
+        String id = menuVO.getId();
+        return foDelegate.updateFuncOperation(id , alias, isValid);
+    }
+
+    @Override
+    public List<Object> getSysConfTree() {
+        return null;
+    }
+
+    @Override
+    public boolean addSysConf() {
+        return false;
+    }
+
+    @Override
+    public boolean updateSysConf() {
+        return false;
+    }
+
+    @Override
+    public boolean delSysConf() {
+        return false;
+    }
+
+    @Override
+    public String exportSysConf(HttpServletResponse response) {
+        return null;
+    }
+
+    /**
+     * 鏀堕泦琛ㄥ崟淇℃伅銆�
+     * @param files
+     * @return
+     * @throws PLException
+     * @throws IOException
+     */
+    private boolean collectionDatas(LinkedList<File> files) throws PLException, IOException{
+        boolean b=false;
+        for (File f : files) {
+            List<SheetDataSet> sheetDataSets = this.getFileList(f);
+            if (sheetDataSets != null && !sheetDataSets.isEmpty()) {
+                for (SheetDataSet sheet : sheetDataSets) {
+                    // sheet涓嶈兘涓虹┖骞朵笖蹇呴』鏈夊嚭琛ㄥご澶栫殑涓�鏉℃暟鎹�
+                    if (sheet != null && sheet.getDataSet() != null && sheet.getDataSet().size() > 1) {
+                        List<String[]> dataSet = sheet.getDataSet();
+                        String fParentId=""; //绗竴绾х殑id(绗簩绾х殑parentid)
+                        boolean boo=true;
+                        boolean first=false;
+                        String[] pd=new String[100];
+                        int jibie=2;
+                        for (int i = 1; i < dataSet.size(); i++) {
+                            //fileDatas = new ArrayList<FunctionObject>();
+                            String[] oneData = dataSet.get(i);
+                            String id = ObjectUtility.getNewObjectID36();
+
+                            FunctionInfo funObj=new FunctionInfo();
+                            boolean onebl=false;
+                            boolean twobl=false;
+                            boolean same=false;
+                            String plName=oneData[0];
+                            //TODO: 杩欓噷缁濆浼氬嚭闂锛屽鍑虹殑绗竴灞傜殑绾у埆閮芥槸0锛岄兘涓嶄細瀛樺湪绛変簬1鐨勶紝鎵�浠ュ钩鍙拌繖鍎跨瓑浜�1搴旇鏄笉瀵圭殑
+                            if(oneData[14].equals("0")) {
+                                try {
+                                    onebl = foDelegate.firstLevel(plName);
+                                } catch (VciException e) {
+                                    // TODO Auto-generated catch block
+                                    e.printStackTrace();
+                                }
+                                //濡傛灉绗竴绾ч噸鍚�
+                                if(onebl == true) {//绗竴绾ч噸鍚嶅悗瑕嗙洊绗竴绾�
+                                    fuzhi(funObj,oneData);
+                                    try {
+                                        fParentId = foDelegate.changeFirstLevel(funObj,plName);
+                                        pd[2]=fParentId;
+                                    } catch (VciException e) {
+                                        // TODO Auto-generated catch block
+                                        e.printStackTrace();
+                                    }
+                                    funObj.id = fParentId;
+                                    fileFunctionDatas.add(funObj);
+                                    first=true;
+
+
+                                } else {
+                                    funObj.id = id;
+                                    funObj.parentId = "modelManagmentNode";
+                                    fuzhi(funObj,oneData);
+                                    fileFunctionDatas.add(funObj);
+                                    first=false;
+                                }
+
+                                b=false;
+                            }
+                            //#########################     鍚堝苟     #########################
+                            for(jibie=2;jibie<100;jibie++){
+                                if(oneData[14].equals(String.valueOf(jibie))){
+                                    if(first == true && boo == true){
+                                        try {
+                                            if(pd[jibie]==null){
+                                                pd[jibie]="";
+                                            }
+                                            twobl=foDelegate.secondLevel(plName,pd[jibie]);
+                                        } catch (VciException e) {
+                                            // TODO Auto-generated catch block
+                                            e.printStackTrace();
+                                        }
+                                        if(twobl==true) {//閲嶅悕鍚庤鐩�
+                                            fuzhi(funObj,oneData);
+                                            try {
+                                                fParentId=foDelegate.changeSecondLevel(funObj,plName,pd[jibie]);
+                                                pd[jibie+1]=fParentId;
+                                            } catch (VciException e) {
+                                                // TODO Auto-generated catch block
+                                                e.printStackTrace();
+                                            }
+                                            //funObj.setId(fParentId);
+                                            funObj.id = pd[jibie+1];
+                                            fileFunctionDatas.add(funObj);
+                                            boo = true;
+
+                                        }
+                                    } else {
+                                        funObj.id = id;
+                                        b = false;
+                                    }
+                                }
+                            }
+
+                            if(oneData[14].equals("-1")) {
+                                importExcelData(count);
+                                FuncOperationInfo foObj = new FuncOperationInfo();
+                                int len=fileFunctionDatas.size();
+                                //**************鍚屼竴鑺傜偣涓嬩笉鑳芥湁鐩稿悓鐨勬搷浣滅被鍨�********************
+                                String dataOperName=oneData[18];
+                                String plFuncOid=fileFunctionDatas.get(len-1).id;
+                                try {
+                                    same = foDelegate.selSameOper(dataOperName,plFuncOid);
+                                } catch (VciBaseException e1) {
+                                    // TODO Auto-generated catch block
+                                    e1.printStackTrace();
+                                }
+                                //******************************************************
+                                if(same == false) {
+                                    foObj.id = id;
+                                    foObj.funcId = fileFunctionDatas.get(len-1).id;
+                                    try {
+                                        OperateInfo operObj = foDelegate.fetchOperateTypeByName(oneData[18]);
+                                        foObj.operId = operObj.id;
+                                    } catch (VciException e) {
+                                        // TODO Auto-generated catch block
+                                        e.printStackTrace();
+                                    }
+                                    foObj.number = Integer.parseInt(oneData[16]);
+                                    foObj.operAlias = oneData[15];
+                                    foObj.isValid = Integer.parseInt(oneData[17]) != 0;
+                                    try {
+                                        foDelegate.saveFuncOperation2(foObj);
+                                    } catch (VciException e) {
+                                        // TODO Auto-generated catch block
+                                        e.printStackTrace();
+                                    }
+
+                                } else {
+                                    foObj.number = Integer.parseInt(oneData[16]);
+                                    foObj.operAlias = oneData[15];
+                                    foObj.isValid = Integer.parseInt(oneData[17]) != 0;
+                                    try {
+                                        foDelegate.updateOperation(foObj,dataOperName,plFuncOid);
+                                    } catch (VciException e) {
+                                        // TODO Auto-generated catch block
+                                        e.printStackTrace();
+                                    }
+                                }
+                                count=fileFunctionDatas.size();
+                                b=true;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return b;
+    }
+
+    /**
+     * 瀵煎叆琛ㄥ崟鏁版嵁
+     * @throws VciException
+     */
+    private boolean importExcelData(int count) throws PLException {
+        boolean b=false;
+        try {
+            b=	foDelegate.importModules(fileFunctionDatas.toArray(new FunctionInfo[]{}),count);
+        } catch (VciBaseException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return b;
+    }
+
+    /**
+     * 鑾峰彇琛ㄥ崟鏁版嵁
+     * @param f
+     * @return
+     * @throws IOException
+     * @throws PLException
+     * @autor caicong
+     * @data 2014-3-11
+     */
+    private List<SheetDataSet> getFileList(File f) throws PLException, IOException {
+        // 鑾峰彇娴�
+        BufferedInputStream fileInputStream = new BufferedInputStream(
+                new FileInputStream(f));
+        String name = f.getName();
+        // 鑾峰彇琛╨ist
+        List<SheetDataSet> sheetDataSets = ExcelDocumentUtils
+                .readExcelDocument(name, fileInputStream);
+        return sheetDataSets;
+    }
+
+    /**
+     * 鏌ヨ"鍔熻兘妯″潡绠$悊"鏁翠釜鏍戠粨鏋勫苟瀵煎嚭
+     * add by caill start
+     * */
+    private String[][] checkLevel() throws VciBaseException{
+        String[][] res = new String[3000][23];
+        try{
+            res = platformClientUtil.getFrameworkService().checkLevel();
+        }catch (PLException e) {
+            e.printStackTrace();
+            throw new VciBaseException(String.valueOf(e.code), e.messages);
+        }
+        return res;
+    }
+
+    /**
+     * 灏嗘煡璇㈠嚭鐨勬暟鎹浆鎹㈡垚sql骞跺啓鍏ユ寚瀹氳矾寰勪笅
+     * @param dir
+     * @param plDatas
+     * @return
+     */
+    private File expData(String dir,boolean isFunction/*鏄惁鏄鍑虹鐞嗗姛鑳芥ā鍧梥ql*/, String[][] plDatas){
+        new File(dir).mkdir();
+        File file = new File(dir + (isFunction ? "/plfuncoperation.sql":"/ploperation.sql"));
+        try {
+            FileWriter w = new FileWriter(file);
+            BufferedWriter bw = new BufferedWriter(w);
+            System.out.println("闀垮害涓猴細"+plDatas.length);
+            for(int i=0;i<plDatas.length;i++){
+                if(isFunction){
+                    if(!plDatas[i][16].trim().equals("") && plDatas[i][16]!=null && !plDatas[i][16].equals("-1")){
+                        bw.write("insert into plfunction values('"+plDatas[i][0]+"','"+plDatas[i][1]+"',"+"'"+plDatas[i][2]+"',"+"'"+plDatas[i][3]+"',"+"'"+plDatas[i][4]+"',"
+                                +"'"+plDatas[i][5]+"',"+"'"+plDatas[i][6]+"',"+"'"+plDatas[i][7]+"',"+"'"+plDatas[i][8]+"',"+"'"+plDatas[i][9]+"',"+"'"+plDatas[i][10]+"',"+"'"+plDatas[i][11]+"',"
+                                +"'"+plDatas[i][12]+"',"+"'"+plDatas[i][13]+"',"+"'"+plDatas[i][14]+"',"+"'"+plDatas[i][15]+"');");
+                        bw.write("\r\n");
+                    }
+                    if(!plDatas[i][16].trim().equals("") && plDatas[i][16]!=null && plDatas[i][16].equals("-1")){
+                        bw.write("insert into plfuncoperation values('"+plDatas[i][17]+"','"+plDatas[i][18]+"',"+"'"+plDatas[i][19]+"',"+"'"+plDatas[i][20]+"',"+"'"+plDatas[i][21]+"',"
+                                +"'"+plDatas[i][22]+"');");
+                        bw.write("\r\n");
+                    }
+                }else{
+                    bw.write("insert into ploperation values('"+plDatas[i][0]+"','"+plDatas[i][1]+"',"+"'"+plDatas[i][2]+"',"+"'"+plDatas[i][3]+"',"+"'"+plDatas[i][4]+"',"
+                            +"'"+plDatas[i][5]+"');");
+                    bw.write("\r\n");
+                }
+            }
+
+            bw.flush();
+            bw.close();
+            return file;
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 淇濆瓨妯″潡涓嬬殑鎿嶄綔
+     * @param funcOperationObjs
+     * @return
+     * @throws VciException
+     */
+    public boolean saveFuncOperation(FuncOperationInfo[] funcOperationObjs) throws VciException {
+        if(funcOperationObjs == null || funcOperationObjs.length < 0){
+            return false;
+        }
+        boolean res = true;
+        try{
+            res = platformClientUtil.getFrameworkService().saveFuncOperation(funcOperationObjs, foDelegate.getUserEntityInfo());
+        }catch (PLException e) {
+            e.printStackTrace();
+            throw new VciException(String.valueOf(e.code),e.messages);
+        }
+        return res;
+    }
+
+    /**
+     * 鏌ヨ"鍔熻兘妯″潡绠$悊"鏁翠釜鏍戠粨鏋勫苟瀵煎嚭sql
+     * @return
+     * @throws PLException
+     */
+    public String[][] getAllDatas(int size) throws PLException {
+        String[][] res = new String[size][23];
+        try{
+            res = platformClientUtil.getFrameworkService().getAllDatas(size);
+        }catch (PLException e) {
+            e.printStackTrace();
+            throw new PLException(String.valueOf(e.code), e.messages);
+        }
+        return res;
+    }
+
+    /**
+     * 鑾峰緱鎵�鏈夌殑鎿嶄綔绫诲瀷骞跺鍑哄埌.sql鏂囦欢涓�
+     * add by caill start 2015.12.11
+     * */
+    private String[][] getAllOperitions(int size) throws VciBaseException{
+        String[][] res = new String[size][6];
+        try{
+            res = platformClientUtil.getFrameworkService().getAllOperitions(size);
+        }catch (PLException e) {
+            e.printStackTrace();
+            throw new VciBaseException(String.valueOf(e.code), e.messages);
+        }
+        return res;
+    }
+
+    public void fuzhi(FunctionInfo functionInfo,String[] oneData){
+        functionInfo.name = oneData[0];
+        functionInfo.resourceC = oneData[1];
+        functionInfo.suffixC = oneData[2];
+        functionInfo.desc = oneData[6];
+        functionInfo.resourceB = oneData[3];
+        functionInfo.suffixB = oneData[4];
+        functionInfo.seq = Integer.parseInt(oneData[9]);
+        //funObj.setModuleNo(Integer.parseInt(oneData[5]));
+        functionInfo.image = oneData[8];
+        functionInfo.isValid = Integer.parseInt(oneData[7]) != 0;
+        functionInfo.aliasName = oneData[10];
+        functionInfo.resourceDotNet = oneData[12];
+        functionInfo.resourceMobile = oneData[13];
+    }
+
+    /**
+     * 鍖呭惈淇濆瓨妯″潡鏂规硶绛夋搷浣滅被
+     */
+    private class FunctionOperateDelegate {
+
+        /**
+         * 鍒ゆ柇绗竴绾ф暟鎹湁娌℃湁閲嶅悕鐨�
+         * @param plName
+         * @return
+         * @throws VciException
+         */
+        public boolean firstLevel(String plName) throws VciException{
+            try{
+                return platformClientUtil.getFrameworkService().firstLevel(plName);
+            }catch (PLException e) {
+                e.printStackTrace();
+                throw new VciException(String.valueOf(e.code), e.messages);
+            }
+        }
+
+        /**
+         * 瑕嗙洊閲嶅悕鐨勭涓�绾ф暟鎹�
+         * add by caill
+         * */
+        public String changeFirstLevel(FunctionInfo functionInfo,String plName) throws VciException{
+            String fParentId="";
+            try {
+                fParentId= platformClientUtil.getFrameworkService().changeFirstLevel(functionInfo, plName);
+            } catch (PLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+
+            return fParentId;
+        }
+
+        /**
+         * 鍒ゆ柇绗簩绾ф暟鎹湁娌℃湁閲嶅悕鐨�
+         * add by caill
+         * */
+        public boolean secondLevel(String plName,String fParentId) throws VciException{
+            try{
+                return platformClientUtil.getFrameworkService().secondLevel(plName,fParentId);
+            }catch (PLException e) {
+                e.printStackTrace();
+                throw new VciException(String.valueOf(e.code), e.messages);
+            }
+        }
+
+        /**
+         * 瑕嗙洊閲嶅悕鐨勭浜岀骇鏁版嵁
+         * add by caill
+         * */
+        public String changeSecondLevel(FunctionInfo functionInfo,String plName,String fParentId) throws VciException{
+            String sParentId="";
+            try {
+                sParentId= platformClientUtil.getFrameworkService().changeSecondLevel(functionInfo, plName,fParentId);
+            } catch (PLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            return sParentId;
+        }
+
+        /**
+         * 淇濆瓨妯″潡
+         * @param object
+         * @return
+         * @throws VciException
+         */
+        public String saveModule(MenuVO object) throws VciBaseException {
+            String res = "";
+            try{
+                res = platformClientUtil.getFrameworkService().saveModule(this.check(object,"add"),this.getUserEntityInfo());
+            }catch (PLException e) {
+                e.printStackTrace();
+                throw new VciBaseException(String.valueOf(e.code), e.messages);
+            }
+            return res;
+        }
+
+        /**
+         * 淇敼妯″潡
+         * @param object
+         * @return
+         * @throws VciException
+         */
+        public String updateMod(MenuVO object) throws VciBaseException {
+            String res = "";
+            try{
+                res = platformClientUtil.getFrameworkService().updateModule(this.check(object,"update"),this.getUserEntityInfo());
+            }catch (PLException e) {
+                e.printStackTrace();
+                throw new VciBaseException(String.valueOf(e.code), e.messages);
+            }
+            return res;
+        }
+
+        /**
+         * 鍒犻櫎妯″潡
+         * @param puid
+         * @return
+         * @throws VciException
+         */
+        public String deleteModule(String puid) throws VciBaseException{
+            String res = "";
+            try{
+                res = platformClientUtil.getFrameworkService().deleteModule(puid,this.getUserEntityInfo());
+            }catch (PLException e) {
+                e.printStackTrace();
+                throw new VciBaseException(String.valueOf(e.code), e.messages);
+            }
+            return res;
+        }
+
+        /**
+         * VO杞珼O瀵硅薄
+         * @return
+         */
+        public FunctionInfo menuVO2FunctionInfo(MenuVO object){
+            FunctionInfo info = new FunctionInfo();
+            info.id = object.getId() == null ? "" : object.getId();
+            //info.layer = object.getLayer();
+            info.name = object.getName() == null ? "" : object.getName();
+            info.parentId = object.getParentId() == null ? "" : object.getParentId();
+            info.resourceC = object.getPathC() == null ? "" : object.getPathC();
+            //info.suffixC = object.getSuffixC() == null ? "" : object.getSuffixC();
+            info.resourceB = object.getPath() == null ? "" : object.getPath();
+            //info.suffixB = object.getSuffixB() == null ? "" : object.getSuffixB();
+            info.desc = object.getRemark() == null ? "" : object.getRemark();
+            info.seq = object.getSort();
+            //info.moduleNo = object.getModuleNo();
+            info.image = object.getSource() == null ? "" : object.getSource();
+            info.isValid = object.getIsValid();
+            info.aliasName = object.getAlias() == null ? "" : object.getAlias();
+            info.resourceDotNet = object.getResourceDotNet() == null ? "" : object.getResourceDotNet();
+            info.resourceMobile = object.getResourceMobile() == null ? "" : object.getResourceMobile();
+            info.desc = object.getRemark();
+            return info;
+        }
+
+        /**
+         * <p>Description: 椤甸潰杈撳叆鐨勬牎楠�</p>
+         *
+         *@author xf
+         *@time 2012-5-15
+         *@return FunctionObject
+         * @return
+         */
+        private FunctionInfo check(MenuVO menuVO,String type) {
+            FunctionInfo obj = new FunctionInfo();
+
+            //鑾峰彇琛ㄥ崟杈撳叆鐨勫��
+            String modelName = menuVO.getName();
+            String csIdentity = menuVO.getPathC();
+            String bsIdentity = menuVO.getPath();
+            String aliasName = menuVO.getAlias();
+            String resDotNet = menuVO.getResourceDotNet();
+            String resMobile = menuVO.getResourceMobile();
+
+            //int moduleNo = transferStringToNum(moduleNoTxt.getText());
+            int sequence = menuVO.getSort();
+            String description = menuVO.getRemark();
+
+            if("".equals(modelName) || "null".equals(modelName) || modelName == null) {
+                throw new VciBaseException("妯″潡鍚嶄笉鑳戒负绌猴紒");
+            }else if(modelName.length() > 128) {
+                throw new VciBaseException("妯″潡鍚嶉暱搴︿笉鑳借秴杩�128锛�");
+            }else if(description.length() > 255) {
+                throw new VciBaseException("鎻忚堪闀垮害涓嶈兘瓒呰繃255锛�");
+            }else if(csIdentity != null && !"".equals(csIdentity) && csIdentity.length() > 255) {
+                throw new VciBaseException("C/S鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�");
+            } else if(resDotNet != null && !"".equals(resDotNet) && resDotNet.length() > 255) {
+                throw new VciBaseException(".NET鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�");
+            }else if(resMobile != null && !"".equals(resMobile) && resMobile.length() > 255) {
+                throw new VciBaseException("Mobile鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�");
+            } else if (sequence < 0) {
+                throw new VciBaseException("搴忓彿涓嶈兘灏忎簬0锛�");
+            }
+            if(type.equals("add")){
+                //缁檕bject瀵硅薄璧嬪��
+                String parentId = "";
+                if(menuVO.getModeType().equals("FunctionObject")) {
+                    parentId = menuVO.getParentId();
+                }else if("modelManagmentNode".equals(menuVO.getParentId())) {
+                    parentId = "modelManagmentNode";
+                }else if("systemManagmentNode".equals(menuVO.getParentId())) {
+                    parentId = "systemManagmentNode";
+                }
+                obj.parentId = parentId;
+            }else{
+                obj.id = menuVO.getId();
+                obj.parentId = menuVO.getParentId();
+            }
+            obj.name = modelName;
+            obj.resourceC = csIdentity;
+            obj.desc = description;
+            obj.resourceB = bsIdentity;
+            obj.suffixC = "";
+            obj.suffixB = "";
+            obj.seq = sequence;
+            obj.image = menuVO.getSource();
+            obj.isValid = menuVO.getValid();//1鏈夋晥0鏃犳晥
+            obj.aliasName = aliasName;
+            obj.resourceDotNet = resDotNet;
+            obj.resourceMobile = resMobile;
+            return obj;
+        }
+
+        /**
+         * 鑾峰彇UserEntityInfo瀵硅薄
+         * @return
+         */
+        public UserEntityInfo getUserEntityInfo(){
+            SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread();
+            UserEntityInfo userEntityInfo = new UserEntityInfo(sessionInfo.getUserId(), "");
+            return userEntityInfo;
+        }
+
+        /**
+         * 瀵煎叆妯″潡瀵硅薄
+         * add by caill
+         * */
+        public boolean importModules(FunctionInfo[] funObject,int count) throws VciBaseException{
+            boolean b=false;
+            int len = funObject.length;
+            List<FunctionInfo> funInfoList = new ArrayList<FunctionInfo>();
+            for(int i = count ; i<len ; i++){
+                if(funObject[i].parentId!=null){
+                    FunctionInfo funInfo = funObject[i];
+                    funInfoList.add(funInfo);
+                }
+            }
+            FunctionInfo[] funInfos = new FunctionInfo[funInfoList.size()];
+            for(int j=0;j<funInfoList.size();j++){
+                funInfos[j] = funInfoList.get(j);
+            }
+
+            try {
+                b = platformClientUtil.getFrameworkService().importModules(funInfos,this.getUserEntityInfo());
+            } catch (PLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+
+            return b;
+        }
+
+        /**
+         * 鏌ヨ鍚屼竴妯″潡涓槸鍚﹀凡缁忓瓨鍦ㄧ浉鍚岀殑鎿嶄綔绫诲瀷
+         * add by caill
+         * */
+        public boolean selSameOper(String dataOperName,String plFuncOid) throws VciBaseException{
+            boolean same=false;
+            try {
+                same = platformClientUtil.getFrameworkService().selSameOper(dataOperName,plFuncOid);
+            } catch (PLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            return same;
+        }
+
+        public OperateInfo fetchOperateTypeByName(String name) throws VciException {
+            try{
+                OperateInfo info =  platformClientUtil.getFrameworkService().fetchOperateTypeByName(name);
+                return info;
+            }catch (PLException e) {
+                e.printStackTrace();
+                throw new VciBaseException(String.valueOf(e.code),e.messages);
+            }
+        }
+
+        /**
+         * 淇濆瓨鎿嶄綔绫诲瀷
+         * add by caill
+         * */
+        public boolean saveFuncOperation2(FuncOperationInfo funcOperationInfo) throws VciException{
+            try {
+                platformClientUtil.getFrameworkService().saveFuncOperation2(funcOperationInfo,this.getUserEntityInfo());
+            } catch (PLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            return true;
+        }
+
+        /**
+         * 瑕嗙洊鎿嶄綔绫诲瀷
+         * add by caill
+         * */
+        public String updateOperation(FuncOperationInfo funcOperationInfo,String dataOperName,String plFuncOid) throws VciException{
+            try {
+                platformClientUtil.getFrameworkService().updateOperation(funcOperationInfo,this.getUserEntityInfo(),dataOperName,plFuncOid);
+            } catch (PLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            return null;
+        }
+
+        public boolean updateFuncOperation(String id , String alias, boolean isSelected) throws VciException {
+            boolean res = false;
+            try{
+                res = platformClientUtil.getFrameworkService().updateFuncOperation(id, alias, isSelected, this.getUserEntityInfo());
+            }catch(PLException e){
+                throw new VciException(String.valueOf(e.code), e.messages);
+            }
+            return res;
+        }
+
+    }
+
+
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
new file mode 100644
index 0000000..966811e
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
@@ -0,0 +1,259 @@
+package com.vci.web.controller;
+
+import com.vci.constant.FrameWorkLangCodeConstant;
+import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
+import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI;
+import com.vci.pagemodel.MenuVO;
+import com.vci.starter.web.annotation.controller.VciUnCheckRight;
+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.LocalFileUtil;
+import com.vci.starter.web.util.VciBaseUtil;
+import com.vci.web.util.Func;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 棣栭〉绯荤粺妯″潡閰嶇疆鎺у埗鍣�
+ * @author ludc
+ * @date 2024/8/19 10:55
+ */
+@RestController
+@RequestMapping("/hmSysModConfigController")
+@VciUnCheckRight
+public class HMSysModConfigController {
+
+    /**
+     * 鍔熻兘鏌ヨ鏈嶅姟
+     */
+    @Resource
+    private ISmFunctionQueryService functionQueryService;
+
+    /**
+     * 棣栭〉绯荤粺閰嶇疆鏈嶅姟
+     */
+    @Resource
+    private SmHMSysModConfigServiceI hmSysModConfigService;
+
+    /**
+     * 鏃ュ織
+     */
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    /**
+     * 鑾峰彇褰撳墠妯″潡涓嬬殑瀛愭ā鍧�
+     * @param parentId
+     * @param modeType
+     * @return
+     */
+    @GetMapping("/getSysModelTreeMenuByPID")
+    public BaseResult<List<MenuVO>> getSysModelTreeMenuByPID(String parentId, String modeType) {
+        try {
+            return BaseResult.dataList(functionQueryService.getSysModelTreeMenuByPID(parentId,modeType,true));
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 娣诲姞妯″潡
+     * @param menuVO
+     * @return
+     */
+    @PostMapping("/addModel")
+    public BaseResult addModel(@RequestBody MenuVO menuVO) {
+        try {
+            return BaseResult.success(hmSysModConfigService.addModule(menuVO),"妯″潡澧炲姞鎴愬姛");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "澧炲姞妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 淇敼妯″潡
+     * @param menuVO
+     * @return
+     */
+    @PutMapping("/updateModel")
+    public BaseResult updateModel(@RequestBody MenuVO menuVO) {
+        try {
+            return BaseResult.success(hmSysModConfigService.updateModule(menuVO),"妯″潡淇敼鎴愬姛");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "淇敼妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 鍒犻櫎妯″潡
+     * @param menuVO
+     * @return
+     */
+    @DeleteMapping("/delModule")
+    public BaseResult delModule(@RequestBody MenuVO menuVO) {
+        try {
+            return BaseResult.success(hmSysModConfigService.delModule(menuVO),"妯″潡鍒犻櫎鎴愬姛");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鍒犻櫎妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 绠$悊鍔熻兘妯″潡銆佷笟鍔″姛鑳芥ā鍧椾笅鐨勫彾瀛愯妭鐐光�斾慨鏀规搷浣滃埆鍚嶆帴鍙�
+     * @param menuVO
+     * @return
+     */
+    @PutMapping("/updateAlias")
+    public BaseResult updateAlias(@RequestBody MenuVO menuVO) {
+        try {
+            return BaseResult.success(hmSysModConfigService.updateAlias(menuVO),"鎿嶄綔鍒悕淇敼鎴愬姛");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鎿嶄綔鍒悕淇敼鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 娣诲姞鎿嶄綔绫诲瀷
+     * @param menuVOList
+     * @return
+     */
+    @PostMapping("/addOperationType")
+    public BaseResult addOperationType(@RequestBody List<MenuVO> menuVOList) {
+        try {
+            return BaseResult.success(hmSysModConfigService.addOperationType(menuVOList),"鎿嶄綔绫诲瀷娣诲姞鎴愬姛");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鍒犻櫎妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 鍒犻櫎闈炵郴缁熸ā鍧�
+     * @return
+     */
+    @DeleteMapping("/delNonsysModule")
+    public BaseResult delNonsysModule() {
+        try {
+            return BaseResult.success(hmSysModConfigService.delNonsysModule(),"鍒犻櫎闈炵郴缁熸ā鍧楁垚鍔�");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鍒犻櫎闈炵郴缁熸ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 鍒犻櫎涓氬姟妯″潡
+     * @return
+     */
+    @PostMapping("/delBusinessModule")
+    public BaseResult delBusinessModule() {
+        try {
+            return BaseResult.success(hmSysModConfigService.delBusinessModule(),"鍒犻櫎涓氬姟妯″潡");
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鍒犻櫎涓氬姟妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 瀵煎嚭绠$悊鍔熻兘妯″潡鎴栨搷浣滅被鍨嬬鐞嗘ā鍧梥ql
+     * @return
+     */
+    @GetMapping("/exportFunctionSql")
+    public void exportFunctionSql(HttpServletResponse response,String exportPath,boolean isFunction) {
+        try {
+            File file = hmSysModConfigService.exportFunctionSql(response,exportPath,isFunction);
+            ControllerUtil.writeFileToResponse(response,file,true);
+        } catch (Exception e) {
+            String msg = "瀵煎嚭sql鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + 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();
+            }
+        }
+    }
+
+    /**
+     * 瀵煎嚭妯″潡
+     * @return
+     */
+    @GetMapping("/exportModule")
+    public void exportModule(HttpServletResponse response) {
+        try {
+            String excelPath = hmSysModConfigService.exportModule(response);
+            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();
+            }
+        }
+    }
+
+    /**
+     * 瀵煎叆妯″潡
+     * @return
+     */
+    @GetMapping("/importModule")
+    public BaseResult importModule(@RequestParam("files") List<MultipartFile> files) {
+        LinkedList<File> fileList = new LinkedList<>();
+        try {
+            for (MultipartFile file : files) {
+                String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename());
+                File file1 = new File(excelFileName);
+                file.transferTo(file1);
+                fileList.add(file1);
+            }
+            if(Func.isEmpty(fileList)){
+                return hmSysModConfigService.importModule(fileList);
+            } else {
+                return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
+            }
+        }catch (Throwable e) {
+            throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+        }finally {
+            fileList.stream().forEach(file -> file.delete());
+        }
+    }
+
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
index 7e9968d..d386a91 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
@@ -49,25 +49,6 @@
 	}
 
 	/**
-	 * 鑾峰彇褰撳墠妯″潡涓嬬殑瀛愭ā鍧�
-	 * @param parentId
-	 * @return
-	 * @throws PLException
-	 */
-	@GetMapping("/getSysModelTreeMenuByPID")
-	@VciUnCheckRight
-	public List<MenuVO> getSysModelTreeMenuByPID(String parentId) {
-		try {
-			return functionQueryService.getSysModelTreeMenuByPID(parentId,true);
-		}catch (Exception e){
-			e.printStackTrace();
-			String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
-			logger.error(errorMsg);
-			throw new VciBaseException(errorMsg);
-		}
-	}
-
-	/**
 	 * 鑾峰彇褰撳墠鐢ㄦ埛鐨勮彍鍗�
 	 * @param treeQueryObject 鏍戞煡璇㈠璞�
 	 * @return  鏍戣妭鐐癸紝鍑虹幇閿欒浼氬湪寮傚父澶勭悊鍣ㄤ腑缁熶竴杩斿洖Json
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/properties/JsonConfigReader.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/properties/JsonConfigReader.java
index 840d4f0..0efe596 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/properties/JsonConfigReader.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/properties/JsonConfigReader.java
@@ -17,20 +17,75 @@
     /**
      * 鑿滃崟json閰嶇疆鏂囦欢锛屽鏈夊叾浠栭渶瑕佽鍙栫殑锛屽彲浠ヤ豢鐓у綋鍓嶉�昏緫缂栧啓
      */
-    private static MenuVO menuVO;
+    private static sysModuleConf sysModuleConf;
 
     static{
         try {
             File file = ResourceUtils.getFile("classpath:menuConfig.json");
             String json = FileUtils.readFileToString(file, "UTF-8");
-            menuVO = JSON.parseObject(json, MenuVO.class);
+            sysModuleConf = JSON.parseObject(json, sysModuleConf.class);
         }catch (IOException e) {
             e.printStackTrace();
         }
     }
 
-    public static MenuVO getMenuVO() {
-        return menuVO;
+    public static sysModuleConf getSysModuleConf() {
+        return sysModuleConf;
+    }
+
+    public static class sysModuleConf {
+
+        /**
+         * 绯荤粺妯″潡閰嶇疆
+         */
+        private MenuVO sysModuleNode;
+
+        /**
+         * 绠$悊鍔熻兘妯″潡
+         */
+        private MenuVO systemManagmentNode;
+
+        /**
+         * 涓氬姟鍔熻兘妯″潡
+         */
+        private MenuVO modelManagmentNode;
+
+        /**
+         * 鎿嶄綔绫诲瀷妯″潡
+         */
+        private MenuVO operateNode;
+
+        public void setSysModuleNode(MenuVO sysModuleNode) {
+            this.sysModuleNode = sysModuleNode;
+        }
+
+        public void setSystemManagmentNode(MenuVO systemManagmentNode) {
+            this.systemManagmentNode = systemManagmentNode;
+        }
+
+        public void setModelManagmentNode(MenuVO modelManagmentNode) {
+            this.modelManagmentNode = modelManagmentNode;
+        }
+
+        public MenuVO getSysModuleNode() {
+            return sysModuleNode;
+        }
+
+        public MenuVO getSystemManagmentNode() {
+            return systemManagmentNode;
+        }
+
+        public MenuVO getModelManagmentNode() {
+            return modelManagmentNode;
+        }
+
+        public void setOperateNode(MenuVO operateNode) {
+            this.operateNode = operateNode;
+        }
+
+        public MenuVO getOperateNode() {
+            return operateNode;
+        }
     }
 
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
index 1256d2a..964b250 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
@@ -275,7 +275,7 @@
 
     /**
      * 瀵煎嚭涓氬姟绫诲瀷
-     * name 涓氬姟绫诲瀷鍚嶇О
+     * oid 涓氬姟绫诲瀷鍚嶇О
      * @return 鍒涘缓缁撴灉
      */
     void expData(String oid, HttpServletResponse response) throws PLException, IOException;
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
index 3f0f4d3..77fd212 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -1264,7 +1264,7 @@
 
     /**
      * 瀵煎嚭涓氬姟绫诲瀷
-     * name 涓氬姟绫诲瀷鍚嶇О
+     * oid 涓氬姟绫诲瀷鍚嶇О
      * @return 鍒涘缓缁撴灉
      */
     @Override

--
Gitblit v1.9.3