Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/OsBtmTypeDTO.java
@@ -86,11 +86,6 @@ private String lifeCycleId; /** * çå½å¨æç䏿åç§° */ private String lifeCycleName; /** * çæ¬¡è§å */ private String versionRule; @@ -104,11 +99,6 @@ * å¤ç¨çå½å¨æè±æåç§° */ private String subLifeCycleId; /** * å¤ç¨çå½å¨æä¸æåç§° */ private String subLifeCycleName; /** * æ¯å¦ä¸ºè§å¾ @@ -136,14 +126,9 @@ private String delimiter; /** * æ·»å æè ç§»é¤ç屿§ä¿¡æ¯ */ private List<OsBtmTypeLinkAttributesDTO> attributes; /** * æ·»å æç§»é¤ç屿§ */ private String[] apNameArray; private String apNameArray; /** * æ¶é´æ³ï¼ç¨äºæ ¡éªæ¯å¦ææ°æ°æ® @@ -170,11 +155,11 @@ */ private Date lastModifyTime; public void setApNameArray(String[] apNameArray) { public void setApNameArray(String apNameArray) { this.apNameArray = apNameArray; } public String[] getApNameArray() { public String getApNameArray() { return apNameArray; } @@ -338,14 +323,6 @@ this.versionRule = versionRule; } public List<OsBtmTypeLinkAttributesDTO> getAttributes() { return attributes; } public void setAttributes(List<OsBtmTypeLinkAttributesDTO> attributes) { this.attributes = attributes; } public Date getTs() { return ts; } @@ -386,28 +363,12 @@ this.lifeCycleId = lifeCycleId; } public String getLifeCycleName() { return lifeCycleName; } public void setLifeCycleName(String lifeCycleName) { this.lifeCycleName = lifeCycleName; } public String getSubLifeCycleId() { return subLifeCycleId; } public void setSubLifeCycleId(String subLifeCycleId) { this.subLifeCycleId = subLifeCycleId; } public String getSubLifeCycleName() { return subLifeCycleName; } public void setSubLifeCycleName(String subLifeCycleName) { this.subLifeCycleName = subLifeCycleName; } public String getClassFullName() { @@ -436,14 +397,11 @@ ", implClass='" + implClass + '\'' + ", shape='" + shape + '\'' + ", lifeCycleId='" + lifeCycleId + '\'' + ", lifeCycleName='" + lifeCycleName + '\'' + ", versionRule='" + versionRule + '\'' + ", subLifeCycleId='" + subLifeCycleId + '\'' + ", subLifeCycleName='" + subLifeCycleName + '\'' + ", viewFlag=" + viewFlag + ", viewCreateSql='" + viewCreateSql + '\'' + ", classFullName='" + classFullName + '\'' + ", attributes=" + attributes + ", ts=" + ts + '}'; } Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java
@@ -33,7 +33,6 @@ */ private Boolean hasChildren; /** * èåç¼å· */ @@ -103,11 +102,25 @@ * æ¯å¦æ°çªå£æå¼ */ private String isOpenName; /** * åªé对äºé¦é¡µç³»ç»æ¨¡åé 置使ç¨ï¼ç¨äºåºåç¹å»ä¸åçèç¹ï¼å±å¼çä¸åæ¥è¯¢é»è¾ */ private String modeType; /** * å端æ¯å¦éè */ private HashMap<String,Boolean> meta = new HashMap<>(); public String getModeType() { return modeType; } public void setModeType(String modeType) { this.modeType = modeType; } public String getId() { return id; } Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/OsBtmTypeAttributeVO.java
@@ -53,7 +53,7 @@ /** * æ°æ®ç±»å */ private String attrDataType; private String attributeDataType; /** * æ¯å¦å¯ä»¥ä¸ºç©º @@ -191,12 +191,12 @@ this.description = description; } public String getAttrDataType() { return attrDataType; public String getAttributeDataType() { return attributeDataType; } public void setAttrDataType(String attrDataType) { this.attrDataType = attrDataType; public void setAttributeDataType(String attributeDataType) { this.attributeDataType = attributeDataType; } public boolean isReferFlag() { @@ -379,7 +379,7 @@ ", name='" + name + '\'' + ", attributeLength=" + attributeLength + ", description='" + description + '\'' + ", attrDataType='" + attrDataType + '\'' + ", attributeDataType='" + attributeDataType + '\'' + ", nullableFlag=" + nullableFlag + ", defaultValue='" + defaultValue + '\'' + ", precisionLength=" + precisionLength + Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/OsBtmTypeVO.java
@@ -1,5 +1,7 @@ package com.vci.pagemodel; import com.vci.starter.web.pagemodel.Tree; import java.util.Date; import java.util.List; Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java
@@ -1,9 +1,11 @@ package com.vci.frameworkcore.compatibility; import com.vci.common.exception.VciException; import com.vci.corba.common.PLException; import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; import com.vci.pagemodel.MenuVO; import com.vci.pagemodel.SmFunctionVO; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.DataGrid; import com.vci.starter.web.pagemodel.PageHelper; import com.vci.starter.web.pagemodel.Tree; @@ -52,13 +54,23 @@ List<MenuVO> treeCurrentUserMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException; /** * éè¿æ¨¡åIDè·åå级å表 * @param parentId * @param isAll æ¯å¦å æ¬æ æç模åï¼trueåå æ¬ * @return * @throws VciBaseException */ List<MenuVO> getSysModelTreeMenuByPID(String parentId,boolean isAll) throws VciBaseException; int checkChildObject(String moduleId) throws VciException; /** * è·åææçåè½èå * @param treeQueryObject æ æ¥è¯¢å¯¹è±¡ * @param resourceControlTypeEnum è§è²æ§å¶åºåï¼ä¹æ¯åè½æ§å¶çåºå * @return æ èç¹ï¼åºç°é误ä¼å¨å¼å¸¸å¤çå¨ä¸ç»ä¸è¿åJson */ List<Tree> treeAllMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum); /** * éè¿ä¸çº§èç¹è·åä¸çº§çææçèåèç¹ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
@@ -2,8 +2,13 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.vci.client.ClientSession; import com.vci.common.exception.VciException; import com.vci.common.locale.LocaleDisplay; import com.vci.corba.common.PLException; import com.vci.corba.framework.data.FuncOperationInfo; import com.vci.corba.framework.data.FunctionInfo; import com.vci.corba.framework.data.OperateInfo; import com.vci.corba.framework.data.RoleRightInfo; import com.vci.corba.omd.data.BusinessObject; import com.vci.corba.portal.data.PLUILayout; @@ -14,13 +19,13 @@ import com.vci.pagemodel.MenuVO; import com.vci.pagemodel.SmFunctionVO; import com.vci.omd.utils.ObjectTool; import com.vci.pagemodel.SmFunctionVO; import com.vci.starter.web.constant.QueryOptionConstant; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.*; import com.vci.starter.web.util.VciBaseUtil; import com.vci.starter.web.wrapper.VciQueryWrapperForDO; import com.vci.pagemodel.UIContentVO; import com.vci.web.properties.JsonConfigReader; import com.vci.web.service.UIEngineServiceI; import com.vci.web.service.WebBoServiceI; import com.vci.web.util.Func; @@ -279,107 +284,156 @@ } functionVOList.add(functionVO); } //妿æ¯å¼åæè æµè¯ç¨æ·ï¼éåè·åç³»ç»æ¨¡åé ç½®èå if(adminOrDeveloperOrRoot){ functionVOList.addAll(this.getSystemMenu()); //è·åé¦é¡µç³»ç»æ¨¡åé ç½®èå MenuVO menuVO = JsonConfigReader.getMenuVO(); functionVOList.add(menuVO); } return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()); } /** * è·åé¦é¡µç³»ç»æ¨¡åé ç½®èå * éè¿æ¨¡åIDè·åå级å表 * @param parentId * @param isAll æ¯å¦å æ¬æ æç模åï¼trueåå æ¬ * @return * @throws VciBaseException */ @Override public List<MenuVO> getSysModelTreeMenuByPID(String parentId,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")){ 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.setId(info.id); menuVO.setCode(info.funcId); menuVO.setId(info.operId); menuVO.setName(info.operName); //menuVO.setOperIndentify(info.operIndentify); menuVO.setAlias(info.operAlias); menuVO.setRemark(info.operDesc); menuVO.setSort((int) info.number); //menuVO.setIsValid(info.isValid); menuVO.setHasChildren(false); menuVOList.add(menuVO); } }catch (PLException e) { e.printStackTrace(); throw new VciBaseException(String.valueOf(e.code), e.messages); } }else if(childType == 1){ try{ FunctionInfo[] funcInfos = platformClientUtil.getFrameworkService().getModuleListByParentId(parentId, isAll); for(int i = 0;i < funcInfos.length; i++){ FunctionInfo funcInfo = funcInfos[i]; MenuVO menuVO = this.functionInfoToMenuVO(funcInfo); menuVOList.add(menuVO); } }catch (PLException e) { e.printStackTrace(); throw new VciBaseException(String.valueOf(e.code),e.messages); } } } catch (Exception e) { e.printStackTrace(); throw new VciBaseException("æ¨¡åæ¥è¯¢æ¶åºç°é误ï¼åå ï¼"+VciBaseUtil.getExceptionMessage(e)); } }else{ try{ 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); } }catch (PLException e) { e.printStackTrace(); throw new VciBaseException(String.valueOf(e.code),e.messages); } } }else if(parentId.equals("operateType")){ //å è½½æææä½ try{ OperateInfo[] operateInfos = platformClientUtil.getFrameworkService().getOperateTreeList(parentId); for(int i = 0; i < operateInfos.length;i++ ){ OperateInfo operateInfo = operateInfos[i]; MenuVO menuVO = new MenuVO(); menuVO.setId(operateInfo.id); menuVO.setName(operateInfo.name); menuVO.setCode(operateInfo.identify); menuVO.setAlias(operateInfo.alias); menuVO.setCategory(2); menuVO.setRemark(operateInfo.desc); menuVO.getMeta().put("keepAlive",false); menuVO.setSort((int) operateInfo.seq); menuVO.setModeType("operateObject"); menuVO.setHasChildren(false); menuVOList.add(menuVO); } }catch (PLException e) { e.printStackTrace(); throw new VciBaseException(String.valueOf(e.code),new String[]{VciBaseUtil.getExceptionMessage(e)}); } } return menuVOList; } /** * functionInfo转VO对象 * @param funcInfo * @return */ private List<MenuVO> getSystemMenu(){ /*å¦ææ¯æµè¯è´¦å·æè å¼åè´¦å·ï¼å¤çè¿åsystemManagmentNodeåmodelManagmentNode以å¤ï¼ è¿éè¦è¿åæä½ç±»å管çèåèç¹ï¼operateNodeï¼åç³»ç»é ç½®ãç³»ç»è¿è¡çæ§èç¹*/ List<MenuVO> functionVOList = new ArrayList<>(); String menuJson = "{\n" + " \"hasChildren\": true,\n" + " \"children\": [\n" + " {\n" + " \"hasChildren\": true,\n" + " \"children\": [],\n" + " \"id\": \"systemManagmentNode\",\n" + " \"name\": \"管çåè½æ¨¡å\",\n" + " \"parentId\": \"VCIBaseTreeNode\",\n" + " \"code\": \"systemManagmentNode\",\n" + " \"alias\": \"system\",\n" + " \"meta\": {\n" + " \"keepAlive\": false\n" + " },\n" + " \"sort\": 2,\n" + " \"soruce\": \"\"\n" + " },\n" + " {\n" + " \"hasChildren\": true,\n" + " \"children\": [],\n" + " \"id\": \"modelManagmentNode\",\n" + " \"name\": \"ä¸å¡åè½æ¨¡å\",\n" + " \"parentId\": \"VCIBaseTreeNode\",\n" + " \"code\": \"modelManagmentNode\",\n" + " \"alias\": \"model\",\n" + " \"meta\": {\n" + " \"keepAlive\": false\n" + " },\n" + " \"sort\": 3,\n" + " \"soruce\": \"\"\n" + " },\n" + " {\n" + " \"hasChildren\": true,\n" + " \"children\": [],\n" + " \"id\": \"operateNode\",\n" + " \"name\": \"æä½ç±»å管ç\",\n" + " \"parentId\": \"VCIBaseTreeNode\",\n" + " \"code\": \"operateNode\",\n" + " \"alias\": \"operate\",\n" + " \"meta\": {\n" + " \"keepAlive\": false\n" + " },\n" + " \"sort\": 4,\n" + " \"soruce\": \"\"\n" + " },\n" + " {\n" + " \"hasChildren\": false,\n" + " \"children\": [],\n" + " \"id\": \"sysOptionNode\",\n" + " \"name\": \"ç³»ç»é ç½®\",\n" + " \"parentId\": \"VCIBaseTreeNode\",\n" + " \"code\": \"sysOptionNode\",\n" + " \"alias\": \"sysOption\",\n" + " \"meta\": {\n" + " \"keepAlive\": false\n" + " },\n" + " \"sort\": 5,\n" + " \"soruce\": \"\"\n" + " },\n" + " {\n" + " \"hasChildren\": false,\n" + " \"children\": [],\n" + " \"id\": \"sysMonitorNode\",\n" + " \"name\": \"ç³»ç»è¿è¡çæ§\",\n" + " \"parentId\": \"VCIBaseTreeNode\",\n" + " \"code\": \"sysMonitorNode\",\n" + " \"alias\": \"sysMonitor\",\n" + " \"meta\": {\n" + " \"keepAlive\": false\n" + " },\n" + " \"sort\": 5,\n" + " \"soruce\": \"\"\n" + " }\n" + " ],\n" + " \"id\": \"VCIBaseTreeNode\",\n" + " \"name\": \"ç³»ç»æ¨¡åé ç½®\",\n" + " \"parentId\": \"\",\n" + " \"code\": \"rootNode\",\n" + " \"alias\": \"root\",\n" + " \"meta\": {\n" + " \"keepAlive\": false\n" + " },\n" + " \"sort\": 1,\n" + " \"soruce\": \"\"\n" + "}"; functionVOList.add(JSON.parseObject(menuJson, MenuVO.class)); return functionVOList; private MenuVO functionInfoToMenuVO(FunctionInfo funcInfo){ MenuVO menuVO = new MenuVO(); menuVO.setId(funcInfo.id); menuVO.setSource(funcInfo.image); //if(StringUtils.isBlank(menu.resourceB)){ // continue; //} menuVO.setPath(funcInfo.resourceB); menuVO.setParentId(funcInfo.parentId); menuVO.setCode(funcInfo.aliasName); menuVO.setAlias(funcInfo.aliasName); menuVO.setName(funcInfo.name); menuVO.getMeta().put("keepAlive",false); menuVO.setSort((int) funcInfo.seq); if(this.checkChildObject(menuVO.getId()) == 0){ menuVO.setHasChildren(false); }else{ menuVO.setHasChildren(true); } return menuVO; } /** * éè¿æ¨¡åIDæ£æ¥è¯¥æ¨¡ååçº§å¯¹è±¡æ¯æ¨¡åè¿æ¯æä½ * @param moduleId * @return 0è¡¨ç¤ºæ²¡ææ¨¡å乿²¡ææä½ï¼1è¡¨ç¤ºææ¨¡åï¼2表示ææä½ * @throws VciException */ @Override public int checkChildObject(String moduleId) throws VciBaseException { long res = 0; try{ res = ClientSession.getFrameworkService().checkChildObject(moduleId); }catch (PLException e) { e.printStackTrace(); throw new VciBaseException(String.valueOf(e.code),e.messages); } return (int)res; } public List<MenuVO> findChildFunctionVO(String parentOid,Map<String, List<FunctionInfo>> map) throws PLException { @@ -723,6 +777,7 @@ } return dataGrid(queryMap,pageHelper); } /** * æ¹éæ ¹æ®è§è²ç主é®è·åå ³èçæé * @@ -755,7 +810,6 @@ } return gridFunctionByRoleOid(roleOidCollection.stream().collect(Collectors.joining(",")), queryMap,pageHelper,resourceControlTypeEnum,false); } /** * æ¸ é¤ç¼å Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
@@ -6,8 +6,12 @@ import com.vci.pagemodel.MenuVO; import com.vci.pagemodel.SmFunctionVO; import com.vci.starter.web.annotation.controller.VciUnCheckRight; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.*; import com.vci.pagemodel.UIContentVO; import com.vci.starter.web.util.VciBaseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -29,6 +33,10 @@ @Autowired private ISmFunctionQueryService functionQueryService; /** * æ¥å¿ */ private Logger logger = LoggerFactory.getLogger(getClass()); /** * è·åå½åç¨æ·çèå @@ -41,6 +49,25 @@ } /** * è·åå½å模åä¸ç忍¡å * @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 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
@@ -54,7 +54,6 @@ @RequestMapping("/btmTypeController") @VciBusinessLog(modelName="ä¸å¡ç±»å") @RestController @VciUnCheckRight public class WebBtmTypeController { /** @@ -191,7 +190,7 @@ * btmTypeDTO 龿¥ç±»åä¿®æ¹ç对象 * @return ä¿åç»æ */ @PostMapping("/updateBtmType") @PutMapping("/updateBtmType") public BaseResult updateBtmType(@RequestBody OsBtmTypeDTO btmTypeDTO){ try { return btmService.updateBtmType(btmTypeDTO) ? BaseResult.success("ä¸å¡ç±»åä¿®æ¹æåï¼"):BaseResult.fail("ä¸å¡ç±»åä¿®æ¹å¤±è´¥ï¼"); @@ -469,7 +468,7 @@ OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); BeanUtil.convert(attr,attributeVO); attributeVO.setAttributeLength(attr.getAttrLength()); attributeVO.setAttrDataType(attr.getAttributeDataType()); attributeVO.setAttributeDataType(attr.getAttributeDataType()); attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); attributeVO.setReferBtmTypeName(attr.getBtmTypeName()); finalBoAttrs.add(attributeVO); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/properties/JsonConfigReader.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,36 @@ package com.vci.web.properties; import com.alibaba.fastjson.JSON; import com.vci.pagemodel.MenuVO; import org.apache.commons.io.FileUtils; import org.springframework.util.ResourceUtils; import java.io.*; /** * 读åjsoné ç½®æä»¶ï¼èåç * @author ludc * @date 2024/8/16 10:09 */ public class JsonConfigReader { /** * èåjsoné ç½®æä»¶ï¼å¦æå ¶ä»éè¦è¯»åçï¼å¯ä»¥ä»¿ç §å½åé»è¾ç¼å */ private static MenuVO menuVO; static{ try { File file = ResourceUtils.getFile("classpath:menuConfig.json"); String json = FileUtils.readFileToString(file, "UTF-8"); menuVO = JSON.parseObject(json, MenuVO.class); }catch (IOException e) { e.printStackTrace(); } } public static MenuVO getMenuVO() { return menuVO; } } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -232,7 +232,7 @@ BeanUtil.convert(attributeVO,btmTypeAttributeVO); btmTypeAttributeVO.setPkBtmType(vo.getOid()); btmTypeAttributeVO.setBtmTypeId(vo.getId()); btmTypeAttributeVO.setAttrDataType(attributeVO.getAttributeDataType()); btmTypeAttributeVO.setAttributeDataType(attributeVO.getAttributeDataType()); btmTypeAttributeVO.setAttributeLength(attributeVO.getAttrLength()); btmTypeAttributeVO.setDefaultValue(attributeVO.getDefaultValue()); if("secretgrade".equalsIgnoreCase(attributeVO.getId())){ @@ -385,7 +385,7 @@ attributeService.getDefaultAttributeVOs().stream().forEach(attr->{ OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); BeanUtil.convert(attr, attributeVO); attributeVO.setAttrDataType(attr.getAttributeDataType()); attributeVO.setAttributeDataType(attr.getAttributeDataType()); attributeVO.setAttributeLength(attr.getAttrLength()); attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); attributeVO.setReferBtmTypeName(attr.getBtmTypeName()); @@ -648,7 +648,7 @@ AttributeDef sysAttributeDef = collect.get(attrName.toLowerCase()); OsBtmTypeAttributeVO vo = new OsBtmTypeAttributeVO(); vo.setOid(sysAttributeDef.oid); vo.setAttrDataType(sysAttributeDef.vtDataType); vo.setAttributeDataType(sysAttributeDef.vtDataType); vo.setPkBtmType(btmName); vo.setCreateTime(new Date(sysAttributeDef.createTime)); vo.setCreator(sysAttributeDef.creator); @@ -667,7 +667,7 @@ for (AttributeDef attribute : attributeDefs) { OsBtmTypeAttributeVO vo = new OsBtmTypeAttributeVO(); vo.setOid(attribute.oid); vo.setAttrDataType(attribute.vtDataType); vo.setAttributeDataType(attribute.vtDataType); vo.setPkBtmType(btmName); vo.setCreateTime(new Date(attribute.createTime)); vo.setCreator(attribute.creator); @@ -695,6 +695,7 @@ */ private BizType dto2BizType(OsBtmTypeDTO dto){ BizType bizType = new BizType(); bizType.oid = dto.getOid(); bizType.name =dto.getId(); bizType.isAbstract = dto.isAbstractFlag(); bizType.label = dto.getName(); @@ -710,24 +711,24 @@ } bizType.description = dto.getDescription(); bizType.revLevel = dto.getRevLevel(); bizType.revRuleName = dto.getRevisionRuleId(); bizType.revInput = dto.isInputRevisionFlag(); bizType.delimiter = (dto.getDelimiter() == null ? "" : dto.getDelimiter()); bizType.verRuleName = Short.parseShort(dto.getVersionRule()); bizType.verRuleName = Func.isBlank(dto.getVersionRule()) ? 0:Short.parseShort(dto.getVersionRule()); //bizType.imageName = dto.get; //List<String> attrIdList = dto.getAttributesDTOList().stream().map(OsBtmTypeLinkAttributesDTO::getId).collect(Collectors.toList()); bizType.apNameArray = dto.getApNameArray();//attrIdList.toArray(new String[attrIdList.size()]); bizType.apNameArray = dto.getApNameArray().split(",");//attrIdList.toArray(new String[attrIdList.size()]); String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); long timeMillis = System.currentTimeMillis(); bizType.creator = Func.isBlank(dto.getCreator()) ? userId:dto.getCreator(); bizType.createTime = Func.isEmpty(dto.getCreateTime()) ? timeMillis:dto.getCreateTime().getTime(); bizType.modifier = userId; bizType.modifyTime = timeMillis; bizType.ts = Func.isEmpty(dto.getTs())? timeMillis:dto.getTs().getTime(); return bizType; } @@ -856,14 +857,14 @@ checkRevLevel(dbBizType,btmTypeDTO); checkVersionInfo(btmTypeDTO); //å¤çä¸å¡ç±»åä¸ç屿§ List<String> lastAttrList = new ArrayList<>(Arrays.asList(btmTypeDTO.getApNameArray())); List<String> lastAttrList = new ArrayList<>(Arrays.asList(btmTypeDTO.getApNameArray().split(","))); //ä¸è½ç§»é¤ç屿§ String[] unRemovableFields = null; List<String> unRemovableFields_ = null; //éè¦ç§»é¤ç屿§ List<String> removableFields = null; //ä¿®æ¹åä¸å¡ç±»å卿°æ®åºä¸å·²åå¨çææå±æ§ String[] apNameArray = btmTypeDTO.getApNameArray(); String[] apNameArray = btmTypeDTO.getApNameArray().split(","); Set<String> dbApNameArray = Arrays.stream(dbBizType.apNameArray) .collect(Collectors.toSet()); //è¿æ»¤åºéè¦ç§»é¤ç屿§ @@ -1481,7 +1482,7 @@ if(StringUtils.isBlank(bizType.getfName())){ continue; } if(bizType.getfName().equals(parentBIzType.getName())){ if(bizType.getfName().equals(parentBIzType.getId())){ Tree tree = new Tree(); tree.setOid(bizType.getOid()); tree.setParentName(parentBIzType.getfName()); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java
@@ -412,7 +412,7 @@ if(StringUtils.isBlank(idAttr.getName())){ idAttr.setName("ç¼å·"); } idAttr.setAttrDataType(VciFieldTypeEnum.VTString.name()); idAttr.setAttributeDataType(VciFieldTypeEnum.VTString.name()); if(idAttr.getAttributeLength() == null || idAttr.getAttributeLength() <= 0){ idAttr.setAttributeLength(50); } @@ -426,7 +426,7 @@ if(StringUtils.isBlank(nameAttr.getName())){ nameAttr.setName("åç§°"); } nameAttr.setAttrDataType(VciFieldTypeEnum.VTString.name()); nameAttr.setAttributeDataType(VciFieldTypeEnum.VTString.name()); if(nameAttr.getAttributeLength() == null || nameAttr.getAttributeLength() <= 0){ nameAttr.setAttributeLength(150); } @@ -440,7 +440,7 @@ if(StringUtils.isBlank(descAttr.getName())){ descAttr.setName("æè¿°"); } descAttr.setAttrDataType(VciFieldTypeEnum.VTString.name()); descAttr.setAttributeDataType(VciFieldTypeEnum.VTString.name()); if(descAttr.getAttributeLength() == null || descAttr.getAttributeLength() <= 0){ descAttr.setAttributeLength(250); } @@ -455,7 +455,7 @@ if(VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(attributeBO.getId())){ attributeBO.setName("ç¶æ"); } attributeBO.setVciAttrDataType(attr.getAttrDataType()); attributeBO.setVciAttrDataType(attr.getAttributeDataType()); attributeBO.setNullable(String.valueOf(attr.isNullableFlag())); attributeBO.setAttrDataType(getAttrDateTypeFromVci(attributeBO.getVciAttrDataType())); attributeBO.setJdbcType(getJdbcTypeFromVci(attributeBO.getVciAttrDataType())); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -319,7 +319,7 @@ } OsBtmTypeAttributeVO attributeVO = attributeVOMap.getOrDefault(attrId.toLowerCase(Locale.ROOT), null); if(attributeVO!=null){ String vtType = attributeVO.getAttrDataType(); String vtType = attributeVO.getAttributeDataType(); String attrType = ""; VciFieldTypeEnum fieldTypeEnum = VciFieldTypeEnum.forValue(vtType); if(fieldTypeEnum == null) { Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
@@ -735,7 +735,7 @@ OsBtmTypeAttributeVO idAttrVO = new OsBtmTypeAttributeVO(); idAttrVO.setId("id"); idAttrVO.setName("ç¼å·"); idAttrVO.setAttrDataType(VciFieldTypeEnum.VTString.name()); idAttrVO.setAttributeDataType(VciFieldTypeEnum.VTString.name()); idAttrVO.setAttributeLength(50); idAttrVO.setNullableFlag(true); attributes.add(idAttrVO); @@ -743,7 +743,7 @@ OsBtmTypeAttributeVO nameAttrVO = new OsBtmTypeAttributeVO(); nameAttrVO.setId("name"); nameAttrVO.setName("åç§°"); nameAttrVO.setAttrDataType(VciFieldTypeEnum.VTString.name()); nameAttrVO.setAttributeDataType(VciFieldTypeEnum.VTString.name()); nameAttrVO.setAttributeLength(50); nameAttrVO.setNullableFlag(true); attributes.add(nameAttrVO); @@ -751,7 +751,7 @@ OsBtmTypeAttributeVO descAttrVO = new OsBtmTypeAttributeVO(); descAttrVO.setId("description"); descAttrVO.setName("æè¿°"); descAttrVO.setAttrDataType(VciFieldTypeEnum.VTString.name()); descAttrVO.setAttributeDataType(VciFieldTypeEnum.VTString.name()); descAttrVO.setAttributeLength(150); descAttrVO.setNullableFlag(true); attributes.add(descAttrVO); @@ -894,7 +894,7 @@ //ç¶å屿§ç䏿åç§° rowDataList.add(new WriteExcelData(rowIndex, 3, attributeVO.getName())); //屿§çç±»å rowDataList.add(new WriteExcelData(rowIndex, 4, VciFieldTypeEnum.getTextByValue(attributeVO.getAttrDataType()))); rowDataList.add(new WriteExcelData(rowIndex, 4, VciFieldTypeEnum.getTextByValue(attributeVO.getAttributeDataType()))); //æ¯å¦å¯ä»¥ä¸ºç©º rowDataList.add(new WriteExcelData(rowIndex, 5, attributeVO.isNullableFlag() ? "æ¯" : "å¦")); //屿§é¿åº¦ @@ -1064,7 +1064,7 @@ } columnData.put(wordFieldProperties.getColumnId(),btmTypeAttributeVO.getId().toLowerCase()); columnData.put(wordFieldProperties.getColumnName(),btmTypeAttributeVO.getName()); String attrDataType = btmTypeAttributeVO.getAttrDataType(); String attrDataType = btmTypeAttributeVO.getAttributeDataType(); String columnType = VciFieldTypeEnum.getTextByValue(attrDataType); if(StringUtils.isBlank(columnType)){ columnType = "å符串"; @@ -1194,15 +1194,8 @@ } else { btmItem.verRuleName = 0; } //å å«ç屿§çæ°ç» List<OsBtmTypeLinkAttributesDTO> attributesDTOList = btmTypeDTO.getAttributes(); List<String> attrIdList = new ArrayList<String>(); if (!CollectionUtils.isEmpty(attributesDTOList)) { for (OsBtmTypeLinkAttributesDTO attr : attributesDTOList) { attrIdList.add(attr.getId().toLowerCase()); } } btmItem.apNameArray = attrIdList.toArray(new String[0]); //å å«ç屿§åç§° btmItem.apNameArray = btmTypeDTO.getApNameArray().split(","); } /** Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/OsScanAnnotationTool.java
@@ -465,7 +465,7 @@ Collections.addAll(fields,btmTypeClass.getDeclaredFields()); List<OsBtmTypeLinkAttributesDTO> btmTypeLinkAttributesDTOList = new ArrayList<OsBtmTypeLinkAttributesDTO>(); scanAttributes(fields,attributeDTOMap,btmTypeLinkAttributesDTOList,processAttributeInfo); btmTypeDTO.setAttributes(btmTypeLinkAttributesDTOList); btmTypeDTO.setApNameArray(btmTypeLinkAttributesDTOList.stream().map(OsBtmTypeLinkAttributesDTO::getId).collect(Collectors.joining(","))); btmTypeDTOMap.put(btmTypeDTO.getId().toLowerCase().trim(),btmTypeDTO); } Source/plt-web/plt-web-parent/plt-web/src/main/resources/menuConfig.json
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,91 @@ { "hasChildren": true, "children": [ { "hasChildren": true, "children": [], "id": "systemManagmentNode", "name": "管çåè½æ¨¡å", "parentId": "VCIBaseTreeNode", "code": "systemManagmentNode", "alias": "system", "meta": { "keepAlive": false }, "sort": 2, "soruce": "", "path": "views/systemModel/mangeModel/index" }, { "hasChildren": true, "children": [], "id": "modelManagmentNode", "name": "ä¸å¡åè½æ¨¡å", "parentId": "VCIBaseTreeNode", "code": "modelManagmentNode", "alias": "model", "meta": { "keepAlive": false }, "sort": 3, "soruce": "", "path": "views/systemModel/businessModel/index" }, { "hasChildren": true, "children": [], "id": "operateNode", "name": "æä½ç±»å管ç", "parentId": "VCIBaseTreeNode", "code": "operateNode", "alias": "operate", "meta": { "keepAlive": false }, "sort": 4, "soruce": "", "path": "views/systemModel/operateType/index" }, { "hasChildren": false, "children": [], "id": "sysOptionNode", "name": "ç³»ç»é ç½®", "parentId": "VCIBaseTreeNode", "code": "sysOptionNode", "alias": "sysOption", "meta": { "keepAlive": false }, "sort": 5, "soruce": "", "path": "views/systemModel/systemConfig/index" }, { "hasChildren": false, "children": [], "id": "sysMonitorNode", "name": "ç³»ç»è¿è¡çæ§", "parentId": "VCIBaseTreeNode", "code": "sysMonitorNode", "alias": "sysMonitor", "meta": { "keepAlive": false }, "sort": 5, "soruce": "", "path": "views/systemModel/systemMonitor/index" } ], "id": "VCIBaseTreeNode", "name": "ç³»ç»æ¨¡åé ç½®", "parentId": "systemManagmentNode", "code": "rootNode", "alias": "root", "meta": { "keepAlive": false }, "sort": 0, "soruce": "", "path": "" }