| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.VCIError; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.CachePut; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import plm.bs.bom.clientobject.ClientBusinessObject; |
| | | import plm.corba.linkTypeManager.LinkType; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | public List<OsLinkTypeVO> selectAllLink() { |
| | | try { |
| | | return linkTypeDO2VOs(Arrays.stream(platformClientUtil.getLinkTypeService().getLinkTypes()).collect(Collectors.toList())); |
| | | } catch (VCIError vciError) { |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | |
| | | vo.setCreator(linkType.creator); |
| | | vo.setLastModifier(linkType.modifier); |
| | | try { |
| | | vo.setCreateTime(VciDateUtil.str2Date(linkType.createTime,VciDateUtil.DateTimeFormat)); |
| | | vo.setLastModifyTime(VciDateUtil.str2Date(linkType.modifyTime,VciDateUtil.DateTimeFormat)); |
| | | vo.setTs(VciDateUtil.str2Date(linkType.ts,VciDateUtil.DateTimeMillFormat)); |
| | | vo.setCreateTime(VciDateUtil.long2Date(linkType.createTime)); |
| | | vo.setLastModifyTime(VciDateUtil.long2Date(linkType.modifyTime)); |
| | | vo.setTs(VciDateUtil.long2Date(linkType.ts)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | "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<ClientBusinessObject> cbosList = boService.queryBySql(sql, new HashMap<>()); |
| | | List<com.vci.client.bof.ClientBusinessObject> cbosList = boService.queryBySql(sql, new HashMap<>()); |
| | | if(!CollectionUtils.isEmpty(cbosList)){ |
| | | cbosList.stream().forEach(cbo->{ |
| | | String attrId = cbo.getAttributeValue("column_name"); |