From b8d0022a3c40c59322661e8eee568643fdeb9c50 Mon Sep 17 00:00:00 2001
From: xiejun <xiejun@vci-tech.com>
Date: 星期五, 13 九月 2024 10:25:12 +0800
Subject: [PATCH] 人员选择接口添加

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java |  240 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 218 insertions(+), 22 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java
index dbea2f7..3357a53 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java
@@ -1,5 +1,8 @@
 package com.vci.frameworkcore.compatibility.impl;
 
+import com.vci.corba.framework.data.DeptInfo;
+import com.vci.corba.framework.data.RoleInfo;
+import com.vci.dto.SmUserDTO;
 import com.vci.common.util.ThreeDES;
 import com.vci.corba.common.PLException;
 import com.vci.corba.common.data.UserEntityInfo;
@@ -9,14 +12,14 @@
 import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI;
 import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI;
 import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
-import com.vci.frameworkcore.model.dto.SmUserDTO;
-import com.vci.frameworkcore.model.SmUserDO;
-import com.vci.frameworkcore.model.po.SmUserPO;
-import com.vci.frameworkcore.pagemodel.OrgDepartmentVO;
-import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO;
-import com.vci.frameworkcore.pagemodel.SmRoleVO;
-import com.vci.frameworkcore.pagemodel.SmUserVO;
-import com.vci.frameworkcore.properties.ConfigReader;
+import com.vci.frameworkcore.enumpck.OrgTypeEnum;
+import com.vci.model.SmUserDO;
+import com.vci.pagemodel.SmUserVO;
+import com.vci.po.SmUserPO;
+import com.vci.pagemodel.OrgDepartmentVO;
+import com.vci.pagemodel.SmPasswordStrategyVO;
+import com.vci.pagemodel.SmRoleVO;
+import com.vci.frameworkcore.properties.ConfigCorbaReader;
 import com.vci.omd.utils.ObjectTool;
 import com.vci.starter.poi.bo.ReadExcelOption;
 import com.vci.starter.poi.bo.WriteExcelData;
@@ -36,6 +39,7 @@
 import com.vci.web.util.WebUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.util.HSSFColor;
+import org.apache.poi.ss.formula.functions.T;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -117,7 +121,7 @@
 	/**
 	 * 蹇呭~鍒�
 	 */
-	private ArrayList<Integer> ColumnNameisRed = new ArrayList<Integer>();
+	private List<Integer> ColumnNameisRed = new ArrayList<Integer>();
 
 	/**
 	 * 鐢ㄦ埛鍒嗛〉鏌ヨ鏃惰幏鍙栭儴闂ㄦ斁鍒拌繖閲岄伩鍏嶉噸澶嶆煡璇�
@@ -183,7 +187,7 @@
 	 * @return 鐢ㄦ埛鐨勪俊鎭�
 	 * @throws VciBaseException 鏌ヨ鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
 	 */
