xiejun
2024-09-04 ac3f3629a261770f573f27e5e23f7ec19d096c2a
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsRevisionRuleServiceImpl.java
@@ -151,8 +151,8 @@
        osRevisionRuleDTOS.stream().forEach(item->{
            String vrName = item.getId();
            try {
                String[] btNamesByVerName = platformClientUtil.getBtmService().getBTNamesByVerName(vrName);
                if(btNamesByVerName != null && btNamesByVerName.length > 0){
                List<Map<String, String>> usedVersionRuleList = this.getUsedVersionRuleList(vrName);
                if(Func.isNotEmpty(usedVersionRuleList)){
                    throw new VciBaseException("该版本已被使用不允许删除");
                }
            } catch (PLException e) {
@@ -172,7 +172,7 @@
            //后台会用ts进行数据一致性校验
            Date ts = vrDTO.getTs();
            if(Func.isBlank(oid) || Func.isBlank(id) || Func.isEmpty(ts)){
                throw new PLException("500",new String[]{"待删除的状态列表中主键【oid】、调整时间【ts】、状态名称【name】不能为空!"});
                throw new PLException("500",new String[]{"待删除的版本规则列表中主键【oid】、调整时间【ts】、状态名称【name】不能为空!"});
            }
            VersionRule vr = new VersionRule();
            vr.oid = oid;
@@ -194,7 +194,8 @@
            throw new PLException("500",new String[]{"名称只能为英文!"});
        }
        //跳跃字符只能为数字或者字母
        if(Func.isNotBlank(dto.getJumpCharacter()) && (!(dto.getJumpCharacter().matches(regex)))){
        String regex0 = "^[a-zA-Z0-9,]+$";
        if(Func.isNotBlank(dto.getJumpCharacter()) && (!(dto.getJumpCharacter().matches(regex0)))){
            throw new PLException("500",new String[]{"跳跃字符只能为数字或者字母!"});
        }
        //初始值不能为空且只能为数字或者字母或英文状态下的符号
@@ -538,7 +539,7 @@
            });
        }catch (Exception e){
            if(logger.isErrorEnabled()){
                logger.error("读取excel内容时或保存用户信息时出现了错误,具体原因:",VciBaseUtil.getExceptionMessage(e));
                logger.error("读取excel内容时或保存版本规则时出现了错误,具体原因:",VciBaseUtil.getExceptionMessage(e));
            }
            e.printStackTrace();
            return BaseResult.fail(VciBaseUtil.getExceptionMessage(e),new String[]{},e);