IntellectualProperty.java 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. package com.izouma.zhirongip.domain.resource;
  2. import cn.hutool.core.bean.BeanUtil;
  3. import com.izouma.zhirongip.annotations.Searchable;
  4. import com.izouma.zhirongip.annotations.SearchableOne;
  5. import com.izouma.zhirongip.converter.StringArrayConverter;
  6. import com.izouma.zhirongip.domain.BaseEntity;
  7. import com.izouma.zhirongip.domain.Setting;
  8. import com.izouma.zhirongip.dto.IntellectualPropertyDTO;
  9. import io.swagger.annotations.ApiModel;
  10. import io.swagger.annotations.ApiModelProperty;
  11. import lombok.AllArgsConstructor;
  12. import lombok.Builder;
  13. import lombok.Data;
  14. import lombok.NoArgsConstructor;
  15. import org.hibernate.annotations.NotFound;
  16. import org.hibernate.annotations.NotFoundAction;
  17. import org.hibernate.annotations.Where;
  18. import javax.persistence.*;
  19. import java.time.LocalDate;
  20. import java.util.List;
  21. @Data
  22. @AllArgsConstructor
  23. @NoArgsConstructor
  24. @Builder
  25. @Entity
  26. @ApiModel(value = "知产")
  27. @Where(clause = "del = 0")
  28. public class IntellectualProperty extends BaseEntity {
  29. // @ApiModelProperty(value = "发明名称")
  30. // private String proName;
  31. @ApiModelProperty(value = "专利代理机构")
  32. private String agency;
  33. @ApiModelProperty(value = "代理人")
  34. private String agent;
  35. @ApiModelProperty(value = "申请主体")
  36. private String applyMain;
  37. @ApiModelProperty(value = "申请人")
  38. private String applyName;
  39. @ApiModelProperty(value = "申请日")
  40. private LocalDate applyTime;
  41. @ApiModelProperty(value = "授权公告日")
  42. private LocalDate authTime;
  43. @ApiModelProperty(value = "公开号")
  44. private String openCode;
  45. @SearchableOne
  46. @ApiModelProperty(value = "申请号")
  47. private String code;
  48. @ApiModelProperty(value = "摘要")
  49. @Column(columnDefinition = "TEXT")
  50. private String digest;
  51. @ApiModelProperty(value = "发布时间")
  52. private LocalDate issue;
  53. @ApiModelProperty(value = "发明人")
  54. @Convert(converter = StringArrayConverter.class)
  55. private List<String> inventor;
  56. @ApiModelProperty(value = "IPC分类")
  57. @Convert(converter = StringArrayConverter.class)
  58. private List<String> ipc;
  59. @SearchableOne
  60. @Searchable
  61. @ApiModelProperty(value = "专利权人")
  62. private String owner;
  63. @ApiModelProperty(value = "专利权人地址")
  64. private String ownerOneAddr;
  65. // @ApiModelProperty(value = "专业领域")
  66. // private String profession;
  67. @ApiModelProperty(value = "技术分类1")
  68. private String techOne;
  69. private String wordUrl;
  70. private String pdfUrl;
  71. @SearchableOne
  72. @Searchable
  73. @ApiModelProperty(value = "专利名称")
  74. private String name;
  75. /**
  76. * setting
  77. */
  78. @ApiModelProperty(value = "行业分类")
  79. private Long industryClass;
  80. // @EnumFormat(value = IntePropLawStatus.class,
  81. // fromExcel = {"有效", "失效", "未知"},
  82. // toJavaEnum = {"EFFECTIVE", "FAILURE", "UNKNOWN"})
  83. // @ExcelProperty(value = "法律状态", converter = EnumExcelConverter.class)
  84. // @Enumerated(EnumType.STRING)
  85. @Transient
  86. @ApiModelProperty(value = "法律状态")
  87. private String lawStatus;
  88. private Long lawStatusId;
  89. /**
  90. * 专利区分:包括脱密国防专利,军转民专利
  91. */
  92. // @EnumFormat(value = IntePropertyType.class,
  93. // fromExcel = {"脱密国防专利", "军转民专利"},
  94. // toJavaEnum = {"DECLASSIFICATION", "MILITARY_TO_CIVILIAN"})
  95. // @ExcelProperty(value = "专利区分", converter = EnumExcelConverter.class)
  96. // @Enumerated(EnumType.STRING)
  97. @Transient
  98. private String type;
  99. private Long typeId;
  100. private String img;
  101. @Searchable
  102. @Column(columnDefinition = "TEXT")
  103. @ApiModelProperty(value = "权利要求书")
  104. private String manual;
  105. @ManyToOne(fetch = FetchType.LAZY)
  106. @JoinColumn(name = "industryClass", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
  107. @NotFound(action = NotFoundAction.IGNORE)
  108. private Setting setting;
  109. public IntellectualProperty(IntellectualPropertyDTO dto) {
  110. BeanUtil.copyProperties(dto, this);
  111. }
  112. }