-	private SmUserVO getUserByField(String queryField,String queryValue) throws VciBaseException{
+	private SmUserVO getUserByField(String queryField, String queryValue) throws VciBaseException{
 		VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(null, SmUserDO.class,null,true);
 		queryWrapper.eq(queryWrapper.getTableNick() + "." +queryField,queryValue);
 		queryWrapper.setDistinct(true);
@@ -942,7 +946,168 @@
 		return treeList;
 	}
 
-	 /**
+	/**
+	 * 鑾峰彇瑙掕壊鏁版嵁
+	 * @param treeQueryObject
+	 * @return
+	 * @throws VciBaseException
+	 */
+	@Override
+	public List<Tree> refPersonOrgTree(TreeQueryObject treeQueryObject) throws VciBaseException {
+		List<Tree> rootTreeList=new ArrayList<>();
+	 	Map<String,String> conditionMap=treeQueryObject.getConditionMap();
+	 	if(CollectionUtils.isEmpty(conditionMap)) {
+		 	conditionMap = new HashMap<>();
+	 	}
+		String dataType=StringUtils.isNotBlank(conditionMap.get("dataType"))?conditionMap.get("dataType"):"";//鏁版嵁绫诲瀷
+		String parentId=StringUtils.isNotBlank(conditionMap.get("parentId"))?conditionMap.get("parentId"):"";//鐖惰妭鐐�
+		String orgType=StringUtils.isNotBlank(conditionMap.get("orgType"))?conditionMap.get("orgType"):"";//鎺ュ彛鏌ヨ鍖呭惈鐨勭被鍨�
+		try {
+			initChildTree(dataType,orgType,parentId,rootTreeList);
+		} catch (PLException e) {
+			throw new  VciBaseException("鐢ㄦ埛鏉冮檺閫夋嫨鏍戝姞杞藉け璐�:"+e.getMessage());
+		}
+		return rootTreeList;
+	}
+
+	/***
+	 *
+	 * @param dataType
+	 * @param orgType
+	 * @param parentId
+	 */
+	private void initChildTree(String dataType,String orgType, String  parentId, List<Tree>rootTreeList) throws PLException {
+		if(StringUtils.isBlank(parentId)){
+			Tree rootTree=new Tree("root","浜哄憳缁勭粐","root");
+			rootTree.setParentBtmName("root");
+			rootTree.setExpanded(true);
+			List<Tree> childList=new ArrayList<>();
+			if(OrgTypeEnum.ORG_TYPE_USER.getValue().equals(orgType)){//濡傛灉鏄汉鍛�
+				Tree userTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_USER.getValue(),"鐢ㄦ埛",OrgTypeEnum.ORG_TYPE_USER.getValue(),OrgTypeEnum.ORG_TYPE_USER.getValue(),rootTree);
+				childList.add(userTree);
+			}else if(OrgTypeEnum.ORG_TYPE_DEPT.getValue().equals(orgType)){//濡傛灉鏄儴闂�
+				Tree departmentTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_DEPT.getValue(),"閮ㄩ棬",OrgTypeEnum.ORG_TYPE_DEPT.getValue(),OrgTypeEnum.ORG_TYPE_DEPT.getValue(),rootTree);
+				childList.add(departmentTree);
+			}else if(OrgTypeEnum.ORG_TYPE_ROLE.getValue().equals(orgType)){//濡傛灉鏄鑹�
+				Tree roleTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_ROLE.getValue(),"瑙掕壊",OrgTypeEnum.ORG_TYPE_ROLE.getValue(),OrgTypeEnum.ORG_TYPE_ROLE.getValue(),rootTree);
+				childList.add(roleTree);
+			}else{
+				Tree userTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_USER.getValue(),"鐢ㄦ埛",OrgTypeEnum.ORG_TYPE_USER.getValue(),OrgTypeEnum.ORG_TYPE_USER.getValue(),rootTree);
+				childList.add(userTree);
+				Tree departmentTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_DEPT.getValue(),"閮ㄩ棬",OrgTypeEnum.ORG_TYPE_DEPT.getValue(),OrgTypeEnum.ORG_TYPE_DEPT.getValue(),rootTree);
+				childList.add(departmentTree);
+				Tree roleTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_ROLE.getValue(),"瑙掕壊",OrgTypeEnum.ORG_TYPE_ROLE.getValue(),OrgTypeEnum.ORG_TYPE_ROLE.getValue(),rootTree);
+				childList.add(roleTree);
+			}
+			if(childList.size()>0){
+				rootTree.setExpanded(true);
+				rootTree.setChildren(childList);
+			}
+			rootTreeList.add(rootTree);
+		}else{
+			if(OrgTypeEnum.ORG_TYPE_ROOT.getValue().equals(dataType)){//濡傛灉鐖惰妭鐐规湁鍊硷紝鍒欓渶瑕佸垽鏂槸鍔犺浇浠�涔堣妭鐐�
+				Tree rootTree=new Tree("root","浜哄憳缁勭粐","root");
+				rootTree.setParentBtmName("root");
+				rootTree.setExpanded(true);
+				if(OrgTypeEnum.ORG_TYPE_USER.getValue().equals(orgType)){//濡傛灉鏄汉鍛�
+					Tree userTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_USER.getValue(),"鐢ㄦ埛",OrgTypeEnum.ORG_TYPE_USER.getValue(),OrgTypeEnum.ORG_TYPE_USER.getValue(),rootTree);
+					rootTreeList.add(userTree);
+				}else if(OrgTypeEnum.ORG_TYPE_DEPT.getValue().equals(orgType)){//濡傛灉鏄儴闂�
+					Tree departmentTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_DEPT.getValue(),"閮ㄩ棬",OrgTypeEnum.ORG_TYPE_DEPT.getValue(),OrgTypeEnum.ORG_TYPE_DEPT.getValue(),rootTree);
+					rootTreeList.add(departmentTree);
+				}else if(OrgTypeEnum.ORG_TYPE_ROLE.getValue().equals(orgType)){//濡傛灉鏄鑹�
+					Tree roleTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_ROLE.getValue(),"瑙掕壊",OrgTypeEnum.ORG_TYPE_ROLE.getValue(),OrgTypeEnum.ORG_TYPE_ROLE.getValue(),rootTree);
+					rootTreeList.add(roleTree);
+				}else{
+					Tree userTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_USER.getValue(),"鐢ㄦ埛",OrgTypeEnum.ORG_TYPE_USER.getValue(),OrgTypeEnum.ORG_TYPE_USER.getValue(),rootTree);
+					rootTreeList.add(userTree);
+					Tree departmentTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_DEPT.getValue(),"閮ㄩ棬",OrgTypeEnum.ORG_TYPE_DEPT.getValue(),OrgTypeEnum.ORG_TYPE_DEPT.getValue(),rootTree);
+					rootTreeList.add(departmentTree);
+					Tree roleTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_ROLE.getValue(),"瑙掕壊",OrgTypeEnum.ORG_TYPE_ROLE.getValue(),OrgTypeEnum.ORG_TYPE_ROLE.getValue(),rootTree);
+					rootTreeList.add(roleTree);
+				}
+			}else if(OrgTypeEnum.ORG_TYPE_USER.getValue().equals(dataType)) {//濡傛灉浼犺繘鏉ョ殑鏄痷ser鑺傜偣
+				if(OrgTypeEnum.ORG_TYPE_USER.getValue().equals(parentId)) {
+					Tree userTree = initDataTreeNode(OrgTypeEnum.ORG_TYPE_USER.getValue(), "鐢ㄦ埛", OrgTypeEnum.ORG_TYPE_USER.getValue(), OrgTypeEnum.ORG_TYPE_USER.getValue(), null);
+					UserInfo[] infos = platformClientUtil.getFrameworkService().fetchUserInfo();
+					Arrays.stream(infos).forEach(info -> {
+						Tree childTree = initDataTreeNode(info.id, info.trueName + "(" + info.userName + ")", info, OrgTypeEnum.ORG_TYPE_USER.getValue(), userTree);
+						rootTreeList.add(childTree);
+					});
+				}
+			}else   if(OrgTypeEnum.ORG_TYPE_DEPT.getValue().equals(dataType)) {//濡傛灉鏄儴闂�
+				DeptInfo[] deptInfos=new DeptInfo[]{};
+				Tree departmentTree=new Tree();
+				if(OrgTypeEnum.ORG_TYPE_DEPT.getValue().equals(parentId)) {
+					departmentTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_DEPT.getValue(),"閮ㄩ棬",OrgTypeEnum.ORG_TYPE_DEPT.getValue(),OrgTypeEnum.ORG_TYPE_DEPT.getValue(),null);
+					deptInfos = platformClientUtil.getFrameworkService().fetchDepartmentInfo();
+				}else{
+					deptInfos=platformClientUtil.getFrameworkService().fetchDepartmentInfoByParentId(parentId);
+					DeptInfo deptInfo=platformClientUtil.getFrameworkService().fetchDepartmentInfoById(parentId);
+					departmentTree=initDataTreeNode(deptInfo.id,deptInfo.name,deptInfo,OrgTypeEnum.ORG_TYPE_DEPT.getValue(),null);
+				}
+				if(!CollectionUtils.isEmpty(Arrays.asList(deptInfos))){
+					Tree finalDepartmentTree = departmentTree;
+					Arrays.stream(deptInfos).forEach(deptInfo -> {
+						Tree childTree=initDataTreeNode(deptInfo.id,deptInfo.name,deptInfo,OrgTypeEnum.ORG_TYPE_DEPT.getValue(), finalDepartmentTree);
+						rootTreeList.add(childTree);
+					});
+				}
+				if(!OrgTypeEnum.ORG_TYPE_DEPT.getValue().equals(parentId)) {
+					UserInfo[] infos = platformClientUtil.getFrameworkService().getUserByDeptId(parentId);
+					if (infos != null && infos.length > 0) {
+						Tree finalDepartmentTree = departmentTree;
+						Arrays.stream(infos).forEach(info -> {
+							Tree childTree = initDataTreeNode(info.id, info.trueName + "(" + info.userName + ")", info, OrgTypeEnum.ORG_TYPE_USER.getValue(), finalDepartmentTree);
+							rootTreeList.add(childTree);
+						});
+					}
+				}
+
+			}else  if(OrgTypeEnum.ORG_TYPE_ROLE.getValue().equals(dataType)) {//濡傛灉鏄鑹�
+				if(OrgTypeEnum.ORG_TYPE_ROLE.getValue().equals(parentId)){
+					Tree roleTree=initDataTreeNode(OrgTypeEnum.ORG_TYPE_ROLE.getValue(),"瑙掕壊",OrgTypeEnum.ORG_TYPE_ROLE.getValue(),OrgTypeEnum.ORG_TYPE_ROLE.getValue(),null);
+					RoleInfo[] roleInfos=platformClientUtil.getFrameworkService().fetchRoleInfo();
+					if(roleInfos!=null&&roleInfos.length>0) {
+						Arrays.stream(roleInfos).forEach(info -> {
+							Tree childTree = initDataTreeNode(info.id, info.name, info, OrgTypeEnum.ORG_TYPE_ROLE.getValue(), roleTree);
+							rootTreeList.add(childTree);
+						});
+					}
+				}else{
+					RoleInfo roleInfo=platformClientUtil.getFrameworkService().fetchRoleInfoById(parentId);
+					Tree roleTree=initDataTreeNode(roleInfo.id,roleInfo.name,roleInfo,OrgTypeEnum.ORG_TYPE_ROLE.getValue(),null);
+					UserInfo[] infos=platformClientUtil.getFrameworkService().fetchUserInfoByRoleId(roleInfo.id,roleInfo.type);
+					if(infos!=null&&infos.length>0) {
+						Arrays.stream(infos).forEach(info -> {
+							Tree childTree = initDataTreeNode(info.id, info.trueName + "(" + info.userName + ")", info, OrgTypeEnum.ORG_TYPE_USER.getValue(), roleTree);
+							rootTreeList.add(childTree);
+						});
+					}
+				}
+			}
+		}
+	}
+
+	/***
+	 *
+	 * @param oid
+	 * @param text
+	 * @param o
+	 * @param type
+	 * @param parentTree
+	 * @return
+	 */
+	private Tree initDataTreeNode(String oid,String text,Object o,String type,Tree parentTree){
+		Tree ObjectTreeNode=new Tree(oid,text,o);
+		ObjectTreeNode.setParentBtmName(type);
+		if(parentTree!=null) {
+			ObjectTreeNode.setParentId(parentTree.getParentId());
+			ObjectTreeNode.setParentName(parentTree.getParentName());
+		}
+		return ObjectTreeNode;
+	}
+	/**
      * 鏍¢獙瀵嗙爜鏄惁鐩稿悓锛屽湪鏂板钩鍙颁腑瀛樺偍鐨勫瘑鐮佹槸涓ゆmd5
      * @param userOid 鐢ㄦ埛涓婚敭
      * @param md5Password 宸茬粡md5鍔犲瘑涓�娆$殑瀵嗙爜--鑰佺殑骞冲彴閲屼笉鑳藉姞瀵�
@@ -1021,23 +1186,52 @@
 	 /**
      * 淇敼瀵嗙爜
      * @param userOid 鐢ㄦ埛涓婚敭
+     * @param oldPassword 鏃х殑瀵嗙爜
      * @param password 鏂扮殑瀵嗙爜
      * @param confirmPassword 纭瀵嗙爜
      */
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public void changePassword(String userOid, String password,
-			String confirmPassword) throws VciBaseException {
-		WebUtil.alertNotNull(userOid,"鐢ㄦ埛涓婚敭",password,"瀵嗙爜",confirmPassword,"纭瀵嗙爜");
+	public boolean changePassword(String userOid,String oldPassword, String password,
+			String confirmPassword) throws Exception {
+		WebUtil.alertNotNull(userOid,"鐢ㄦ埛涓婚敭",oldPassword,"鐧诲綍瀵嗙爜",password,"瀵嗙爜",confirmPassword,"纭瀵嗙爜");
 		if(!password.equals(confirmPassword)){
 			throw new VciBaseException("瀵嗙爜鍜岀‘璁ゅ瘑鐮佷笉鐩哥瓑");
 		}
+		//瀵规棫瀵嗙爜鍜屽瘑鐮佽繘琛岃В瀵嗭紝渚夸簬姣斿瀵嗙爜鐢�
+		oldPassword = Func.decryptAes(oldPassword,"daliantan0v0vcip");
+		password = Func.decryptAes(password,"daliantan0v0vcip");
+		//瀵规瘮鏃у瘑鐮�
+		boolean b = this.checkPasswordEqual(oldPassword, userOid);
+		if(!b){
+			throw new PLException("500", new String[] { "鎮ㄨ緭鍏ョ殑瀵嗙爜涓庣櫥褰曞瘑鐮佷笉涓�鑷�,璇烽噸鏂拌緭鍏�!"});
+		}
+		SmUserVO smUserVO = getUserByUserOid(userOid);
+		if(Func.isEmpty(smUserVO)){
+			throw new VciBaseException("褰撳墠淇敼鐨勭敤鎴蜂笉瀛樺湪锛�");
+		}
+		//TODO:鏍¢獙瀵嗙爜鏄惁绗﹀悎绛栫暐
+		String error = platformClientUtil.getFrameworkService().checkPasswordStrategyByUserId(smUserVO.getId(), password,null);
+		if (!StringUtils.isBlank(error)) {
+			throw new VciBaseException("褰撳墠璁剧疆鐨勫瘑鐮侊紝瀵嗙爜绛栫暐鏍¢獙鏈�氳繃!");
+		}
+
+		//TODO:鑰冭檻鏄惁闇�瑕佸皢淇敼鏂瑰紡鏀规垚鐩存帴璋冪敤骞冲彴鐨勬帴鍙o紝鍥犱负鐜板湪鐨勪慨鏀规柟寮忔病鑳芥纭殑鏇存柊缂撳瓨
+		/*UserInfo userInfo = new UserInfo();
+		userInfo.id = userOid.trim();
+		userInfo.pwd = password;
+		userInfo.pwdUpdateTime = System.currentTimeMillis();
+		boolean updateBoolean = platformClientUtil.getFrameworkService().updateUser(userInfo, new UserEntityInfo(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(), null));
+		return updateBoolean;*/
+
 		ThreeDES des = new ThreeDES();// 瀹炰緥鍖栦竴涓锟�?
 		des.getKey("daliantan0v0");// 鐢熸垚瀵嗗寵
 		String encPassword = des.getEncString(password);
-		String sql = "update pluser set plpassword = '" + encPassword + "' where pluid = '" + userOid.trim() + "'";
+		//淇敼瀵嗙爜鐨勫悓鏃堕渶瑕佸皢瀵嗙爜淇敼鏃堕棿涔熸洿鏂�
+		String sql = "update pluser set plpassword = '" + encPassword + "', plpwdupdatetime = TO_DATE('"
+				+ Func.format(new Date(),"yyyy-MM-dd HH:mm:ss") +"','yyyy-MM-dd hh24:mi:ss') where pluid = '" + userOid.trim() + "'";
 		try {
-			platformClientUtil.getBOFactoryService().executeUpdateSql(sql);
+			return platformClientUtil.getBOFactoryService().executeUpdateSql(sql);
 		} catch (PLException vciError) {
 			throw WebUtil.getVciBaseException(vciError);
 		}
@@ -1213,8 +1407,8 @@
 		}
 		//鏍规嵁褰撳墠鍒涘缓杩欎釜鐢ㄦ埛鐨勪汉鎵�缁戝畾瀵嗙爜绛栫暐鏉ヨ繘琛屽瘑鐮佹牎楠�
 		try {
-			String userName = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
-			String error = platformClientUtil.getFrameworkService().checkPasswordStrategyByUserId(userName, smUserDTO.getPassword(),null);
+			String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
+			String error = platformClientUtil.getFrameworkService().checkPasswordStrategyByUserId(userId, smUserDTO.getPassword(),null);
 			if (!StringUtils.isBlank(error)) {
 				throw new VciBaseException("褰撳墠璁剧疆鐨勫瘑鐮侊紝瀵嗙爜绛栫暐鏍¢獙鏈�氳繃");
 			}
@@ -1293,7 +1487,7 @@
 		// 璁剧疆琛ㄥ崟鍒楀悕
 		List<String> columns = new ArrayList<>(Arrays.asList("璐﹀彿", "瀵嗙爜", "濮撳悕", "鐢靛瓙閭", "涓撲笟", "鎻忚堪", "閮ㄩ棬(涓婁笅绾ч儴闂ㄤ箣闂翠互鍙嶆枩鏉犻殧寮�(/))"));
 		//鑾峰彇鏄惁瀵煎嚭瀵嗙骇閰嶇疆椤�
-		String flag = ConfigReader.getConfigValue("exportSecretGrade");
+		String flag = ConfigCorbaReader.getConfigValue("exportSecretGrade");
 		if (flag != null && flag.equalsIgnoreCase("true")) {
 			columns = new ArrayList<>(Arrays.asList("璐﹀彿", "瀵嗙爜", "濮撳悕", "鐢靛瓙閭", "涓撲笟", "鎻忚堪", "閮ㄩ棬(涓婁笅绾ч儴闂ㄤ箣闂翠互鍙嶆枩鏉犻殧寮�(/))" ,"瀵嗙骇"));
 		}
@@ -1333,7 +1527,7 @@
 	 * @throws VciBaseException
 	 */
 	@Override
-	public BaseResult importUser(File file) throws VciBaseException {
+	public BaseResult importUser(File file) throws Exception {
 		VciBaseUtil.alertNotNull(file,"excel鏂囦欢");
 		if(!file.exists()){
 			throw new VciBaseException("瀵煎叆鐨別xcel鏂囦欢涓嶅瓨鍦�,{0}",new String[]{file.getPath()});
@@ -1345,7 +1539,7 @@
 			String loginUserId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
 			UserEntityInfo userEntityInfo = new UserEntityInfo(loginUserId,null);
 			//鏄惁瀵煎叆瀵嗙骇閰嶇疆
-			boolean exportSecretGrade = Boolean.parseBoolean(ConfigReader.getConfigValue("exportSecretGrade"));
+			boolean exportSecretGrade = Boolean.parseBoolean(ConfigCorbaReader.getConfigValue("exportSecretGrade"));
 			List<SmUserPO> poList = ExcelUtil.readDataObjectFromExcel(file, SmUserPO.class,excelOption,(value, po, fieldName)->{
 				Integer secretValue = UserSecretEnum.getSecretValueByText(po.getSecretGradeText());
 				//鏄惁蹇呴』瀵煎叆瀵嗙骇
@@ -1369,7 +1563,9 @@
 			//褰撳墠excel涓槸鍚﹂噸澶嶇敤鐨勫垽閲峂ap:锛坘ey锛氳处鍙凤紝value锛氳鍙凤級
 			Map<String, String> excelReapeat = new HashMap<>();
 			//鍏堣幏鍙栧叏閮ㄩ儴闂ㄥ悕绉扮殑鐖跺瓙瀵瑰簲鍏崇郴锛歬ey涓洪儴闂ㄥ瓙鐖剁骇鍚嶇О璺緞锛寁alue涓洪儴闂ㄤ俊鎭�
-			Map<String,OrgDepartmentVO> deptVOMap = orgDeptQueryService.getDeptAllTreeMap();
+			List<OrgDepartmentVO> orgDepartmentVOList = orgDeptQueryService.getDeptAllFullName();
+			Map<String, OrgDepartmentVO> deptVOMap = orgDepartmentVOList.stream().collect(Collectors.toMap(OrgDepartmentVO::getFullDeptNamePath, s->s));
+			//Map<String,OrgDepartmentVO> deptVOMap = orgDeptQueryService.getDeptAllTreeMap();
 			//鍒ゆ柇蹇呭~灞炴�ф槸鍚︿负绌猴紝鐢ㄦ埛鏄惁宸插瓨鍦紝浠ュ強閮ㄩ棬鏄惁濉敊绛夋牎楠岄�昏緫
 			List<String> finalRepeatUserId = repeatUserId;
 			poList.stream().forEach(smUserPO -> {

--
Gitblit v1.9.3