From 2871cb99e018f6bf9e2ef76a424a1429a7c818f0 Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期四, 13 七月 2023 11:40:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java index 2dc1b5f..bac65bb 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java @@ -10,7 +10,7 @@ import com.vci.ubcs.omd.constant.BtmTypeConstant; import com.vci.ubcs.omd.constant.BtmTypeFieldConstant; import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO; -import com.vci.ubcs.omd.entity.Attribute; +import com.vci.ubcs.omd.entity.*; import com.vci.ubcs.omd.repeater.DomainRepeater; import com.vci.ubcs.omd.service.*; import com.vci.ubcs.omd.vo.*; @@ -19,9 +19,6 @@ import com.vci.ubcs.starter.web.constant.OmdRegExpConstant; import com.vci.ubcs.omd.dto.BtmTypeDTO; import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; -import com.vci.ubcs.omd.entity.BtmType; -import com.vci.ubcs.omd.entity.BtmTypeAttribute; -import com.vci.ubcs.omd.entity.ModifyAttributeInfo; import com.vci.ubcs.omd.mapper.BtmTypeMapper; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.web.enumpck.BooleanEnum; @@ -85,6 +82,12 @@ */ @Autowired private IAttributeService attributeService; + + /** + * 鐢熷懡鍛ㄦ湡鐨勬湇鍔� + */ + @Autowired + private ILifeCycleService lifeCycleService; /** * 琛ㄥ悕鍓嶇紑 @@ -495,7 +498,7 @@ } checkBtmTypeBeforeSave(btmTypeDTO); BtmType btmTypeDO = Optional.ofNullable(BeanUtil.copy(btmTypeDTO, BtmType.class)).orElseGet(BtmType::new); - btmTypeDO.setBizDomain(btmTypeDTO.getDomain()); + btmTypeDO.setBizDomain(btmTypeDTO.getBizDomain()); List<BtmTypeLinkAttributesDTO> attributes = btmTypeDTO.getAttributes(); List<BtmTypeAttributeVO> afterAttributes; if (StringUtils.isBlank(btmTypeDO.getOid())){ @@ -521,7 +524,7 @@ try { if (autoCreateTable) { // checkTableSame(btmTypeVO); - R result = DomainRepeater.submitBtmType(btmTypeDTO.getDomain(), btmTypeVO); + R result = DomainRepeater.submitBtmType(btmTypeDTO.getBizDomain(), btmTypeVO); if (result.isSuccess()){ List<ModifyAttributeInfo> infoList = new ArrayList<>(); Object data = result.getData(); @@ -617,13 +620,14 @@ if (btmTypeDTO.isLifeCycleFlag()){ // 闇�瑕佹帶鍒剁敓鍛藉懆鏈� //妫�鏌ヤ娇鐢ㄧ殑鐢熷懡鍛ㄦ湡鏄惁瀛樺湪 -// if (StringUtils.isNotBlank(btmTypeDTO.getLifeCycleId()) -// && !FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE.equalsIgnoreCase(btmTypeDTO.getLifeCycleId())) { -// if (lifeCycleServiceI.checkLifeCycleExist(btmTypeDTO.getLifeCycleId())) { -// throw new VciBaseException("鐢熷懡鍛ㄦ湡{0}[{1}]鍦ㄧ郴缁熶腑涓嶅瓨鍦紝璇峰厛鏌ヨ瘉", -// new Object[]{btmTypeDTO.getLifeCycleId(), btmTypeDTO.getLifeCycleName()}); -// } -// } + if (StringUtils.isNotBlank(btmTypeDTO.getLifeCycleId()) +// && !FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE.equalsIgnoreCase(btmTypeDTO.getLifeCycleId()) + ) { + if (lifeCycleService.getOne(Wrappers.<LifeCycleRule>query().lambda().eq(LifeCycleRule::getId,btmTypeDTO.getLifeCycleId())) == null) { + throw new VciBaseException("鐢熷懡鍛ㄦ湡{0}[{1}]鍦ㄧ郴缁熶腑涓嶅瓨鍦紝璇峰厛鏌ヨ瘉", + new Object[]{btmTypeDTO.getLifeCycleId(), btmTypeDTO.getLifeCycleName()}); + } + } // if (StringUtils.isNotBlank(btmTypeDTO.getSubLifeCycleId())) { // if (lifeCycleServiceI.checkLifeCycleExist(btmTypeDTO.getSubLifeCycleId())) { // throw new VciBaseException("澶囩敤鐢熷懡鍛ㄦ湡{0}[{1}]涓叾涓湁鏌愪簺鍦ㄧ郴缁熶腑涓嶅瓨鍦紝璇峰厛鏌ヨ瘉", -- Gitblit v1.9.3