lihang
2023-07-10 dd2cbe9c6f7360d0f50da4e5f0fc506ad3915d8b
业务类型修改功能修正
已修改8个文件
33 ■■■■■ 文件已修改
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/BtmTypeMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeAttributeMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -359,6 +359,12 @@
        },
        // 属性池加载
        attrRefOnLoad(){
            if (!this.attrRef.queryNotIn || (this.attrRef.queryNotIn === '' && this.btmType.attributes !== [])){
              this.attrRef.queryNotIn = '';
               this.btmType.attributes.forEach(item => {
                  this.attrRef.queryNotIn += (item.id + ",")
               })
            }
            this.attrRef.loading = true;
            queryPage(this.attrRef.key,this.attrRef.queryNotIn,this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => {
                const data = res.data.data;
Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java
@@ -59,11 +59,10 @@
    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder().append(dataType);
        if (dataLength != null){
        if (dataLength != null && dataPrecision != null){
            stringBuilder.append(StringPool.SPACE).append(StringPool.LEFT_BRACKET).append(dataLength).append(StringPool.COMMA).append(dataPrecision).append(StringPool.RIGHT_BRACKET).append(StringPool.SPACE);
        }else if (dataLength != null) {
            stringBuilder.append(StringPool.SPACE).append(StringPool.LEFT_BRACKET).append(dataLength).append(StringPool.RIGHT_BRACKET).append(StringPool.SPACE);
        }
        if (dataPrecision != null){
            stringBuilder.append(StringPool.SPACE).append(StringPool.LEFT_BRACKET).append(dataLength == null ? 22 : dataLength).append(StringPool.COMMA).append(dataPrecision).append(StringPool.RIGHT_BRACKET).append(StringPool.SPACE);
        }
        if (!nullable){
            stringBuilder.append(StringPool.SPACE).append("not null").append(StringPool.SPACE);
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java
@@ -65,7 +65,7 @@
    public String getColumnTypeSql(VciFieldTypeEnum fieldType, BtmTypeAttributeVO attributeVO) {
        DdlFieldMappingAttrBO mappingBO = getMappingBO(fieldType);
        if (fieldType.equals(VciFieldTypeEnum.VTDouble)) {
            mappingBO.setDataPrecision(attributeVO.getPrecisionLength());
            mappingBO.setDataPrecision(attributeVO.getPrecisionLength() == -1 ? 8 : attributeVO.getPrecisionLength());
        }
        //先只针对数字类型的进行处理
        if (fieldType.equals(VciFieldTypeEnum.VTInteger) ){
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
@@ -1007,7 +1007,7 @@
                }
                return R.fail(e.getMessage());
            }catch (ServiceException e2){
                throw new RuntimeException(e2.getMessage());
                return R.fail(e.getMessage());
            }
        }
    }
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/BtmTypeMapper.java
@@ -109,5 +109,4 @@
     */
    @InterceptorIgnore(tenantLine = "1")
    Long batchInsert(@Param("records") List<BtmType> records);
}
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -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);
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
@@ -204,7 +204,7 @@
     */
    @Override
    public List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException {
        return CollectionUtils.isEmpty(idCollection) ? null : baseMapper.selectList(Wrappers.<BtmType>query().lambda().in(BtmType::getId, idCollection));
        return CollectionUtils.isEmpty(idCollection) ? null : baseMapper.selectByIdCollection(idCollection);
    }
    /**
@@ -595,11 +595,14 @@
        if (btmTypeDTO.getId().length() > 24) {
            throw new VciBaseException("业务类型英文名称不能超过18,目前长度为{0}", new Object[]{btmTypeDTO.getId().length()});
        }
        List<BtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId()));
        List<BtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId().toLowerCase(Locale.ROOT)));
        if (!CollectionUtils.isEmpty(btmTypeDOList) && btmTypeDOList.size() > 0) {
            boolean exist = btmTypeDOList.stream().filter(btm -> StringUtils.isNotBlank(btm.getOid())).anyMatch(btm -> !StringUtils.equals(btmTypeDTO.getOid(), btm.getOid()));
            BtmType existBtmType = btmTypeDOList.get(0);
            throw new VciBaseException("业务类型英文名称已经存在(不区分大小写),这个英文名称对应的中文名称为{0},创建人{1},创建时间{2}"
                , new Object[]{existBtmType.getName(), existBtmType.getCreator(), VciDateUtil.date2Str(existBtmType.getCreateTime(), VciDateUtil.DateFormat)});
            if (exist) {
                throw new VciBaseException("业务类型英文名称已经存在(不区分大小写),这个英文名称对应的中文名称为{0},创建人{1},创建时间{2}"
                    , new Object[]{existBtmType.getName(), existBtmType.getCreator(), VciDateUtil.date2Str(existBtmType.getCreateTime(), VciDateUtil.DateFormat)});
            }
        }
        if (btmTypeDTO.isRevisionFlag()){
            // 需要控制版本
Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeAttributeMapper.xml
@@ -45,7 +45,7 @@
            update <include refid="tableName"/> set
                id = #{item.id,jdbcType=VARCHAR},
                name = #{item.name,jdbcType=VARCHAR},
                descrption = #{item.decription,jdbcType=VARCHAR},
                description = #{item.description,jdbcType=VARCHAR},
                pk_btm_type = #{item.pkBtmType,jdbcType=VARCHAR},
                attribute_length = #{item.attributeLength,jdbcType=DECIMAL},
                attr_data_type = #{item.attrDataType,jdbcType=VARCHAR},