lihang
2023-07-05 3ac838419c7cd3867a15cccd5ecf5c546462b922
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
@@ -1,5 +1,7 @@
package com.vci.ubcs.omd.wrapper;
import com.vci.ubcs.omd.cache.EnumCache;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.BtmTypeAttribute;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
@@ -33,6 +35,9 @@
   public BtmTypeAttributeVO entityVO(BtmTypeAttribute entity) {
      BtmTypeAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeAttributeVO.class));
      // 在这里设置枚举显示值
      vo.setPrecisionLength(vo.getPrecisionLength() == -1 ? null : vo.getPrecisionLength());
      vo.setScaleLength(vo.getScaleLength() == -1 ? null : vo.getPrecisionLength());
      vo.setAttrDataTypeText(EnumCache.getValue("attributeType",vo.getAttrDataType()));
      return vo;
   }
@@ -55,7 +60,7 @@
   public BtmTypeAttribute copyBtmTypeAttributeDTO2Entity(BtmTypeLinkAttributesDTO dto, String btmTypeOid, String creator, Date now){
      BtmTypeAttribute entity = Objects.requireNonNull(BeanUtil.copy(dto, BtmTypeAttribute.class));
      entity.setOid(VciBaseUtil.getPk());
      entity.setBtmName("btmTypeAttribute");
      entity.setBtmName(BtmTypeConstant.BTM_TYPE_ATTRIBUTE);
      entity.setOwner(creator);
      entity.setCreator(creator);
      entity.setCreateTime(now);