xiejun
2023-08-29 44d22931aebfbe0315345d5100e9ba02382b2932
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -135,9 +135,17 @@
    */
   @Override
   public R addSave(CodeClassify codeClassifyEntity) {
      try {
         VciBaseUtil.alertNotNull(codeClassifyEntity.getId(),"主题库编号不能为空!",codeClassifyEntity.getName(),"主题库名称不能为空!");
      }catch (VciBaseException e){
         return R.fail(e.getMessage());
      }
      if(StringUtils.isNotBlank(codeClassifyEntity.getParentCodeClassifyOid()) && StringUtils.isNotBlank(codeClassifyEntity.getBtmTypeId())){
         return R.fail("只有在顶层的主题库分类才能设置业务类型");
      }
      if(StringUtils.isEmpty(codeClassifyEntity.getParentCodeClassifyOid()) && StringUtils.isBlank(codeClassifyEntity.getBtmTypeId())){
         return R.fail("主题库关联的业务类型不能为空!");
      }
      QueryWrapper<CodeClassify> classifyQueryWrapper = new QueryWrapper<>();
      classifyQueryWrapper.eq("parentCodeClassifyOid",codeClassifyEntity.getParentCodeClassifyOid());
      classifyQueryWrapper.eq("id",codeClassifyEntity.getId());