| | |
| | | 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) { |
| | |
| | | //后台会用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; |
| | |
| | | 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[]{"跳跃字符只能为数字或者字母!"}); |
| | | } |
| | | //初始值不能为空且只能为数字或者字母或英文状态下的符号 |
| | |
| | | }); |
| | | }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); |