Merge remote-tracking branch 'origin/main'
This commit is contained in:
+4
-6
@@ -5,9 +5,6 @@
|
||||
# dependencies
|
||||
node_modules/
|
||||
.idea/
|
||||
# build
|
||||
.next/
|
||||
dist/
|
||||
|
||||
# build
|
||||
.next
|
||||
@@ -22,6 +19,9 @@ apps/fo/.next/**/*
|
||||
#.env*
|
||||
.qodo
|
||||
|
||||
# next-agents-md
|
||||
.next-docs/
|
||||
|
||||
pnpm-lock.yaml
|
||||
settings.json
|
||||
.npmrc
|
||||
@@ -29,6 +29,4 @@ settings.json
|
||||
.agent
|
||||
|
||||
apps/**/tsconfig.tsbuildinfo
|
||||
|
||||
# next-agents-md
|
||||
.next-docs/
|
||||
logs/
|
||||
@@ -1,6 +1,21 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: "standalone",
|
||||
experimental: {
|
||||
proxyTimeout: 600000,
|
||||
},
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
logging: {
|
||||
fetches: {
|
||||
fullUrl: true,
|
||||
},
|
||||
},
|
||||
async rewrites() {
|
||||
return {
|
||||
afterFiles: [
|
||||
|
||||
@@ -13,6 +13,12 @@ interface HbVerificationDetailProps {
|
||||
onBack: () => void;
|
||||
}
|
||||
|
||||
export interface AppliedFilter {
|
||||
sido: string | null;
|
||||
gugun: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
const HbVerificationDetail: React.FC<HbVerificationDetailProps> = ({
|
||||
anlsSn,
|
||||
onBack,
|
||||
@@ -20,7 +26,11 @@ const HbVerificationDetail: React.FC<HbVerificationDetailProps> = ({
|
||||
const [selectedVrfcTrgtSn, setSelectedVrfcTrgtSn] = useState<string | null>(
|
||||
null,
|
||||
);
|
||||
const [selectedSido, setSelectedSido] = useState<string | null>(null);
|
||||
const [appliedFilter, setAppliedFilter] = useState<AppliedFilter>({
|
||||
sido: "",
|
||||
gugun: "",
|
||||
status: "",
|
||||
});
|
||||
const [selectedRowId, setSelectedRowId] = useState<number | null>(null);
|
||||
const [selectedTargetInfo, setSelectedTargetInfo] = useState<{
|
||||
statsNm: string;
|
||||
@@ -34,6 +44,11 @@ const HbVerificationDetail: React.FC<HbVerificationDetailProps> = ({
|
||||
vrfcTrgtNm: row.vrfcTrgtNm,
|
||||
});
|
||||
setSelectedRowId(null);
|
||||
setAppliedFilter({
|
||||
sido: "",
|
||||
gugun: "",
|
||||
status: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -76,8 +91,9 @@ const HbVerificationDetail: React.FC<HbVerificationDetailProps> = ({
|
||||
vrfcTrgtNm={
|
||||
selectedTargetInfo?.vrfcTrgtNm || ""
|
||||
}
|
||||
onSidoSelect={setSelectedSido}
|
||||
onFilterChange={setAppliedFilter}
|
||||
selectedRowId={selectedRowId}
|
||||
appliedFilter={appliedFilter}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-[0.5] flex-col gap-4 p-4 pt-[4.8rem]">
|
||||
@@ -89,7 +105,7 @@ const HbVerificationDetail: React.FC<HbVerificationDetailProps> = ({
|
||||
<ScatterChart
|
||||
anlsSn={anlsSn}
|
||||
vrfcTrgtSn={selectedVrfcTrgtSn}
|
||||
selectedSido={selectedSido}
|
||||
appliedFilter={appliedFilter}
|
||||
onPointClick={setSelectedRowId}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,8 @@ import {
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
|
||||
import type { AppliedFilter } from "./HbVerificationDetail";
|
||||
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import type { ColumnInfo } from "@/components/type/DataGrid.type";
|
||||
|
||||
@@ -26,14 +28,9 @@ interface RegionalGridProps {
|
||||
vrfcTrgtSn: string | null;
|
||||
statsNm: string;
|
||||
vrfcTrgtNm: string;
|
||||
onSidoSelect: (sido: string | null) => void;
|
||||
onFilterChange: (filter: AppliedFilter) => void;
|
||||
selectedRowId?: number | null;
|
||||
}
|
||||
|
||||
interface AppliedFilter {
|
||||
sido: string | null;
|
||||
gugun: string;
|
||||
status: string;
|
||||
appliedFilter: AppliedFilter;
|
||||
}
|
||||
|
||||
const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
@@ -41,19 +38,15 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
vrfcTrgtSn,
|
||||
statsNm,
|
||||
vrfcTrgtNm,
|
||||
onSidoSelect,
|
||||
onFilterChange,
|
||||
selectedRowId,
|
||||
appliedFilter,
|
||||
}) => {
|
||||
const [selectedSido, setSelectedSido] = useState<string>("");
|
||||
const [selectedGugun, setSelectedGugun] = useState<string>("");
|
||||
const [selectedStatus, setSelectedStatus] = useState<string>("");
|
||||
const [showAllOnEmptyFilter, setShowAllOnEmptyFilter] =
|
||||
useState<boolean>(true);
|
||||
const [appliedFilter, setAppliedFilter] = useState<AppliedFilter>({
|
||||
sido: "",
|
||||
gugun: "",
|
||||
status: "",
|
||||
});
|
||||
const [isDownloading, setIsDownloading] = useState<boolean>(false);
|
||||
|
||||
const [gridRowData, setGridRowData] = useState<
|
||||
@@ -125,9 +118,22 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
}
|
||||
}
|
||||
|
||||
const mapOtlrToLabel = (otlrYn: string) => {
|
||||
switch (otlrYn) {
|
||||
case "0":
|
||||
return "정상";
|
||||
case "1":
|
||||
return "이상치";
|
||||
case "2":
|
||||
return "제외";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
const mappedData = data.map((item) => ({
|
||||
...item,
|
||||
otlrYn: item.otlrYn === "0" ? "정상" : "이상치",
|
||||
otlrYn: mapOtlrToLabel(item.otlrYn),
|
||||
}));
|
||||
|
||||
setGridRowData(
|
||||
@@ -231,8 +237,7 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
};
|
||||
|
||||
const handleSearch = () => {
|
||||
onSidoSelect(selectedSido);
|
||||
setAppliedFilter({
|
||||
onFilterChange({
|
||||
sido: selectedSido,
|
||||
gugun: selectedGugun,
|
||||
status: selectedStatus,
|
||||
@@ -241,11 +246,10 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
onSidoSelect(null);
|
||||
setSelectedSido("");
|
||||
setSelectedGugun("");
|
||||
setSelectedStatus("");
|
||||
setAppliedFilter({
|
||||
onFilterChange({
|
||||
sido: "",
|
||||
gugun: "",
|
||||
status: "",
|
||||
@@ -366,10 +370,10 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
columnInfo={columnInfo}
|
||||
rowData={gridRowData}
|
||||
setRowData={setGridRowData}
|
||||
idFieldName="rsltSn"
|
||||
isExcelExport={false}
|
||||
isExcelImport={false}
|
||||
highlightedRowId={selectedRowId}
|
||||
idFieldName="rsltSn"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -26,6 +26,8 @@ import {
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics/model/statistics-analysis-result-interface";
|
||||
import { LoadingWithAnimation } from "@common/components";
|
||||
|
||||
import type { AppliedFilter } from "./HbVerificationDetail";
|
||||
|
||||
ChartJS.register(
|
||||
LinearScale,
|
||||
LineController,
|
||||
@@ -40,7 +42,7 @@ ChartJS.register(
|
||||
interface ScatterChartProps {
|
||||
anlsSn: number;
|
||||
vrfcTrgtSn: string | null;
|
||||
selectedSido: string | null;
|
||||
appliedFilter: AppliedFilter;
|
||||
onPointClick?: (rsltSn: number | null) => void;
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ interface DataPoint extends LinePoint {
|
||||
const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
selectedSido,
|
||||
appliedFilter,
|
||||
onPointClick,
|
||||
}) => {
|
||||
const { data: regionCodes } = useQuery({
|
||||
@@ -64,12 +66,17 @@ const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
queryFn: () => CodeApi.getCode("LAESECD"),
|
||||
});
|
||||
|
||||
const selectedSidoName = useMemo(() => {
|
||||
if (!selectedSido || !regionCodes) return null;
|
||||
return (
|
||||
regionCodes.find((c) => c.lwpoCd === selectedSido)?.lwpoCdNm || null
|
||||
);
|
||||
}, [regionCodes, selectedSido]);
|
||||
const filterNames = useMemo(() => {
|
||||
if (!regionCodes) return { sido: null, gugun: null };
|
||||
return {
|
||||
sido:
|
||||
regionCodes.find((c) => c.lwpoCd === appliedFilter.sido)
|
||||
?.lwpoCdNm || null,
|
||||
gugun:
|
||||
regionCodes.find((c) => c.lwpoCd === appliedFilter.gugun)
|
||||
?.lwpoCdNm || null,
|
||||
};
|
||||
}, [regionCodes, appliedFilter.sido, appliedFilter.gugun]);
|
||||
|
||||
const { data: resultData, isLoading: isLoadingGrid } = useStAnlsRsltList(
|
||||
anlsSn,
|
||||
@@ -85,7 +92,7 @@ const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
const chartConfig = useMemo(() => {
|
||||
if (!resultData || !chartData) return null;
|
||||
|
||||
const rawPoints = resultData.content ?? [];
|
||||
const rawPoints = (resultData.content ?? []) as StAnlsRsltResponse[];
|
||||
const boundaries = chartData.list ?? [];
|
||||
|
||||
const sortedBoundaries = [...boundaries].sort(
|
||||
@@ -106,7 +113,19 @@ const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
const outlierPoints: DataPoint[] = [];
|
||||
|
||||
rawPoints.forEach((item) => {
|
||||
if (selectedSidoName && item.sido !== selectedSidoName) {
|
||||
// Apply Filters (Sido, Gugun, Status)
|
||||
if (filterNames.sido && item.sido !== filterNames.sido) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (filterNames.gugun && !filterNames.gugun.includes(item.gugun)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
appliedFilter.status &&
|
||||
item.otlrYn.toLowerCase() !== appliedFilter.status
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -230,7 +249,7 @@ const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
};
|
||||
|
||||
return { data, options };
|
||||
}, [resultData, chartData, selectedSidoName]);
|
||||
}, [resultData, chartData, filterNames, appliedFilter.status]);
|
||||
|
||||
return (
|
||||
<div className="relative flex-1 p-4">
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface StAnlsRsltResponse {
|
||||
chgRt: number | null; // 변경율 (r_i)
|
||||
trsfRt: number | null; // 변환 비율 (s_i)
|
||||
otlrTrsfRt: number | null; // 이상치 변환 비율 (E_i)
|
||||
otlrYn: string; // 이상치 여부 (0: 정상, 1: 이상치)
|
||||
otlrYn: string; // 이상치 여부 (0: 정상, 1: 이상치, 2: 제외)
|
||||
}
|
||||
|
||||
export interface StAnlsRsltSearchParams extends PageableParams {
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
const common = {
|
||||
exec_mode: 'cluster',
|
||||
instances: 'max',
|
||||
|
||||
autorestart: true,
|
||||
max_memory_restart: '1G',
|
||||
watch: false,
|
||||
|
||||
merge_logs: true,
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
||||
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'cs-app',
|
||||
cwd: './apps/cs',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3000',
|
||||
|
||||
error_file: './logs/cs-error.log',
|
||||
out_file: './logs/cs-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'st-app',
|
||||
cwd: './apps/st',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3001',
|
||||
|
||||
error_file: './logs/st-error.log',
|
||||
out_file: './logs/st-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'cm-app',
|
||||
cwd: './apps/cm',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3002',
|
||||
|
||||
error_file: './logs/cm-error.log',
|
||||
out_file: './logs/cm-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'features-app',
|
||||
cwd: './apps/common/features',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 13000',
|
||||
|
||||
error_file: './logs/feature-error.log',
|
||||
out_file: './logs/feature-out.log',
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user