| | |
| | | //vo.setCreateTime(VciDateUtil.str2Date(String.valueOf(btmItem.createTime),VciDateUtil.DateTimeFormat)); |
| | | vo.setCreateTime(Func.parse(btmItem.createTime, ConcurrentDateFormat.of(VciDateUtil.DateTimeFormat))); |
| | | vo.setLastModifyTime( Func.parse(btmItem.modifyTime, ConcurrentDateFormat.of(VciDateUtil.DateTimeFormat))); |
| | | vo.setTs(Func.parse(btmItem.ts, ConcurrentDateFormat.of(VciDateUtil.DateTimeFormat))); |
| | | vo.setTs(Func.parse(btmItem.ts, ConcurrentDateFormat.of(VciDateUtil.DateTimeMillFormat))); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | vo.setInputRevisionFlag(btmItem.revInput); |
| | | vo.setDelimiter(btmItem.delimiter); |
| | | vo.setfName(btmItem.fName); |
| | | if(StringUtils.isNotBlank(vo.getRevisionRuleId()) || vo.isInputRevisionFlag()){ |
| | | vo.setVersionRule(String.valueOf(btmItem.verRuleName)); |
| | | if(StringUtils.isNotBlank(vo.getRevisionRuleName()) || vo.isInputRevisionFlag()){ |
| | | vo.setRevisionFlag(true); |
| | | } |
| | | vo.setVersionRule(String.valueOf(btmItem.verRuleName)); |
| | | vo.setSubLifeCycleId(Arrays.stream(btmItem.lifeCycles).collect(Collectors.joining(","))); |
| | | vo.setLifeCycleIds(Arrays.stream(btmItem.lifeCycles).collect(Collectors.joining(","))); |
| | | vo.setApNameArray(btmItem.apNameArray); |
| | | List<OsAttributeVO> attributeVOS = attributeService.listAttrByIds(Arrays.stream(btmItem.apNameArray).collect(Collectors.toList())); |
| | | List<OsBtmTypeAttributeVO> btmTypeAttributeVOS = new ArrayList<>(); |
| | |
| | | bizType.description = dto.getDescription(); |
| | | bizType.revLevel = dto.getRevLevel(); |
| | | |
| | | bizType.revRuleName = dto.getRevisionRuleName(); |
| | | bizType.revRuleName = dto.getRevisionRuleId(); |
| | | bizType.revInput = dto.isInputRevisionFlag(); |
| | | |
| | | bizType.delimiter = (dto.getDelimiter() == null ? "" : dto.getDelimiter()); |
| | | |
| | | bizType.verRuleName = Short.parseShort(dto.getRevisionRuleName()); |
| | | bizType.verRuleName = Short.parseShort(dto.getVersionRule()); |
| | | |
| | | //bizType.imageName = dto.get; |
| | | //List<String> attrIdList = dto.getAttributesDTOList().stream().map(OsBtmTypeLinkAttributesDTO::getId).collect(Collectors.toList()); |
| | |
| | | * @return |
| | | */ |
| | | private void checkVersionInfo(OsBtmTypeDTO dto) throws PLException { |
| | | //需要手动输入版本时revisionRuleName不能为空 |
| | | if (dto.isInputRevisionFlag() && Func.isBlank(dto.getRevisionRuleName())) { |
| | | throw new PLException("500",new String[]{"版本号规则不能为空"}); |
| | | //需要手动输入版本时revisionRuleId不能为空 |
| | | if (dto.getRevLevel() == 1 || dto.getRevLevel() == 2) { |
| | | if (Func.isBlank(dto.getRevisionRuleId()) && !dto.isInputRevisionFlag()) { |
| | | throw new PLException("500",new String[]{"版本号规则不能为空"}); |
| | | } |
| | | } |
| | | } |
| | | |