Commit 0cba4713 authored by wangqiang's avatar wangqiang

增加标准与文档的link关系功能代码

parent 79e7da49
package com.yonde.dcs.plan.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.basedata.entity.annotation.DexTypeVersionProp;
import com.yonde.dex.basedata.entity.annotation.VersionProperty;
import com.yonde.dex.basedata.entity.data.VersionRelationType;
import com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* @description: ExtStandardAndDocLink-VO
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:28
**/
@JsonTypeInfo( use = JsonTypeInfo.Id.CLASS, property = "dxClassname", visible = true, defaultImpl = ExtStandardAndDocLinkVO.class)
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
@DexTypeVersionProp(propName = "source", join = @VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.ITERATION))
@DexTypeVersionProp(propName = "target", join = @VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.VERSION))
public class ExtStandardAndDocLinkVO extends IdOnlyVO implements IdVO ,DxLinkDataVOHolder<DxDocumentVO, ExtStandardVO>{
public static final String DX_ID_EMBEDDABLE_PROP_NAME = "dxIdEmbeddable";
public static final String DX_LINK_DATA_EMBEDDABLE_PROP_NAME = "dxLinkDataEmbeddable";
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, ExtStandardVO> dxLinkDataEmbeddable;
}
package com.yonde.dcs.plan.core.controller;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dcs.plan.core.controller.shadow.ExtStandardAndDocLinkControllerShadow;
import com.yonde.dcs.plan.core.service.ExtStandardAndDocLinkService;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @description: ExtStandardAndDocLink-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
@Api(tags = "ExtStandardAndDocLink管理服务")
@RequestMapping("/ExtStandardAndDocLink")
@ResponseBody()
@Controller(ExtStandardAndDocLinkController.BEAN_NAME)
public class ExtStandardAndDocLinkController<V extends ExtStandardAndDocLinkVO, S extends ExtStandardAndDocLinkService<V>> extends ExtStandardAndDocLinkControllerShadow<V, S> {
}
package com.yonde.dcs.plan.core.controller.shadow;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dcs.plan.core.service.ExtStandardAndDocLinkService;
import com.yonde.dcs.plan.core.service.impl.ExtStandardAndDocLinkServiceImpl;
import com.yonde.dex.baseweb.AbstractBaseController;
import com.yonde.dex.linkdata.plugin.core.controller.DxLinkDataController;
import javax.annotation.Resource;
/**
* @description: ExtStandardAndDocLink-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
public class ExtStandardAndDocLinkControllerShadow<V extends ExtStandardAndDocLinkVO, S extends ExtStandardAndDocLinkService<V>> implements AbstractBaseController<V, S> ,DxLinkDataController<V, S>{
public static final String BEAN_NAME = "extStandardAndDocLinkController";
/**
* 注入
*/
@Resource(name = ExtStandardAndDocLinkServiceImpl.BEAN_NAME)
private ExtStandardAndDocLinkService<V> extStandardAndDocLinkService;
/**
* getService
*/
@Override
public S getService() {
return (S)this.extStandardAndDocLinkService;
}
}
package com.yonde.dcs.plan.core.repository;
import com.yonde.dcs.plan.core.repository.shadow.ExtStandardAndDocLinkRepositoryShadow;
import com.yonde.dcs.plan.entity.po.ExtStandardAndDocLink;
/**
* @description: ExtStandardAndDocLink-repository
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
public interface ExtStandardAndDocLinkRepository<P extends ExtStandardAndDocLink> extends ExtStandardAndDocLinkRepositoryShadow<P> {
}
package com.yonde.dcs.plan.core.repository.shadow;
import com.yonde.dcs.plan.entity.po.ExtStandardAndDocLink;
import com.yonde.dex.dao.business.repository.BaseRepository;
import com.yonde.dex.linkdata.plugin.core.repository.DxLinkDataRepository;
import org.springframework.data.repository.NoRepositoryBean;
/**
* @description: ExtStandardAndDocLink-repository
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
@NoRepositoryBean
public interface ExtStandardAndDocLinkRepositoryShadow<P extends ExtStandardAndDocLink> extends BaseRepository<P> ,DxLinkDataRepository<P> {
String BEAN_NAME = "extStandardAndDocLinkRepository";
}
package com.yonde.dcs.plan.core.service;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dcs.plan.core.service.shadow.ExtStandardAndDocLinkServiceShadow;
/**
* @description: ExtStandardAndDocLink-service
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
public interface ExtStandardAndDocLinkService<V extends ExtStandardAndDocLinkVO> extends ExtStandardAndDocLinkServiceShadow<V> {
}
package com.yonde.dcs.plan.core.service.impl;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dcs.plan.core.repository.ExtStandardAndDocLinkRepository;
import com.yonde.dcs.plan.core.service.ExtStandardAndDocLinkService;
import com.yonde.dcs.plan.entity.po.ExtStandardAndDocLink;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @description: ExtStandardAndDocLink-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
@Slf4j
@Service(ExtStandardAndDocLinkServiceImpl.BEAN_NAME)
public class ExtStandardAndDocLinkServiceImpl<V extends ExtStandardAndDocLinkVO> implements ExtStandardAndDocLinkService<V>{
public static final String BEAN_NAME = "extStandardAndDocLinkServiceImpl";
@Autowired
ExtStandardAndDocLinkRepository<ExtStandardAndDocLink> extStandardAndDocLinkRepository;
}
package com.yonde.dcs.plan.core.service.shadow;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dcs.plan.feign.ExtStandardAndDocLinkServiceFeign;
import com.yonde.dex.dao.service.BaseIdEntityService;
import com.yonde.dex.linkdata.plugin.core.service.DxLinkDataService;
/**
* @description: ExtStandardAndDocLink-service
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:28
**/
public interface ExtStandardAndDocLinkServiceShadow<V extends ExtStandardAndDocLinkVO> extends ExtStandardAndDocLinkServiceFeign<V>, BaseIdEntityService<V> ,DxLinkDataService<V> {
}
package com.yonde.dcs.plan.entity.po;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable;
import com.yonde.dex.dao.entity.base.IdEntity;
import com.yonde.dex.dao.entity.base.IdOnlyEntity;
import com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable;
import com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @description: ExtStandardAndDocLink-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:28
**/
@Entity
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Data
@Table(name = "EXT_STANDARD_AND_DOC_LINK")
public class ExtStandardAndDocLink extends IdOnlyEntity implements IdEntity ,DxLinkDataHolder{
/**
* dao扩展对象
*/
@DexEmbedded()
@Embedded()
private DxIdEntityEmbeddable dxIdEmbeddable;
/**
* 扩展PO属性
*/
@DexEmbedded()
@Embedded()
private DxLinkDataEmbeddable dxLinkDataEmbeddable;
}
package com.yonde.dcs.plan.feign;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dcs.plan.feign.shadow.ExtStandardAndDocLinkServiceFeignShadow;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
/**
* @description: ExtStandardAndDocLink-Feign
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
@Api(tags = "ExtStandardAndDocLink-FEIGN")
@FeignClient(value = "${dcs.feign.INET-PLAN}", path = "/ExtStandardAndDocLink")
public interface ExtStandardAndDocLinkServiceFeign<V extends ExtStandardAndDocLinkVO> extends ExtStandardAndDocLinkServiceFeignShadow<V> {
}
package com.yonde.dcs.plan.feign.shadow;
import com.yonde.dcs.plan.common.vo.ExtStandardAndDocLinkVO;
import com.yonde.dex.dao.service.remotes.BaseFeign;
import com.yonde.dex.linkdata.plugin.feign.DxLinkDataFeign;
/**
* @description: ExtStandardAndDocLink-Feign
* @author: dexadmin
* @version: V
* @date: 2024-10-30 11:42:29
**/
public interface ExtStandardAndDocLinkServiceFeignShadow<V extends ExtStandardAndDocLinkVO> extends BaseFeign<V> ,DxLinkDataFeign<V> {
String BEAN_NAME = "extStandardAndDocLinkServiceFeign";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment