From 600c2ebb55b18d687ff848cb6c9d9a61b8bfa307 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 15 十一月 2024 17:52:48 +0800
Subject: [PATCH] 优化业务类型链接类型查询接口
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java | 1
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java | 20 ++++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java | 2
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java | 9 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java | 81 ++++++++++++++++---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/utility/UIDataFetcher.java | 3
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java | 10 ++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java | 8 +-
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java | 30 ++++++-
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIDataController.java | 9 ++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java | 4
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java | 2
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java | 7 +
13 files changed, 148 insertions(+), 38 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java
index daf15f0..932c429 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java
@@ -414,6 +414,7 @@
//缁勫悎鏂瑰紡杞崲涓哄瓨鍌ㄥ��
spsDto.setRequireCharType(combinations2Plchartypes(spsDto.getCombinations()));
PasswordStrategyInfo passwordStrategyInfo = changePasswordStrategyDTO2Info(spsDto);
+
return platformClientUtil.getFrameworkService().editPasswordStrategy(passwordStrategyInfo,userEntityInfo);
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
index 9bbe900..1ae1fc1 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
@@ -92,7 +92,15 @@
String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):"";
String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : "";
OsLinkTypeVO linkTypeVO = linkTypeService.selectByOid(linkTypeOid);
- List<OsLinkTypeAttributeVO> boAttrs = linkTypeService.listAttributeByLinkId(linkTypeVO.getId());
+ List<OsLinkTypeAttributeVO> boAttrs = null;
+ try {
+ boAttrs = linkTypeService.listAttributeByLinkId(linkTypeVO.getId());
+ }catch (Exception e){
+ e.printStackTrace();
+ String errorLog = "鏌ヨ閾炬帴绫诲瀷鍏宠仈鐨勫睘鎬ф椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorLog);
+ throw new VciBaseException(errorLog);
+ }
List<OsLinkTypeAttributeVO> attrList = boAttrs.stream().filter(s->{
boolean usedFlag = true;
if(StringUtils.isNotBlank(attrId) && !s.getId().contains(attrId)){
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
index 19d19ee..ea31dba 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
@@ -614,8 +614,15 @@
*/
@GetMapping("/createERDiagram")
public BaseResult createERDiagram(String id){
- OsERVO osERVO = btmService.createERDiagram(id);
- return BaseResult.success(osERVO);
+ try {
+ OsERVO osERVO = btmService.createERDiagram(id);
+ return BaseResult.success(osERVO);
+ }catch (Exception e){
+ e.printStackTrace();
+ String msg = "鐢熸垚涓氬姟绫诲瀷浣跨敤鐨凟R鍥炬椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(msg);
+ return BaseResult.fail(msg);
+ }
}
/**
@@ -625,7 +632,14 @@
*/
@GetMapping("/createERUsed")
public BaseResult createERUsed(String id){
- return BaseResult.success(btmService.createERUsed(id));
+ try {
+ return BaseResult.success(btmService.createERUsed(id));
+ } catch (PLException e) {
+ e.printStackTrace();
+ String msg = "鍙栦娇鐢ㄨ繖涓笟鍔$被鍨嬬殑E-R鍥炬椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(msg);
+ return BaseResult.fail(msg);
+ }
}
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIDataController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIDataController.java
index c436ff7..ba3ad2d 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIDataController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIDataController.java
@@ -87,7 +87,14 @@
@VciUnCheckRight
@VciBusinessLog(operateName = "鏍戠殑鏌ヨ",description = "${param.btmname}")
public List<Tree> getDataForTree(UITreeQuery treeQuery){
- return uiDataService.getDataForTree(treeQuery);
+ try {
+ return uiDataService.getDataForTree(treeQuery);
+ }catch (Exception e){
+ e.printStackTrace();
+ String errorMsg = "鏍戠殑鏁版嵁鏌ヨ鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorMsg);
+ throw new VciBaseException(errorMsg);
+ }
}
/**
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
index fe96380..9e10ef7 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
@@ -108,7 +108,7 @@
* @param id 缂栧彿
* @return 涓氬姟绫诲瀷
*/
- OsBtmTypeVO getBtmById(String id);
+ OsBtmTypeVO getBtmById(String id) throws PLException;
/**
* 浣跨敤绫诲瀷鍚嶈幏鍙栦笟鍔$被鍨�,鏌ヤ笉鍒扮洿鎺ユ姤閿�
@@ -176,20 +176,20 @@
* @param id 鏋氫妇鐨勮嫳鏂�
* @return 鏋氫妇鐨勫悕绉�
*/
- String getNameById(String id);
+ String getNameById(String id) throws PLException;
/**
* 鏍规嵁涓氬姟绫诲瀷鍜岄摼鎺ョ被鍨嬬敓鎴怑R鍥�
* @param btmId 涓氬姟绫诲瀷涓婚敭
*/
- OsERVO createERDiagram(String btmId);
+ OsERVO createERDiagram(String btmId) throws PLException;
/**
* 鑾峰彇浣跨敤杩欎釜涓氬姟绫诲瀷鐨凟-R鍥�
* @param btmId 涓氬姟绫诲瀷缂栧彿
* @return 鎵ц缁撴灉
*/
- OsERVO createERUsed(String btmId);
+ OsERVO createERUsed(String btmId) throws PLException;
/**
* 鑾峰彇鎵�鏈変笟鍔$被鍨嬶紙鏍戝舰缁撴瀯锛�
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
index adf9e4b..afb6229 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
@@ -91,14 +91,14 @@
* @param id 缂栧彿
* @return 閾炬帴绫诲瀷
*/
- OsLinkTypeVO getLinkTypeById(String id);
+ OsLinkTypeVO getLinkTypeById(String id) throws PLException;
/**
* 鑾峰彇閾炬帴绫诲瀷鐨勫睘鎬�
* @param linkTypeId 閾炬帴绫诲瀷鐨勭紪鍙�
* @return 閾炬帴绫诲瀷鐨勫睘鎬�
*/
- List<OsLinkTypeAttributeVO> listAttributeByLinkId(String linkTypeId);
+ List<OsLinkTypeAttributeVO> listAttributeByLinkId(String linkTypeId) throws PLException;
/**
* 閾炬帴绫诲瀷鐨勫垪琛�
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java
index bd46053..d3b564a 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java
@@ -50,7 +50,7 @@
* @return 鏍戝舰鏁版嵁
* @throws VciBaseException 鏌ヨ鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
*/
- List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException;
+ List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException, PLException;
/**
* 璋冪敤鍓嶇疆浜嬩欢
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
index 325921d..4076503 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -22,6 +22,7 @@
import com.vci.corba.omd.ltm.LinkType;
import com.vci.corba.omd.stm.StatePool;
import com.vci.corba.omd.vrm.VersionRule;
+import com.vci.corba.portal.data.PLUILayout;
import com.vci.dto.OsBtmTypeDTO;
import com.vci.dto.OsBtmTypeLinkAttributesDTO;
import com.vci.model.IndexObject;
@@ -203,7 +204,7 @@
@Override
public List<OsBtmTypeVO> btmDO2VOs(Collection<BizType> btmItems,Map<String, OsAttributeVO> attributeVOMap) {
List<OsBtmTypeVO> VOS = new ArrayList<>();
- Optional.ofNullable(btmItems).orElseGet(() -> new ArrayList<>()).stream().forEach(btmItem -> {
+ Optional.ofNullable(btmItems).orElseGet(() -> new ArrayList<>()).parallelStream().forEach(btmItem -> {
OsBtmTypeVO vo = btmDO2VO(btmItem,attributeVOMap);
VOS.add(vo);
});
@@ -290,12 +291,12 @@
if (CollectionUtils.isEmpty(btmIds)) {
return null;
}
- Map<String, OsBtmTypeVO> btmTypeVOMap = self.selectAllBtmMap();
+ //Map<String, OsBtmTypeVO> btmTypeVOMap = self.selectAllBtmMap();
+ BtmDataFetcher btmDataFetcher = new BtmDataFetcher();
List<OsBtmTypeVO> btmTypeVOS = new ArrayList<>();
btmIds.stream().forEach(id -> {
- if (btmTypeVOMap.containsKey(id.toLowerCase())) {
- btmTypeVOS.add(btmTypeVOMap.get(id.toLowerCase()));
- }
+ OsBtmTypeVO btmType = btmDataFetcher.getBtmType(id);
+ btmTypeVOS.add(btmType);
});
return btmTypeVOS;
}
@@ -307,11 +308,12 @@
* @return 涓氬姟绫诲瀷
*/
@Override
- public OsBtmTypeVO getBtmById(String id) {
+ public OsBtmTypeVO getBtmById(String id) throws PLException {
if (StringUtils.isBlank(id)) {
return null;
}
- return self.selectAllBtmMap().getOrDefault(id.toLowerCase(), null);
+ BizType bizType = platformClientUtil.getBtmService().getBizTypeByName(id);
+ return btmDO2VO(bizType,null);
}
/**
@@ -623,7 +625,7 @@
* @return 鏋氫妇鐨勫悕绉�
*/
@Override
- public String getNameById(String id) {
+ public String getNameById(String id) throws PLException {
OsBtmTypeVO btmTypeVO = getBtmById(id);
if (btmTypeVO == null) {
throw new VciBaseException("涓氬姟绫诲瀷[{0}]鍦ㄧ郴缁熼噷涓嶅瓨鍦�", new String[]{id});
@@ -637,7 +639,7 @@
* @param btmId 涓氬姟绫诲瀷涓婚敭
*/
@Override
- public OsERVO createERDiagram(String btmId) {
+ public OsERVO createERDiagram(String btmId) throws PLException {
VciBaseUtil.alertNotNull(btmId, "涓氬姟绫诲瀷缂栧彿");
OsBtmTypeVO btmTypeVO = getBtmById(btmId);
List<OsERNodeVO> nodeVOList = new ArrayList<>();
@@ -658,7 +660,7 @@
* @return 鎵ц缁撴灉
*/
@Override
- public OsERVO createERUsed(String btmId) {
+ public OsERVO createERUsed(String btmId) throws PLException {
VciBaseUtil.alertNotNull(btmId, "涓氬姟绫诲瀷缂栧彿");
OsBtmTypeVO btmTypeVO = getBtmById(btmId);
//鑾峰彇浣跨敤褰撳墠绫诲瀷鐨勫睘鎬�
@@ -1654,7 +1656,14 @@
itemList.add(nodePropertyVO);
//鍒ゆ柇鍙傜収
if (hasRefer) {
- selectReferenceBtmType(attribute, btmTypeVO, nodeVOList, relationVOList);
+ try {
+ selectReferenceBtmType(attribute, btmTypeVO, nodeVOList, relationVOList);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = "鍒ゆ柇涓氬姟绫诲瀷鐨勫睘鎬ф槸涓嶆槸鍙傜収绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ throw new VciBaseException(exceptionMessage);
+ }
}
});
nodeVO.setItems(itemList);
@@ -1670,7 +1679,7 @@
* @param relationVOList 鍏崇郴淇℃伅
*/
private void selectReferenceBtmType(OsBtmTypeAttributeVO attribute, OsBtmTypeVO btmTypeVO,
- List<OsERNodeVO> nodeVOList, List<OsERRelationVO> relationVOList) {
+ List<OsERNodeVO> nodeVOList, List<OsERRelationVO> relationVOList) throws PLException {
if (StringUtils.isNotBlank(attribute.getReferBtmTypeId())) {
//鏄弬鐓х被鍨嬬殑
OsBtmTypeVO referenceBtmType = getBtmById(attribute.getReferBtmTypeId());
@@ -1759,7 +1768,14 @@
items.add(nodePropertyVO);
//鍒ゆ柇鍙傜収
if (!used) {
- selectReferenceLinkType(attr, link, nodeVOList, relationVOList);
+ try {
+ selectReferenceLinkType(attr, link, nodeVOList, relationVOList);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = "鏂摼鎺ョ被鍨嬬殑灞炴�ф槸涓嶆槸鍙傜収绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ throw new VciBaseException(exceptionMessage);
+ }
}
});
nodeVO.setItems(items);
@@ -1834,7 +1850,7 @@
* @param nodeVOList 鑺傜偣瀵硅薄
* @param relationVOList 鍏崇郴瀵硅薄
*/
- private void selectReferenceLinkType(OsLinkTypeAttributeVO attr, OsLinkTypeVO linkTypeVO, List<OsERNodeVO> nodeVOList, List<OsERRelationVO> relationVOList) {
+ private void selectReferenceLinkType(OsLinkTypeAttributeVO attr, OsLinkTypeVO linkTypeVO, List<OsERNodeVO> nodeVOList, List<OsERRelationVO> relationVOList) throws PLException {
if (StringUtils.isNotBlank(attr.getReferBtmTypeId())) {
//鏄弬鐓х被鍨嬬殑
OsBtmTypeVO referenceBtmType = getBtmById(attr.getReferBtmTypeId());
@@ -2085,4 +2101,41 @@
}
+ private class BtmDataFetcher {
+
+ //涓氬姟绫诲瀷
+ private Map<String, BizType> btmTypeVOMap = new HashMap<String, BizType>();
+
+ public BtmDataFetcher() {
+ initBtmDataFetcher();
+ }
+
+ private void initBtmDataFetcher(){
+ try {
+ BizType[] bizTypes = platformClientUtil.getBtmService().getBizTypes("");
+ //List<OsBtmTypeVO> osBtmTypeVOS = btmDO2VOs(Arrays.asList(bizTypes), null);
+ if(Func.isNotEmpty(bizTypes)){
+ btmTypeVOMap = Arrays.stream(bizTypes).collect(Collectors.toMap(btm -> btm.name, btm -> btm));
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * 鑾峰彇涓氬姟绫诲瀷
+ * @param id
+ * @return
+ */
+ public OsBtmTypeVO getBtmType(String id) {
+ BizType bizType = btmTypeVOMap.get(id);
+ if(Func.isEmpty(bizType)){
+ return null;
+ }
+ //鑾峰彇鐨勬椂鍊欐墠璧歏O瀵硅薄锛岃繖鏍烽伩鍏嶄竴娆℃�у叏閮˙tm杞琕O澶參鐨勯棶棰�
+ return btmDO2VO(bizType,null);
+ }
+
+ }
+
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
index 4bd9c0c..4604743 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -242,11 +242,12 @@
* @return 閾炬帴绫诲瀷
*/
@Override
- public OsLinkTypeVO getLinkTypeById(String id) {
+ public OsLinkTypeVO getLinkTypeById(String id) throws PLException {
if(StringUtils.isBlank(id)){
return null;
}
- return self.selectAllLinkMap().getOrDefault(id.toLowerCase(),null);
+ LinkType linkType = platformClientUtil.getLinkTypeService().getLinkType(id);
+ return this.linkTypeDO2VO(linkType);
}
/**
@@ -256,7 +257,7 @@
* @return 閾炬帴绫诲瀷鐨勫睘鎬�
*/
@Override
- public List<OsLinkTypeAttributeVO> listAttributeByLinkId(String linkTypeId) {
+ public List<OsLinkTypeAttributeVO> listAttributeByLinkId(String linkTypeId) throws PLException {
OsLinkTypeVO linkTypeVO = getLinkTypeById(linkTypeId);
return linkTypeVO.getAttributes();
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
index b526924..3e1c57f 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -345,7 +345,7 @@
* @throws VciBaseException 鏌ヨ鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
*/
@Override
- public List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException {
+ public List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException, PLException {
VciBaseUtil.alertNotNull(treeQuery,"琛ㄥ崟鐨勬煡璇㈠璞�",treeQuery.getBtmname(),"涓氬姟绫诲瀷鐨勪俊鎭�",treeQuery.getComponentOid(),"鏍戞墍鍦ㄧ殑缁勪欢鐨勪富閿�");
Map<String, OsAttributeVO> attributeVOMap = attrService.selectAllAttributeMap();
UIComponentVO componentVO = uiEngineService.getComponentByOid(treeQuery.getComponentOid(),attributeVOMap);
@@ -1594,7 +1594,12 @@
conditionMap.put(usedAttributeVO.getId(),QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(oids.toArray(new String[0])) + ")");
if(StringUtils.isNotBlank(usedAttributeVO.getPkBtmType())) {
if (boService.queryCount(usedAttributeVO.getPkBtmType(), conditionMap) > 0) {
- OsBtmTypeVO btmTypeVO = btmService.getBtmById(usedAttributeVO.getPkBtmType());
+ OsBtmTypeVO btmTypeVO = null;
+ try {
+ btmTypeVO = btmService.getBtmById(usedAttributeVO.getPkBtmType());
+ } catch (PLException e) {
+ e.printStackTrace();
+ }
throw new VciBaseException("鏁版嵁鍦ㄣ��" + btmTypeVO.getName() + "銆戜腑鐨勫瓧娈礫" + usedAttributeVO.getName() + "]閲岃寮曠敤.涓嶈兘鍒犻櫎");
}
}else{
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
index e9e7253..8595212 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -3539,7 +3539,7 @@
*/
private boolean checkLinkTypeInputIsOk(String txtVIName/*閫夋嫨鐨勬ā鏉�*/,String txtQTName/*鏌ヨ妯℃澘*/,String btmType) throws PLException {
boolean res = false;
- if(!(this.checkBtmTypeTxtIsOk("鐩爣瀵硅薄", linkType,true))){
+ if(!(this.checkLinkTypeTxtIsOk("鐩爣瀵硅薄", linkType,true))){
res = false;
} else if(!(this.checkPortalVITxtIsOk("閫夋嫨妯℃澘", txtVIName, linkType,true))){
res = false;
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 7faff82..43a3303 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
@@ -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);
});
@@ -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);
});
@@ -920,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);
@@ -1063,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);
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/utility/UIDataFetcher.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/utility/UIDataFetcher.java
index c889347..7fefd4e 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/utility/UIDataFetcher.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/utility/UIDataFetcher.java
@@ -11,6 +11,7 @@
import java.util.stream.Collectors;
/**
+ * 鍔犺浇UI涓婁笅鏂�
* @author ludc
* @date 2024/10/15 10:32
*/
@@ -27,8 +28,6 @@
//鎸夐挳map
private Map<String, List<PLTabButton>> buttonMap = new HashMap<String, List<PLTabButton>>();
-
-
public UIDataFetcher() {
initUIDefination();
--
Gitblit v1.9.3