xia
3 years ago
7 changed files with 204 additions and 3 deletions
-
29archives/src/main/java/com/storeroom/modules/archives/controller/ArchivesController.java
-
124archives/src/main/java/com/storeroom/modules/archives/domain/ArchivesSummary.java
-
13archives/src/main/java/com/storeroom/modules/archives/repository/ArchivesSummaryRepository.java
-
5archives/src/main/java/com/storeroom/modules/archives/service/ArchivesService.java
-
30archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesServiceImpl.java
-
2archives/src/main/java/com/storeroom/modules/dictionary/domain/Field.java
-
4archives/src/main/java/com/storeroom/modules/dictionary/repository/FieldRepository.java
@ -0,0 +1,29 @@ |
|||||
|
package com.storeroom.modules.archives.controller; |
||||
|
|
||||
|
import com.storeroom.modules.archives.service.ArchivesService; |
||||
|
import com.storeroom.utils.ApiResponse; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.data.domain.Pageable; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@RestController |
||||
|
@RequiredArgsConstructor |
||||
|
@Api(tags = "档案管理") |
||||
|
@RequestMapping("/api/archives") |
||||
|
public class ArchivesController { |
||||
|
|
||||
|
private final ArchivesService archivesService; |
||||
|
|
||||
|
@ApiOperation("测试档案") |
||||
|
@GetMapping("/test") |
||||
|
public ApiResponse<Object> test( |
||||
|
){ |
||||
|
archivesService.test(); |
||||
|
return ApiResponse.success(null); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,124 @@ |
|||||
|
package com.storeroom.modules.archives.domain; |
||||
|
|
||||
|
import com.storeroom.base.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Id; |
||||
|
import javax.persistence.Table; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Entity |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@Table(name = "archives_summary") |
||||
|
public class ArchivesSummary extends BaseEntity implements Serializable { |
||||
|
|
||||
|
@Id |
||||
|
@Column(name = "archives_id") |
||||
|
private String archivesId; |
||||
|
|
||||
|
@Column(name = "archive_no") |
||||
|
@ApiModelProperty(value = "档号") |
||||
|
private String archiveNo; |
||||
|
|
||||
|
@Column(name = "archive_ctg_no") |
||||
|
@ApiModelProperty(value = "分类号") |
||||
|
private String archiveCtgNo; |
||||
|
|
||||
|
@Column(name = "fonds_no") |
||||
|
@ApiModelProperty(value = "全宗号") |
||||
|
private String fondsNo; |
||||
|
|
||||
|
@Column(name = "item_no") |
||||
|
@ApiModelProperty(value = "项目号") |
||||
|
private String itemNo; |
||||
|
|
||||
|
@Column(name = "record_no") |
||||
|
@ApiModelProperty(value = "案卷号") |
||||
|
private String recordNo; |
||||
|
|
||||
|
@Column(name = "maintitle") |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String maintitle; |
||||
|
|
||||
|
@Column(name = "security_class") |
||||
|
@ApiModelProperty(value = "密级") |
||||
|
private String securityClass; |
||||
|
|
||||
|
@Column(name = "retention") |
||||
|
@ApiModelProperty(value = "保管期限") |
||||
|
private String retention; |
||||
|
|
||||
|
@Column(name = "archive_year") |
||||
|
@ApiModelProperty(value = "归档年度") |
||||
|
private Integer archiveYear; |
||||
|
|
||||
|
@Column(name = "responsibleby") |
||||
|
@ApiModelProperty(value = "责任人") |
||||
|
private String responsibleby; |
||||
|
|
||||
|
@Column(name = "department") |
||||
|
@ApiModelProperty(value = "部门名称") |
||||
|
private String department; |
||||
|
|
||||
|
@Column(name = "filing_person") |
||||
|
@ApiModelProperty(value = "立卷人") |
||||
|
private String filingPerson; |
||||
|
|
||||
|
@Column(name = "filing_date") |
||||
|
@ApiModelProperty(value = "立卷日期") |
||||
|
private String filingDate; |
||||
|
|
||||
|
@Column(name = "archive_person") |
||||
|
@ApiModelProperty(value = "归档人") |
||||
|
private String archivePerson; |
||||
|
|
||||
|
@Column(name = "archive_date") |
||||
|
@ApiModelProperty(value = "归档日期") |
||||
|
private String archiveDate; |
||||
|
|
||||
|
@Column(name = "category_id") |
||||
|
@ApiModelProperty(value = "门类id") |
||||
|
private String categoryId; |
||||
|
|
||||
|
@Column(name = "category_name") |
||||
|
@ApiModelProperty(value = "门类名称") |
||||
|
private String categoryName; |
||||
|
|
||||
|
@Column(name = "category_type") |
||||
|
@ApiModelProperty(value = "门类级别") |
||||
|
private Integer categoryType; |
||||
|
|
||||
|
@Column(name = "archives_table_name") |
||||
|
@ApiModelProperty(value = "档案表名") |
||||
|
private String archivesTableName; |
||||
|
|
||||
|
@Column(name = "case_no") |
||||
|
@ApiModelProperty(value = "档案盒id") |
||||
|
private String caseNo; |
||||
|
|
||||
|
@Column(name = "case_name") |
||||
|
@ApiModelProperty(value = "档案盒名称") |
||||
|
private String caseName; |
||||
|
|
||||
|
@Column(name = "folder_location") |
||||
|
@ApiModelProperty(value = "存放位置") |
||||
|
private String folderLocation; |
||||
|
|
||||
|
@Column(name = "folder_location_details") |
||||
|
@ApiModelProperty(value = "存放具体位置") |
||||
|
private String folderLocationDetails; |
||||
|
|
||||
|
@Column(name = "tag_no") |
||||
|
@ApiModelProperty(value = "标签号") |
||||
|
private String tagNo; |
||||
|
|
||||
|
@Column(name = "child") |
||||
|
@ApiModelProperty(value = "子条目数") |
||||
|
private Integer child; |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.storeroom.modules.archives.repository; |
||||
|
|
||||
|
import com.storeroom.modules.archives.domain.ArchivesSummary; |
||||
|
import org.springframework.data.jpa.repository.JpaRepository; |
||||
|
import org.springframework.data.jpa.repository.Query; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
public interface ArchivesSummaryRepository extends JpaRepository<ArchivesSummary, String>{ |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
package com.storeroom.modules.archives.service; |
||||
|
|
||||
|
public interface ArchivesService { |
||||
|
String test(); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.storeroom.modules.archives.service.impl; |
||||
|
|
||||
|
import com.storeroom.modules.archives.repository.ArchivesSummaryRepository; |
||||
|
import com.storeroom.modules.archives.service.ArchivesService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.persistence.EntityManager; |
||||
|
import javax.persistence.PersistenceContext; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class ArchivesServiceImpl implements ArchivesService { |
||||
|
|
||||
|
private final ArchivesSummaryRepository archivesSummaryRepository; |
||||
|
|
||||
|
@PersistenceContext |
||||
|
EntityManager entityManager; |
||||
|
|
||||
|
@Override |
||||
|
public String test() { |
||||
|
|
||||
|
String testQuery = "dic_name,dic_code"; |
||||
|
String testTable = "archives_dictionary_config"; |
||||
|
List<Object[]> list = entityManager.createNativeQuery("select "+testQuery+" from "+testTable).getResultList(); |
||||
|
return null; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue