已修改10个文件
已删除5个文件
已重命名54个文件
已添加6个文件
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/cache/OmdAttributeCache.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.cache; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.feign.IOmdAttributeClient; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | * |
| | | * @author Chill |
| | | */ |
| | | public class OmdAttributeCache { |
| | | public class AttributeCache { |
| | | |
| | | private static final String ATTR_ID = "attr:id"; |
| | | private static final String ATTR_LIST = "attr:list"; |
| | | private static final String ATTR_CACHE = "ubcs:attr"; |
| | | |
| | | private static IOmdAttributeClient attrClient; |
| | | private static IAttributeClient attrClient; |
| | | |
| | | private static IOmdAttributeClient getAttributeClient() { |
| | | private static IAttributeClient getAttributeClient() { |
| | | if (attrClient == null) { |
| | | attrClient = SpringUtil.getBean(IOmdAttributeClient.class); |
| | | attrClient = SpringUtil.getBean(IAttributeClient.class); |
| | | } |
| | | return attrClient; |
| | | } |
| | |
| | | * @param id ä¸»é® |
| | | * @return å
æ°æ®å®ä½å¯¹è±¡ |
| | | */ |
| | | public static OmdAttribute getById(Long id) { |
| | | public static Attribute getById(Long id) { |
| | | String keyPrefix = ATTR_ID.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | return CacheUtil.get(ATTR_CACHE, keyPrefix, id, () -> { |
| | | R<OmdAttribute> result = getAttributeClient().getById(id); |
| | | R<Attribute> result = getAttributeClient().getById(id); |
| | | return result.getData(); |
| | | }); |
| | | } |
| | |
| | | * |
| | | * @param key 屿§åç§° |
| | | */ |
| | | public static List<OmdAttribute> getList(String key) { |
| | | public static List<Attribute> getList(String key) { |
| | | String keyPrefix = ATTR_LIST.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | return CacheUtil.get(DICT_CACHE, keyPrefix, key, () -> { |
| | | R<List<OmdAttribute>> result = getAttributeClient().getList(key); |
| | | R<List<Attribute>> result = getAttributeClient().getList(key); |
| | | return result.getData(); |
| | | }); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/cache/OmdBtmTypeCache.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.cache; |
| | | |
| | | import com.vci.ubcs.omd.feign.IOmdBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/24 |
| | | */ |
| | | public class OmdBtmTypeCache { |
| | | public class BtmTypeCache { |
| | | |
| | | private static final String BTM_DETAIL = "btm:id"; |
| | | |
| | |
| | | |
| | | private static final String BTM_IDS = "btm:ids"; |
| | | |
| | | private static IOmdBtmTypeClient btmTypeClient; |
| | | private static IBtmTypeClient btmTypeClient; |
| | | |
| | | private static IOmdBtmTypeClient getBtmTypeClient() { |
| | | private static IBtmTypeClient getBtmTypeClient() { |
| | | if (btmTypeClient == null) { |
| | | btmTypeClient = SpringUtil.getBean(IOmdBtmTypeClient.class); |
| | | btmTypeClient = SpringUtil.getBean(IBtmTypeClient.class); |
| | | } |
| | | return btmTypeClient; |
| | | } |
| | |
| | | * @param oid ä¸»é® |
| | | * @return ä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | public static OmdBtmTypeVO getDetail(String oid){ |
| | | public static BtmTypeVO getDetail(String oid){ |
| | | String keyPrefix = BTM_DETAIL.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | return CacheUtil.get(BTM_TYPE_CACHE, keyPrefix, oid, () -> { |
| | | R<OmdBtmTypeVO> result = getBtmTypeClient().getDetail(oid); |
| | | R<BtmTypeVO> result = getBtmTypeClient().getDetail(oid); |
| | | return result.getData(); |
| | | }); |
| | | } |
| | |
| | | * @param ids å¯¹è±¡è±æåç§° 使¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | public static List<OmdBtmTypeVO> selectByIdCollection(List<String> ids) { |
| | | public static List<BtmTypeVO> selectByIdCollection(List<String> ids) { |
| | | String keyPrefix = BTM_IDS.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | return CacheUtil.get(BTM_TYPE_CACHE,keyPrefix,Func.toStr(ids), () -> { |
| | | R<List<OmdBtmTypeVO>> result = getBtmTypeClient().selectByIdCollection(ids); |
| | | R<List<BtmTypeVO>> result = getBtmTypeClient().selectByIdCollection(ids); |
| | | return result.getData(); |
| | | }); |
| | | } |
| | |
| | | * @param pkBtmTypeCollection ä¸å¡ç±»å主é®éå |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | public static List<OmdBtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) { |
| | | public static List<BtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) { |
| | | String keyPrefix = BTM_IDS.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | return CacheUtil.get(BTM_TYPE_CACHE,keyPrefix,Func.toStr(pkBtmTypeCollection.stream().map(s -> s.substring(0,5))),() ->{ |
| | | R<List<OmdBtmTypeVO>> result = getBtmTypeClient().listBtmTypeByOidCollection(pkBtmTypeCollection); |
| | | R<List<BtmTypeVO>> result = getBtmTypeClient().listBtmTypeByOidCollection(pkBtmTypeCollection); |
| | | return result.getData(); |
| | | }); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/OmdBtmTypeConstant.java ÐÞ¸Ä |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/23 |
| | | */ |
| | | public class OmdBtmTypeConstant { |
| | | public class BtmTypeConstant { |
| | | |
| | | /** |
| | | * 屿§çä¸å¡ç±»ååç§° |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OmdAttributeDTO.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.dto; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class OmdAttributeDTO extends OmdAttribute { |
| | | public class AttributeDTO extends Attribute { |
| | | |
| | | /** |
| | | * åºåå |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OmdBtmTypeDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 16:43 |
| | | */ |
| | | @Data |
| | | public class OmdBtmTypeDTO implements java.io.Serializable{ |
| | | public class BtmTypeDTO implements java.io.Serializable{ |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | */ |
| | |
| | | /** |
| | | * æ·»å æè
ç§»é¤ç屿§ä¿¡æ¯ |
| | | */ |
| | | private List<OmdBtmTypeLinkAttributesDTO> attributesDTOList; |
| | | private List<BtmTypeLinkAttributesDTO> attributesDTOList; |
| | | |
| | | /** |
| | | * æ¶é´æ³ï¼ç¨äºæ ¡éªæ¯å¦ææ°æ°æ® |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsBtmTypeExportDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:09 |
| | | */ |
| | | @Data |
| | | public class OsBtmTypeExportDTO implements java.io.Serializable{ |
| | | public class BtmTypeExportDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * ç¶ææ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OsStatusDTO> statusDTOList; |
| | | private List<StatusDTO> statusDTOList; |
| | | |
| | | /** |
| | | * çæ¬è§åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OsRevisionRuleDTO> revisionRuleDTOList; |
| | | private List<RevisionRuleDTO> revisionRuleDTOList; |
| | | |
| | | /** |
| | | * æä¸¾æ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OsEnumDTO> enumDTOList; |
| | | private List<EnumDTO> enumDTOList; |
| | | |
| | | /** |
| | | * çå½å¨ææ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OsLifeCycleDTO> lifeCycleDTOList; |
| | | private List<LifeCycleDTO> lifeCycleDTOList; |
| | | |
| | | /** |
| | | * 屿§æ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OmdAttributeDTO> attributeDTOList; |
| | | private List<AttributeDTO> attributeDTOList; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OmdBtmTypeDTO> btmTypeDTOList; |
| | | private List<BtmTypeDTO> btmTypeDTOList; |
| | | |
| | | /** |
| | | * 龿¥ç±»åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | private List<OsLinkTypeDTO> linkTypeDTOList; |
| | | private List<LinkTypeDTO> linkTypeDTOList; |
| | | |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OmdBtmTypeLinkAttributesDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 16:17 |
| | | */ |
| | | @Data |
| | | public class OmdBtmTypeLinkAttributesDTO implements java.io.Serializable{ |
| | | public class BtmTypeLinkAttributesDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsEnumDTO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/14 17:25 |
| | | */ |
| | | public class OsEnumDTO implements java.io.Serializable{ |
| | | public class EnumDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsLifeCycleDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:28 |
| | | */ |
| | | @Data |
| | | public class OsLifeCycleDTO implements java.io.Serializable { |
| | | public class LifeCycleDTO implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * å
å«çè¿æ¥çº¿ |
| | | */ |
| | | private List<OsLifeCycleLineDTO> lineDTOList; |
| | | private List<LifeCycleLineDTO> lineDTOList; |
| | | |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsLifeCycleLineDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:31 |
| | | */ |
| | | @Data |
| | | public class OsLifeCycleLineDTO implements java.io.Serializable{ |
| | | public class LifeCycleLineDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * å
å«çäºä»¶ |
| | | */ |
| | | private List<OsLifeCycleLineEventDTO> eventDTOList; |
| | | private List<LifeCycleLineEventDTO> eventDTOList; |
| | | |
| | | |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsLifeCycleLineEventDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:47 |
| | | */ |
| | | @Data |
| | | public class OsLifeCycleLineEventDTO implements java.io.Serializable { |
| | | public class LifeCycleLineEventDTO implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsLinkTypeDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:53 |
| | | */ |
| | | @Data |
| | | public class OsLinkTypeDTO implements java.io.Serializable { |
| | | public class LinkTypeDTO implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * å
å«ç屿§æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private List<OmdBtmTypeLinkAttributesDTO> attributesDTOList; |
| | | private List<BtmTypeLinkAttributesDTO> attributesDTOList; |
| | | |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsRevisionRuleDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:22 |
| | | */ |
| | | @Data |
| | | public class OsRevisionRuleDTO implements java.io.Serializable{ |
| | | public class RevisionRuleDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/dto/OsStatusDTO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/14 17:15 |
| | | */ |
| | | @Data |
| | | public class OsStatusDTO implements java.io.Serializable{ |
| | | public class StatusDTO implements java.io.Serializable{ |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | */ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OmdAttribute.java ÐÞ¸Ä |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("pl_omd_attribute") |
| | | @ApiModel(value = "屿§å¯¹è±¡", description = "屿§å¯¹è±¡") |
| | | public class OmdAttribute extends BaseEntity { |
| | | public class Attribute extends BaseEntity { |
| | | /** |
| | | * åºåå |
| | | */ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OmdBtmType.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_btm_type") |
| | | @ApiModel(value = "ä¸å¡ç±»å", description = "ä¸å¡ç±»å") |
| | | public class OmdBtmType implements java.io.Serializable{ |
| | | public class BtmType implements java.io.Serializable{ |
| | | |
| | | |
| | | /** |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OmdBtmTypeAttribute.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_btm_type_attr") |
| | | @ApiModel(value = "ä¸å¡ç±»åå
å«ç屿§", description = "ä¸å¡ç±»åå
å«ç屿§") |
| | | public class OmdBtmTypeAttribute implements java.io.Serializable{ |
| | | public class BtmTypeAttribute implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OmdFieldRange.java ÐÞ¸Ä |
| | |
| | | @ToString(callSuper = true) |
| | | @TableName("pl_omd_field_range") |
| | | @ApiModel(value = "åæ®µèå´",description = "åæ®µèå´") |
| | | public class OmdFieldRange extends BaseEntity { |
| | | public class FieldRange extends BaseEntity { |
| | | /** |
| | | * åºåå |
| | | */ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsLifeCycleEventDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_lift_cycle_event") |
| | | @ApiModel(value = "çå½å¨æäºä»¶éå", description = "çå½å¨æäºä»¶éå") |
| | | public class OsLifeCycleEventDO implements java.io.Serializable{ |
| | | public class LifeCycleEvent implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsLifeCycleLineDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_lift_cycle_line") |
| | | @ApiModel(value = "çå½å¨æç¶æè¿æ¥çº¿", description = "çå½å¨æç¶æè¿æ¥çº¿") |
| | | public class OsLifeCycleLineDO implements java.io.Serializable { |
| | | public class LifeCycleLine implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsLifeCycleLineEventDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_lift_cycle_line_event") |
| | | @ApiModel(value = "çå½å¨æç¶æè¿æ¥çº¿", description = "çå½å¨æç¶æè¿æ¥çº¿") |
| | | public class OsLifeCycleLineEventDO implements java.io.Serializable{ |
| | | public class LifeCycleLineEvent implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsLifeCycleRuleDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_lift_cycle_rule") |
| | | @ApiModel(value = "çå½å¨æè§å", description = "çå½å¨æè§å") |
| | | public class OsLifeCycleRuleDO implements java.io.Serializable { |
| | | public class LifeCycleRule implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsLinkTypeAttributeDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_link_type_attr") |
| | | @ApiModel(value = "龿¥ç±»åå
å«ç屿§", description = "龿¥ç±»åå
å«ç屿§") |
| | | public class OsLinkTypeAttributeDO implements java.io.Serializable{ |
| | | public class LinkTypeAttribute implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsLinkTypeDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_link_type") |
| | | @ApiModel(value = "龿¥ç±»å", description = "龿¥ç±»å") |
| | | public class OsLinkTypeDO implements java.io.Serializable{ |
| | | public class LinkTypeDO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/OsModifyAttributeInfoDO.java ÐÞ¸Ä |
| | |
| | | @Data |
| | | @TableName("pl_omd_modify_attr_info") |
| | | @ApiModel(value = "éè¦ä¿®æ¹æ°æ®åºè¡¨ä¸å段çä¿¡æ¯", description = "éè¦ä¿®æ¹æ°æ®åºè¡¨ä¸å段çä¿¡æ¯") |
| | | public class OsModifyAttributeInfoDO implements Serializable { |
| | | public class ModifyAttributeInfoDO implements Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/feign/IOmdAttributeClient.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | */ |
| | | @FeignClient( |
| | | value = AppConstant.APPLICATION_NAME_OMD, |
| | | fallback = IOmdAttributeFallback.class |
| | | fallback = IAttributeFallback.class |
| | | ) |
| | | public interface IOmdAttributeClient { |
| | | public interface IAttributeClient { |
| | | |
| | | String API_PREFIX = "/client"; |
| | | String GET_BY_ID = API_PREFIX + "/attribute/get-by-id"; |
| | |
| | | * @return å
æ°æ®å¯¹è±¡ |
| | | */ |
| | | @GetMapping(GET_BY_ID) |
| | | R<OmdAttribute> getById(@RequestParam("id") Long id); |
| | | R<Attribute> getById(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * è·åå
æ°æ®å表 |
| | |
| | | * @return å
æ°æ®å表 |
| | | */ |
| | | @GetMapping(GET_LIST) |
| | | R<List<OmdAttribute>> getList(@RequestParam("key") String key); |
| | | R<List<Attribute>> getList(@RequestParam("key") String key); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/feign/IOmdAttributeFallback.java ÐÞ¸Ä |
| | |
| | | */ |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | * @author Chill |
| | | */ |
| | | @Component |
| | | public class IOmdAttributeFallback implements IOmdAttributeClient { |
| | | public class IAttributeFallback implements IAttributeClient { |
| | | @Override |
| | | public R<OmdAttribute> getById(Long id) { |
| | | public R<Attribute> getById(Long id) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<OmdAttribute>> getList(String code) { |
| | | public R<List<Attribute>> getList(String code) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/feign/IOmdBtmTypeClient.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | value = AppConstant.APPLICATION_NAME_OMD, |
| | | fallback = IDictClientFallback.class |
| | | ) |
| | | public interface IOmdBtmTypeClient { |
| | | public interface IBtmTypeClient { |
| | | |
| | | /** |
| | | * åç¼ |
| | |
| | | * @return ä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(GET_DETAIL) |
| | | R<OmdBtmTypeVO> getDetail(@RequestParam("oid") String oid); |
| | | R<BtmTypeVO> getDetail(@RequestParam("oid") String oid); |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping(GET_REF) |
| | | R<IPage<OmdBtmTypeVO>> getRef(@RequestParam("condition")Map<String,Object> condition, @RequestParam("query")Query query, @RequestParam("domain") String domain); |
| | | R<IPage<BtmTypeVO>> getRef(@RequestParam("condition")Map<String,Object> condition, @RequestParam("query")Query query, @RequestParam("domain") String domain); |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éæ¥è¯¢å¯¹è±¡ |
| | |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @GetMapping(GET_BY_IDS) |
| | | R<List<OmdBtmTypeVO>> selectByIdCollection(List<String> ids); |
| | | R<List<BtmTypeVO>> selectByIdCollection(List<String> ids); |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸»é®è·åä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | @GetMapping(GET_BY_OIDS) |
| | | R<List<OmdBtmTypeVO>> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection); |
| | | R<List<BtmTypeVO>> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Feign失败é
ç½® |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Component |
| | | public class IBtmTypeFallback implements IBtmTypeClient { |
| | | /** |
| | | * è·åä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return ä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public R<BtmTypeVO> getDetail(String oid) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * |
| | | * @param condition æ¥è¯¢æ¡ä»¶ |
| | | * @param query å页æ¡ä»¶ |
| | | * @param domain é¢åå¼ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<IPage<BtmTypeVO>> getRef(Map<String, Object> condition, Query query, String domain) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éæ¥è¯¢å¯¹è±¡ |
| | | * |
| | | * @param ids å¯¹è±¡è±æåç§° 使¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public R<List<BtmTypeVO>> selectByIdCollection(List<String> ids) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸»é®è·åä¸å¡ç±»å |
| | | * |
| | | * @param pkBtmTypeCollection ä¸å¡ç±»å主é®éå |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | @Override |
| | | public R<List<BtmTypeVO>> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OmdAttributeVO.java ÐÞ¸Ä |
| | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "å
æ°æ®æ¾ç¤ºå¯¹è±¡", description = "å
æ°æ®æ¾ç¤ºå¯¹è±¡") |
| | | public class OmdAttributeVO extends OmdAttribute { |
| | | public class AttributeVO extends Attribute { |
| | | /** |
| | | * åºåå |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty("åæ®µèå´") |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | List<OmdFieldRangeVO> fieldRanges; |
| | | List<FieldRangeVO> fieldRanges; |
| | | |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OmdBtmTypeAttributeVO.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.vo; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "ä¸å¡ç±»åå
å«ç屿§å¯¹è±¡", description = "ä¸å¡ç±»åå
å«ç屿§å¯¹è±¡") |
| | | public class OmdBtmTypeAttributeVO extends OmdBtmTypeAttribute { |
| | | public class BtmTypeAttributeVO extends BtmTypeAttribute { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OmdBtmTypeVO.java ÐÞ¸Ä |
| | |
| | | * @date 2019/10/11 5:24 PM |
| | | */ |
| | | @Data |
| | | public class OmdBtmTypeVO implements java.io.Serializable{ |
| | | public class BtmTypeVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * çæ¬è§åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private OsRevisionRuleVO revisionRuleVO; |
| | | private RevisionRuleVO revisionRuleVO; |
| | | |
| | | /** |
| | | * æ¯å¦æ½è±¡å |
| | |
| | | /** |
| | | * å
å«å±æ§ |
| | | */ |
| | | private List<OmdBtmTypeAttributeVO> attributes; |
| | | private List<BtmTypeAttributeVO> attributes; |
| | | |
| | | |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OmdFieldRangeVO.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.vo; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdFieldRange; |
| | | import com.vci.ubcs.omd.entity.FieldRange; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "åæ®µèå´æ¾ç¤ºå¯¹è±¡", description = "åæ®µèå´æ¾ç¤ºå¯¹è±¡") |
| | | public class OmdFieldRangeVO extends OmdFieldRange { |
| | | public class FieldRangeVO extends FieldRange { |
| | | /** |
| | | * åºåå |
| | | */ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsLifeCycleEventVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/17 9:46 |
| | | */ |
| | | public class OsLifeCycleEventVO implements java.io.Serializable{ |
| | | public class LifeCycleEventVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsLifeCycleLineEventVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 4:54 PM |
| | | */ |
| | | public class OsLifeCycleLineEventVO implements java.io.Serializable{ |
| | | public class LifeCycleLineEventVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsLifeCycleLineVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 4:48 PM |
| | | */ |
| | | public class OsLifeCycleLineVO implements java.io.Serializable { |
| | | public class LifeCycleLineVO implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * å
å«äºä»¶ |
| | | */ |
| | | private List<OsLifeCycleLineEventVO> events; |
| | | private List<LifeCycleLineEventVO> events; |
| | | |
| | | public String getPkLifeCycle() { |
| | | return pkLifeCycle; |
| | |
| | | this.ts = ts; |
| | | } |
| | | |
| | | public List<OsLifeCycleLineEventVO> getEvents() { |
| | | public List<LifeCycleLineEventVO> getEvents() { |
| | | return events; |
| | | } |
| | | |
| | | public void setEvents(List<OsLifeCycleLineEventVO> events) { |
| | | public void setEvents(List<LifeCycleLineEventVO> events) { |
| | | this.events = events; |
| | | } |
| | | |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsLifeCycleVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 4:45 PM |
| | | */ |
| | | public class OsLifeCycleVO implements java.io.Serializable{ |
| | | public class LifeCycleVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * å
å«è¿æ¥çº¿ |
| | | */ |
| | | private List<OsLifeCycleLineVO> lines ; |
| | | private List<LifeCycleLineVO> lines ; |
| | | |
| | | public String getClassFullName() { |
| | | return classFullName; |
| | |
| | | this.ts = ts; |
| | | } |
| | | |
| | | public List<OsLifeCycleLineVO> getLines() { |
| | | public List<LifeCycleLineVO> getLines() { |
| | | return lines; |
| | | } |
| | | |
| | | public void setLines(List<OsLifeCycleLineVO> lines) { |
| | | public void setLines(List<LifeCycleLineVO> lines) { |
| | | this.lines = lines; |
| | | } |
| | | |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsLinkTypeAttributeVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 6:16 PM |
| | | */ |
| | | public class OsLinkTypeAttributeVO implements java.io.Serializable{ |
| | | public class LinkTypeAttributeVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsLinkTypeVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 6:04 PM |
| | | */ |
| | | public class OsLinkTypeVO implements java.io.Serializable { |
| | | public class LinkTypeVO implements java.io.Serializable { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | /** |
| | | * from端ä¸å¡ç±»åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private List<OmdBtmTypeVO> fromBtmTypeVOS; |
| | | private List<BtmTypeVO> fromBtmTypeVOS; |
| | | |
| | | /** |
| | | * from端ä¸å¡ç±»ååç§° |
| | |
| | | /** |
| | | * to端ä¸å¡ç±»åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private List<OmdBtmTypeVO> toBtmTypeVOS; |
| | | private List<BtmTypeVO> toBtmTypeVOS; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»ååç§° |
| | |
| | | /** |
| | | * å
å«å±æ§ |
| | | */ |
| | | private List<OsLinkTypeAttributeVO> attributes; |
| | | private List<LinkTypeAttributeVO> attributes; |
| | | |
| | | public String getOid() { |
| | | return oid; |
| | |
| | | this.fromBtmType = fromBtmType; |
| | | } |
| | | |
| | | public List<OmdBtmTypeVO> getFromBtmTypeVOS() { |
| | | public List<BtmTypeVO> getFromBtmTypeVOS() { |
| | | return fromBtmTypeVOS; |
| | | } |
| | | |
| | | public void setFromBtmTypeVOS(List<OmdBtmTypeVO> fromBtmTypeVOS) { |
| | | public void setFromBtmTypeVOS(List<BtmTypeVO> fromBtmTypeVOS) { |
| | | this.fromBtmTypeVOS = fromBtmTypeVOS; |
| | | } |
| | | |
| | |
| | | this.toBtmTypeName = toBtmTypeName; |
| | | } |
| | | |
| | | public List<OmdBtmTypeVO> getToBtmTypeVOS() { |
| | | public List<BtmTypeVO> getToBtmTypeVOS() { |
| | | return toBtmTypeVOS; |
| | | } |
| | | |
| | | public void setToBtmTypeVOS(List<OmdBtmTypeVO> toBtmTypeVOS) { |
| | | public void setToBtmTypeVOS(List<BtmTypeVO> toBtmTypeVOS) { |
| | | this.toBtmTypeVOS = toBtmTypeVOS; |
| | | } |
| | | |
| | |
| | | this.ts = ts; |
| | | } |
| | | |
| | | public List<OsLinkTypeAttributeVO> getAttributes() { |
| | | public List<LinkTypeAttributeVO> getAttributes() { |
| | | return attributes; |
| | | } |
| | | |
| | | public void setAttributes(List<OsLinkTypeAttributeVO> attributes) { |
| | | public void setAttributes(List<LinkTypeAttributeVO> attributes) { |
| | | this.attributes = attributes; |
| | | } |
| | | |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsModifyAttributeInfoVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/18 11:48 |
| | | */ |
| | | public class OsModifyAttributeInfoVO implements java.io.Serializable{ |
| | | public class ModifyAttributeInfoVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsRevisionRuleVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 5:19 PM |
| | | */ |
| | | public class OsRevisionRuleVO implements java.io.Serializable{ |
| | | public class RevisionRuleVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/OsStatusVO.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/10/11 4:40 PM |
| | | */ |
| | | public class OsStatusVO implements java.io.Serializable { |
| | | public class StatusVO implements java.io.Serializable { |
| | | |
| | | |
| | | /** |
| | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.ddl.bo.DdlTableBO; |
| | | import com.vci.ubcs.ddl.service.IDdlService; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | @PostMapping("/submitBtmType") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹", notes = "ä¼ å
¥ä¸å¡ç±»åä¼ è¾å¯¹è±¡") |
| | | public R submitBtmType(@Valid @RequestBody OmdBtmTypeDTO dto) { |
| | | public R submitBtmType(@Valid @RequestBody BtmTypeDTO dto) { |
| | | return ddlService.submitBtmType(dto); |
| | | } |
| | | |
| | |
| | | package com.vci.ubcs.ddl.processor.dll; |
| | | |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param attributeVOList 屿§çç«ç¢ |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | String getCreateSqlByAttributeForBtm(List<OmdBtmTypeAttributeVO> attributeVOList); |
| | | String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList); |
| | | |
| | | /** |
| | | * å¤çæ´æ°ç±»åçsqlè½¬æ¢ |
| | | * @param attributeVO 屿§ |
| | | * @return sql |
| | | */ |
| | | String dealNumberCreateSql(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealNumberCreateSql(BtmTypeAttributeVO attributeVO); |
| | | |
| | | /** |
| | | * è°ç¨å¤çé»è®¤å¼åé空 |
| | | * @param attributeVO 屿§ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | String dealDefaultAndNull(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealDefaultAndNull(BtmTypeAttributeVO attributeVO); |
| | | |
| | | /** |
| | | * å¤çé»è®¤å¼ |
| | |
| | | * @param attributeVO 屿§ |
| | | * @return sql |
| | | */ |
| | | String dealDoubleCreateSql(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealDoubleCreateSql(BtmTypeAttributeVO attributeVO); |
| | | |
| | | /** |
| | | * å¤çé空 |
| | | * @return sql |
| | | */ |
| | | String dealNullableSql(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealNullableSql(BtmTypeAttributeVO attributeVO); |
| | | |
| | | /** |
| | | * å¤çå¸å°ç±»åçsqlè½¬æ¢ |
| | | * @param attributeVO 屿§ |
| | | * @return sql |
| | | */ |
| | | String dealBooleanCreateSql(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealBooleanCreateSql(BtmTypeAttributeVO attributeVO); |
| | | |
| | | /** |
| | | * å¤çæ¥ææ¶é´ç±»åçsqlè½¬æ¢ |
| | | * @param attributeVO 屿§ |
| | | * @return sql |
| | | */ |
| | | String dealDateTimeCreateSql(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealDateTimeCreateSql(BtmTypeAttributeVO attributeVO); |
| | | |
| | | /** |
| | | * å¤çå符串类åçsqlè½¬æ¢ |
| | | * @param attributeVO 屿§ |
| | | * @return sql |
| | | */ |
| | | String dealStringCreateSql(OmdBtmTypeAttributeVO attributeVO); |
| | | String dealStringCreateSql(BtmTypeAttributeVO attributeVO); |
| | | } |
| | |
| | | package com.vci.ubcs.ddl.processor.dll; |
| | | |
| | | import com.vci.ubcs.ddl.mapper.DllMapper; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description:DLLçå¤çæ¥å£ |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealNumberCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealNumberCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | StringBuilder snb = new StringBuilder().append(NUMBER + SPACE); |
| | | dealDefaultAndNull(attributeVO); |
| | | return snb.toString(); |
| | |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public String dealDefaultAndNull(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDefaultAndNull(BtmTypeAttributeVO attributeVO) { |
| | | String value = ""; |
| | | if (StringUtils.isNotBlank(attributeVO.getDefaultValue())) { |
| | | value += dealDefaultValue(attributeVO.getDefaultValue()); |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDoubleCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDoubleCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | Integer length = attributeVO.getPrecisionLength(); |
| | | if(length == null || length == 0){ |
| | | length = 20; |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealNullableSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealNullableSql(BtmTypeAttributeVO attributeVO) { |
| | | if (!attributeVO.isNullableFlag()) { |
| | | return SPACE + "not null" + SPACE; |
| | | } |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealBooleanCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealBooleanCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "VARCHAR (5) " + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDateTimeCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDateTimeCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "DATETIME" + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealStringCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealStringCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | Integer length2 = attributeVO.getAttributeLength(); |
| | | if (length2 == null) { |
| | |
| | | |
| | | import com.vci.ubcs.ddl.mapper.DllMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllMsMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllOracleMapper; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | <<<<<<< HEAD |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | ======= |
| | | >>>>>>> dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | @Override |
| | | public String getCreateSqlByAttributeForBtm(List<OmdBtmTypeAttributeVO> attributeVOList) { |
| | | public String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | attributeVOList.forEach(a -> { |
| | | sb.append(a.getId()).append(SPACE); |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealNumberCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealNumberCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "INT" + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDoubleCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDoubleCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | Integer length = attributeVO.getPrecisionLength(); |
| | | if(length == null || length == 0){ |
| | | length = 20; |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealBooleanCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealBooleanCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "VARCHAR (5) " + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDateTimeCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDateTimeCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "DATETIME" + SPACE + dealNullableSql(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealStringCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealStringCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | Integer length2 = attributeVO.getAttributeLength(); |
| | | if(length2 == null){ |
| | | length2 = 250; |
| | |
| | | |
| | | import com.vci.ubcs.ddl.mapper.DllMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllOracleMapper; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | <<<<<<< HEAD |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | ======= |
| | | >>>>>>> dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import javax.smartcardio.ATR; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | @Override |
| | | public String getCreateSqlByAttributeForBtm(List<OmdBtmTypeAttributeVO> attributeVOList) { |
| | | public String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | attributeVOList.forEach(a -> { |
| | | sb.append(a.getId()).append(SPACE); |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealNumberCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealNumberCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | if (VciFieldTypeEnum.VTInteger.name().equalsIgnoreCase(attributeVO.getAttrDataType())) { |
| | | sb.append("INT").append(SPACE); |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDoubleCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDoubleCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | Integer length = attributeVO.getPrecisionLength(); |
| | | if (length == null || length == 0) { |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealBooleanCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealBooleanCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "VARCHAR (5) " + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDateTimeCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDateTimeCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return "DATETIME" + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | |
| | |
| | | package com.vci.ubcs.ddl.processor.dll; |
| | | |
| | | <<<<<<< HEAD |
| | | ======= |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | >>>>>>> dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c |
| | | import com.vci.ubcs.ddl.mapper.DllMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllOracleMapper; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | <<<<<<< HEAD |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.util.CollectionUtils; |
| | | ======= |
| | | >>>>>>> dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | @Override |
| | | public String getCreateSqlByAttributeForBtm(List<OmdBtmTypeAttributeVO> attributeVOList) { |
| | | public String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | attributeVOList.forEach(a -> { |
| | | sb.append(a.getId()).append(SPACE); |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealStringCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealStringCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | Integer length2 = attributeVO.getAttributeLength(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | if(length2 == null){ |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealDateTimeCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealDateTimeCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return TIMESTAMP + SPACE + dealNullableSql(attributeVO); |
| | | } |
| | | |
| | |
| | | * @return sql |
| | | */ |
| | | @Override |
| | | public String dealBooleanCreateSql(OmdBtmTypeAttributeVO attributeVO) { |
| | | public String dealBooleanCreateSql(BtmTypeAttributeVO attributeVO) { |
| | | return VARCHAR + "(5)" + SPACE + dealDefaultAndNull(attributeVO); |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.ddl.processor.dll; |
| | | |
| | | import com.vci.ubcs.ddl.mapper.DllMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllOracleMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllSqlLiteMapper; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | @Override |
| | | public String getCreateSqlByAttributeForBtm(List<OmdBtmTypeAttributeVO> attributeVOList) { |
| | | public String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.vci.starter.word.bo.WordMergeStartTableDataBO; |
| | | import com.vci.ubcs.ddl.bo.DdlTableBO; |
| | | import com.vci.ubcs.ddl.enums.DataBaseEnum; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.OsModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeVO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.ModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | |
| | | * @param modifyLengthAttrDOList éè¦ä¿®æ¹ç屿§å¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void changeColumnForBtm(List<OmdBtmTypeAttributeVO> modifyLengthAttrDOList) throws VciBaseException; |
| | | void changeColumnForBtm(List<BtmTypeAttributeVO> modifyLengthAttrDOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * ä¿®æ¹é¾æ¥ç±»åä¸ç屿§å段çé¿åº¦ï¼æ³¨æå¨æ§è¡è¿ä¸ªæ¹æ³æ¶å°±ä¼å°ä»¥åçäºå¡æäº¤ã |
| | | * @param modifyLengthAttrDOListForLinkType éè¦ä¿®æ¹ç屿§å¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void changeColumnForLink(List<OsLinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException; |
| | | void changeColumnForLink(List<LinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ·»å 屿§å段å°ä¸å¡ç±»åä¸ï¼æ³¨æå¨æ§è¡è¿ä¸ªæ¹æ³æ¶å°±ä¼å°ä»¥åçäºå¡æäº¤ã |
| | | * @param addAttrDOList éè¦æ·»å ç屿§å¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void addColumn2TableForBtm(List<OmdBtmTypeAttributeVO> addAttrDOList) throws VciBaseException; |
| | | void addColumn2TableForBtm(List<BtmTypeAttributeVO> addAttrDOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ·»å 屿§å段å°é¾æ¥ç±»åä¸ï¼æ³¨æå¨æ§è¡è¿ä¸ªæ¹æ³æ¶å°±ä¼å°ä»¥åçäºå¡æäº¤ã |
| | | * @param addAttrDOListForLinkType éè¦æ·»å ç屿§å¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void addColumn2TableForLink(List<OsLinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException; |
| | | void addColumn2TableForLink(List<LinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException; |
| | | |
| | | /** |
| | | * å¤æè¡¨ä¸æ¯å¦ææ°æ® |
| | |
| | | * @param linkTypeVOList 龿¥ç±»åå¯¹è±¡ï¼æå±æ§æ¶éè¦å
å«å±æ§ |
| | | * @return ä¸åçå°æ¹ï¼æ¯ä¸ä¸ªä¸å¡ç±»åæè
龿¥ç±»å䏿¡æ°æ® |
| | | */ |
| | | List<OsModifyAttributeInfoDO> checkDifferent(List<OmdBtmTypeVO> btmTypeVOList, List<OsLinkTypeVO> linkTypeVOList) throws VciBaseException; |
| | | List<ModifyAttributeInfoDO> checkDifferent(List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¸
çä¸å¡ç±»åä¸åæ°æ®åºéä¸ä¸æ ·ç |
| | | * @param differentAttributeList ä¸åç屿§çå表 |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void reflexDifferent(List<OsModifyAttributeInfoDO> differentAttributeList) throws VciBaseException; |
| | | void reflexDifferent(List<ModifyAttributeInfoDO> differentAttributeList) throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åæ°æ®åºä¸ææçè¡¨æ ¼ |
| | |
| | | * @param dto ä¸å¡ç±»åä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | R submitBtmType(OmdBtmTypeDTO dto); |
| | | R submitBtmType(BtmTypeDTO dto); |
| | | |
| | | /** |
| | | * æè¡¨åè·åè¡¨ä¿¡æ¯ |
| | |
| | | package com.vci.ubcs.ddl.service.impl; |
| | | |
| | | <<<<<<< HEAD |
| | | import com.alibaba.nacos.client.naming.NacosNamingService; |
| | | |
| | | ======= |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | >>>>>>> dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c |
| | | import com.vci.starter.word.bo.WordMergeStartTableDataBO; |
| | | import com.vci.ubcs.ddl.bo.DdlTableBO; |
| | | import com.vci.ubcs.ddl.bo.DdlTableInDataBaseBO; |
| | |
| | | import com.vci.ubcs.ddl.properties.DdlExportWordFieldProperties; |
| | | import com.vci.ubcs.ddl.properties.DdlPropertise; |
| | | import com.vci.ubcs.ddl.service.IDdlService; |
| | | import com.vci.ubcs.omd.cache.OmdBtmTypeCache; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.OsModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeVO; |
| | | import com.vci.ubcs.omd.cache.BtmTypeCache; |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.ModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Override |
| | | public String getTableNameByBtmTypeOid(String pkBtmType) { |
| | | VciBaseUtil.alertNotNull(pkBtmType, "ä¸å¡ç±»åæè
龿¥ç±»åç主é®"); |
| | | OmdBtmTypeVO btmType = OmdBtmTypeCache.getDetail(pkBtmType); |
| | | BtmTypeVO btmType = BtmTypeCache.getDetail(pkBtmType); |
| | | String tableName = ""; |
| | | if (btmType == null || StringUtils.isBlank(btmType.getOid())) { |
| | | /*OsLinkTypeDO linkTypeDO = linkTypeDOMapper.selectByPrimaryKey(pkBtmType.trim()); |
| | |
| | | @Override |
| | | public String getTableNameByBtmTypeId(String id) { |
| | | VciBaseUtil.alertNotNull(id, "ä¸å¡ç±»åæè
龿¥ç±»åçè±æåç§°"); |
| | | List<OmdBtmTypeVO> btmTypeList = OmdBtmTypeCache.selectByIdCollection(VciBaseUtil.str2List(id)); |
| | | List<BtmTypeVO> btmTypeList = BtmTypeCache.selectByIdCollection(VciBaseUtil.str2List(id)); |
| | | String tableName = ""; |
| | | if (CollectionUtils.isEmpty(btmTypeList)) { |
| | | /*List<OsLinkTypeDO> linkTypeDOList = linkTypeDOMapper.selectByIdCollection(VciBaseUtil.str2List(id)); |
| | |
| | | @Override |
| | | public void createDbTablesByOidCollection(Collection<String> oidCollection) throws VciBaseException { |
| | | VciBaseUtil.alertCollectionNotNull("ä¸å¡ç±»å/龿¥ç±»åç主é®éå", oidCollection); |
| | | List<OmdBtmTypeVO> btmTypeVOList = OmdBtmTypeCache.listBtmTypeByOidCollection(oidCollection); |
| | | List<BtmTypeVO> btmTypeVOList = BtmTypeCache.listBtmTypeByOidCollection(oidCollection); |
| | | // List<OsLinkTypeVO> linkTypeVOList = linkTypeService.listLinkTypeByOidCollection(oidCollection); |
| | | if (!CollectionUtils.isEmpty(btmTypeVOList)) { |
| | | //è¯´ææ¯ä¸å¡ç±»å |
| | |
| | | * @param btmTypeVO ä¸å¡ç±»åçæ¾ç¤ºå¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | private void createDbTableForBtm(OmdBtmTypeVO btmTypeVO) throws VciBaseException { |
| | | private void createDbTableForBtm(BtmTypeVO btmTypeVO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(btmTypeVO, "è¦åå»ºè¡¨æ ¼æå±çä¸å¡ç±»å", btmTypeVO.getTableName(), "ä¸å¡ç±»åçè¡¨æ ¼åç§°"); |
| | | if (btmTypeVO.isViewFlag() && StringUtils.isNotBlank(btmTypeVO.getViewCreateSql())) { |
| | | //è¯´ææ¯è§å¾ |
| | |
| | | @Override |
| | | public void createDbTablesById(String ids) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(ids, "ä¸å¡ç±»å/龿¥ç±»åçè±æéå"); |
| | | List<OmdBtmTypeVO> btmTypeVOList = OmdBtmTypeCache.selectByIdCollection(VciBaseUtil.str2List(ids)); |
| | | List<BtmTypeVO> btmTypeVOList = BtmTypeCache.selectByIdCollection(VciBaseUtil.str2List(ids)); |
| | | // List<OsLinkTypeVO> linkTypeVOList = linkTypeService.listLinkTypeByIdCollection(VciBaseUtil.str2List(ids)); |
| | | if (!CollectionUtils.isEmpty(btmTypeVOList)) { |
| | | //è¯´ææ¯ä¸å¡ç±»å |
| | |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void changeColumnForBtm(List<OmdBtmTypeAttributeVO> modifyLengthAttrVOList) throws VciBaseException { |
| | | public void changeColumnForBtm(List<BtmTypeAttributeVO> modifyLengthAttrVOList) throws VciBaseException { |
| | | VciBaseUtil.alertCollectionNotNull("è¦ä¿®æ¹é¿åº¦ç屿§é", modifyLengthAttrVOList); |
| | | Map<String, List<OmdBtmTypeAttributeVO>> btmTypeHasAttributeVOMap = modifyLengthAttrVOList.stream().collect(Collectors.groupingBy(OmdBtmTypeAttributeVO::getPkBtmType)); |
| | | Map<String, List<BtmTypeAttributeVO>> btmTypeHasAttributeVOMap = modifyLengthAttrVOList.stream().collect(Collectors.groupingBy(BtmTypeAttributeVO::getPkBtmType)); |
| | | btmTypeHasAttributeVOMap.forEach((k, v) -> { |
| | | OmdBtmTypeVO btmTypeVO = OmdBtmTypeCache.getDetail(k); |
| | | BtmTypeVO btmTypeVO = BtmTypeCache.getDetail(k); |
| | | if (btmTypeVO == null || StringUtils.isBlank(btmTypeVO.getOid())) { |
| | | throw new VciBaseException("è¦ä¿®æ¹å±æ§åé¿åº¦çä¸å¡ç±»åä¸åå¨"); |
| | | } |
| | |
| | | * @param tableName è¡¨æ ¼çåç§° |
| | | * @param attributeVOList è¦æ·»å ç屿§å段 |
| | | */ |
| | | private void changeColumnsForTable(String tableName, List<OmdBtmTypeAttributeVO> attributeVOList) { |
| | | private void changeColumnsForTable(String tableName, List<BtmTypeAttributeVO> attributeVOList) { |
| | | String attributeSql = dllMapper.getCreateSqlByAttributeForBtm(attributeVOList); |
| | | //å
å¤æè¡¨æ ¼æ¯å¦åå¨ |
| | | boolean tableExist = false; |
| | |
| | | * @param tableName è¡¨æ ¼åç§° |
| | | * @param attributeVOList 屿§å¯¹è±¡å表 |
| | | */ |
| | | private void commentColumnsForTable(String tableName, List<OmdBtmTypeAttributeVO> attributeVOList) { |
| | | private void commentColumnsForTable(String tableName, List<BtmTypeAttributeVO> attributeVOList) { |
| | | if (StringUtils.isNotBlank(tableName) && !CollectionUtils.isEmpty(attributeVOList)) { |
| | | attributeVOList.stream().forEach(s -> { |
| | | ddlMapper.commentColumnTable(tableName, s.getId(), s.getName()); |
| | |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void changeColumnForLink(List<OsLinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException { |
| | | public void changeColumnForLink(List<LinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException { |
| | | |
| | | } |
| | | |
| | |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void addColumn2TableForBtm(List<OmdBtmTypeAttributeVO> addAttrDOList) throws VciBaseException { |
| | | public void addColumn2TableForBtm(List<BtmTypeAttributeVO> addAttrDOList) throws VciBaseException { |
| | | VciBaseUtil.alertCollectionNotNull("è¦æ·»å å°æ°æ®åºè¡¨ä¸ç屿§é", addAttrDOList); |
| | | Map<String, List<OmdBtmTypeAttributeVO>> btmTypeHasAttributeVOMap = addAttrDOList.stream().collect(Collectors.groupingBy(OmdBtmTypeAttributeVO::getPkBtmType)); |
| | | Map<String, List<BtmTypeAttributeVO>> btmTypeHasAttributeVOMap = addAttrDOList.stream().collect(Collectors.groupingBy(BtmTypeAttributeVO::getPkBtmType)); |
| | | btmTypeHasAttributeVOMap.forEach((k, v) -> { |
| | | OmdBtmTypeVO btmTypeVO = OmdBtmTypeCache.getDetail(k); |
| | | BtmTypeVO btmTypeVO = BtmTypeCache.getDetail(k); |
| | | if (btmTypeVO == null || StringUtils.isBlank(btmTypeVO.getOid())) { |
| | | throw new VciBaseException("è¦ä¿®æ¹å±æ§åé¿åº¦çä¸å¡ç±»åä¸åå¨"); |
| | | } |
| | |
| | | * @param attributeVOList 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡æè
è·åsqlè¯å¥çæ¶ååºç°éè¯¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | <<<<<<< HEAD |
| | | private void addColumnForTable(String tableName, List<OmdBtmTypeAttributeVO> attributeVOList) throws VciBaseException{ |
| | | ======= |
| | | private void addColumnForTable(String tableName, List<BtmTypeAttributeVO> attributeVOList) { |
| | | >>>>>>> dd3a6c681f938fd53d5f6cc3a4fcee40e71b259c |
| | | String attributeSql = dllMapper.getCreateSqlByAttributeForBtm(attributeVOList); |
| | | //å
å¤æè¡¨æ ¼æ¯å¦åå¨ |
| | | if (!checkTableExistByTableName(tableName)) { |
| | | OmdBtmTypeAttributeVO attributeVO = attributeVOList.get(0); |
| | | BtmTypeAttributeVO attributeVO = attributeVOList.get(0); |
| | | createDbTables(attributeVO.getPkBtmType()); |
| | | } else { |
| | | ddlMapper.addColumn2TableBySql(tableName, attributeSql); |
| | |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void addColumn2TableForLink(List<OsLinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException { |
| | | public void addColumn2TableForLink(List<LinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException { |
| | | |
| | | } |
| | | |
| | |
| | | * @return ä¸åçå°æ¹ï¼æ¯ä¸ä¸ªä¸å¡ç±»åæè
龿¥ç±»å䏿¡æ°æ® |
| | | */ |
| | | @Override |
| | | public List<OsModifyAttributeInfoDO> checkDifferent(List<OmdBtmTypeVO> btmTypeVOList, List<OsLinkTypeVO> linkTypeVOList) throws VciBaseException { |
| | | public List<ModifyAttributeInfoDO> checkDifferent(List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void reflexDifferent(List<OsModifyAttributeInfoDO> differentAttributeList) throws VciBaseException { |
| | | public void reflexDifferent(List<ModifyAttributeInfoDO> differentAttributeList) throws VciBaseException { |
| | | |
| | | } |
| | | |
| | |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public R submitBtmType(OmdBtmTypeDTO dto) { |
| | | public R submitBtmType(BtmTypeDTO dto) { |
| | | VciBaseUtil.alertNotNull(dto, "ä¸å¡ç±»å", dto.getAttributesDTOList(), "ä¸å¡ç±»å屿§"); |
| | | OmdBtmTypeVO btmTypeVO = Objects.requireNonNull(BeanUtil.copy(dto, OmdBtmTypeVO.class)); |
| | | BtmTypeVO btmTypeVO = Objects.requireNonNull(BeanUtil.copy(dto, BtmTypeVO.class)); |
| | | if (Func.isNotBlank(dto.getTableName())) { |
| | | checkModifyOrCreateTable(btmTypeVO); |
| | | } else { |
| | |
| | | * |
| | | * @param btmTypeVO ä¸å¡ç±»å |
| | | */ |
| | | private void checkModifyOrCreateTable(OmdBtmTypeVO btmTypeVO) { |
| | | private void checkModifyOrCreateTable(BtmTypeVO btmTypeVO) { |
| | | if (checkTableExistByTableName(btmTypeVO.getTableName())) { |
| | | // 表已åå¨ï¼æ ¡éªå±æ§ |
| | | List<OmdBtmTypeVO> vos = new ArrayList<>(); |
| | | List<BtmTypeVO> vos = new ArrayList<>(); |
| | | vos.add(btmTypeVO); |
| | | List<OsModifyAttributeInfoDO> differentAttributeList = checkDifferent(vos, null); |
| | | List<ModifyAttributeInfoDO> differentAttributeList = checkDifferent(vos, null); |
| | | if (CollectionUtils.isEmpty(differentAttributeList)) { |
| | | // å¯ä»¥ç´æ¥å é¤åå建 |
| | | dropTableByName(btmTypeVO.getTableName()); |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/OmdAttributeController.java ÐÞ¸Ä |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.omd.constant.OmdCacheConstant; |
| | | import com.vci.ubcs.omd.dto.OmdAttributeDTO; |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.service.IOmdAttributeService; |
| | | import com.vci.ubcs.omd.vo.OmdAttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.OmdAttributeWrapper; |
| | | import com.vci.ubcs.system.vo.DictVO; |
| | | import com.vci.ubcs.omd.dto.AttributeDTO; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.AttributeWrapper; |
| | | import io.swagger.annotations.*; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | |
| | | @AllArgsConstructor |
| | | @RequestMapping("/attribute") |
| | | @Api(value = "å
æ°æ®æ§å¶å¨", tags = "å
æ°æ®æ§å¶å¨") |
| | | public class OmdAttributeController extends BladeController { |
| | | public class AttributeController extends BladeController { |
| | | /** |
| | | * å
æ°æ®æå¡ |
| | | */ |
| | | private final IOmdAttributeService attributeService; |
| | | private final IAttributeService attributeService; |
| | | |
| | | /** |
| | | * æ¥ç详æ
|
| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "æ¥ç详æ
", notes = "ä¼ å
¥ä¸»é®") |
| | | public R<OmdAttributeVO> detail(Long id) { |
| | | public R<AttributeVO> detail(Long id) { |
| | | return R.data(attributeService.getAttributeDetail(id)); |
| | | } |
| | | |
| | |
| | | }) |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "æ¥è¯¢å表", notes = "ä¼ å
¥æ¥è¯¢") |
| | | public R<List<OmdAttributeVO>> list(@ApiIgnore @RequestParam Map<String, Object> condition) { |
| | | return R.data(OmdAttributeWrapper.build().listEntityVO(attributeService.list(Condition.getQueryWrapper(condition, OmdAttribute.class).lambda().orderByAsc(OmdAttribute::getKey)))); |
| | | public R<List<AttributeVO>> list(@ApiIgnore @RequestParam Map<String, Object> condition) { |
| | | return R.data(AttributeWrapper.build().listEntityVO(attributeService.list(Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByAsc(Attribute::getKey)))); |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "æ¥è¯¢å表", notes = "ä¼ å
¥æ¥è¯¢") |
| | | public R<IPage<OmdAttributeVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) { |
| | | IPage<OmdAttributeVO> pageVO = new Page<>(); |
| | | IPage<OmdAttribute> page = attributeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, OmdAttribute.class).lambda().orderByAsc(OmdAttribute::getKey)); |
| | | public R<IPage<AttributeVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) { |
| | | IPage<AttributeVO> pageVO = new Page<>(); |
| | | IPage<Attribute> page = attributeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByAsc(Attribute::getKey)); |
| | | BeanUtil.copy(page,pageVO); |
| | | pageVO.setRecords( OmdAttributeWrapper.build().listEntityVO(page.getRecords())); |
| | | pageVO.setRecords( AttributeWrapper.build().listEntityVO(page.getRecords())); |
| | | return R.data(pageVO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹", notes = "ä¼ å
¥å
æ°æ®å¯¹è±¡") |
| | | public R submit(@Valid @RequestBody OmdAttributeDTO dto) { |
| | | public R submit(@Valid @RequestBody AttributeDTO dto) { |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return R.status(attributeService.submit(dto)); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/OmdBtmTypeController.java ÐÞ¸Ä |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.omd.constant.OmdCacheConstant; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.OmdBtmType; |
| | | import com.vci.ubcs.omd.service.IOmdBtmTypeService; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.wrapper.OmdBtmTypeWrapper; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import com.vci.ubcs.omd.service.IBtmTypeService; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; |
| | | import io.swagger.annotations.*; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | |
| | | @AllArgsConstructor |
| | | @RequestMapping("/btm-type") |
| | | @Api(value = "ä¸å¡ç±»åæ§å¶å¨", tags = "ä¸å¡ç±»åæ§å¶å¨") |
| | | public class OmdBtmTypeController extends BladeController { |
| | | public class BtmTypeController extends BladeController { |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åæå¡ |
| | | */ |
| | | private final IOmdBtmTypeService btmTypeService; |
| | | private final IBtmTypeService btmTypeService; |
| | | |
| | | |
| | | /** |
| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "æ¥ç详æ
", notes = "ä¼ å
¥ä¸»é®") |
| | | public R<OmdBtmTypeVO> detail(String oid) { |
| | | public R<BtmTypeVO> detail(String oid) { |
| | | return R.data(btmTypeService.getBtmTypeByOid(oid)); |
| | | } |
| | | |
| | |
| | | }) |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "æ¥è¯¢å表", notes = "ä¼ å
¥æ¥è¯¢") |
| | | public R<List<OmdBtmTypeVO>> list(@ApiIgnore @RequestParam Map<String, Object> condition) { |
| | | return R.data(OmdBtmTypeWrapper.build().listEntityVO(btmTypeService.list(Condition.getQueryWrapper(condition, OmdBtmType.class).lambda().orderByAsc(OmdBtmType::getId)))); |
| | | public R<List<BtmTypeVO>> list(@ApiIgnore @RequestParam Map<String, Object> condition) { |
| | | return R.data(BtmTypeWrapper.build().listEntityVO(btmTypeService.list(Condition.getQueryWrapper(condition, BtmType.class).lambda().orderByAsc(BtmType::getId)))); |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "æ¥è¯¢å表", notes = "ä¼ å
¥æ¥è¯¢") |
| | | public R<IPage<OmdBtmTypeVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) { |
| | | IPage<OmdBtmTypeVO> pageVO = new Page<>(); |
| | | IPage<OmdBtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, OmdBtmType.class).lambda().orderByAsc(OmdBtmType::getId)); |
| | | public R<IPage<BtmTypeVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) { |
| | | IPage<BtmTypeVO> pageVO = new Page<>(); |
| | | IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, BtmType.class).lambda().orderByAsc(BtmType::getId)); |
| | | BeanUtil.copy(page, pageVO); |
| | | pageVO.setRecords(OmdBtmTypeWrapper.build().listEntityVO(page.getRecords())); |
| | | pageVO.setRecords(BtmTypeWrapper.build().listEntityVO(page.getRecords())); |
| | | return R.data(pageVO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹", notes = "ä¼ å
¥å
æ°æ®å¯¹è±¡") |
| | | public R submit(@Valid @RequestBody OmdBtmTypeDTO dto) { |
| | | public R submit(@Valid @RequestBody BtmTypeDTO dto) { |
| | | CacheUtil.clear(OmdCacheConstant.BTM_CACHE); |
| | | return R.status(btmTypeService.submit(dto)); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/OmdAttributeClient.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.service.IOmdAttributeService; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | |
| | | @ApiIgnore |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class OmdAttributeClient implements IOmdAttributeClient{ |
| | | private final IOmdAttributeService service; |
| | | public class AttributeClient implements IAttributeClient { |
| | | private final IAttributeService service; |
| | | |
| | | @Override |
| | | @GetMapping(GET_BY_ID) |
| | | public R<OmdAttribute> getById(Long id) { |
| | | public R<Attribute> getById(Long id) { |
| | | return R.data(service.getById(id)); |
| | | } |
| | | |
| | | @Override |
| | | @GetMapping(GET_LIST) |
| | | public R<List<OmdAttribute>> getList(String key) { |
| | | public R<List<Attribute>> getList(String key) { |
| | | Map<String,Object> condition = new HashMap<>(); |
| | | condition.put("key",key); |
| | | return R.data(service.list(Condition.getQueryWrapper(condition, OmdAttribute.class).lambda().orderByAsc(OmdAttribute::getKey))); |
| | | return R.data(service.list(Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByAsc(Attribute::getKey))); |
| | | } |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/OmdBtmTypeClient.java ÐÞ¸Ä |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.entity.OmdBtmType; |
| | | import com.vci.ubcs.omd.service.IOmdBtmTypeService; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.wrapper.OmdBtmTypeWrapper; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import com.vci.ubcs.omd.service.IBtmTypeService; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | @ApiIgnore |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class OmdBtmTypeClient implements IOmdBtmTypeClient{ |
| | | public class BtmTypeClient implements IBtmTypeClient { |
| | | |
| | | private final IOmdBtmTypeService btmTypeService; |
| | | private final IBtmTypeService btmTypeService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @return ä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public R<OmdBtmTypeVO> getDetail(String oid) { |
| | | public R<BtmTypeVO> getDetail(String oid) { |
| | | return R.data(btmTypeService.getBtmTypeByOid(oid)); |
| | | } |
| | | |
| | |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<IPage<OmdBtmTypeVO>> getRef(Map<String, Object> condition, Query query, String domain) { |
| | | public R<IPage<BtmTypeVO>> getRef(Map<String, Object> condition, Query query, String domain) { |
| | | Func.requireNotNull(domain,"é¢åå¼"); |
| | | IPage<OmdBtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, OmdBtmType.class).lambda().eq(OmdBtmType::getDomain, domain).orderByAsc(OmdBtmType::getId)); |
| | | IPage<OmdBtmTypeVO> pageVO = new Page<>(); |
| | | IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, BtmType.class).lambda().eq(BtmType::getDomain, domain).orderByAsc(BtmType::getId)); |
| | | IPage<BtmTypeVO> pageVO = new Page<>(); |
| | | BeanUtil.copy(page,pageVO); |
| | | pageVO.setRecords(OmdBtmTypeWrapper.build().listEntityVO(page.getRecords())); |
| | | R<IPage<OmdBtmTypeVO>> r = R.data(pageVO); |
| | | pageVO.setRecords(BtmTypeWrapper.build().listEntityVO(page.getRecords())); |
| | | R<IPage<BtmTypeVO>> r = R.data(pageVO); |
| | | r.setSuccess(true); |
| | | return r; |
| | | } |
| | |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public R<List<OmdBtmTypeVO>> selectByIdCollection(List<String> ids) { |
| | | public R<List<BtmTypeVO>> selectByIdCollection(List<String> ids) { |
| | | Func.requireNotNull(ids,"ä¸å¡ç±»åè±æåç§°"); |
| | | List<OmdBtmTypeVO> voList = OmdBtmTypeWrapper.build().listEntityVO( |
| | | List<BtmTypeVO> voList = BtmTypeWrapper.build().listEntityVO( |
| | | Optional.ofNullable(btmTypeService.list( |
| | | Wrappers.<OmdBtmType>query().lambda().in(OmdBtmType::getId, ids) |
| | | Wrappers.<BtmType>query().lambda().in(BtmType::getId, ids) |
| | | ) |
| | | ).orElseGet(ArrayList::new) |
| | | ); |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | @Override |
| | | public R<List<OmdBtmTypeVO>> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) { |
| | | public R<List<BtmTypeVO>> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) { |
| | | Func.requireNotNull(pkBtmTypeCollection,"ä¸å¡ç±»å主é®"); |
| | | List<OmdBtmTypeVO> voList = OmdBtmTypeWrapper.build().listEntityVO( |
| | | List<BtmTypeVO> voList = BtmTypeWrapper.build().listEntityVO( |
| | | Optional.ofNullable(btmTypeService.list( |
| | | Wrappers.<OmdBtmType>query().lambda().in(OmdBtmType::getOid, pkBtmTypeCollection) |
| | | Wrappers.<BtmType>query().lambda().in(BtmType::getOid, pkBtmTypeCollection) |
| | | ) |
| | | ).orElseGet(ArrayList::new) |
| | | ); |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/OmdAttributeMapper.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.mapper; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import org.springblade.core.mp.mapper.BladeMapper; |
| | | |
| | | import java.util.Collection; |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/3 |
| | | */ |
| | | public interface OmdAttributeMapper extends BladeMapper<OmdAttribute> { |
| | | public interface AttributeMapper extends BladeMapper<Attribute> { |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | List<OmdAttribute> selectAll(); |
| | | List<Attribute> selectAll(); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * @param primaryKey ä¸»é® |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | OmdAttribute selectByPrimaryKey(Long primaryKey); |
| | | Attribute selectByPrimaryKey(Long primaryKey); |
| | | |
| | | /** |
| | | * 䏻鮿¹éæ¥è¯¢ |
| | | * @param primaryKeyCollection 主é®éå |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | List<OmdAttribute> selectByPrimaryKeyCollection(Collection<String> primaryKeyCollection); |
| | | List<Attribute> selectByPrimaryKeyCollection(Collection<String> primaryKeyCollection); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.mapper; |
| | | |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import org.springblade.core.mp.mapper.BladeMapper; |
| | | |
| | | /** |
| | | * Description: |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/4/23 |
| | | */ |
| | | public interface BtmTypeAttributeMapper extends BladeMapper<BtmTypeAttribute> { |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/OmdBtmTypeMapper.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.mapper; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.OmdBtmType; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.core.mp.mapper.BladeMapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public interface OmdBtmTypeMapper extends BladeMapper<OmdBtmType> { |
| | | public interface BtmTypeMapper extends BladeMapper<BtmType> { |
| | | /** |
| | | * æ ¹æ®ä¸»é®å é¤å¯¹è±¡ |
| | | * @param oid çå½å¨æä¸»é® |
| | |
| | | * @param record è¦æ·»å çä¸å¡ç±»å对象 |
| | | * @return å½±åçè¡æ° |
| | | */ |
| | | int insert(OmdBtmType record); |
| | | int insert(BtmType record); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®è·åæ°æ®å¯¹è±¡ |
| | | * @param oid ä¸»é® |
| | | * @return æ°æ®å¯¹è±¡ |
| | | */ |
| | | OmdBtmType selectByPrimaryKey(String oid); |
| | | BtmType selectByPrimaryKey(String oid); |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¹éè·å对象 |
| | | * @param oids 主é®ï¼å
å«åå¼å·,使¯ä¸è½è¶
è¿1000 |
| | | * @return æ°æ®å¯¹è±¡å表 |
| | | */ |
| | | List<OmdBtmType> selectByPrimaryKeys(String oids); |
| | | List<BtmType> selectByPrimaryKeys(String oids); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¹éæ¥è¯¢å¯¹è±¡ |
| | | * @param oids 对象主é®,使ç¨éå·åéï¼ä½æ¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | List<OmdBtmType> selectByPrimaryKeyCollection(@Param("oids") Collection<String> oids); |
| | | List<BtmType> selectByPrimaryKeyCollection(@Param("oids") Collection<String> oids); |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éæ¥è¯¢å¯¹è±¡ |
| | | * @param ids å¯¹è±¡è±æåç§° 使¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | List<OmdBtmType> selectByIdCollection(@Param("ids") Collection<String> ids); |
| | | List<BtmType> selectByIdCollection(@Param("ids") Collection<String> ids); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨çä¸å¡ç±»å |
| | | * @return ä¸å¡ç±»åæ°æ®å¯¹è±¡å表 |
| | | */ |
| | | List<OmdBtmType> selectAll(); |
| | | List<BtmType> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®ä¿®æ¹çå½å¨æ |
| | | * @param record æ°æ®å¯¹è±¡ |
| | | * @return å½±åçè¡æ° |
| | | */ |
| | | int updateByPrimaryKey(OmdBtmType record); |
| | | int updateByPrimaryKey(BtmType record); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®è·ååç§° |
| | |
| | | * @param pkAttribute 屿§çä¸»é® |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | List<OmdBtmType> selectByAttributeOid(String pkAttribute); |
| | | List<BtmType> selectByAttributeOid(String pkAttribute); |
| | | |
| | | /** |
| | | * æ ¹æ®çæ¬è§åç主é®è·å使ç¨çä¸å¡ç±»å对象 |
| | | * @param pkRevisionRule çæ¬è§åçä¸»é® |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | List<OmdBtmType> selectByRevisionRuleOid(String pkRevisionRule); |
| | | List<BtmType> selectByRevisionRuleOid(String pkRevisionRule); |
| | | |
| | | /** |
| | | * æ ¹æ®çå½å¨æç主é®è·å使ç¨çä¸å¡ç±»å对象 |
| | | * @param pkLifeCycle çå½å¨æçä¸»é® |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | List<OmdBtmType> selectByLifeCycleOid(String pkLifeCycle); |
| | | List<BtmType> selectByLifeCycleOid(String pkLifeCycle); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param records æ¹éçä¿¡æ¯ |
| | | * @return æ§è¡æ»æ° |
| | | */ |
| | | Long batchInsert(@Param("records") List<OmdBtmTypeAttribute> records); |
| | | Long batchInsert(@Param("records") List<BtmTypeAttribute> records); |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.cloud.nacos.NacosDiscoveryProperties; |
| | | import com.alibaba.cloud.nacos.NacosServiceManager; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.nacos.api.annotation.NacosInjected; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.api.exception.NacosException; |
| | | import com.alibaba.nacos.api.naming.NamingService; |
| | | import com.alibaba.nacos.api.naming.pojo.Instance; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import org.apache.http.Header; |
| | | import org.apache.http.client.methods.CloseableHttpResponse; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Repository; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * Description: é¢å转åå¨ |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/25 |
| | | */ |
| | | @Repository |
| | | public class DomainRepeater { |
| | | private DomainRepeater() { |
| | | } |
| | | |
| | | /** |
| | | * æ§å¶å¨è·¯å¾ |
| | |
| | | */ |
| | | public static final String API_GET_ALL_TABLE_INFO = API_PREFIX + StringPool.SLASH +"getAllTableInfo"; |
| | | |
| | | @NacosInjected |
| | | private NamingService nacosNamingService; |
| | | /** |
| | | * Nacosæå¡å表 |
| | | */ |
| | | private static NamingService namingService = SINGLE.build(); |
| | | |
| | | @Component |
| | | public static class SINGLE{ |
| | | private static class SINGLE { |
| | | @Autowired |
| | | private NacosServiceManager nacosServiceManager; |
| | | private NacosServiceManager manager; |
| | | private static NacosServiceManager nacosServiceManager; |
| | | |
| | | @Autowired |
| | | private NacosDiscoveryProperties nacosDiscoveryProperties; |
| | | |
| | | private static NamingService nacosNamingService; |
| | | private NacosDiscoveryProperties properties; |
| | | private static NacosDiscoveryProperties nacosDiscoveryProperties; |
| | | |
| | | @PostConstruct |
| | | public NamingService build(){ |
| | | nacosNamingService = nacosServiceManager.getNamingService(nacosDiscoveryProperties.getNacosProperties()); |
| | | return nacosNamingService; |
| | | private void init(){ |
| | | nacosServiceManager = manager; |
| | | nacosDiscoveryProperties = properties; |
| | | } |
| | | private static NamingService build(){ |
| | | return nacosServiceManager.getNamingService(nacosDiscoveryProperties.getNacosProperties()); |
| | | } |
| | | } |
| | | |
| | | private RestTemplate restTemplate = new RestTemplate(); |
| | | |
| | | public Object submitBtmType (String serviceName, OmdBtmTypeVO omdBtmTypeVO) throws NacosException { |
| | | |
| | | if (nacosNamingService == null){ |
| | | nacosNamingService = SINGLE.nacosNamingService; |
| | | } |
| | | Instance service = nacosNamingService.selectOneHealthyInstance(AppConstant.APPLICATION_GATEWAY_NAME); |
| | | public static R submitBtmType (String serviceName, BtmTypeVO btmTypeVO) throws NacosException { |
| | | Instance service = namingService.selectOneHealthyInstance(AppConstant.APPLICATION_GATEWAY_NAME); |
| | | try { |
| | | String url = "http://" + service.getIp() +StringPool.COLON+ service.getPort() + StringPool.SLASH + serviceName + StringPool.SLASH + API_SUBMIT_BTM_TYPE; |
| | | HttpPost httpPost = buildPost(url); |
| | | httpPost.setEntity(new StringEntity(JSON.toJSONString(omdBtmTypeVO),"utf-8")); |
| | | CloseableHttpClient httpClient = HttpClientBuilder.create().build(); |
| | | CloseableHttpResponse response = httpClient.execute(httpPost); |
| | | return response; |
| | | ResponseEntity<R> responseEntity = executePost(url, JSONObject.toJSONString(btmTypeVO), null); |
| | | if (responseEntity.getStatusCode().equals(HttpStatus.OK)){ |
| | | return responseEntity.getBody(); |
| | | } |
| | | return R.fail(String.valueOf(responseEntity.getStatusCode().value())); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | private HttpPost buildPost(String url){ |
| | | HttpPost httpPost = new HttpPost(url); |
| | | httpPost.setHeader("Content-Type","application/json;charset=UTF-8"); |
| | | httpPost.setHeader("Blade-Auth", AuthUtil.getHeader()); |
| | | return httpPost; |
| | | private static ResponseEntity<R> executePost(String url, String body,Map<String,String> extraHeaders) throws IOException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("Content-Type","application/json;charset=UTF-8"); |
| | | httpHeaders.add("Blade-Auth", AuthUtil.getHeader()); |
| | | Optional.ofNullable(extraHeaders).orElseGet(HashMap::new).forEach(httpHeaders::add); |
| | | HttpEntity<String> request = new HttpEntity<>(body,httpHeaders); |
| | | return restTemplate.postForEntity(url, request, R.class); |
| | | } |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IOmdAttributeService.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.service; |
| | | |
| | | import com.vci.ubcs.omd.dto.OmdAttributeDTO; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.vo.OmdAttributeVO; |
| | | import com.vci.ubcs.omd.dto.AttributeDTO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/3 |
| | | */ |
| | | public interface IOmdAttributeService extends BaseService<OmdAttribute> { |
| | | public interface IAttributeService extends BaseService<Attribute> { |
| | | |
| | | /** |
| | | * è·åå
æ°æ®è¯¦æ
|
| | | * @param id ä¸»é® |
| | | * @return å
æ°æ®æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OmdAttributeVO getAttributeDetail(Long id); |
| | | AttributeVO getAttributeDetail(Long id); |
| | | |
| | | /** |
| | | * æ°å¢æä¿®æ¹ |
| | | * @param dto 页é¢ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | boolean submit(OmdAttributeDTO dto); |
| | | boolean submit(AttributeDTO dto); |
| | | |
| | | /** |
| | | * å é¤ |
| | |
| | | * @return 屿§å¯¹è±¡å表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdAttributeVO> listAttributeByKeyCollection(Collection<String> attributeIdCollection) throws VciBaseException; |
| | | List<AttributeVO> listAttributeByKeyCollection(Collection<String> attributeIdCollection) throws VciBaseException; |
| | | |
| | | /** |
| | | * 夿屿§çå
容æ¯å¦ç¬¦åè¦æ± |
| | |
| | | * @return true 符å false ä¸ç¬¦å |
| | | * @throws VciBaseException ä¸ç¬¦åæ¶æåºå¼å¸¸ |
| | | */ |
| | | boolean checkAttribute(OmdBtmTypeLinkAttributesDTO attributesDTO) throws VciBaseException; |
| | | boolean checkAttribute(BtmTypeLinkAttributesDTO attributesDTO) throws VciBaseException; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.service; |
| | | |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description:ä¸å¡ç±»åå
³è屿§çæå¡ |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/4/23 |
| | | */ |
| | | public interface IBtmTypeAttributeService extends BaseService<BtmTypeAttribute> { |
| | | |
| | | /** |
| | | * æ£æ¥å±æ§åå¨å¹¶æ·»å |
| | | * @param btmTypeOid ä¸å¡ç±»åä¸»é® |
| | | * @param attributesDTOList 页é¢ä¼ è¾å¯¹è±¡éå |
| | | * @param creator å建人 |
| | | * @param now tsæ¶é´æ³ |
| | | * @return åå½±åçè¡æ° |
| | | */ |
| | | int checkAndInsert(String btmTypeOid, List<BtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now); |
| | | |
| | | /** |
| | | * æ¹éæå
¥ |
| | | * @param records æ°æ®å¯¹è±¡éå |
| | | */ |
| | | int batchInsert(List<BtmTypeAttribute> records); |
| | | |
| | | /** |
| | | * ä¸å¡ç±»å䏻鮿¥å±æ§ |
| | | * @param btmTypeOid ä¸å¡ç±»åä¸»é® |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | List<BtmTypeAttributeVO> getAttributeByBtmTypeOid(String btmTypeOid); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IOmdBtmTypeService.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.service; |
| | | |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.OmdBtmType; |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.OsModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeVO; |
| | | 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.ModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | |
| | |
| | | * @author weidy |
| | | * @date 2019/10/13 2:33 PM |
| | | */ |
| | | public interface IOmdBtmTypeService extends BaseService<OmdBtmType> { |
| | | public interface IBtmTypeService extends BaseService<BtmType> { |
| | | |
| | | /** |
| | | * è®¾ç½®å¹³å°æ¬èº«çä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åï¼å¦æä¸åå¨ä¼è¿ånull |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | OmdBtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException; |
| | | BtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¹éè·åä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException; |
| | | List<BtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException; |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸»é®è·åä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException; |
| | | List<BtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°è·åä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åï¼å¦æä¸åå¨ä¼è¿ånull |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | OmdBtmTypeVO getBtmTypeById(String id) throws ServiceException; |
| | | BtmTypeVO getBtmTypeById(String id) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éè·åä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException; |
| | | List<BtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°éåæ¹éè·åä¸å¡ç±»å |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException; |
| | | List<BtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°éåæ¹éè·åä¸å¡ç±»åçæ°æ®å¯¹è±¡ |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException; |
| | | List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®éåæ¹éè·åä¸å¡ç±»åçæ°æ®å¯¹è±¡ |
| | |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException; |
| | | List<BtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»å主é®è·å䏿åç§° |
| | |
| | | * @return ææç屿§å¯¹è±¡ï¼å
æ¬ç³»ç»å±æ§ |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºææ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | List<OmdBtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException; |
| | | List<BtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åè±æåç§°è·åå
³èçææå±æ§å¯¹è±¡ |
| | |
| | | * @return ææç屿§å¯¹è±¡ï¼å
æ¬ç³»ç»å
ç½®å±æ§ |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | List<OmdBtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException; |
| | | List<BtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»å主é®è·åå
³èçææå±æ§å¯¹è±¡ |
| | |
| | | * @return ææç屿§å¯¹è±¡ï¼å
æ¬ç³»ç»å
ç½®å±æ§ï¼keyæ¯ä¸å¡ç±»å主é®ï¼valueæ¯å
å«ç屿§ |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | Map<String,List<OmdBtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException; |
| | | Map<String,List<BtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åè±æåç§°è·åå
³èçææå±æ§å¯¹è±¡ |
| | |
| | | * @return ææç屿§å¯¹è±¡ï¼å
æ¬ç³»ç»å
ç½®å±æ§ï¼keyæ¯ä¸å¡ç±»å主é®ï¼valueæ¯å
å«ç屿§ |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | Map<String,List<OmdBtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException; |
| | | Map<String,List<BtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException; |
| | | |
| | | |
| | | /** |
| | |
| | | * @return å¼ç¨ç龿¥ç±»å |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | List<OsLinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException; |
| | | List<LinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException; |
| | | |
| | | /** |
| | | * æ ¡éªä¸å¡ç±»åæ¯å¦è¢«å¼ç¨ |
| | |
| | | * @return æ·»å åçä¸å¡ç±»å |
| | | * @throws ServiceException æ·»å åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | OmdBtmTypeDTO addSave(OmdBtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException; |
| | | BtmTypeDTO addSave(BtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException; |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¸å¡ç±»å |
| | |
| | | * @return ä¿®æ¹åçä¸å¡ç±»å |
| | | * @throws ServiceException ä¿®æ¹åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | OmdBtmTypeDTO editSave(OmdBtmTypeDTO btmTypeDTO, boolean autoEditTable) throws ServiceException; |
| | | BtmTypeDTO editSave(BtmTypeDTO btmTypeDTO, boolean autoEditTable) throws ServiceException; |
| | | |
| | | /** |
| | | * å é¤ä¸å¡ç±»å |
| | |
| | | * @param autoDeleteTable èªå¨å é¤è¡¨æ ¼ |
| | | * @throws ServiceException 妿ä¸å¡ç±»å被å¼ç¨ï¼æè
å é¤åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | void delete(OmdBtmTypeVO btmTypeVO,boolean autoDeleteTable) throws ServiceException; |
| | | void delete(BtmTypeVO btmTypeVO, boolean autoDeleteTable) throws ServiceException; |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¸å¡ç±»å |
| | |
| | | * @param autoDeleteTable èªå¨å é¤è¡¨æ ¼ |
| | | * @throws ServiceException 妿ä¸å¡ç±»å被å¼ç¨ï¼æè
å é¤åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | void batchDelete(List<OmdBtmTypeVO> btmTypeVOList,boolean autoDeleteTable) throws ServiceException; |
| | | void batchDelete(List<BtmTypeVO> btmTypeVOList, boolean autoDeleteTable) throws ServiceException; |
| | | |
| | | /** |
| | | * æ£æ¥ä¸å¡ç±»å䏿°æ®åºè¡¨æ¯å¦ä¸è´ |
| | |
| | | * @return ä¸åç屿§ä¿¡æ¯ |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | List<OsModifyAttributeInfoDO> checkDbTableSame(String pkBtmType) throws ServiceException; |
| | | List<ModifyAttributeInfoDO> checkDbTableSame(String pkBtmType) throws ServiceException; |
| | | |
| | | /** |
| | | * è·åæ°æ®åºè¡¨ï¼æ¯æä¸å¡ç±»ååè§å¾ |
| | |
| | | * @param now å½åæ¶é´ |
| | | * @return 屿§çæ°æ®å¯¹è±¡ |
| | | */ |
| | | OmdBtmTypeAttribute btmTypeAttributeDTO2DO(OmdBtmTypeLinkAttributesDTO attributesDTO, String pkBtmType, String creator, Date now); |
| | | BtmTypeAttribute btmTypeAttributeDTO2DO(BtmTypeLinkAttributesDTO attributesDTO, String pkBtmType, String creator, Date now); |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åç屿§æ¾ç¤ºå¯¹è±¡è½¬æ¢ä¸ºæ°æ®å¯¹è±¡ |
| | | * @param thisBtmTypeHasAttributeVOList ä¸å¡ç±»å屿§æ¾ç¤ºå¯¹è±¡ |
| | | * @return æ°æ®å¯¹è±¡ |
| | | */ |
| | | List<OmdBtmTypeAttribute> btmTypeAttributeVO2DO(List<OmdBtmTypeAttributeVO> thisBtmTypeHasAttributeVOList); |
| | | List<BtmTypeAttribute> btmTypeAttributeVO2DO(List<BtmTypeAttributeVO> thisBtmTypeHasAttributeVOList); |
| | | |
| | | /** |
| | | * æ¹éå°ä¸å¡ç±»åçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param attributeDOList 屿§çæ°æ®å¯¹è±¡å表 |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡å表 |
| | | */ |
| | | List<OmdBtmTypeAttributeVO> batchBtmTypeAttributeDO2VO(List<OmdBtmTypeAttribute> attributeDOList); |
| | | List<BtmTypeAttributeVO> batchBtmTypeAttributeDO2VO(List<BtmTypeAttribute> attributeDOList); |
| | | |
| | | /** |
| | | * æ¹éå°ä¸å¡ç±»åçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param attributesDO 屿§çæ°æ®å¯¹è±¡ |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡å表 |
| | | */ |
| | | OmdBtmTypeAttributeVO btmTypeAttributeDO2VO(OmdBtmTypeAttribute attributesDO); |
| | | BtmTypeAttributeVO btmTypeAttributeDO2VO(BtmTypeAttribute attributesDO); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åçæå®å±æ§ |
| | |
| | | * @param attributeIdCollection 屿§çéåï¼å¦æä¸ºç©ºåè·åå
¨é¨ |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OmdBtmTypeAttribute> listAttributeDOByIdsForBtm(String id, Collection<String> attributeIdCollection); |
| | | List<BtmTypeAttribute> listAttributeDOByIdsForBtm(String id, Collection<String> attributeIdCollection); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åçç¼å·è·å屿§ |
| | | * @param id ä¸å¡ç±»åçç¼å· |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OmdBtmTypeAttributeVO> listAttributeByBtmTypeId(String id); |
| | | List<BtmTypeAttributeVO> listAttributeByBtmTypeId(String id); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åç主é®è·å屿§ |
| | | * @param oid ä¸å¡ç±»åçä¸»é® |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OmdBtmTypeAttributeVO> listAttributeByBtmTypeOid(String oid); |
| | | List<BtmTypeAttributeVO> listAttributeByBtmTypeOid(String oid); |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸å¡ç±»åç¼å·æè
主é®è·åå
å«ç屿§ |
| | |
| | | * @return keyæ¯ä¸å¡ç±»åç䏻鮿è
ç¼å·ï¼å¼æ¯å
å«ç屿§çä¿¡æ¯ |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | List<OmdBtmTypeAttributeVO> batchListAttributeByBtmType(Collection<String> oidsOrIds, boolean queryById) throws ServiceException; |
| | | List<BtmTypeAttributeVO> batchListAttributeByBtmType(Collection<String> oidsOrIds, boolean queryById) throws ServiceException; |
| | | |
| | | /** |
| | | * æ°å¢æä¿®æ¹ä¸å¡ç±»å |
| | | * @param btmTypeDTO ä¸å¡ç±»å页é¢ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | boolean submit(OmdBtmTypeDTO btmTypeDTO); |
| | | boolean submit(BtmTypeDTO btmTypeDTO); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/OmdAttributeServiceImpl.java ÐÞ¸Ä |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.omd.constant.OmdCacheConstant; |
| | | import com.vci.ubcs.omd.dto.OmdAttributeDTO; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.mapper.OmdAttributeMapper; |
| | | import com.vci.ubcs.omd.service.IOmdAttributeService; |
| | | import com.vci.ubcs.omd.vo.OmdAttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.OmdAttributeWrapper; |
| | | import com.vci.ubcs.omd.dto.AttributeDTO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.mapper.AttributeMapper; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.AttributeWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | |
| | | * @date 2023/4/3 |
| | | */ |
| | | @Service |
| | | public class OmdAttributeServiceImpl extends ServiceImpl<OmdAttributeMapper, OmdAttribute> implements IOmdAttributeService { |
| | | public class AttributeServiceImpl extends ServiceImpl<AttributeMapper, Attribute> implements IAttributeService { |
| | | |
| | | @Override |
| | | public boolean deleteLogic(@NotEmpty List<Long> ids) { |
| | |
| | | * @return å
æ°æ®æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OmdAttributeVO getAttributeDetail(Long id) { |
| | | public AttributeVO getAttributeDetail(Long id) { |
| | | Func.requireNotNull(id,"主é®ä¸è½ä¸ºç©º"); |
| | | return OmdAttributeWrapper.build().entityVO(baseMapper.selectByPrimaryKey(id)); |
| | | return AttributeWrapper.build().entityVO(baseMapper.selectByPrimaryKey(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public boolean submit(OmdAttributeDTO dto) { |
| | | LambdaQueryWrapper<OmdAttribute> wrapper = Wrappers.<OmdAttribute>query().lambda().eq(OmdAttribute::getKey, dto.getKey()); |
| | | Long count = baseMapper.selectCount((Func.isEmpty(dto.getId())) ? wrapper : wrapper.notIn(OmdAttribute::getId, dto.getId())); |
| | | public boolean submit(AttributeDTO dto) { |
| | | LambdaQueryWrapper<Attribute> wrapper = Wrappers.<Attribute>query().lambda().eq(Attribute::getKey, dto.getKey()); |
| | | Long count = baseMapper.selectCount((Func.isEmpty(dto.getId())) ? wrapper : wrapper.notIn(Attribute::getId, dto.getId())); |
| | | if (count > 0L) { |
| | | throw new ServiceException("屿§åå·²åå¨!"); |
| | | } |
| | | dto.setIsDeleted(BladeConstant.DB_NOT_DELETED); |
| | | OmdAttribute omdAttribute = BeanUtil.copy(dto, OmdAttribute.class); |
| | | Attribute omdAttribute = BeanUtil.copy(dto, Attribute.class); |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return saveOrUpdate(omdAttribute); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkAttributeExists(Collection<String> keyCollections) throws VciBaseException { |
| | | List<OmdAttributeVO> existAttributeVOList = listAttributeByKeyCollection(keyCollections); |
| | | List<AttributeVO> existAttributeVOList = listAttributeByKeyCollection(keyCollections); |
| | | if (CollectionUtils.isEmpty(existAttributeVOList)) { |
| | | throw new VciBaseException("使ç¨ç屿§é½å¨ç³»ç»ä¸ä¸åå¨ï¼è¯·å
æ¥è¯"); |
| | | } else { |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdAttributeVO> listAttributeByKeyCollection(Collection<String> attributeIdCollection) throws VciBaseException { |
| | | public List<AttributeVO> listAttributeByKeyCollection(Collection<String> attributeIdCollection) throws VciBaseException { |
| | | if(!CollectionUtils.isEmpty(attributeIdCollection)){ |
| | | List<OmdAttribute> attributeDOList = listAttributeByKeyCollectionDO(attributeIdCollection); |
| | | List<Attribute> attributeDOList = listAttributeByKeyCollectionDO(attributeIdCollection); |
| | | if(!CollectionUtils.isEmpty(attributeDOList)) { |
| | | return OmdAttributeWrapper.build().listEntityVO(attributeDOList); |
| | | return AttributeWrapper.build().listEntityVO(attributeDOList); |
| | | } |
| | | } |
| | | return null; |
| | |
| | | * @return 屿§æ°æ®å¯¹è±¡å表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | * @throws VciBaseException mybatisæ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | private List<OmdAttribute> listAttributeByKeyCollectionDO(Collection<String> attributeIdCollection) throws VciBaseException { |
| | | private List<Attribute> listAttributeByKeyCollectionDO(Collection<String> attributeIdCollection) throws VciBaseException { |
| | | if(!CollectionUtils.isEmpty(attributeIdCollection)){ |
| | | List<OmdAttribute> attributeDOList = new ArrayList<>(); |
| | | List<Attribute> attributeDOList = new ArrayList<>(); |
| | | Collection<String> distAttributeIdCollection = attributeIdCollection.stream().distinct().collect(Collectors.toList()); |
| | | Collection<Collection<String>> idCollections = VciBaseUtil.switchCollectionForOracleIn(distAttributeIdCollection); |
| | | if(!CollectionUtils.isEmpty(idCollections)) { |
| | | idCollections.stream().forEach(s -> { |
| | | List<OmdAttribute> attributeDOS = baseMapper.selectList(Wrappers.<OmdAttribute>query().lambda().in(OmdAttribute::getKey, s)); |
| | | List<Attribute> attributeDOS = baseMapper.selectList(Wrappers.<Attribute>query().lambda().in(Attribute::getKey, s)); |
| | | if(!CollectionUtils.isEmpty(attributeDOS)){ |
| | | attributeDOList.addAll(attributeDOS); |
| | | } |
| | |
| | | * @throws VciBaseException ä¸ç¬¦åæ¶æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public boolean checkAttribute(OmdBtmTypeLinkAttributesDTO attributesDTO) throws VciBaseException { |
| | | public boolean checkAttribute(BtmTypeLinkAttributesDTO attributesDTO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(attributesDTO.getId(), "屿§çè±æåç§°", attributesDTO.getName(), "屿§ç䏿åç§°", |
| | | attributesDTO.getAttrDataType(), "屿§çæ°æ®ç±»å"); |
| | | boolean pass = checkAttributePass(attributesDTO.getId(), attributesDTO.getAttrDataType(), attributesDTO.getAttributeLength(), attributesDTO.getDefaultValue()); |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/OmdBtmAttributeServiceImpl.java ÐÞ¸Ä |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.mapper.OmdBtmTypeAttributeMapper; |
| | | import com.vci.ubcs.omd.service.IOmdAttributeService; |
| | | import com.vci.ubcs.omd.service.IOmdBtmTypeAttributeService; |
| | | import com.vci.ubcs.omd.vo.OmdAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.OmdBtmTypeAttributeWrapper; |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.mapper.BtmTypeAttributeMapper; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import com.vci.ubcs.omd.service.IBtmTypeAttributeService; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeAttributeWrapper; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @date 2023/4/23 |
| | | */ |
| | | @Service |
| | | public class OmdBtmAttributeServiceImpl extends ServiceImpl<OmdBtmTypeAttributeMapper, OmdBtmTypeAttribute> implements IOmdBtmTypeAttributeService { |
| | | public class BtmAttributeServiceImpl extends ServiceImpl<BtmTypeAttributeMapper, BtmTypeAttribute> implements IBtmTypeAttributeService { |
| | | |
| | | @Autowired |
| | | private IOmdAttributeService attributeService; |
| | | private IAttributeService attributeService; |
| | | |
| | | @Override |
| | | public boolean deleteLogic(@NotEmpty List<Long> ids) { |
| | |
| | | * @return åå½±åçè¡æ° |
| | | */ |
| | | @Override |
| | | public int checkAndInsert(String btmTypeOid,List<OmdBtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now) { |
| | | public int checkAndInsert(String btmTypeOid, List<BtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now) { |
| | | List<String> attributeIdList = new ArrayList<>(); |
| | | List<OmdBtmTypeAttribute> btmTypeAttributeDOList = new ArrayList<>(); |
| | | List<BtmTypeAttribute> btmTypeAttributeDOList = new ArrayList<>(); |
| | | if (!CollectionUtils.isEmpty(attributesDTOList)) { |
| | | attributesDTOList.stream().forEachOrdered(s -> { |
| | | attributeService.checkAttribute(s); |
| | | btmTypeAttributeDOList.add(OmdBtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now)); |
| | | btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now)); |
| | | attributeIdList.add(s.getId().toLowerCase().trim()); |
| | | }); |
| | | //æ£æ¥å±æ§æ¯å¦é½åå¨ |
| | |
| | | * @param records æ°æ®å¯¹è±¡éå |
| | | */ |
| | | @Override |
| | | public int batchInsert(List<OmdBtmTypeAttribute> records) { |
| | | public int batchInsert(List<BtmTypeAttribute> records) { |
| | | return baseMapper.insertBatchSomeColumn(records); |
| | | } |
| | | |
| | |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> getAttributeByBtmTypeOid(String btmTypeOid){ |
| | | public List<BtmTypeAttributeVO> getAttributeByBtmTypeOid(String btmTypeOid){ |
| | | Func.requireNotNull(btmTypeOid,"ä¸å¡ç±»å主é®"); |
| | | return OmdBtmTypeAttributeWrapper.build().listEntityVO( |
| | | return BtmTypeAttributeWrapper.build().listEntityVO( |
| | | Optional.ofNullable( |
| | | baseMapper.selectList(Wrappers.<OmdBtmTypeAttribute>query().lambda().eq(OmdBtmTypeAttribute::getPkBtmType, btmTypeOid)) |
| | | baseMapper.selectList(Wrappers.<BtmTypeAttribute>query().lambda().eq(BtmTypeAttribute::getPkBtmType, btmTypeOid)) |
| | | ).orElseGet(ArrayList::new) |
| | | ); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/OmdBtmTypeServiceImpl.java ÐÞ¸Ä |
| | |
| | | import com.alibaba.nacos.api.exception.NacosException; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.omd.constant.OmdBtmTypeConstant; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.repeater.DomainRepeater; |
| | | import com.vci.ubcs.omd.service.IOmdBtmTypeAttributeService; |
| | | import com.vci.ubcs.omd.wrapper.OmdBtmTypeWrapper; |
| | | import com.vci.ubcs.omd.service.IBtmTypeAttributeService; |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; |
| | | import com.vci.ubcs.starter.web.constant.OmdRegExpConstant; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.OmdBtmType; |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.OsModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.mapper.OmdBtmTypeMapper; |
| | | import com.vci.ubcs.omd.service.IOmdBtmTypeService; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeVO; |
| | | 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.ModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.mapper.BtmTypeMapper; |
| | | import com.vci.ubcs.omd.service.IBtmTypeService; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | |
| | | import org.springframework.transaction.support.DefaultTransactionDefinition; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.*; |
| | | |
| | |
| | | * @date 2023/4/23 |
| | | */ |
| | | @Service |
| | | public class OmdBtmTypeServiceImpl extends ServiceImpl<OmdBtmTypeMapper, OmdBtmType> implements IOmdBtmTypeService { |
| | | public class BtmTypeServiceImpl extends ServiceImpl<BtmTypeMapper, BtmType> implements IBtmTypeService { |
| | | |
| | | /** |
| | | * äºå¡ç®¡ç |
| | |
| | | * ä¸å¡ç±»åå
³è屿§æå¡ |
| | | */ |
| | | @Autowired |
| | | private IOmdBtmTypeAttributeService btmTypeAttributeService; |
| | | |
| | | @Autowired |
| | | private DomainRepeater domainRepeater; |
| | | private IBtmTypeAttributeService btmTypeAttributeService; |
| | | |
| | | /** |
| | | * è®¾ç½®å¹³å°æ¬èº«çä¸å¡ç±»å |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public OmdBtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException { |
| | | public BtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException { |
| | | Func.requireNotNull(pkBtmType,"ä¸å¡ç±»å主é®ä¸è½ä¸ºç©º"); |
| | | OmdBtmTypeVO btmTypeVO = OmdBtmTypeWrapper.build().entityVO(baseMapper.selectOne(Wrappers.<OmdBtmType>query().lambda().eq(OmdBtmType::getOid, pkBtmType))); |
| | | BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(baseMapper.selectOne(Wrappers.<BtmType>query().lambda().eq(BtmType::getOid, pkBtmType))); |
| | | btmTypeVO.setAttributes(btmTypeAttributeService.getAttributeByBtmTypeOid(pkBtmType)); |
| | | return btmTypeVO; |
| | | } |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException { |
| | | public List<BtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException { |
| | | public List<BtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public OmdBtmTypeVO getBtmTypeById(String id) throws ServiceException { |
| | | public BtmTypeVO getBtmTypeById(String id) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException { |
| | | public List<BtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | public List<BtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | public List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException { |
| | | public List<BtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºææ¥è¯¢åºéæ¶ä¼æåºé误 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException { |
| | | public List<BtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException { |
| | | public List<BtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public Map<String, List<OmdBtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException { |
| | | public Map<String, List<BtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException ä¸å¡ç±»åä¸åå¨ï¼åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public Map<String, List<OmdBtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | public Map<String, List<BtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<OsLinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException { |
| | | public List<LinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException æ·»å åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public OmdBtmTypeDTO addSave(OmdBtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException { |
| | | public BtmTypeDTO addSave(BtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException { |
| | | TransactionStatus transaction = null; |
| | | DefaultTransactionDefinition def = null; |
| | | if (autoCreateTable) { |
| | |
| | | transaction = dataSourceTransactionManager.getTransaction(def); |
| | | // è·å¾äºå¡ç¶æ |
| | | } |
| | | OmdBtmType btmTypeDO = new OmdBtmType(); |
| | | BtmType btmTypeDO = new BtmType(); |
| | | try { |
| | | VciBaseUtil.alertNotNull(btmTypeDTO, "è¦æ·»å çä¸å¡ç±»å", btmTypeDTO.getId(), "ä¸å¡ç±»åçè±æåç§°", btmTypeDTO.getName(), "ä¸å¡ç±»å䏿åç§°"); |
| | | if (btmTypeDTO.isViewFlag() && (StringUtils.isBlank(btmTypeDTO.getViewCreateSql()) |
| | |
| | | if (btmTypeDTO.getId().length() > 24) { |
| | | throw new VciBaseException("ä¸å¡ç±»åè±æåç§°ä¸è½è¶
è¿18ï¼ç®åé¿åº¦ä¸º{0}", new Object[]{btmTypeDTO.getId().length()}); |
| | | } |
| | | List<OmdBtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId())); |
| | | List<BtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId())); |
| | | if (!CollectionUtils.isEmpty(btmTypeDOList) && btmTypeDOList.size() > 0) { |
| | | OmdBtmType existBtmType = btmTypeDOList.get(0); |
| | | BtmType existBtmType = btmTypeDOList.get(0); |
| | | throw new VciBaseException("ä¸å¡ç±»åè±æåç§°å·²ç»åå¨ï¼ä¸åºå大å°åï¼ï¼è¿ä¸ªè±æå称对åºç䏿å称为{0},å建人{1},å建æ¶é´{2}" |
| | | , new Object[]{existBtmType.getName(), existBtmType.getCreator(), VciDateUtil.date2Str(existBtmType.getCreateTime(), VciDateUtil.DateFormat)}); |
| | | } |
| | |
| | | btmTypeDO.setCreator(creator); |
| | | btmTypeDO.setCreateTime(now); |
| | | btmTypeDO.setOwner(creator); |
| | | btmTypeDO.setBtmname(OmdBtmTypeConstant.OMD_BTMTYPE); |
| | | btmTypeDO.setBtmname(BtmTypeConstant.OMD_BTMTYPE); |
| | | btmTypeDO.setTs(now); |
| | | if (StringUtils.isBlank(btmTypeDO.getTableName())) { |
| | | btmTypeDO.setTableName(getTableName(btmTypeDO.getId())); |
| | |
| | | throw e; |
| | | } |
| | | if (autoCreateTable) { |
| | | OmdBtmTypeVO btmTypeVO = OmdBtmTypeWrapper.build().entityVO(btmTypeDO); |
| | | BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(btmTypeDO); |
| | | btmTypeVO.setAttributes(listHasAttributesByOid(btmTypeDO.getOid())); |
| | | checkTableSame(btmTypeVO); |
| | | } |
| | |
| | | * |
| | | * @param btmTypeVO ä¸å¡ç±»åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private void checkTableSame(OmdBtmTypeVO btmTypeVO) { |
| | | private void checkTableSame(BtmTypeVO btmTypeVO) { |
| | | /*List<OmdBtmTypeVO> btmTypeVOList = new ArrayList<>(); |
| | | btmTypeVOList.add(btmTypeVO); |
| | | List<OsModifyAttributeInfoDO> modifyAttributeInfoDOList = ddlServiceI.checkDifferent(btmTypeVOList, null); |
| | |
| | | * @param creator å建人 |
| | | * @param now å½åæ¶é´ |
| | | */ |
| | | private void addAttributeForBtm(OmdBtmTypeDTO btmTypeDTO, String creator, Date now) throws VciBaseException{ |
| | | List<OmdBtmTypeLinkAttributesDTO> attributesDTOList = btmTypeDTO.getAttributesDTOList(); |
| | | private void addAttributeForBtm(BtmTypeDTO btmTypeDTO, String creator, Date now) throws VciBaseException{ |
| | | List<BtmTypeLinkAttributesDTO> attributesDTOList = btmTypeDTO.getAttributesDTOList(); |
| | | btmTypeAttributeService.checkAndInsert(btmTypeDTO.getOid(),attributesDTOList,creator,now); |
| | | } |
| | | |
| | |
| | | * @throws ServiceException ä¿®æ¹åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public OmdBtmTypeDTO editSave(OmdBtmTypeDTO btmTypeDTO, boolean autoEditTable) throws ServiceException { |
| | | public BtmTypeDTO editSave(BtmTypeDTO btmTypeDTO, boolean autoEditTable) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException 妿ä¸å¡ç±»å被å¼ç¨ï¼æè
å é¤åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void delete(OmdBtmTypeVO btmTypeVO, boolean autoDeleteTable) throws ServiceException { |
| | | public void delete(BtmTypeVO btmTypeVO, boolean autoDeleteTable) throws ServiceException { |
| | | |
| | | } |
| | | |
| | |
| | | * @throws ServiceException 妿ä¸å¡ç±»å被å¼ç¨ï¼æè
å é¤åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void batchDelete(List<OmdBtmTypeVO> btmTypeVOList, boolean autoDeleteTable) throws ServiceException { |
| | | public void batchDelete(List<BtmTypeVO> btmTypeVOList, boolean autoDeleteTable) throws ServiceException { |
| | | |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<OsModifyAttributeInfoDO> checkDbTableSame(String pkBtmType) throws ServiceException { |
| | | public List<ModifyAttributeInfoDO> checkDbTableSame(String pkBtmType) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return 屿§çæ°æ®å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OmdBtmTypeAttribute btmTypeAttributeDTO2DO(OmdBtmTypeLinkAttributesDTO attributesDTO, String pkBtmType, String creator, Date now) { |
| | | public BtmTypeAttribute btmTypeAttributeDTO2DO(BtmTypeLinkAttributesDTO attributesDTO, String pkBtmType, String creator, Date now) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return æ°æ®å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttribute> btmTypeAttributeVO2DO(List<OmdBtmTypeAttributeVO> thisBtmTypeHasAttributeVOList) { |
| | | public List<BtmTypeAttribute> btmTypeAttributeVO2DO(List<BtmTypeAttributeVO> thisBtmTypeHasAttributeVOList) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡å表 |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> batchBtmTypeAttributeDO2VO(List<OmdBtmTypeAttribute> attributeDOList) { |
| | | public List<BtmTypeAttributeVO> batchBtmTypeAttributeDO2VO(List<BtmTypeAttribute> attributeDOList) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡å表 |
| | | */ |
| | | @Override |
| | | public OmdBtmTypeAttributeVO btmTypeAttributeDO2VO(OmdBtmTypeAttribute attributesDO) { |
| | | public BtmTypeAttributeVO btmTypeAttributeDO2VO(BtmTypeAttribute attributesDO) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttribute> listAttributeDOByIdsForBtm(String id, Collection<String> attributeIdCollection) { |
| | | public List<BtmTypeAttribute> listAttributeDOByIdsForBtm(String id, Collection<String> attributeIdCollection) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> listAttributeByBtmTypeId(String id) { |
| | | public List<BtmTypeAttributeVO> listAttributeByBtmTypeId(String id) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> listAttributeByBtmTypeOid(String oid) { |
| | | public List<BtmTypeAttributeVO> listAttributeByBtmTypeOid(String oid) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @throws ServiceException åæ°ä¸ºç©ºæè
æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<OmdBtmTypeAttributeVO> batchListAttributeByBtmType(Collection<String> oidsOrIds, boolean queryById) throws ServiceException { |
| | | public List<BtmTypeAttributeVO> batchListAttributeByBtmType(Collection<String> oidsOrIds, boolean queryById) throws ServiceException { |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public boolean submit(OmdBtmTypeDTO btmTypeDTO) { |
| | | //addSave(btmTypeDTO,false); |
| | | public boolean submit(BtmTypeDTO btmTypeDTO) { |
| | | addSave(btmTypeDTO,false); |
| | | try { |
| | | Object result = domainRepeater.submitBtmType(btmTypeDTO.getDomain(), Objects.requireNonNull(BeanUtil.copy(btmTypeDTO, OmdBtmTypeVO.class))); |
| | | if (result instanceof R){ |
| | | R r = (R) result; |
| | | if (r.isSuccess()){ |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | R result = DomainRepeater.submitBtmType(btmTypeDTO.getDomain(), Objects.requireNonNull(BeanUtil.copy(btmTypeDTO, BtmTypeVO.class))); |
| | | return result.isSuccess(); |
| | | } catch (NacosException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/OmdAttributeWrapper.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.*; |
| | | import com.vci.ubcs.system.cache.DictBizCache; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/3 |
| | | */ |
| | | public class OmdAttributeWrapper extends BaseEntityWrapper<OmdAttribute, OmdAttributeVO> { |
| | | public class AttributeWrapper extends BaseEntityWrapper<Attribute, AttributeVO> { |
| | | |
| | | public static OmdAttributeWrapper build() { |
| | | return new OmdAttributeWrapper(); |
| | | public static AttributeWrapper build() { |
| | | return new AttributeWrapper(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OmdAttributeVO entityVO(OmdAttribute entity) { |
| | | OmdAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, OmdAttributeVO.class)); |
| | | public AttributeVO entityVO(Attribute entity) { |
| | | AttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, AttributeVO.class)); |
| | | vo.setTypeValue(DictBizCache.getValue(vo.getTypeCode(),vo.getTypeKey())); |
| | | if (StringUtil.isNotBlank(vo.getReferTypeCode())){ |
| | | vo.setReferTypeValue(DictBizCache.getValue(vo.getReferTypeCode(),vo.getReferTypeKey())); |
| | |
| | | * @param list pojoéå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public List<OmdAttributeVO> listEntityVO(List<OmdAttribute> list) { |
| | | public List<AttributeVO> listEntityVO(List<Attribute> list) { |
| | | return list.stream().map(this::entityVO).collect(Collectors.toList()); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Description: |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/4/23 |
| | | */ |
| | | public class BtmTypeAttributeWrapper extends BaseEntityWrapper<BtmTypeAttribute, BtmTypeAttributeVO> { |
| | | |
| | | public static BtmTypeAttributeWrapper build() { |
| | | return new BtmTypeAttributeWrapper(); |
| | | } |
| | | |
| | | /** |
| | | * do2vo |
| | | * @param entity pojo |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public BtmTypeAttributeVO entityVO(BtmTypeAttribute entity) { |
| | | BtmTypeAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeAttributeVO.class)); |
| | | // å¨è¿é设置æä¸¾æ¾ç¤ºå¼ |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * æ¹é转vo |
| | | * @param list pojoéå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public List<BtmTypeAttributeVO> listEntityVO(List<BtmTypeAttribute> list) { |
| | | return list.stream().map(this::entityVO).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ·è´ä¸å¡ç±»å æ°æ®ä¼ è¾å¯¹è±¡å° æ°æ®å¯¹è±¡ |
| | | * |
| | | * @param dto ä¸å¡ç±»åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @param creator å建人 |
| | | * @param now 彿¶æ¶é´ |
| | | */ |
| | | public BtmTypeAttribute copyBtmTypeAttributeDTO2Entity(BtmTypeLinkAttributesDTO dto, String btmTypeOid, String creator, Date now){ |
| | | BtmTypeAttribute entity = Objects.requireNonNull(BeanUtil.copy(dto, BtmTypeAttribute.class)); |
| | | entity.setLastModifier(creator); |
| | | entity.setTs(now); |
| | | entity.setPkBtmType(btmTypeOid); |
| | | // å¨è¿è¿è¡éç¨å段å¤ç |
| | | return entity; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Description: |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/4/23 |
| | | */ |
| | | public class BtmTypeWrapper extends BaseEntityWrapper<BtmType, BtmTypeVO> { |
| | | public static BtmTypeWrapper build() { |
| | | return new BtmTypeWrapper(); |
| | | } |
| | | |
| | | /** |
| | | * do2vo |
| | | * @param entity pojo |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public BtmTypeVO entityVO(BtmType entity) { |
| | | BtmTypeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeVO.class)); |
| | | // å¨è¿é设置æä¸¾æ¾ç¤ºå¼ |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * æ¹é转vo |
| | | * @param list pojoéå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public List<BtmTypeVO> listEntityVO(List<BtmType> list) { |
| | | return list.stream().map(this::entityVO).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ·è´ä¸å¡ç±»å æ°æ®ä¼ è¾å¯¹è±¡å° æ°æ®å¯¹è±¡ |
| | | * |
| | | * @param dto ä¸å¡ç±»åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @param creator å建人 |
| | | * @param now 彿¶æ¶é´ |
| | | */ |
| | | public BtmType copyBtmTypeDTO2Entity(BtmTypeDTO dto, String creator, Date now){ |
| | | BtmType entity = Objects.requireNonNull(BeanUtil.copy(dto, BtmType.class)); |
| | | entity.setLastModifier(creator); |
| | | entity.setTs(now); |
| | | // å¨è¿è¿è¡éç¨å段å¤ç |
| | | return entity; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.entity.FieldRange; |
| | | import com.vci.ubcs.omd.vo.FieldRangeVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Description: åæ®µèå´çå
è£
ç±» |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/4/3 |
| | | */ |
| | | public class FiledRangeWrapper extends BaseEntityWrapper<FieldRange, FieldRangeVO> { |
| | | |
| | | public static FiledRangeWrapper build() { |
| | | return new FiledRangeWrapper(); |
| | | } |
| | | |
| | | /** |
| | | * do2vo |
| | | * @param entity pojo |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public FieldRangeVO entityVO(FieldRange entity) { |
| | | FieldRangeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, FieldRangeVO.class)); |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * æ¹é转vo |
| | | * @param list pojoéå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public List<FieldRangeVO> listEntityVO(List<FieldRange> list) { |
| | | return list.stream().map(this::entityVO).collect(Collectors.toList()); |
| | | } |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/OmdAttributeMapper.xml ÐÞ¸Ä |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.omd.mapper.OmdAttributeMapper"> |
| | | <mapper namespace="com.vci.ubcs.omd.mapper.AttributeMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="baseResultMap" type="com.vci.ubcs.omd.entity.OmdAttribute"> |
| | | <resultMap id="baseResultMap" type="com.vci.ubcs.omd.entity.Attribute"> |
| | | <id column="id" property="id"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | |
| | | <result column="ts" property="ts" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="extraResultMap" type="com.vci.ubcs.omd.entity.OmdAttribute"> |
| | | <resultMap id="extraResultMap" type="com.vci.ubcs.omd.entity.Attribute"> |
| | | <result column="nullable" property="nullable" jdbcType="VARCHAR"/> |
| | | <result column="max_length" property="maxLength" jdbcType="NUMERIC"/> |
| | | <result column="precision" property="precision" jdbcType="NUMERIC"/> |