From da4310936f073b70e64b87b842af43790d7d04e4 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 30 八月 2024 15:59:28 +0800
Subject: [PATCH] 链接类型查询模板
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
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 3f0f4d3..e46d9c8 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
@@ -38,6 +38,7 @@
import com.vci.starter.poi.constant.ExcelLangCodeConstant;
import com.vci.starter.poi.util.ExcelUtil;
import com.vci.starter.web.annotation.log.VciUnLog;
+import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.enumpck.BooleanEnum;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
@@ -358,9 +359,14 @@
* @return 灞炴�х殑鍐呭
*/
@Override
- public List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) {
+ public List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) throws PLException {
VciBaseUtil.alertNotNull(btmId,"涓氬姟绫诲瀷鐨勭紪鍙�");
- OsBtmTypeVO btmTypeVO = getBtmById(btmId);
+ BizType[] bizTypes = platformClientUtil.getBtmService().getBizTypes(btmId);
+ if(Func.isEmpty(bizTypes)){
+ return new ArrayList<>();
+ }
+ BizType bizType = bizTypes[0];
+ OsBtmTypeVO btmTypeVO = btmDO2VO(bizType);
List<OsBtmTypeAttributeVO> attributes = btmTypeVO.getAttributes();
if(attributes == null){
attributes = new ArrayList<>();
@@ -375,7 +381,7 @@
* @return 灞炴�х殑鍐呭
*/
@Override
- public List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId) {
+ public List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId) throws PLException {
List<OsBtmTypeAttributeVO> attrVOs = listAttributeByBtmId(btmId);
if(attrVOs == null){
attrVOs = new ArrayList<>();
@@ -1216,13 +1222,15 @@
public boolean addIndex(List<IndexObject> indexObjectList) throws PLException {
VciBaseUtil.alertNotNull(indexObjectList,"鏂板鐨勭储寮曚俊鎭�");
String btmName = indexObjectList.get(0).getTypeName();
- String indexNames = indexObjectList.stream().map(IndexObject::getIndexName).collect(Collectors.joining());
+ String indexNames = indexObjectList.stream().map(IndexObject::getIndexName).collect(Collectors.joining(","));
String[] oldindexAttr = {indexNames};
BusinessObject bo;
List<BusinessObject> boList = new ArrayList<>();
//鍏堟煡璇㈠綋鍓嶆坊鍔犵储寮曟槸鍚﹀凡缁忓瓨鍦紝濡傛灉瀛樺湪灏卞厛鍒犻櫎鍐嶆柊澧炲疄鐜版浛鎹㈡搷浣�
Map<String, String> conditionMap = new HashMap<>();
conditionMap.put("typename",btmName);
+ //鍏堣繖鏍峰鐞嗭紝鍓嶇鐜板湪鍙仛浜嗗崟娆′繚瀛橈紝鎵�浠ヤ笉鐢╥n
+ conditionMap.put("indexname", indexNames);
List<IndexObject> indexObjects = getIndexByCondition(conditionMap);
if(indexObjects!=null && indexObjects.size()>0){
//绱㈠紩涓嶅瓨鍦ㄦ椂鍒犻櫎灏变細鎶ラ敊绱㈠紩涓嶅瓨鍦紝鎵�浠ヨ繖閲屾湁绱㈠紩鎵嶅幓鍒犻櫎
@@ -1264,7 +1272,7 @@
/**
* 瀵煎嚭涓氬姟绫诲瀷
- * name 涓氬姟绫诲瀷鍚嶇О
+ * oid 涓氬姟绫诲瀷鍚嶇О
* @return 鍒涘缓缁撴灉
*/
@Override
@@ -1311,8 +1319,8 @@
String attrPath = attributeService.exportAttributes("btmattr",
attributes.stream().collect(Collectors.joining(",")),true);
//绉诲姩灞炴�у埌閾炬帴绫诲瀷鏂囦欢澶归噷闈㈠幓
- cn.hutool.core.io.FileUtil.move(new File(attrPath), new File(defaultTempFolder),true);
- cn.hutool.core.io.FileUtil.del(attrPath.substring(0,attrPath.lastIndexOf("\\")));
+ FileUtil.move(new File(attrPath), new File(defaultTempFolder),true);
+ FileUtil.del(attrPath.substring(0,attrPath.lastIndexOf("\\")));
}catch (IOException e) {
throw new RuntimeException(e);
}
--
Gitblit v1.9.3