yuxc
2024-06-19 663878fdcd0d44c105888014f4cdf7fc926f609f
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -1,7 +1,9 @@
package com.vci.web.service.impl;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.starter.web.pagemodel.BaseQueryObject;
@@ -9,7 +11,6 @@
import com.vci.starter.web.util.BeanUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.VciDateUtil;
import com.vci.web.constant.CacheKeyConstant;
import com.vci.web.model.OsLinkTypeDO;
import com.vci.web.pageModel.*;
import com.vci.web.service.*;
@@ -19,16 +20,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
import static com.vci.web.constant.CacheNameConstant.VCI_OBJECT_SERVICE;
/**
 * 链接类型服务
@@ -103,7 +100,6 @@
     */
    @Override
    @VciUnLog
    @Cacheable(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_Link,unless = "#result == null")
    public Map<String, OsLinkTypeVO> selectAllLinkMap() {
        return Optional.ofNullable(self.selectAllLink()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId().toLowerCase(),t->t,(o1,o2)->o1));
    }
@@ -276,11 +272,11 @@
                    "inner JOIN user_col_comments c on t.TABLE_NAME  = c.table_name and t.COLUMN_NAME = c.column_name where " +
                    "t.table_name = '" + VciBaseUtil.getTableName(btmTypeVO.getId()).toUpperCase(Locale.ROOT) + "' order by t.column_name asc";
            Map<String, OsBtmTypeAttributeVO> attributeVOMap = btmTypeVO.getAttributes().stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
            List<com.vci.client.bof.ClientBusinessObject> cbosList = boService.queryBySql(sql, new HashMap<>());
            List<BusinessObject> cbosList = boService.queryBySql(sql, new HashMap<>());
            if(!CollectionUtils.isEmpty(cbosList)){
                cbosList.stream().forEach(cbo->{
                    String attrId = cbo.getAttributeValue("column_name");
                    String dataType = cbo.getAttributeValue("data_type");
                    String attrId = ObjectTool.getBOAttributeValue(cbo,"column_name");
                    String dataType = ObjectTool.getBOAttributeValue(cbo,"data_type");
                    if(StringUtils.isNotBlank(dataType) && dataType.contains("(")){
                        dataType = dataType.substring(0,dataType.indexOf("("));
                    }
@@ -328,7 +324,6 @@
     * 清除缓存
     */
    @Override
    @CacheEvict(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_Link)
    public void clearCache() {
    }