ludc
2023-07-05 1c407a93546036bc0438fbe019aeaf03f6ef1805
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
@@ -83,25 +83,25 @@
   private final Map<String, LinkTypeVO> idLinkMap = new ConcurrentHashMap<>();
   private void putBtm(@NotNull BtmTypeVO... voList) throws ServiceException {
   private void putBtm(@NotNull BtmTypeVO... voList) throws Throwable {
      String collect = Arrays.stream(voList).map(BtmTypeVO::getId).filter(idBtmMap::containsKey).collect(Collectors.joining(","));
      if (StringUtils.isBlank(collect)) {
         Arrays.stream(voList).forEach(vo -> {
            idBtmMap.put(vo.getId(), vo);
         });
      } else {
         throw new ServiceException("业务类型:[" + collect + "]正在被其他用户操作");
         throw new Throwable("业务类型:[" + collect + "]正在被其他用户操作");
      }
   }
   private void putLink(@NotNull LinkTypeVO... voList) throws ServiceException {
   private void putLink(@NotNull LinkTypeVO... voList) throws Throwable {
      String collect = Arrays.stream(voList).map(LinkTypeVO::getId).filter(idLinkMap::containsKey).collect(Collectors.joining(","));
      if (StringUtils.isBlank(collect)) {
         Arrays.stream(voList).forEach(vo -> {
            idLinkMap.put(vo.getId(), vo);
         });
      } else {
         throw new ServiceException("链接类型:[" + collect + "]正在被其他用户操作");
         throw new Throwable("链接类型:[" + collect + "]正在被其他用户操作");
      }
   }
@@ -978,7 +978,7 @@
    * @return 执行结果
    */
   @Override
   public R<List<ModifyAttributeInfo>> submit(BtmAndLinkTypeDdlDTO ddlDTO) {
   public R<List<ModifyAttributeInfo>> submit(BtmAndLinkTypeDdlDTO ddlDTO) throws Throwable {
      try {
         List<ModifyAttributeInfo> changedList = new ArrayList<>();
         if (!CollectionUtils.isEmpty(ddlDTO.getBtmTypeList())) {
@@ -996,7 +996,7 @@
         R<List<ModifyAttributeInfo>> result = R.success("数据库操作成功");
         result.setData(changedList);
         return result;
      } catch (VciBaseException e) {
      } catch (Exception e) {
         try {
            // 建表失败有异常,捕获后返回,并释放线程中的内容
            if (!CollectionUtils.isEmpty(ddlDTO.getBtmTypeList())) {
@@ -1009,8 +1009,6 @@
         }catch (ServiceException e2){
            throw new RuntimeException(e2.getMessage());
         }
      } catch (ServiceException e) {
         throw new RuntimeException(e.getMessage());
      }
   }