From 34c25ddf37a3eb8da9efb04efedad089f13efe83 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 24 七月 2024 18:20:27 +0800
Subject: [PATCH] 部门导入调整,按照部门名称/实现层级关系。枚举导入功能接口上传,属性池添加新增、查询、修改、导出、查看应用范围等接口。业务类型、链接类型、枚举类型增加等接口属性是否产生数据检查、根据属性名修改业务类型和连接类型中对应属性方法,以及属性池中需要的一些下拉查询接口。

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 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 80dd56a..d08bcbb 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
@@ -16,7 +16,7 @@
 import com.vci.pagemodel.OrgDepartmentVO;
 import com.vci.pagemodel.SmPasswordStrategyVO;
 import com.vci.pagemodel.SmRoleVO;
-import com.vci.frameworkcore.properties.ConfigReader;
+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;
@@ -1028,15 +1028,18 @@
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public boolean changePassword(String userOid,String oldPassword, String password,
-			String confirmPassword) throws PLException {
+			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[] { "鎮ㄨ緭鍏ョ殑瀵嗙爜涓庣櫥褰曞瘑鐮佷笉涓�鑷�,璇烽噸鏂拌緭鍏�!"});
-		}
-		if(!password.equals(confirmPassword)){
-			throw new VciBaseException("瀵嗙爜鍜岀‘璁ゅ瘑鐮佷笉鐩哥瓑");
 		}
 		SmUserVO smUserVO = getUserByUserOid(userOid);
 		if(Func.isEmpty(smUserVO)){
@@ -1047,12 +1050,21 @@
 		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 + "', plpwdupdatetime = TO_DATE('"
-				+ Func.format(new Date(),"yyyy-MM-dd HH:mm:ss") +"','yyyy-MM-dd hh24:mi:ssxff') where pluid = '" + userOid.trim() + "'";
+				+ Func.format(new Date(),"yyyy-MM-dd HH:mm:ss") +"','yyyy-MM-dd hh24:mi:ss') where pluid = '" + userOid.trim() + "'";
 		try {
 			return platformClientUtil.getBOFactoryService().executeUpdateSql(sql);
 		} catch (PLException vciError) {
@@ -1310,7 +1322,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("璐﹀彿", "瀵嗙爜", "濮撳悕", "鐢靛瓙閭", "涓撲笟", "鎻忚堪", "閮ㄩ棬(涓婁笅绾ч儴闂ㄤ箣闂翠互鍙嶆枩鏉犻殧寮�(/))" ,"瀵嗙骇"));
 		}
@@ -1362,7 +1374,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());
 				//鏄惁蹇呴』瀵煎叆瀵嗙骇
@@ -1386,7 +1398,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