페이지 화면 수정 및 dockerfile 수정
This commit is contained in:
@@ -1,40 +1,96 @@
|
||||
/**
|
||||
* Gene API (임시 Mock)
|
||||
* TODO: 백엔드 구현 후 실제 API로 교체
|
||||
* Gene API
|
||||
* 유전자(SNP) 분석 결과 조회 API
|
||||
*/
|
||||
|
||||
import apiClient from "../api-client";
|
||||
|
||||
export interface MarkerModel {
|
||||
markerNm: string;
|
||||
markerTypeCd: string; // 'QTY' | 'QLT'
|
||||
markerDesc?: string;
|
||||
relatedTrait?: string;
|
||||
favorableAllele?: string;
|
||||
/**
|
||||
* 유전자 상세 정보 타입
|
||||
*/
|
||||
export interface GeneDetail {
|
||||
pkGeneDetailNo: number;
|
||||
fkRequestNo: number | null;
|
||||
cowId: string | null;
|
||||
snpName: string | null;
|
||||
chromosome: string | null;
|
||||
position: string | null;
|
||||
snpType: string | null;
|
||||
allele1: string | null;
|
||||
allele2: string | null;
|
||||
remarks: string | null;
|
||||
regDt?: string;
|
||||
updtDt?: string;
|
||||
genomeRequest?: {
|
||||
pkRequestNo: number;
|
||||
requestDt: string | null;
|
||||
chipReportDt: string | null;
|
||||
chipSireName: string | null;
|
||||
chipDamName: string | null;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 유전자 요약 정보 타입
|
||||
*/
|
||||
export interface GeneSummary {
|
||||
total: number;
|
||||
homozygousCount: number;
|
||||
heterozygousCount: number;
|
||||
}
|
||||
|
||||
export const geneApi = {
|
||||
/**
|
||||
* 전체 마커 목록 조회 (임시 빈 배열 반환)
|
||||
* 개체식별번호로 유전자 상세 정보 조회
|
||||
* GET /gene/:cowId
|
||||
*/
|
||||
getAllMarkers: async (): Promise<MarkerModel[]> => {
|
||||
// TODO: 백엔드 구현 후 실제 API 연동
|
||||
return [];
|
||||
findByCowId: async (cowId: string): Promise<GeneDetail[]> => {
|
||||
const response = await apiClient.get<GeneDetail[]>(`/gene/${cowId}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 타입별 마커 목록 조회 (임시 빈 배열 반환)
|
||||
* 개체별 유전자 요약 정보 조회
|
||||
* GET /gene/summary/:cowId
|
||||
*/
|
||||
getGenesByType: async (_typeCd: string): Promise<MarkerModel[]> => {
|
||||
// TODO: 백엔드 구현 후 실제 API 연동
|
||||
return [];
|
||||
getGeneSummary: async (cowId: string): Promise<GeneSummary> => {
|
||||
const response = await apiClient.get<GeneSummary>(`/gene/summary/${cowId}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 개체별 유전자(SNP) 데이터 조회 (임시 빈 배열 반환)
|
||||
* 의뢰번호로 유전자 상세 정보 조회
|
||||
* GET /gene/request/:requestNo
|
||||
*/
|
||||
findByCowNo: async (_cowNo: string | number): Promise<any[]> => {
|
||||
// TODO: 백엔드 구현 후 실제 API 연동
|
||||
return [];
|
||||
findByRequestNo: async (requestNo: number): Promise<GeneDetail[]> => {
|
||||
const response = await apiClient.get<GeneDetail[]>(`/gene/request/${requestNo}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 유전자 상세 정보 단건 조회
|
||||
* GET /gene/detail/:geneDetailNo
|
||||
*/
|
||||
findOne: async (geneDetailNo: number): Promise<GeneDetail> => {
|
||||
const response = await apiClient.get<GeneDetail>(`/gene/detail/${geneDetailNo}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 유전자 상세 정보 생성
|
||||
* POST /gene
|
||||
*/
|
||||
create: async (data: Partial<GeneDetail>): Promise<GeneDetail> => {
|
||||
const response = await apiClient.post<GeneDetail>('/gene', data);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 유전자 상세 정보 일괄 생성
|
||||
* POST /gene/bulk
|
||||
*/
|
||||
createBulk: async (dataList: Partial<GeneDetail>[]): Promise<GeneDetail[]> => {
|
||||
const response = await apiClient.post<GeneDetail[]>('/gene/bulk', dataList);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -13,6 +13,7 @@ export { authApi } from './auth.api'; // 인증 API
|
||||
export { cowApi } from './cow.api';
|
||||
export { dashboardApi } from './dashboard.api';
|
||||
export { farmApi } from './farm.api';
|
||||
export { geneApi, type GeneDetail, type GeneSummary } from './gene.api';
|
||||
export { genomeApi, type ComparisonAveragesDto, type CategoryAverageDto, type FarmTraitComparisonDto, type TraitComparisonAveragesDto, type TraitAverageDto } from './genome.api';
|
||||
export { reproApi } from './repro.api';
|
||||
export { breedApi } from './breed.api';
|
||||
|
||||
Reference in New Issue
Block a user