c74e742b6f
Build and Push Images / build-and-push (push) Has been cancelled
수입검사 요청 (incoming-request): - 필터 12종 (품의서/발주서/프로젝트/품번/품명/공급업체/입고결과/제품구분/ 검사여부/요청현황/요청자/요청일범위) - 그리드 12컬럼 (proposal_no, purchase_order_no, project_no, product_name, part_no, part_name, partner_name, delivery_status, request_date, request_user_name, inspection_yn, request_status) - 백엔드: purchase_order_master + incoming_inspection_detail LEFT JOIN + sales_request_master + contract_mgmt + part_mng + user_info 수입검사 진행 (incoming-mgmt): - 필터 11종 (수입요청과 유사 + 검사일범위 + 검사현황) - 그리드 19컬럼 (검사일/검사자/품의서/발주서/프로젝트/제품구분/품명모델/ 부품품번/부품명/공급업체/입고일/입고수량/입고결과/검사수량/불량수량/ 불량률/검사현황/검사성적서) - SUM(defect_qty) 서브쿼리로 불량률 자동 계산 - 하단 요약: 총 입고수량/검사수량/불량수량 공정검사 관리 (process-inspection): - 필터 10종 (프로젝트/제품구분/품번/품명/작업환경/측정기/검사일범위/ 검사자/검사결과/진행공정) - 그리드 9컬럼 (검사일/검사자/프로젝트/제품구분/품번/품명/검사수량합계/ 검사결과/첨부파일) - master/detail 집계 + EXISTS 필터로 wace 1:1 반제품검사 관리 (semi-product-inspection): - 필터 8종 (모델명/작업지시번호/부품품번/부품명/검사일범위/검사자/ 불량유형/귀책부서) - 그리드 14컬럼 (검사일/검사자/제품구분/모델명/작업지시번호/부품품번/ 부품명/입고수량/양품수량/불량수량/불량률/재생수량/최종양품수량) - data_type='GOOD' 마스터 + 동일 inspection_group_id 의 'DEFECT' SUM - 재생수량(disposition_type='수정완료') + 최종양품수량 자동 산정 - 하단 요약: 5개 합계 카드 frontend/lib/api/quality.ts 타입 1:1 정합, 모든 필터 파라미터 직렬화.
100 lines
3.0 KiB
TypeScript
100 lines
3.0 KiB
TypeScript
/**
|
|
* 품질관리 API 클라이언트 — wace_plm quality.xml 1:1.
|
|
* 백엔드: backend-node/src/routes/qualityRoutes.ts
|
|
*/
|
|
import { apiClient } from "./client";
|
|
|
|
export interface IncomingRequestRow {
|
|
objid: string;
|
|
proposal_no?: string;
|
|
purchase_order_no?: string;
|
|
project_no?: string;
|
|
product_name?: string;
|
|
part_no?: string;
|
|
part_name?: string;
|
|
partner_name?: string;
|
|
delivery_status?: string;
|
|
request_date?: string;
|
|
request_user_name?: string;
|
|
inspection_yn?: string;
|
|
request_status?: string;
|
|
}
|
|
|
|
export interface IncomingMgmtRow {
|
|
objid: string;
|
|
inspection_date?: string;
|
|
inspector_name?: string;
|
|
proposal_no?: string;
|
|
purchase_order_no?: string;
|
|
project_no?: string;
|
|
product_name?: string;
|
|
model_name?: string;
|
|
part_no?: string;
|
|
part_name?: string;
|
|
partner_name?: string;
|
|
delivery_date?: string;
|
|
delivery_qty?: number;
|
|
delivery_status?: string;
|
|
inspection_qty?: number;
|
|
defect_qty_sum?: number;
|
|
defect_rate?: number;
|
|
inspection_result?: string;
|
|
inspection_file_cnt?: number;
|
|
}
|
|
|
|
export interface ProcessInspectionRow {
|
|
objid: string;
|
|
inspection_date?: string;
|
|
inspector_name?: string;
|
|
project_no?: string;
|
|
product_name?: string;
|
|
part_no?: string;
|
|
part_name?: string;
|
|
inspection_qty?: number;
|
|
defect_qty?: number;
|
|
work_env_status?: string;
|
|
measuring_device?: string;
|
|
inspection_result?: string;
|
|
process_inspection_file_cnt?: number;
|
|
}
|
|
|
|
export interface SemiProductInspectionRow {
|
|
objid: string;
|
|
inspection_date?: string;
|
|
writer_name?: string;
|
|
product_type?: string;
|
|
model_name?: string;
|
|
work_order_no?: string;
|
|
part_no?: string;
|
|
part_name?: string;
|
|
receipt_qty?: number;
|
|
good_qty?: number;
|
|
defective_qty?: number;
|
|
defect_rate?: number;
|
|
regeneration_qty?: number;
|
|
final_good_qty?: number;
|
|
}
|
|
|
|
interface ListResp<T> {
|
|
success: boolean;
|
|
list: T[];
|
|
pagination: { page: number; pageSize: number; total: number; totalPages: number };
|
|
}
|
|
|
|
const buildParams = (obj: Record<string, string | undefined>): Record<string, string> => {
|
|
const p: Record<string, string> = {};
|
|
Object.entries(obj).forEach(([k, v]) => { if (v) p[k] = v; });
|
|
return p;
|
|
};
|
|
|
|
export const qualityApi = {
|
|
incomingRequest: async (params: Record<string, string | undefined> = {}): Promise<ListResp<IncomingRequestRow>> =>
|
|
(await apiClient.get("/quality/incoming-request", { params: buildParams(params) })).data,
|
|
incomingMgmt: async (params: Record<string, string | undefined> = {}): Promise<ListResp<IncomingMgmtRow>> =>
|
|
(await apiClient.get("/quality/incoming-mgmt", { params: buildParams(params) })).data,
|
|
processInspection: async (params: Record<string, string | undefined> = {}): Promise<ListResp<ProcessInspectionRow>> =>
|
|
(await apiClient.get("/quality/process-inspection", { params: buildParams(params) })).data,
|
|
semiProductInspection: async (params: Record<string, string | undefined> = {}): Promise<ListResp<SemiProductInspectionRow>> =>
|
|
(await apiClient.get("/quality/semi-product-inspection", { params: buildParams(params) })).data,
|
|
};
|