dangsn
2023-08-02 54f35ae7866dac5c497372b68d03309c7eae9424
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -60,7 +60,7 @@
         attributesDTOList.stream().forEachOrdered(s -> {
            attributeService.checkAttribute(s);
            btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now));
            attributeIdList.add(s.getId().toLowerCase().trim());
            attributeIdList.add(s.getId().trim());
         });
         //检查属性是否都存在
         boolean exists = attributeService.checkAttributeExists(attributeIdList);
@@ -107,7 +107,7 @@
         attributesDTOList.stream().forEachOrdered(s -> {
            attributeService.checkAttribute(s);
            btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now));
            attributeIdList.add(s.getId().toLowerCase().trim());
            attributeIdList.add(s.getId().trim());
         });
         //检查属性是否都存在
         boolean exists = attributeService.checkAttributeExists(attributeIdList);
@@ -194,7 +194,7 @@
         if ("oid".equals(id)){
            vo.setNullableFlag(false);
         }
         if (Arrays.asList("createtime","lastmodifytime","owner").contains(id)){
         if (Arrays.asList("createtime","lastmodifytime","ts").contains(id)){
            vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name());
            vo.setAttributeLength(6);
         }else {
@@ -213,9 +213,9 @@
            vo.setPkBtmType(btmType.getOid());
            vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
            // 版本规则字段不能为空
            vo.setNullableFlag(false);
//            vo.setNullableFlag(false);
            vo.setAttributeLength(150);
            if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq","revisionvalue","versionvalue").contains(id)){
            if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq").contains(id)){
               vo.setAttributeLength(5);
               vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name());
            }
@@ -234,7 +234,7 @@
            vo.setId(id);
            vo.setName(name);
            vo.setPkBtmType(btmType.getOid());
            vo.setNullableFlag(false);
//            vo.setNullableFlag(false);
            vo.setAttributeLength(50);
            vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
            list.add(vo);
@@ -248,7 +248,7 @@
            vo.setId(id);
            vo.setName(name);
            vo.setPkBtmType(btmType.getOid());
            vo.setNullableFlag(false);
//            vo.setNullableFlag(false);
            vo.setAttributeLength(5);
            vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name());
            list.add(vo);