From 241222dcd12612a89cd276fa40ae8a9f68ffaac7 Mon Sep 17 00:00:00 2001 From: 100JM Date: Wed, 16 Sep 2026 14:52:38 +0900 Subject: [PATCH] =?UTF-8?q?[il]=20-=20=EC=97=B0=EA=B3=84=20db=20=ED=91=9C?= =?UTF-8?q?=EC=A4=80=ED=99=94=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=EC=86=8C?= =?UTF-8?q?=EC=8A=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/entities/link/model/link-interface.ts | 126 +++++++++--------- .../cs/src/pages/link/model/table-columns.tsx | 28 ++-- .../cs/src/pages/link/ui/LinkExpiredAlert.tsx | 10 +- apps/cs/src/pages/link/ui/link-form.tsx | 42 +++--- apps/cs/src/pages/link/ui/link-page.tsx | 4 +- apps/cs/src/pages/link/ui/modify-page.tsx | 10 +- apps/cs/src/pages/link/ui/regist-page.tsx | 22 +-- .../src/pages/linkLog/model/table-columns.tsx | 19 ++- .../cs/src/pages/linkLog/ui/link-log-page.tsx | 24 ++++ .../pages/linkParams/model/table-columns.tsx | 10 +- .../linkParams/model/vrbl-table-columns.tsx | 19 ++- .../linkParams/ui/link-params-dialog.tsx | 54 +++++--- .../pages/linkParams/ui/link-params-page.tsx | 16 +-- .../pages/linkStats/ui/link-stats-page.tsx | 6 +- .../pages/linkTable/ui/link-table-dialog.tsx | 26 ++-- .../pages/linkTable/ui/link-table-page.tsx | 44 +++--- 16 files changed, 257 insertions(+), 203 deletions(-) diff --git a/apps/cs/src/entities/link/model/link-interface.ts b/apps/cs/src/entities/link/model/link-interface.ts index 67cd75807..7640e3b8f 100644 --- a/apps/cs/src/entities/link/model/link-interface.ts +++ b/apps/cs/src/entities/link/model/link-interface.ts @@ -1,61 +1,62 @@ -import { z } from "zod"; +import { z } from "zod"; import type { PageableParams, PageableList } from "@/shared/model"; export interface Link { - link_sn: string; + intg_link_sn: string; link_nm: string; link_clsf_cd: string; - link_url: string; - link_srvr_ip: string; - link_db_cd: string; - link_key: string; - link_id: string; - link_pswd: string; - link_cycle_stng: string; - srvc_usg: string; - last_link_rslt_cd: string; + link_url_addr: string; + link_srvr_ip_addr: string; + link_db_nm: string; + link_api_no: string; + link_cntn_nm: string; + link_cntn_tkn_no: string; + link_cycle_stng_nm: string; + srvc_usg_nm: string; + last_link_rslt_nm: string; last_link_excn_dt: string; next_link_excn_dt: string; - last_link_err_cd: string; + last_link_err_nm: string; mdfcn_dt: string; - mdfr_id_id: string; - link_cycle_mi: string; - link_key_expry_ymd: string; + mdfr_uuid: string; + link_cycle_no: string; + link_expry_ymd: string; } export interface LinkLog { rownum: number; - link_sn: string; + intg_link_sn: string; link_nm: string; - link_rslt_cd: string; + link_rslt_nm: string; err_cn: string; - link_err_cd: string; + link_err_nm: string; log_crt_dt: string; + link_exec_step: string; } export interface LinkInfo extends LinkFormData { - link_sn: string; + intg_link_sn: string; link_nm: string; link_clsf_cd: string; - link_url: string; - link_srvr_ip: string; - link_db_cd: string; - link_key: string; - link_id: string; - link_pswd: string; - srvc_usg: string; - last_link_rslt_cd: string; + link_url_addr: string; + link_srvr_ip_addr: string; + link_db_nm: string; + link_api_no: string; + link_cntn_nm: string; + link_cntn_tkn_no: string; + srvc_usg_nm: string; + last_link_rslt_nm: string; last_link_excn_dt: string; next_link_excn_dt: string; - last_link_err_cd: string; + last_link_err_nm: string; mdfcn_dt: string; - mdfr_id: string; - link_cycle_mi: number; - link_key_expry_ymd: string; + mdfr_uuid: string; + link_cycle_no: number; + link_expry_ymd: string; } export interface LinkStats { - link_sn: string; + intg_link_sn: string; link_nm: string; count: number; } @@ -63,16 +64,16 @@ export interface LinkStats { export interface LinkVrbl { link_vrbl_sn: string; link_vrbl_nm: string; - link_vrbl_vl: string; - link_vrbl_cd: string; + link_vrbl_vl_cn: string; + link_vrbl_cd_nm: string; link_vrbl_expln: string; mdfcn_dt: string; - mdfr_id: string; + mdfr_uuid: string; } export interface LinkTable { link_nm: string; - link_sn: string; + intg_link_sn: string; tbl_sn: string; sou_tbl_nm: string; sou_tbl_korn_nm: string; @@ -87,16 +88,16 @@ export interface LinkTableColumns { col_sn: string; sou_col_nm: string; sou_col_korn_nm: string; - sou_col_data_frm: string; + sou_col_frm_nm: string; sou_col_sz: number; trsf_col_nm: string; trsf_col_korn_nm: string; - trsf_col_data_frm: string; + trsf_col_frm_nm: string; trsf_col_sz: number pk_yn: string; col_seq: number; mdfcn_dt: string; - mdfr_id: string; + mdfr_uuid: string; } export const linkFormSchema = z.object({ @@ -106,48 +107,48 @@ export const linkFormSchema = z.object({ }, { message: "연계 분류를 선택해주세요" }), - link_sn: z.string().max(50).nullable().optional(), + intg_link_sn: z.string().max(50).nullable().optional(), link_nm: z.string().max(40, { message: '연계명은 40자 이하로 입력해 주세요.' }).nonempty({ message: '연계명은 필수입니다.' }), - link_url: z.string().max(1000, { message: '연계 URL은 1000자 이하로 입력해 주세요.' }).nonempty({ message: '연계 URL은 필수입니다.' }), - link_srvr_ip: z.string().max(20).nullable().optional(), - link_db_cd: z.string().max(10).nullable().optional(), - link_key: z.string().max(100, { message: '연계 KEY는 100자 이하로 입력해 주세요.' }).nonempty({ message: '연계 KEY는 필수입니다.' }), - link_id: z.string().max(20).nullable().optional(), - link_pswd: z.string().max(128).nullable().optional(), - srvc_usg: z.string().max(40).nullable().optional(), - last_link_rslt_cd: z.string().max(4).nullable().optional(), + link_url_addr: z.string().max(1000, { message: '연계 URL은 1000자 이하로 입력해 주세요.' }).nonempty({ message: '연계 URL은 필수입니다.' }), + link_srvr_ip_addr: z.string().max(20).nullable().optional(), + link_db_nm: z.string().max(10).nullable().optional(), + link_api_no: z.string().max(100, { message: '연계 KEY는 100자 이하로 입력해 주세요.' }).nonempty({ message: '연계 KEY는 필수입니다.' }), + link_cntn_nm: z.string().max(20).nullable().optional(), + link_cntn_tkn_no: z.string().max(128).nullable().optional(), + srvc_usg_nm: z.string().max(40).nullable().optional(), + last_link_rslt_nm: z.string().max(4).nullable().optional(), last_link_excn_dt: z.string().max(40).nullable().optional(), next_link_excn_dt: z.string().max(40).nullable().optional(), - last_link_err_cd: z.string().max(50, { message: '마지막 연계 오류 코드는 50자 이하입니다.' }).nullable().optional(), + last_link_err_nm: z.string().max(50, { message: '마지막 연계 오류 코드는 50자 이하입니다.' }).nullable().optional(), mdfcn_dt: z.string().nullable().optional(), - mdfr_id: z.string().nullable().optional(), - link_cycle_mi: z.coerce.number().nullable().optional().refine((val) => { + mdfr_uuid: z.string().nullable().optional(), + link_cycle_no: z.coerce.number().nullable().optional().refine((val) => { if (val == null) return true; return val >= 5; }, { message: "연계 주기는 5분 이상이어야 합니다." }), - link_key_expry_ymd: z.string().nullable().optional(), + link_expry_ymd: z.string().nullable().optional(), }); export const linkVrblFormSchema = z.object({ - link_sn: z.string().max(50).nullable().optional(), + intg_link_sn: z.string().max(50).nullable().optional(), link_vrbl_sn: z.string().max(50).nullable().optional(), link_vrbl_nm: z.string().max(40, { message: '변수명은 40자 이하로 입력해 주세요.' }).nonempty({ message: '변수명은 필수입니다.' }), link_vrbl_expln: z.string().max(4000, { message: '설명은 400자 이하로 입력해 주세요.' }).nullable().optional(), - link_vrbl_cd: z.string().max(10, { message: '변수코드는 10자 이하로 입력해 주세요.' }).nullable().optional(), - link_vrbl_vl: z.string().max(1000, { message: '변수값은 1000자 이하로 입력해 주세요.' }).nonempty({ message: '변수값은 필수입니다.' }), + link_vrbl_cd_nm: z.string().max(10, { message: '변수코드는 10자 이하로 입력해 주세요.' }).nullable().optional(), + link_vrbl_vl_cn: z.string().max(1000, { message: '변수값은 1000자 이하로 입력해 주세요.' }).nonempty({ message: '변수값은 필수입니다.' }), mdfcn_dt: z.string().nullable().optional(), - mdfr_id: z.string().nullable().optional(), + mdfr_uuid: z.string().nullable().optional(), }); export const LinkTableColumnsSchema = z.object({ - link_sn: z.string().max(50).nullable().optional(), + intg_link_sn: z.string().max(50).nullable().optional(), tbl_sn: z.string().max(50).nullable().optional(), col_sn: z.string().max(50).nullable().optional(), sou_col_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nullable().optional(), sou_col_korn_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nullable().optional(), - sou_col_data_frm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nullable().optional(), + sou_col_frm_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nullable().optional(), sou_col_sz: z.coerce.number().nullable().optional().refine((val) => { if (val == null) return true; return val.toString().replace('.', '').length <= 14; @@ -157,7 +158,7 @@ export const LinkTableColumnsSchema = z.object({ pk_yn: z.string().max(1).nonempty(), trsf_col_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nonempty({ message: '변환컬럼명은 필수입니다.' }), trsf_col_korn_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nonempty({ message: '변환컬럼 한글명은 필수입니다.' }), - trsf_col_data_frm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nonempty({ message: '변환컬럼 데이터 형식은 필수입니다.' }), + trsf_col_frm_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nonempty({ message: '변환컬럼 데이터 형식은 필수입니다.' }), trsf_col_sz: z.coerce.number().nullable().optional().refine((val) => { if (val == null) return true; return val.toString().replace('.', '').length <= 14; @@ -166,11 +167,11 @@ export const LinkTableColumnsSchema = z.object({ }), col_seq: z.coerce.number().nullable().optional(), mdfcn_dt: z.string().nullable().optional(), - mdfr_id: z.string().nullable().optional(), + mdfr_uuid: z.string().nullable().optional(), }); export const LinkTableSchema = z.object({ - link_sn: z.string().max(50).nullable().optional(), + intg_link_sn: z.string().max(50).nullable().optional(), tbl_sn: z.string().max(50).nullable().optional(), link_nm: z.string().max(50).nullable().optional(), sou_tbl_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nullable().optional(), @@ -180,7 +181,7 @@ export const LinkTableSchema = z.object({ trsf_tbl_korn_nm: z.string().max(40, { message: '40자 이하로 입력해 주세요.' }).nonempty({ message: '변환테이블 한글명은 필수입니다.' }), trsf_tbl_expln: z.string().max(2000, { message: '설명은 2000자 이하로 입력해 주세요.' }).nullable().optional(), mdfcn_dt: z.string().nullable().optional(), - mdfr_id: z.string().nullable().optional(), + mdfr_uuid: z.string().nullable().optional(), }); interface LinkStatsListObject { @@ -195,6 +196,7 @@ export interface LinkSearchParam extends PageableParams { endDate?: string; isSucc?: string; linkClfsCd?: string; + linkExecStep?: string; } export type LinkFormData = z.infer; diff --git a/apps/cs/src/pages/link/model/table-columns.tsx b/apps/cs/src/pages/link/model/table-columns.tsx index 800801277..829743849 100644 --- a/apps/cs/src/pages/link/model/table-columns.tsx +++ b/apps/cs/src/pages/link/model/table-columns.tsx @@ -1,4 +1,4 @@ -import dayjs from "dayjs"; +import dayjs from "dayjs"; import { createColumnHelper } from "@tanstack/react-table"; import { type Link } from "@/entities/link"; import QuickStartButton from "../ui/QuickStartButton"; @@ -35,39 +35,39 @@ const columns = [ id: 'no', header: 'NO', }), - columnHelper.accessor('link_sn', { - id: 'link_sn', + columnHelper.accessor('intg_link_sn', { + id: 'intg_link_sn', header: '연계일련번호', }), columnHelper.accessor('link_nm', { id: 'link_nm', header: '연계 명', }), - columnHelper.accessor('link_url', { - id: 'link_url', + columnHelper.accessor('link_url_addr', { + id: 'link_url_addr', header: '연계 URL', cell: (info) => (info.getValue() ? info.getValue() : '-'), }), - columnHelper.accessor('link_srvr_ip', { - id: 'link_srvr_ip', + columnHelper.accessor('link_srvr_ip_addr', { + id: 'link_srvr_ip_addr', header: '연계서버 IP', cell: (info) => (info.getValue() ? info.getValue() : '-'), }), - columnHelper.accessor('link_cycle_mi', { - id: 'link_cycle_mi', + columnHelper.accessor('link_cycle_no', { + id: 'link_cycle_no', header: '연계 주기', cell: (info) => convertMinutesToPeriod(Number(info.getValue())), }), - columnHelper.accessor('srvc_usg', { - id: 'srvc_usg', + columnHelper.accessor('srvc_usg_nm', { + id: 'srvc_usg_nm', header: '서비스용도', cell: (info) => (info.getValue() ? info.getValue() : '-'), }), columnHelper.display({ - id: 'last_link_rslt_cd', + id: 'last_link_rslt_nm', header: '연계상태', cell: (info) => { - const resultCd = info.row.original.last_link_rslt_cd; + const resultCd = info.row.original.last_link_rslt_nm; return {resultCd === 'SUCC' ? '성공' : (resultCd === 'FAIL' ? '실패' : (resultCd === 'RUNN' ? '진행중' : '대기'))} }, }), @@ -80,7 +80,7 @@ const columns = [ id: 'quick_start_btn', header: '즉시 실행', cell: (info) => { - return + return } }) ]; diff --git a/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx b/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx index 92628a755..ab5091389 100644 --- a/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx +++ b/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx @@ -1,4 +1,4 @@ -import type { Link, LinkList } from "@/entities/link/model/link-interface"; +import type { Link, LinkList } from "@/entities/link/model/link-interface"; import { Button, DropdownMenu, @@ -18,11 +18,11 @@ const LinkExpiredAlert = ({ linkList }: { linkList: UseQueryResult }) useEffect(() => { if (linkList?.data?.content) { const expriedLinks = linkList.data.content.filter((l) => { - if (l.link_key_expry_ymd === 'none' || !l.link_key_expry_ymd) { + if (l.link_expry_ymd === 'none' || !l.link_expry_ymd) { return false; } - const expryDate = dayjs(l.link_key_expry_ymd, 'YYMMDD'); + const expryDate = dayjs(l.link_expry_ymd, 'YYMMDD'); const today = dayjs(); const daysDiff = expryDate.diff(today, 'day'); @@ -56,11 +56,11 @@ const LinkExpiredAlert = ({ linkList }: { linkList: UseQueryResult }) {expriedLinkList.length > 0 ? {expriedLinkList.map((l) => { - const expryDate = dayjs(l.link_key_expry_ymd, 'YYMMDD'); + const expryDate = dayjs(l.link_expry_ymd, 'YYMMDD'); const today = dayjs(); const daysDiff = expryDate.diff(today, 'day'); - return router.push(`link/register/${l.link_sn}`)}> + return router.push(`link/register/${l.intg_link_sn}`)}>
{daysDiff > 0 ?

{l.link_nm} API KEY 만료 {daysDiff}일전

diff --git a/apps/cs/src/pages/link/ui/link-form.tsx b/apps/cs/src/pages/link/ui/link-form.tsx index 51d8c9f18..6969c6165 100644 --- a/apps/cs/src/pages/link/ui/link-form.tsx +++ b/apps/cs/src/pages/link/ui/link-form.tsx @@ -1,4 +1,4 @@ -import { +import { Button, Input, Table, @@ -55,7 +55,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, const newData = { ...data, - link_key_expry_ymd: isNoExprie ? 'none' :dayjs(expryDate).format('YYYYMMDD'), + link_expry_ymd: isNoExprie ? 'none' :dayjs(expryDate).format('YYYYMMDD'), }; await handleConfirm(async () => { @@ -133,7 +133,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -222,7 +222,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -233,9 +233,9 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, autoComplete="off" /> - {form.formState.errors.link_url && ( + {form.formState.errors.link_url_addr && (

- {form.formState.errors.link_url.message} + {form.formState.errors.link_url_addr.message}

)}
@@ -250,7 +250,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -277,7 +277,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -288,9 +288,9 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, autoComplete="off" /> - {form.formState.errors.link_key && ( + {form.formState.errors.link_api_no && (

- {form.formState.errors.link_key.message} + {form.formState.errors.link_api_no.message}

)}
@@ -303,7 +303,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -333,9 +333,9 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink,
- {form.formState.errors.link_key_expry_ymd && ( + {form.formState.errors.link_expry_ymd && (

- {form.formState.errors.link_key_expry_ymd.message} + {form.formState.errors.link_expry_ymd.message}

)} @@ -348,7 +348,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -369,7 +369,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -391,7 +391,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( @@ -412,7 +412,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, { const timeParts = convertMinutesToPeriod(Number(field.value)); return ( @@ -510,9 +510,9 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, - {form.formState.errors.link_cycle_mi && ( + {form.formState.errors.link_cycle_no && (

- {form.formState.errors.link_cycle_mi.message} + {form.formState.errors.link_cycle_no.message}

)}
@@ -528,7 +528,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, { return ( @@ -596,7 +596,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink, ( diff --git a/apps/cs/src/pages/link/ui/link-page.tsx b/apps/cs/src/pages/link/ui/link-page.tsx index a59b9e751..ac13cd7d2 100644 --- a/apps/cs/src/pages/link/ui/link-page.tsx +++ b/apps/cs/src/pages/link/ui/link-page.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import "@common/assets/styles/grid.css"; @@ -78,7 +78,7 @@ function LinkPage() { `${process.env.NEXT_PUBLIC_LINK_BACKEND_API_HOST}/getLinkInfo`, ], }); - router.push(`link/register/${link.link_sn}`); + router.push(`link/register/${link.intg_link_sn}`); }; const handleClickRegist = () => { diff --git a/apps/cs/src/pages/link/ui/modify-page.tsx b/apps/cs/src/pages/link/ui/modify-page.tsx index 88a83f47b..97dd513e4 100644 --- a/apps/cs/src/pages/link/ui/modify-page.tsx +++ b/apps/cs/src/pages/link/ui/modify-page.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { LinkApi, linkFormSchema, type LinkFormData } from "@/entities/link"; @@ -37,7 +37,7 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) { mutationFn: (data: LinkFormData) => LinkApi.updateLinkInfo({ ...data, link_clsf_cd: data.link_clsf_cd !== 'none' ? data.link_clsf_cd : null, - mdfr_id: userUniqId + mdfr_uuid: userUniqId }), onSuccess: () => { alert('수정되었습니다.'); @@ -75,17 +75,17 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) { if (linkInfo) { let newData = { ...linkInfo }; - if (linkInfo.mdfr_id) { + if (linkInfo.mdfr_uuid) { const userName = await fetchUserInfo(); newData = { ...linkInfo, - mdfr_id: userName, + mdfr_uuid: userName, }; } form.reset(newData); - setInitialIsNoExprie(newData.link_key_expry_ymd === 'none'); + setInitialIsNoExprie(newData.link_expry_ymd === 'none'); } }; diff --git a/apps/cs/src/pages/link/ui/regist-page.tsx b/apps/cs/src/pages/link/ui/regist-page.tsx index 76912ab9f..e5635c8bd 100644 --- a/apps/cs/src/pages/link/ui/regist-page.tsx +++ b/apps/cs/src/pages/link/ui/regist-page.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import { LinkApi, type LinkFormData, linkFormSchema } from "@/entities/link"; import LinkForm from "./link-form"; @@ -20,14 +20,14 @@ function RegistLinkPage() { resolver: zodResolver(linkFormSchema), defaultValues: { link_nm: '', - link_url: '', - link_srvr_ip: '', - link_db_cd: '', - link_key: '', - link_id: '', - link_pswd: '', - srvc_usg: '', - link_cycle_mi: 5, + link_url_addr: '', + link_srvr_ip_addr: '', + link_db_nm: '', + link_api_no: '', + link_cntn_nm: '', + link_cntn_tkn_no: '', + srvc_usg_nm: '', + link_cycle_no: 5, link_clsf_cd: 'none', }, }); @@ -44,8 +44,8 @@ function RegistLinkPage() { const insertData = { ...data, link_clsf_cd: data.link_clsf_cd !== 'none' ? data.link_clsf_cd : null, - next_link_excn_dt: dayjs().add(Number(data.link_cycle_mi), 'minute').format('YYYY-MM-DD HH:mm:ss'), - mdfr_id: userUniqId, + next_link_excn_dt: dayjs().add(Number(data.link_cycle_no), 'minute').format('YYYY-MM-DD HH:mm:ss'), + mdfr_uuid: userUniqId, }; insertLinkInfo(insertData); diff --git a/apps/cs/src/pages/linkLog/model/table-columns.tsx b/apps/cs/src/pages/linkLog/model/table-columns.tsx index 30e7fa702..b5b2c7ff3 100644 --- a/apps/cs/src/pages/linkLog/model/table-columns.tsx +++ b/apps/cs/src/pages/linkLog/model/table-columns.tsx @@ -1,4 +1,4 @@ -import dayjs from "dayjs"; +import dayjs from "dayjs"; import { createColumnHelper } from "@tanstack/react-table"; import { type LinkLog } from "@/entities/link"; @@ -9,24 +9,29 @@ const columns = [ id: 'rownum', header: 'NO', }), - columnHelper.accessor('link_sn', { - id: 'link_sn', + columnHelper.accessor('intg_link_sn', { + id: 'intg_link_sn', header: '연계일련번호', }), columnHelper.accessor('link_nm', { id: 'link_nm', header: '연계 명', }), + columnHelper.accessor('link_exec_step', { + id: 'link_exec_step', + header: '연계실행단계', + cell: (info) => (info.getValue() ? info.getValue() : '-'), + }), columnHelper.display({ - id: 'link_rslt_cd', + id: 'link_rslt_nm', header: '연계실행결과', cell: (info) => { - const isSucc = info.row.original.link_rslt_cd.trim() === 'SUCC'; + const isSucc = info.row.original.link_rslt_nm.trim() === 'SUCC'; return {isSucc ? '성공' : '실패'} }, }), - columnHelper.accessor('link_err_cd', { - id: 'link_err_cd', + columnHelper.accessor('link_err_nm', { + id: 'link_err_nm', header: '연계오류코드', cell: (info) => (info.getValue() ? info.getValue() : '-'), }), diff --git a/apps/cs/src/pages/linkLog/ui/link-log-page.tsx b/apps/cs/src/pages/linkLog/ui/link-log-page.tsx index 5a0637b72..9dcd72341 100644 --- a/apps/cs/src/pages/linkLog/ui/link-log-page.tsx +++ b/apps/cs/src/pages/linkLog/ui/link-log-page.tsx @@ -33,6 +33,7 @@ function LinkLogPage() { const [linkSn, setLinkSn] = useState(""); const [linkNm, setLinkNm] = useState(""); + const [linkExecStep, setLinkExecStep] = useState("ALL"); const [isSucc, setIsSucc] = useState("ALL"); const [startDate, setStartDate] = useState( dayjs().subtract(7, "day").format("YYYY-MM-DD"), @@ -42,6 +43,7 @@ function LinkLogPage() { const [linkSearchParam, setLinkSearchParam] = useState({ linkSn: "", linkNm: "", + linkExecStep: "", isSucc: "", startDate: "", endDate: "", @@ -65,6 +67,7 @@ function LinkLogPage() { ...linkSearchParam, page: pagination.pageIndex, size: pagination.pageSize, + linkExecStep, isSucc, startDate, endDate, @@ -91,6 +94,7 @@ function LinkLogPage() { }); const handleResetSearchParam = () => { + setLinkExecStep("ALL"); setIsSucc("ALL"); setLinkNm(""); setLinkSn(""); @@ -100,6 +104,7 @@ function LinkLogPage() { ...linkSearchParam, linkSn: "", linkNm: "", + linkExecStep: "ALL", isSucc: "ALL", startDate: dayjs().subtract(7, "day").format("YYYY-MM-DD"), endDate: dayjs().format("YYYY-MM-DD"), @@ -122,6 +127,7 @@ function LinkLogPage() { ...linkSearchParam, linkSn, linkNm, + linkExecStep, isSucc, startDate, endDate, @@ -157,6 +163,24 @@ function LinkLogPage() { onChange={(e) => setLinkNm(e.target.value)} autoComplete="off" /> + + diff --git a/apps/cs/src/pages/linkParams/model/table-columns.tsx b/apps/cs/src/pages/linkParams/model/table-columns.tsx index a71a74e9d..868019e31 100644 --- a/apps/cs/src/pages/linkParams/model/table-columns.tsx +++ b/apps/cs/src/pages/linkParams/model/table-columns.tsx @@ -1,4 +1,4 @@ -import { createColumnHelper } from "@tanstack/react-table"; +import { createColumnHelper } from "@tanstack/react-table"; import { type Link } from "@/entities/link"; const columnHelper = createColumnHelper(); @@ -8,16 +8,16 @@ const columns = [ id: 'no', header: 'NO', }), - columnHelper.accessor('link_sn', { - id: 'link_sn', + columnHelper.accessor('intg_link_sn', { + id: 'intg_link_sn', header: '연계 일련번호', }), columnHelper.accessor('link_nm', { id: 'link_nm', header: '연계 명', }), - columnHelper.accessor('srvc_usg', { - id: 'srvc_usg', + columnHelper.accessor('srvc_usg_nm', { + id: 'srvc_usg_nm', header: '서비스용도', cell: (info) => (info.getValue() ? info.getValue() : '-'), }), diff --git a/apps/cs/src/pages/linkParams/model/vrbl-table-columns.tsx b/apps/cs/src/pages/linkParams/model/vrbl-table-columns.tsx index 26ccc7303..c9026097d 100644 --- a/apps/cs/src/pages/linkParams/model/vrbl-table-columns.tsx +++ b/apps/cs/src/pages/linkParams/model/vrbl-table-columns.tsx @@ -1,4 +1,4 @@ -import { createColumnHelper } from "@tanstack/react-table"; +import { createColumnHelper } from "@tanstack/react-table"; import { type LinkVrbl } from "@/entities/link"; import { Checkbox } from "@common/components"; @@ -70,15 +70,22 @@ function vrblColumns({ id: "link_vrbl_nm", header: "변수 명", }), - columnHelper.accessor("link_vrbl_cd", { - id: "link_vrbl_cd", + columnHelper.accessor("link_vrbl_cd_nm", { + id: "link_vrbl_cd_nm", header: "변수코드", cell: (info) => (info.getValue() ? info.getValue() : '-'), }), - columnHelper.accessor("link_vrbl_vl", { - id: "link_vrbl_vl", + columnHelper.accessor("link_vrbl_vl_cn", { + id: "link_vrbl_vl_cn", header: "변수 값", - cell: (info) => (info.getValue() === 'now' ? '요청일자' : info.getValue() === 'nowMonth' ? '요청월' : info.getValue()), + cell: (info) => { + const value = info.getValue(); + if (value === 'now') return '요청일자'; + if (value === 'nowMonth') return '요청월'; + if (value === 'nowHour') return '요청일자(시간포함)'; + if (value === 'nowHourMin') return '요청일자(시분포함)'; + return value; + }, }), columnHelper.accessor("link_vrbl_expln", { id: "link_vrbl_expln", diff --git a/apps/cs/src/pages/linkParams/ui/link-params-dialog.tsx b/apps/cs/src/pages/linkParams/ui/link-params-dialog.tsx index 9a3e2b87e..86675aede 100644 --- a/apps/cs/src/pages/linkParams/ui/link-params-dialog.tsx +++ b/apps/cs/src/pages/linkParams/ui/link-params-dialog.tsx @@ -1,4 +1,4 @@ -'use client'; +'use client'; import { Dialog, @@ -71,21 +71,29 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp if (await confirm(confirmMsg)) { if (isModifyMode) { - updateLinkVrbl(isToday ? { ...cleanData, link_vrbl_vl: checkNowMonth } : cleanData); + updateLinkVrbl(isToday ? { ...cleanData, link_vrbl_vl_cn: checkNowMonth } : cleanData); } else { - insertLinkVrbl(isToday ? { ...cleanData, link_vrbl_vl: checkNowMonth } : cleanData); + insertLinkVrbl(isToday ? { ...cleanData, link_vrbl_vl_cn: checkNowMonth } : cleanData); } } }); }; + const getTodayValueLabel = (value: string) => { + if (value === 'now') return '요청일자'; + if (value === 'nowMonth') return '요청월'; + if (value === 'nowHour') return '요청일자(시간포함)'; + if (value === 'nowHourMin') return '요청일자(시분포함)'; + return value; + }; + const handleCheckTodayValue = (check: boolean | string) => { if (check) { setIsToday(true); - form.setValue('link_vrbl_vl', (checkNowMonth === 'now' ? '요청일자' : '요청월')); + form.setValue('link_vrbl_vl_cn', getTodayValueLabel(checkNowMonth)); } else { setIsToday(false); - form.setValue('link_vrbl_vl', ''); + form.setValue('link_vrbl_vl_cn', ''); } }; @@ -96,14 +104,14 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp form.reset({ link_vrbl_nm: '', link_vrbl_expln: '', - link_vrbl_cd: '', - link_vrbl_vl: '', + link_vrbl_cd_nm: '', + link_vrbl_vl_cn: '', }); } - if (isModifyMode && (form.getValues('link_vrbl_vl') === 'now' || form.getValues('link_vrbl_vl') === 'nowMonth')) { + if (isModifyMode && ['now', 'nowMonth', 'nowHour', 'nowHourMin'].includes(form.getValues('link_vrbl_vl_cn') ?? '')) { setIsToday(true); - setCheckNowMonth(form.getValues('link_vrbl_vl')); + setCheckNowMonth(form.getValues('link_vrbl_vl_cn')); } }, [dialogOpen]); @@ -118,7 +126,7 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp - + {selectedLink.linkNm} ({selectedLink.linkSn}) @@ -213,7 +221,7 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp ( @@ -224,9 +232,9 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp autoComplete="off" /> - {form.formState.errors.link_vrbl_cd && ( + {form.formState.errors.link_vrbl_cd_nm && (

- {form.formState.errors.link_vrbl_cd.message} + {form.formState.errors.link_vrbl_cd_nm.message}

)}
@@ -239,7 +247,7 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp (
@@ -252,7 +260,7 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp name="checkNowMonth" onValueChange={(value) => { setCheckNowMonth(value); - form.setValue('link_vrbl_vl', (value === 'now' ? '요청일자' : '요청월')); + form.setValue('link_vrbl_vl_cn', getTodayValueLabel(value)); }} >
@@ -263,21 +271,29 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp
+
+ + +
+
+ + +
} - {form.formState.errors.link_vrbl_vl && ( + {form.formState.errors.link_vrbl_vl_cn && (

- {form.formState.errors.link_vrbl_vl.message} + {form.formState.errors.link_vrbl_vl_cn.message}

)}
@@ -292,7 +308,7 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp ( diff --git a/apps/cs/src/pages/linkParams/ui/link-params-page.tsx b/apps/cs/src/pages/linkParams/ui/link-params-page.tsx index 001eb9953..8eba90176 100644 --- a/apps/cs/src/pages/linkParams/ui/link-params-page.tsx +++ b/apps/cs/src/pages/linkParams/ui/link-params-page.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import { useState, useMemo } from "react"; import { @@ -123,8 +123,8 @@ function LinkParamsPage() { mutationFn: async (data: LinkVrblFormData) => await LinkApi.insertLinkVrbl({ ...data, - link_sn: selectedLink.linkSn, - mdfr_id: userUniqId, + intg_link_sn: selectedLink.linkSn, + mdfr_uuid: userUniqId, }), onSuccess: async () => { // 쿼리 무효화를 통한 최신 데이터 가져오기 @@ -140,8 +140,8 @@ function LinkParamsPage() { mutationFn: async (data: LinkVrblFormData) => await LinkApi.updateLinkVrblInfo({ ...data, - link_sn: selectedLink.linkSn, - mdfr_id: userUniqId, + intg_link_sn: selectedLink.linkSn, + mdfr_uuid: userUniqId, }), onSuccess: async () => { await queryClient.invalidateQueries({ @@ -191,7 +191,7 @@ function LinkParamsPage() { const handleRowClick = async (link: Link) => { setSelectedLink({ - linkSn: link.link_sn, + linkSn: link.intg_link_sn, linkNm: link.link_nm, }); @@ -242,11 +242,11 @@ function LinkParamsPage() { if (linkVrblInfo) { let newData = { ...linkVrblInfo }; - if (linkVrblInfo.mdfr_id) { + if (linkVrblInfo.mdfr_uuid) { const userName = await fetchUserInfo(); newData = { ...linkVrblInfo, - mdfr_id: userName, + mdfr_uuid: userName, }; } diff --git a/apps/cs/src/pages/linkStats/ui/link-stats-page.tsx b/apps/cs/src/pages/linkStats/ui/link-stats-page.tsx index 19163d24c..503e925d7 100644 --- a/apps/cs/src/pages/linkStats/ui/link-stats-page.tsx +++ b/apps/cs/src/pages/linkStats/ui/link-stats-page.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import { useState, useEffect, useRef } from "react"; import dayjs from "dayjs"; @@ -255,7 +255,7 @@ function LinkStatsPage() { setLogQueryParam({ isSucc: "SUCC", linkNm: linkStatsList.linkSuccStats[index]?.link_nm, - linkSn: linkStatsList.linkSuccStats[index]?.link_sn, + linkSn: linkStatsList.linkSuccStats[index]?.intg_link_sn, }); } }; @@ -284,7 +284,7 @@ function LinkStatsPage() { setLogQueryParam({ isSucc: "FAIL", linkNm: linkStatsList.linkFailStats[index]?.link_nm, - linkSn: linkStatsList.linkFailStats[index]?.link_sn, + linkSn: linkStatsList.linkFailStats[index]?.intg_link_sn, }); } }; diff --git a/apps/cs/src/pages/linkTable/ui/link-table-dialog.tsx b/apps/cs/src/pages/linkTable/ui/link-table-dialog.tsx index be835872d..3517393b4 100644 --- a/apps/cs/src/pages/linkTable/ui/link-table-dialog.tsx +++ b/apps/cs/src/pages/linkTable/ui/link-table-dialog.tsx @@ -1,4 +1,4 @@ -'use client'; +'use client'; import { Dialog, @@ -61,13 +61,13 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink if (!isModifyMode) { insertLinkTableCol({ ...data, - link_sn: tableInfo.link_sn, + intg_link_sn: tableInfo.intg_link_sn, tbl_sn: tableInfo.tbl_sn, }); } else { updateLinkTableCol({ ...data, - link_sn: tableInfo.link_sn, + intg_link_sn: tableInfo.intg_link_sn, tbl_sn: tableInfo.tbl_sn, }); } @@ -92,16 +92,16 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink col_sn: '', sou_col_nm: '', sou_col_korn_nm: '', - sou_col_data_frm: '', + sou_col_frm_nm: '', sou_col_sz: null, trsf_col_nm: '', trsf_col_korn_nm: '', - trsf_col_data_frm: '', + trsf_col_frm_nm: '', trsf_col_sz: null, col_seq: null, pk_yn: 'N', mdfcn_dt: '', - mdfr_id: '', + mdfr_uuid: '', }); } @@ -216,7 +216,7 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink ( @@ -227,9 +227,9 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink autoComplete="off" /> - {form.formState.errors.sou_col_data_frm && ( + {form.formState.errors.sou_col_frm_nm && (

- {form.formState.errors.sou_col_data_frm.message} + {form.formState.errors.sou_col_frm_nm.message}

)}
@@ -349,7 +349,7 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink ( @@ -360,9 +360,9 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink autoComplete="off" /> - {form.formState.errors.trsf_col_data_frm && ( + {form.formState.errors.trsf_col_frm_nm && (

- {form.formState.errors.trsf_col_data_frm.message} + {form.formState.errors.trsf_col_frm_nm.message}

)}
@@ -444,7 +444,7 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink ( diff --git a/apps/cs/src/pages/linkTable/ui/link-table-page.tsx b/apps/cs/src/pages/linkTable/ui/link-table-page.tsx index 3ccee78e8..55e541fc4 100644 --- a/apps/cs/src/pages/linkTable/ui/link-table-page.tsx +++ b/apps/cs/src/pages/linkTable/ui/link-table-page.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import { useState, useMemo } from "react"; import { @@ -97,7 +97,7 @@ function LinkTablePage() { mutationFn: async (data: LinkTableColData) => await LinkApi.insertLinkTableCol({ ...data, - mdfr_id: userUniqId, + mdfr_uuid: userUniqId, }), onSuccess: async () => { if (selectedTableInfo) { @@ -113,10 +113,10 @@ function LinkTablePage() { }); const tableData = await LinkApi.getLinkTableInfo( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); const tableColList = await LinkApi.getLinkTableColList( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); setSelectedTableInfo(tableData); @@ -132,7 +132,7 @@ function LinkTablePage() { mutationFn: async (data: LinkTableColData) => await LinkApi.updateLinkTableCol({ ...data, - mdfr_id: userUniqId, + mdfr_uuid: userUniqId, }), onSuccess: async () => { if (selectedTableInfo) { @@ -148,10 +148,10 @@ function LinkTablePage() { }); const tableData = await LinkApi.getLinkTableInfo( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); const tableColList = await LinkApi.getLinkTableColList( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); setSelectedTableInfo(tableData); @@ -180,10 +180,10 @@ function LinkTablePage() { }); const tableData = await LinkApi.getLinkTableInfo( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); const tableColList = await LinkApi.getLinkTableColList( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); setSelectedTableInfo(tableData); @@ -212,14 +212,14 @@ function LinkTablePage() { }); const tableData = await LinkApi.getLinkTableInfo( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); const tableColList = await LinkApi.getLinkTableColList( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); tableForm.reset({ - link_sn: tableData.link_sn, + intg_link_sn: tableData.intg_link_sn, link_nm: tableData.link_nm, tbl_sn: tableData.tbl_sn ?? "", sou_tbl_nm: tableData.sou_tbl_nm ?? "", @@ -254,10 +254,10 @@ function LinkTablePage() { }); const tableData = await LinkApi.getLinkTableInfo( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); const tableColList = await LinkApi.getLinkTableColList( - selectedTableInfo.link_sn, + selectedTableInfo.intg_link_sn, ); setSelectedTableInfo(tableData); @@ -316,15 +316,15 @@ function LinkTablePage() { }; const handleRowClick = async (data: Link) => { - const tableData = await LinkApi.getLinkTableInfo(data.link_sn); - const tableColList = await LinkApi.getLinkTableColList(data.link_sn); + const tableData = await LinkApi.getLinkTableInfo(data.intg_link_sn); + const tableColList = await LinkApi.getLinkTableColList(data.intg_link_sn); setSelectedTableInfo(tableData); setTableColList(tableColList.content); setSelectedColIds([]); tableForm.reset({ - link_sn: tableData.link_sn, + intg_link_sn: tableData.intg_link_sn, link_nm: tableData.link_nm, tbl_sn: tableData.tbl_sn ?? "", sou_tbl_nm: tableData.sou_tbl_nm ?? "", @@ -345,11 +345,11 @@ function LinkTablePage() { if (colInfo) { let newData = { ...colInfo }; - if (colInfo.mdfr_id) { + if (colInfo.mdfr_uuid) { const userName = await fetchUserInfo(); newData = { ...colInfo, - mdfr_id: userName, + mdfr_uuid: userName, }; } @@ -387,7 +387,7 @@ function LinkTablePage() { if (await confirm(confirmMsg)) { insertLinkTableInfo({ ...data, - mdfr_id: userUniqId, + mdfr_uuid: userUniqId, tbl_sn: regTblInfo.count > 0 ? regTblInfo.tbl_sn : "", }); } @@ -398,7 +398,7 @@ function LinkTablePage() { updateLinkTableInfo({ ...data, tbl_sn: regTblInfo.count > 0 ? regTblInfo.tbl_sn : "", - mdfr_id: userUniqId, + mdfr_uuid: userUniqId, }); } }); @@ -511,7 +511,7 @@ function LinkTablePage() { {selectedTableInfo ? ( (