From 19464eb021cfa547dfbfba45a9c896837f7d0d98 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 18 七月 2024 15:35:15 +0800 Subject: [PATCH] 修改密码,登录接口增加密码解密逻辑(前端传递的密码加密传输);枚举和枚举项:查询、增加、修改、删除接口上传。 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java | 60 ++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 34 insertions(+), 26 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java index 1d5153f..e5380cc 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java @@ -1,8 +1,5 @@ package com.vci.web.service.impl; -import com.vci.client.omd.linktype.util.Tool; -import com.vci.client.omd.provider.BtmProvider; -import com.vci.client.omd.provider.LinkTypeProvider; import com.vci.corba.common.PLException; import com.vci.corba.omd.atm.AttributeDef; import com.vci.corba.omd.btm.BTMServicePrx; @@ -15,6 +12,8 @@ import com.vci.corba.omd.lcm.TransitionVOEvent; import com.vci.corba.omd.ltm.LinkType; import com.vci.corba.omd.stm.StatePool; +import com.vci.dto.*; +import com.vci.pagemodel.*; import com.vci.starter.poi.bo.WriteExcelData; import com.vci.starter.poi.bo.WriteExcelOption; import com.vci.starter.poi.util.ExcelUtil; @@ -28,8 +27,6 @@ import com.vci.starter.web.util.VciDateUtil; import com.vci.starter.word.bo.WordMergeStartTableDataBO; import com.vci.starter.word.util.WordUtil; -import com.vci.web.dto.*; -import com.vci.web.pageModel.*; import com.vci.web.properties.OsDDLExportWordFieldProperties; import com.vci.web.service.*; import com.vci.web.util.Func; @@ -48,7 +45,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; -import static com.vci.client.omd.attribpool.ui.VTDataTypePanel.*; +import static com.vci.omd.constants.AttributeConstants.*; /** @@ -259,7 +256,7 @@ List<LifeCycle> unExistLifeCycleList = new ArrayList<LifeCycle>(); List<LifeCycle> editLifeCycleList = new ArrayList<LifeCycle>(); String userId = WebUtil.getCurrentUserId(); - long now = VciDateUtil.getTime(VciDateUtil.getNow()); + long now = VciDateUtil.getNowTime(); //寰幆鍒嗘瀽闇�瑕佹坊鍔犺繕鏄慨鏀� for(OsLifeCycleDTO lifeCycleDTO : lifeCycleDTOList){ String lifeCycleId = lifeCycleDTO.getId().toLowerCase().trim(); @@ -378,7 +375,7 @@ List<AttributeDef> unExistAttrList = new ArrayList<AttributeDef>(); List<AttributeDef> editAttrList = new ArrayList<AttributeDef>(); String userId = WebUtil.getCurrentUserId(); - long now = VciDateUtil.getTime(VciDateUtil.getNow()); + long now = VciDateUtil.getNowTime(); //寰幆鍒嗘瀽闇�瑕佹坊鍔犺繕鏄慨鏀� for (OsAttributeDTO attributeDTO : attributeDTOList) { String attrId = attributeDTO.getId().toLowerCase().trim(); @@ -578,7 +575,7 @@ List<BizType> unExistBtmList = new ArrayList<BizType>(); List<BizType> editBtmList = new ArrayList<BizType>(); String userId = WebUtil.getCurrentUserId(); - long now = VciDateUtil.getTime(VciDateUtil.getNow()); + long now = VciDateUtil.getNowTime(); for (OsBtmTypeDTO btmTypeDTO : btmTypeDTOList) { String btmId = btmTypeDTO.getId().toLowerCase().trim(); @@ -630,21 +627,25 @@ btmService.addBizType(btmItem); //鎵ц瀹屾垚浜嗛渶瑕佸垱寤鸿〃 //鑾峰彇鐨勬椂鍊欎笉涓�瀹氬埛鏂颁簡缂撳瓨锛岃繖鏍峰氨鑾峰彇涓嶅埌淇℃伅 - String btmTableName = BtmProvider.getInstance().getBTTableName(btmItem.name); + //OmdHelper + //todo 姝ゅ崰鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String btmTableName = BtmProvider.getInstance().getBTTableName(btmItem.name); + String btmTableName = null; String sql = "create Table " + btmTableName + "(" + "\n\tOID VARCHAR2(36) not null,\n\tREVISIONOID VARCHAR2(36),\n\tNAMEOID VARCHAR2(36),\n\tBtmName VARCHAR2(36),\n\tISLastR CHAR(1),\n\tISFirstR CHAR(1),\n\tISLastV CHAR(1),\n\tISFirstV CHAR(1),\n\tCreator VARCHAR2(36),\n\tCreateTime TIMESTAMP,\n\tLastModifier VARCHAR2(36),\n\tLastModifyTime TIMESTAMP,\n\tRevisionRule VARCHAR2(36),\n\tVersionRule VARCHAR2(36),\n\tRevisionSeq NUMBER,\n\tRevisionValue VARCHAR2(10),\n\tVersionSeq NUMBER,\n\tVersionValue VARCHAR2(10),\n\tLCTID VARCHAR2(36),\n\tLCStatus VARCHAR2(36),\n\tTS TIMESTAMP,\n\tID VARCHAR2(36),\n\tNAME VARCHAR2(128),\n\tDESCRIPTION VARCHAR2(255),\n\tOWNER VARCHAR2(36),\n\tCHECKINBY VARCHAR2(36),\n\tCHECKINTIME TIMESTAMP,\n\tCHECKOUTBY VARCHAR2(36),\n\tCHECKOUTTIME TIMESTAMP,\n\tCOPYFROMVERSION VARCHAR2(36),\n\t"; String[] apNameArray = btmItem.apNameArray; if(apNameArray!=null && apNameArray.length>0){ for(String attrId : apNameArray){ OsAttributeVO attrVO = attributeMap.get(attrId.toLowerCase().trim()); if(attrVO!=null) { - String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO)); - sql = sql + abSql; + //todo 姝ゅ崰鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO)); +// sql = sql + abSql; }else{ logger.info("涓氬姟绫诲瀷{}閲岀殑灞炴�}娌℃壘鍒�",btmTableName,attrId.toLowerCase().trim()); } } } - String alterSql = BtmProvider.getInstance().getAddPKSql(btmItem.name); +// String alterSql = BtmProvider.getInstance().getAddPKSql(btmItem.name); sql = sql.substring(0, sql.lastIndexOf(",")); sql = sql + "\n)"; //TODO 鏆傛椂涓嶆竻妤氱敤浣曠鏂瑰紡鍒涘缓琛紝姝ゅ鍏堟敞閲婃帀 @@ -1122,12 +1123,15 @@ */ private void addAttrToDB(Collection<String> addedAbList,String btmType,boolean linkType){ if (!CollectionUtils.isEmpty(addedAbList)) { - String tableName = linkType? LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType); + //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String tableName = linkType? LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType); + String tableName = null; String addSql = "alter table " + tableName + " add("; Map<String, OsAttributeVO> attributeMap = attrService.selectAllAttributeMap(); for (String abName : addedAbList) { AttributeDef abItem = attrService.attributeVO2DO(attributeMap.get(abName)); - addSql = addSql + Tool.getInstance().getAbSql(abItem); + //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// addSql = addSql + Tool.getInstance().getAbSql(abItem); } addSql = VciBaseUtil.removeComma(addSql.replace("\n\t","")); addSql = addSql + ")"; @@ -1143,13 +1147,14 @@ */ private void removeAttrToDB(Collection<String> removeAbList,String btmType,boolean linkType){ if (!CollectionUtils.isEmpty(removeAbList)) { - String tableName = linkType?LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType); - String removeSql = "alter table " + tableName + " drop("; - for (String abName : removeAbList) { - removeSql = removeSql + abName + ","; - } - removeSql = VciBaseUtil.removeComma(removeSql.replace("\n\t","")); - removeSql = removeSql + ")"; + //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String tableName = linkType?LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType); +// String removeSql = "alter table " + tableName + " drop("; +// for (String abName : removeAbList) { +// removeSql = removeSql + abName + ","; +// } +// removeSql = VciBaseUtil.removeComma(removeSql.replace("\n\t","")); +// removeSql = removeSql + ")"; //TODO 涓嶆竻妤氬叿浣撲娇鐢ㄤ粈涔堟柟娉曪紝鏆傛椂娉ㄩ噴锛屼絾涓嶈鍒犻櫎 // DDLToolClient.getService().batchExecuteUpdateOracle(new String[]{removeSql}); } @@ -1210,7 +1215,7 @@ List<LinkType> addLinkTypeList = new ArrayList<LinkType>(); List<LinkType> editLinkTypeList = new ArrayList<LinkType>(); String userId = WebUtil.getCurrentUserId(); - long now = VciDateUtil.getTime(VciDateUtil.getNow()); + long now = VciDateUtil.getNowTime(); for(OsLinkTypeDTO linkTypeDTO : linkTypeDTOS){ String linkId = linkTypeDTO.getId().toLowerCase().trim(); LinkType linkType = null; @@ -1275,14 +1280,17 @@ for(LinkType linkType : linkTypes){ try{ platformClientUtil.getLinkTypeService().addLinkType(linkType); - String tableName = LinkTypeProvider.getInstance().getLTTableName(linkType.name); + //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String tableName = LinkTypeProvider.getInstance().getLTTableName(linkType.name); + String tableName = null; String sql = "create table " + tableName + "(" + "\n\tOID VARCHAR2(36) not null,\n\tCreator VARCHAR2(36),\n\tCreateTime TIMESTAMP,\n\tLastModifier VARCHAR2(36),\n\tLastModifyTime TIMESTAMP,\n\tTS TIMESTAMP,\n\t"; String[] apNameArray = linkType.attributes; if(apNameArray!=null && apNameArray.length>0){ for(String attrId : apNameArray){ OsAttributeVO attrVO = attributeMap.get(attrId.toLowerCase().trim()); - String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO)); - sql = sql + abSql; + //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO)); +// sql = sql + abSql; } } sql = sql.substring(0, sql.lastIndexOf(",")); -- Gitblit v1.9.3