| | |
| | | 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; |
| | |
| | | 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.*; |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 链接类型服务 |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | |
| | | "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("(")); |
| | | } |
| | |
| | | * 清除缓存 |
| | | */ |
| | | @Override |
| | | @CacheEvict(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_Link) |
| | | public void clearCache() { |
| | | |
| | | } |