diff --git a/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx b/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx
index 82a1bae17..f32bd5300 100644
--- a/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx
+++ b/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx
@@ -334,7 +334,23 @@ const SidoSggFacilityNameSearchForm = ({
}
};
- const handleSaveAdminRegions = () => {
+ const handleSaveAdminRegions = async () => {
+ const statusCodeResponse = await statisticsApi.CheckStatusCode({
+ sewerBzmnCd: initialSearchValues?.bsnmCd?.trim() ?? "",
+ statsCd: 'ST00020002',
+ statsYr: statsYr?.trim() ?? ''
+ });
+
+ if (statusCodeResponse.status === 'success') {
+ if (!['0', '1', '4'].includes(statusCodeResponse.data)) {
+ const codeName = statusCodeResponse.data === '2' ? '제출' : (statusCodeResponse.data === '3' ? '승인' : '검증중');
+ alert(`시설별 설치 현황 데이터가 ${codeName} 상태일 때는 처리 시설 정보를 변경할 수 없습니다.`);
+ return;
+ }
+ } else {
+ alert('오류가 발생했습니다.\n관리자에게 문의하세요')
+ }
+
if (!statsYr?.trim()) {
alert("상단에서 통계연도로 조회한 뒤 이용해 주세요.");
return;
diff --git a/apps/st/src/components/statistics/input/MainFacilityMappingSaveDialog.tsx b/apps/st/src/components/statistics/input/MainFacilityMappingSaveDialog.tsx
index a1cc85b52..d9f9de404 100644
--- a/apps/st/src/components/statistics/input/MainFacilityMappingSaveDialog.tsx
+++ b/apps/st/src/components/statistics/input/MainFacilityMappingSaveDialog.tsx
@@ -240,11 +240,6 @@ export function MainFacilityMappingSaveDialog({
-
-
-
+
+
+
diff --git a/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx b/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx
index 6735f9752..84ad50646 100644
--- a/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx
+++ b/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx
@@ -87,13 +87,16 @@ function computeTabToolbarSnapshot(
): TabToolbarSnapshot {
const gugunOk = buildGugunOkForToolbar(searchContext);
const enterable = computeTabEnterable(statusInfo, periodEnterable);
+ const isSubmitted = statusInfo?.laeSbmsnSttsCd === '2';
const showSaveInToolbar = (enterable || isAdminInfo) && gugunOk;
const showEnterableToolbarButtons = enterable && gugunOk;
+ const showSubmittedInInputPeriodToolbar = isSubmitted && periodEnterable && gugunOk;
const showActionToolbarCard =
(hasRowData || treatAsSearched) &&
(showSaveInToolbar ||
- (statusInfo?.laeSbmsnSttsCd === '2' &&
- (isAdminInfo || (enterable && gugunOk))));
+ showEnterableToolbarButtons ||
+ showSubmittedInInputPeriodToolbar ||
+ (isSubmitted && isAdminInfo));
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
}
@@ -411,6 +414,22 @@ const PublicSewageFacilityInp = () => {
}
if (activeTab === 'ST00060002') {
+ const statusCodeResponse = await statisticsApi.CheckStatusCode({
+ sewerBzmnCd: lastSearchedValues.bsnmCd ?? '',
+ statsCd: 'ST00060001',
+ statsYr: lastSearchedValues.year ?? ''
+ });
+
+ if (statusCodeResponse.status === 'success') {
+ if (!['0', '1', '4'].includes(statusCodeResponse.data)) {
+ const codeName = statusCodeResponse.data === '2' ? '제출' : (statusCodeResponse.data === '3' ? '승인' : '검증중');
+ alert(`공공 하수처리 시설 데이터가 ${codeName} 상태일 때는 중심 처리 시설 데이터를 변경할 수 없습니다.`);
+ return;
+ }
+ } else {
+ alert('오류가 발생했습니다.\n관리자에게 문의하세요')
+ }
+
if (!(await confirm('저장 하시겠습니까?'))) return;
const leftRows = rowDataMap.get('MainFacility') ?? [];
@@ -980,26 +999,34 @@ const PublicSewageFacilityInp = () => {
};
const searchContextForToolbar = lastSearchedValues ?? searchValues;
+ const gugunOkOrNotDoList = buildGugunOkForToolbar(searchContextForToolbar);
const activeTabStatus = tabStatusInfoMap.get(activeTab) ?? null;
- const activeTabToolbar =
- toolbarSnapshotByTab.get(activeTab) ??
- computeTabToolbarSnapshot(
- activeTabStatus,
- tabRowDataExists(activeTab),
- hasSearched,
- searchContextForToolbar,
- inputPeriodEnterable,
- isAdminInfo,
- );
+ const activeTabToolbar = computeTabToolbarSnapshot(
+ activeTabStatus,
+ tabRowDataExists(activeTab),
+ hasSearched,
+ searchContextForToolbar,
+ inputPeriodEnterable,
+ isAdminInfo,
+ );
const {
showSaveInToolbar: baseShowSaveInToolbar,
showEnterableToolbarButtons: baseShowEnterableToolbarButtons,
showActionToolbarCard: baseShowActionToolbarCard,
} = activeTabToolbar;
- const showSaveInToolbar = baseShowSaveInToolbar && toolbarGroupAllowed;
- const showEnterableToolbarButtons = baseShowEnterableToolbarButtons && toolbarGroupAllowed;
- const showActionToolbarCard = baseShowActionToolbarCard && toolbarGroupAllowed;
const isMainFacilityTab = activeTab === 'ST00060002';
+ const showMainFacilitySaveInToolbar =
+ isMainFacilityTab &&
+ tabRowDataExists('ST00060002') &&
+ gugunOkOrNotDoList &&
+ (isAdminInfo || inputPeriodEnterable);
+ const showSaveInToolbar =
+ toolbarGroupAllowed && (baseShowSaveInToolbar || showMainFacilitySaveInToolbar);
+ const showEnterableToolbarButtons =
+ baseShowEnterableToolbarButtons && toolbarGroupAllowed;
+ const showActionToolbarCard =
+ toolbarGroupAllowed &&
+ (baseShowActionToolbarCard || showMainFacilitySaveInToolbar);
const openVerificationHistoryDialog = () => {
const ctx = lastSearchedValues ?? searchValues;
@@ -1037,9 +1064,11 @@ const PublicSewageFacilityInp = () => {
{showActionToolbarCard && (
-
+ {!isMainFacilityTab && (
+
+ )}
{showEnterableToolbarButtons && !isMainFacilityTab && (
<>
{showIsNotApplicable &&
}
@@ -1159,13 +1188,25 @@ const PublicSewageFacilityInp = () => {
}
const gridColumnInfo = getGridColumnInfo(tab);
+ const tabStatus = tabStatusInfoMap.get(tab.tabKey) ?? null;
+ const tabEnterableForGrid = computeTabEnterable(
+ tabStatus,
+ inputPeriodEnterable,
+ );
+ const excelToolbarEnabledForTab =
+ tabRowDataExists(tab.tabKey) &&
+ tabEnterableForGrid &&
+ gugunOkOrNotDoList;
+
return (
{
setRowDataMap((prev) => {
@@ -1182,6 +1223,8 @@ const PublicSewageFacilityInp = () => {
getGridDataRef={
tab.tabKey === 'ST00060001' ? st60001GridGetRowsRef : undefined
}
+ isExcelImport={excelToolbarEnabledForTab}
+ isExcelExport
showHeaderCheckbox={false}
enableSort={false}
cellStyleCallback={({ row, fieldName }) => {
diff --git a/apps/st/src/components/statistics/input/SewagePipeInp.tsx b/apps/st/src/components/statistics/input/SewagePipeInp.tsx
index 9329dc967..d8ffdde0d 100644
--- a/apps/st/src/components/statistics/input/SewagePipeInp.tsx
+++ b/apps/st/src/components/statistics/input/SewagePipeInp.tsx
@@ -332,13 +332,16 @@ function computeTabToolbarSnapshot(
): TabToolbarSnapshot {
const gugunOk = buildGugunOkForToolbar(searchContext);
const enterable = computeTabEnterable(statusInfo, periodEnterable);
+ const isSubmitted = statusInfo?.laeSbmsnSttsCd === "2";
const showSaveInToolbar = (enterable || isAdminInfo) && gugunOk;
const showEnterableToolbarButtons = enterable && gugunOk;
+ const showSubmittedInInputPeriodToolbar = isSubmitted && periodEnterable && gugunOk;
const showActionToolbarCard =
(hasRowData || treatAsSearched) &&
(showSaveInToolbar ||
- (statusInfo?.laeSbmsnSttsCd === "2" &&
- (isAdminInfo || (enterable && gugunOk))));
+ showEnterableToolbarButtons ||
+ showSubmittedInInputPeriodToolbar ||
+ (isSubmitted && isAdminInfo));
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
}
@@ -1887,9 +1890,11 @@ const SewagePipeInp = () => {
const rightRowData = rowDataMap.get(rightKey) ?? [];
const splitTopButton = info.right.topButton;
const showSplitTopButton =
+ activeTab === tabKey &&
Boolean(splitTopButton?.text) &&
(splitTopButton?.visible ?? true) &&
- excelToolbarEnabledForTab;
+ tabRowDataExists(rowDataMap, tabKey) &&
+ gugunOkOrNotDoList;
const leftColumnInfo: ColumnInfo = {
columns: info.left.columns ?? [],
columnLayout: info.left.columnLayout ?? [],
diff --git a/apps/st/src/components/statistics/input/SeweragePenetrationRateInp.tsx b/apps/st/src/components/statistics/input/SeweragePenetrationRateInp.tsx
index 2e0f318f9..4193f2535 100644
--- a/apps/st/src/components/statistics/input/SeweragePenetrationRateInp.tsx
+++ b/apps/st/src/components/statistics/input/SeweragePenetrationRateInp.tsx
@@ -748,16 +748,21 @@ const SeweragePenetrationRateInp = () => {
? Boolean(lastSearchedValues?.gugun && lastSearchedValues.gugun !== 'ALL')
: true;
+ const inputPeriodCurrent = isInputPeriodCurrent(periodCheckList);
+ const isSubmitted = statusInfo?.laeSbmsnSttsCd === '2';
const baseShowSaveInToolbar = (isEnterable || isAdminInfo) && gugunOkOrNotDoList;
const baseShowEnterableToolbarButtons = isEnterable && gugunOkOrNotDoList;
+ const showSubmittedInInputPeriodToolbar =
+ isSubmitted && inputPeriodCurrent && gugunOkOrNotDoList;
const showSaveInToolbar = baseShowSaveInToolbar && toolbarGroupAllowed;
const showEnterableToolbarButtons = baseShowEnterableToolbarButtons && toolbarGroupAllowed;
- /** 카드는 저장/제출줄/제출취소 중 하나라도 보일 때만 (관리자만으로 빈 카드 방지) */
const showActionToolbarCard =
rowData.length > 0 &&
toolbarGroupAllowed &&
(baseShowSaveInToolbar ||
- (statusInfo?.laeSbmsnSttsCd === '2' && (isAdminInfo || (isEnterable && gugunOkOrNotDoList))));
+ baseShowEnterableToolbarButtons ||
+ showSubmittedInInputPeriodToolbar ||
+ (isSubmitted && isAdminInfo));
return (
<>
diff --git a/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx b/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx
index 37dff9b7e..6d23f3c87 100644
--- a/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx
+++ b/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx
@@ -120,7 +120,7 @@ const PublicSewageFacilityRvw = () => {
const rawList = response.data.publicSewageList;
const convertedData: PublicSewageFacilityReviewItem[] = rawList.map((item) => ({
...item,
- impdFcltPstnCn: item.fcltPstnCn ?? "",
+ fcltPstnCn: item.fcltPstnCn ?? "",
prxyBzentyNmCn: item.prxyBzentyNmCn ?? "",
prxyCtrtCn: item.prxyCtrtCn ?? "",
intgPrcsFcltCn: item.intgPrcsFcltCn ?? "",
diff --git a/apps/st/src/components/util/column/input/PublicSewageFactInpColumn/PublicSewageFactColumn.ts b/apps/st/src/components/util/column/input/PublicSewageFactInpColumn/PublicSewageFactColumn.ts
index fa2f73317..db0c550ff 100644
--- a/apps/st/src/components/util/column/input/PublicSewageFactInpColumn/PublicSewageFactColumn.ts
+++ b/apps/st/src/components/util/column/input/PublicSewageFactInpColumn/PublicSewageFactColumn.ts
@@ -15,7 +15,7 @@ export const PublicSewageFactColumn = {
{ name: 'swtrmtFcltNm', fieldName: 'swtrmtFcltNm', header: { text: '시설명(500m³/일 이상/미만)' }, editable: false, styleName: 'rg-cell-readonly' },
// 소재지
- { name: 'impdFcltPstnCn', fieldName: 'impdFcltPstnCn', header: { text: '소재지' }, editable: false, styleName: 'rg-cell-readonly' },
+ { name: 'fcltPstnCn', fieldName: 'fcltPstnCn', header: { text: '소재지' }, editable: false, styleName: 'rg-cell-readonly' },
// 시설용량
{ name: 'prcsFcltCpct', fieldName: 'prcsFcltCpct', header: { text: '시설용량(500m³/일 이상/미만)' }, editable: false, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0', styleName: 'rg-cell-total' },
@@ -126,7 +126,7 @@ export const PublicSewageFactColumn = {
items: ['ctpvNm', 'sggNm'],
},
'swtrmtFcltNm',
- 'impdFcltPstnCn',
+ 'fcltPstnCn',
'prcsFcltCpct',
{
name: 'facilityCapacityDetail',
diff --git a/apps/st/src/components/util/column/review/PublicSewageFacilityRvwColumn.ts b/apps/st/src/components/util/column/review/PublicSewageFacilityRvwColumn.ts
index cbfec445a..d02b5360b 100644
--- a/apps/st/src/components/util/column/review/PublicSewageFacilityRvwColumn.ts
+++ b/apps/st/src/components/util/column/review/PublicSewageFacilityRvwColumn.ts
@@ -49,7 +49,7 @@ export const rawPublicSewageFacilityInfoList = {
],
},
{ name: 'swtrmtFcltNm', fieldName: 'swtrmtFcltNm', header: { text: '시설명(500m³/일 이상/미만)' } },
- { name: 'impdFcltPstnCn', fieldName: 'impdFcltPstnCn', header: { text: '소재지' } },
+ { name: 'fcltPstnCn', fieldName: 'fcltPstnCn', header: { text: '소재지' } },
/* 2. 시설용량 (㎥/일) */
{ name: 'prcsFcltCpct', fieldName: 'prcsFcltCpct', header: { text: '시설용량(500m³/일 이상/미만)' }, footer: footerDecimal1ArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
@@ -132,7 +132,7 @@ export const rawPublicSewageFacilityInfoList = {
header: { text: '행정구역' },
items: [{ column: 'ctpvNm', footerUserSpans: [{ colspan: 3 }, { colspan: 3 }] }, 'sggNm'],
},
- 'displayYear', 'swtrmtFcltNm', 'impdFcltPstnCn', 'prcsFcltCpct',
+ 'displayYear', 'swtrmtFcltNm', 'fcltPstnCn', 'prcsFcltCpct',
{
name: 'groupB',
header: { text: '시설용량(㎥/일)' },
diff --git a/apps/st/src/entities/statistics/api/statistics-service.ts b/apps/st/src/entities/statistics/api/statistics-service.ts
index fc36b73c8..7186240c4 100644
--- a/apps/st/src/entities/statistics/api/statistics-service.ts
+++ b/apps/st/src/entities/statistics/api/statistics-service.ts
@@ -5,6 +5,8 @@ import {
type ApiResponse,
type cancelSubmitRequest,
type cancelSubmitResponse,
+ type CheckStatusCodeRequest,
+ type CheckStatusCodeResponse,
type getReviewOpinionDetailRequest,
type getReviewOpinionDetailResponse,
type ImrRequest,
@@ -321,6 +323,14 @@ export class StatisticsApiService implements StatisticsService {
);
return response.data;
}
+
+ public async CheckStatusCode(param: CheckStatusCodeRequest): Promise {
+ const response = await stClient.get(
+ `${ENDPOINT.ST_SERVICE.INPUTCOMMON}/status-code`,
+ { params: param },
+ );
+ return response.data;
+ }
}
export const statisticsApi = new StatisticsApiService();
diff --git a/apps/st/src/entities/statistics/model/input/statistics-public-sewage-facility-input-interface.ts b/apps/st/src/entities/statistics/model/input/statistics-public-sewage-facility-input-interface.ts
index 328818e48..093ea859b 100644
--- a/apps/st/src/entities/statistics/model/input/statistics-public-sewage-facility-input-interface.ts
+++ b/apps/st/src/entities/statistics/model/input/statistics-public-sewage-facility-input-interface.ts
@@ -37,7 +37,7 @@ export interface PublicSewageFacilityItem {
fcltSn: number;
swtrmtFcltCd: string;
swtrmtFcltNm: string;
- impdFcltPstnCn: string | null;
+ fcltPstnCn: string | null;
prcsFcltCpct: number;
prcsFcltPhysCpct: number;
prcsFcltBoilCpct: number;
diff --git a/apps/st/src/entities/statistics/model/statistics-interface.ts b/apps/st/src/entities/statistics/model/statistics-interface.ts
index 464c391c4..5081952c7 100644
--- a/apps/st/src/entities/statistics/model/statistics-interface.ts
+++ b/apps/st/src/entities/statistics/model/statistics-interface.ts
@@ -475,6 +475,17 @@ export interface StatiscicsExceptionResetResponse {
message?: string;
}
+export interface CheckStatusCodeRequest {
+ statsCd: string;
+ statsYr: string;
+ sewerBzmnCd: string;
+}
+
+export interface CheckStatusCodeResponse {
+ status: string;
+ data: string;
+}
+
export interface StatisticsService {
getSidoList(params?: { instSeCd?: string }): Promise>;
getSggList(sidoName: string, params?: { instSeCd?: string; gugunSkipYn?: "Y" | "N" }): Promise>;
@@ -504,4 +515,5 @@ export interface StatisticsService {
getReviewerInfo(param: ReviewerInfoRequest): Promise;
getStatiscicsManagementReviewHistory(param: StatiscicsManagementReviewHistoryRequest): Promise;
StatiscicsExceptionReset(param: StatiscicsExceptionResetRequest): Promise;
+ CheckStatusCode(param: CheckStatusCodeRequest): Promise;
}
\ No newline at end of file