From 370b26066c560f15f6a84caca2be149e48e86556 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期二, 07 一月 2025 15:52:05 +0800
Subject: [PATCH] 系统菜单 默认显示&&系统配置、对象建模按钮权限以及按钮图标
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java | 53 ++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 38 insertions(+), 15 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 b8724f9..9586abf 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
@@ -21,7 +21,8 @@
import com.vci.starter.web.constant.FrameWorkLcStatusConstant;
import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.starter.web.exception.VciBaseException;
-import com.vci.starter.web.util.BeanUtil;
+import com.vci.starter.web.util.BeanUtilForVCI;
+import com.vci.starter.web.util.Lcm.Func;
import com.vci.starter.web.util.LocalFileUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.VciDateUtil;
@@ -29,7 +30,6 @@
import com.vci.starter.word.util.WordUtil;
import com.vci.web.properties.OsDDLExportWordFieldProperties;
import com.vci.web.service.*;
-import com.vci.web.util.Func;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
@@ -274,7 +274,7 @@
lifeCyle = lifeCycleService.lifeCycleVO2DO(allLifeCycleLowMap.get(lifeCycleId));
edit = true;
}
- lifeCyle.tag = lifeCycleDTO.getName();
+ lifeCyle.label = lifeCycleDTO.getName();
lifeCyle.description = lifeCycleDTO.getDescription() == null?"":lifeCycleDTO.getDescription();
lifeCyle.startState = lifeCycleDTO.getStartStatus() == null?"":lifeCycleDTO.getStartStatus();
lifeCyle.modifier = userId;
@@ -762,7 +762,14 @@
attributes.stream().forEach( t -> {
int index = indexMap.get("index");
- Map<String,Object> columnData = attributeToWordMap(t,index);
+ Map<String,Object> columnData = null;
+ try {
+ columnData = attributeToWordMap(t,index);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = "灏嗗睘鎬у璞℃嫹璐濆埌word鏁版嵁瀵硅薄涓椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ }
indexMap.put("index",index+1);
columnDataList.add(columnData);
});
@@ -794,7 +801,7 @@
List<OsBtmTypeAttributeVO> attributes = new ArrayList<>();
linkAttributes.stream().forEach(t -> {
OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO();
- BeanUtil.convert(t,attributeVO);
+ BeanUtilForVCI.convert(t,attributeVO);
attributeVO.setPkBtmType(t.getPkLinkType());
attributes.add(attributeVO);
});
@@ -804,7 +811,14 @@
indexMap.put("index",1);
attributes.stream().forEach( t -> {
int index = indexMap.get("index");
- Map<String,Object> columnData = attributeToWordMap(t,index);
+ Map<String,Object> columnData = null;
+ try {
+ columnData = attributeToWordMap(t,index);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = "灏嗗睘鎬у璞℃嫹璐濆埌word鏁版嵁瀵硅薄涓椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ }
indexMap.put("index",index+1);
columnDataList.add(columnData);
});
@@ -851,7 +865,13 @@
if(!CollectionUtils.isEmpty(btmTypeVOList)) {
btmTypeVOList.stream().forEach(btmTypeVO -> {
String btmId = btmTypeVO.getId();
- List<OsBtmTypeAttributeVO> attributeVOS = btmService.listAttributeByBtmId(btmId);
+ List<OsBtmTypeAttributeVO> attributeVOS = null;
+ try {
+ attributeVOS = btmService.listAttributeByBtmId(btmId);
+ } catch (PLException e) {
+ e.printStackTrace();
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e));
+ }
//鍏堟槸鍚嶇О
int rowIndex = index[0];
WriteExcelData idED = new WriteExcelData(rowIndex, 0, btmId);
@@ -914,7 +934,15 @@
if(!CollectionUtils.isEmpty(linkTypeVOList)){
linkTypeVOList.stream().forEach(linkTypeVO->{
String linkTypeId = linkTypeVO.getId();
- List<OsLinkTypeAttributeVO> attributeVOS = linkTypeService.listAttributeByLinkId(linkTypeId);
+ List<OsLinkTypeAttributeVO> attributeVOS = null;
+ try {
+ attributeVOS = linkTypeService.listAttributeByLinkId(linkTypeId);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String errorLog = "鏌ヨ閾炬帴绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorLog);
+ throw new VciBaseException(errorLog);
+ }
//鍏堟槸鍚嶇О
int rowIndex = index[0];
WriteExcelData idED = new WriteExcelData(rowIndex, 0, linkTypeId);
@@ -1057,7 +1085,7 @@
* @param index 绱㈠紩
* @return 鏁版嵁鏄犲皠,key 鏄痺ord閲岀殑鍩熷瓧娈碉紝value鏄搴旂殑鍊�
*/
- private Map<String,Object> attributeToWordMap(OsBtmTypeAttributeVO btmTypeAttributeVO,int index){
+ private Map<String,Object> attributeToWordMap(OsBtmTypeAttributeVO btmTypeAttributeVO,int index) throws PLException {
Map<String,Object> columnData = new HashMap<>();
if(StringUtils.isNotBlank(wordFieldProperties.getColumnIndex())) {
columnData.put(wordFieldProperties.getColumnIndex(), index);
@@ -1115,7 +1143,6 @@
return "";
}
-
/**
* 娣诲姞灞炴�у埌oracle
* @param addedAbList 娣诲姞鐨勫睘鎬�
@@ -1159,10 +1186,6 @@
// DDLToolClient.getService().batchExecuteUpdateOracle(new String[]{removeSql});
}
}
-
-
-
-
/**
* 灏佽涓氬姟绫诲瀷
@@ -1232,7 +1255,7 @@
linkType.modifyTime = now;
linkType.id = "";
linkType.name = linkId;
- linkType.tag = linkTypeDTO.getName();
+ linkType.label = linkTypeDTO.getName();
linkType.description = linkTypeDTO.getDescription() == null ?"":linkTypeDTO.getDescription();
linkType.implClass = "";
linkType.shape = "";
--
Gitblit v1.9.3