Merge remote-tracking branch 'origin/feature/sein' into iipbs/st/dev
This commit is contained in:
@@ -55,7 +55,16 @@ const AdmdstRenewalTab = ({ tab, statsYr }: Props) => {
|
||||
추가된 행정구역 자료
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex justify-end pr-[1rem] mb-[0.4rem]">
|
||||
<div className="flex justify-end pr-[1rem] mb-[0.4rem] gap-4">
|
||||
<Button
|
||||
type="button"
|
||||
color="red"
|
||||
disabled={tab.isLoading}
|
||||
onClick={() => void tab.handleRefresh()}
|
||||
className="mt-[0.5rem] px-[4rem] py-[0.8rem] text-[1.4rem]"
|
||||
>
|
||||
갱신
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="primary"
|
||||
|
||||
@@ -60,6 +60,7 @@ export function useAdmdstRenewalTab() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
await run(async () => {
|
||||
const userInfo = await getUserInfo();
|
||||
const addedList: AdmdstRenewalAddedSaveItem[] = addedRowData
|
||||
@@ -79,13 +80,12 @@ const addedList: AdmdstRenewalAddedSaveItem[] = addedRowData
|
||||
userId: userInfo.userUnqId,
|
||||
}));
|
||||
|
||||
|
||||
|
||||
const reducedList: AdmdstRenewalReducedSaveItem[] = reducedRowData.map((row) => ({
|
||||
adstCd: String(row.adstCd ?? ""),
|
||||
}));
|
||||
|
||||
console.log("reducedList:", reducedList);
|
||||
console.log("addedList:", addedList);
|
||||
console.log("reducedList 이상한 것:", reducedList.filter(r => r.adstCd.length !== 10));
|
||||
const res = await statisticsPpltnApi.saveChangedArea(reducedList, addedList);
|
||||
if (res.status === "success") {
|
||||
await loadAll(statsYr);
|
||||
@@ -110,8 +110,6 @@ console.log("reducedList 이상한 것:", reducedList.filter(r => r.adstCd.lengt
|
||||
if (res.status === "success" && Array.isArray(res.data) && res.data.length > 0) {
|
||||
setCandidates(res.data);
|
||||
const rowIndex = addedRowData.findIndex((r) => r.adstCd === rowData.adstCd);
|
||||
console.log("rowData.adstCd:", rowData.adstCd); // ← 여기
|
||||
console.log("rowIndex:", rowIndex); // ← 여기
|
||||
selectedRowIndexRef.current = rowIndex;
|
||||
setDialogOpen(true);
|
||||
} else {
|
||||
@@ -131,9 +129,20 @@ console.log("reducedList 이상한 것:", reducedList.filter(r => r.adstCd.lengt
|
||||
: row,
|
||||
),
|
||||
);
|
||||
|
||||
selectedRowIndexRef.current = null;
|
||||
};
|
||||
|
||||
const handleRefresh = async () => {
|
||||
await run(async () => {
|
||||
const res = await statisticsPpltnApi.refreshMaterializedViews();
|
||||
if (res.status === "success") {
|
||||
alert("뷰 갱신이 완료되었습니다.");
|
||||
} else {
|
||||
alert("뷰 갱신 중 오류가 발생했습니다.");
|
||||
}
|
||||
});
|
||||
};
|
||||
const reset = () => {
|
||||
setReducedRowData([]);
|
||||
setAddedRowData([]);
|
||||
@@ -156,6 +165,7 @@ console.log("reducedList 이상한 것:", reducedList.filter(r => r.adstCd.lengt
|
||||
handleFinal,
|
||||
handleRowClick,
|
||||
handleCodeSelect,
|
||||
handleRefresh,
|
||||
reset,
|
||||
};
|
||||
}
|
||||
@@ -813,8 +813,6 @@ const rawSewagePipeTotList = [
|
||||
{ name: "yy25Step3MnhlCnt", fieldName: "yy25Step3MnhlCnt", header: { text: "콘크리트" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "yy25Step4MnhlCnt", fieldName: "yy25Step4MnhlCnt", header: { text: "기타" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "yy25Step5MnhlCnt", fieldName: "yy25Step5MnhlCnt", header: { text: "추락방지시설\n설치맨홀(개)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
|
||||
{ name: "rmrk", fieldName: "rmrk", header: { text: "비고" }, editable: false },
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: "addrGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm"] },
|
||||
@@ -922,8 +920,7 @@ const rawSewagePipeTotList = [
|
||||
{ name: "yy25MtrlGroup", header: { text: "맨홀뚜껑 재질(개)" }, items: ["yy25WholMnhlCnt", "yy25Step1MnhlCnt", "yy25Step2MnhlCnt", "yy25Step3MnhlCnt", "yy25Step4MnhlCnt"] },
|
||||
"yy25Step5MnhlCnt",
|
||||
],
|
||||
},
|
||||
"rmrk",
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
@@ -135,10 +135,7 @@ export const SeweragePentrationRateTotColumn = {
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: '#,##0.0',
|
||||
excludeFromExcelExport: true,
|
||||
},
|
||||
|
||||
// 비고
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
}
|
||||
].map((col) => ({ ...col, editable: false })),
|
||||
|
||||
columnLayout: [
|
||||
@@ -200,7 +197,6 @@ export const SeweragePentrationRateTotColumn = {
|
||||
'staaPsplyRt',
|
||||
'altdPrcsPsplyRt',
|
||||
'sewerInstlRt',
|
||||
'rurPsplyRt',
|
||||
'rmrk',
|
||||
'rurPsplyRt'
|
||||
]
|
||||
};
|
||||
+1
-1
@@ -4,7 +4,7 @@ export const PrivateSewageTab2ColumnConfig = {
|
||||
tabKey: "ST00080002",
|
||||
tabLabel: "정화조현황",
|
||||
rowStartNum: 4,
|
||||
fixedColumns: 3,
|
||||
fixedColumns: 2,
|
||||
columns: [
|
||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
|
||||
@@ -235,6 +235,14 @@ public async getLawCdsByName(
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/** 행정동 갱신 — MATERIALIZED VIEW 갱신 */
|
||||
public async refreshMaterializedViews(): Promise<{ status: string; message?: string }> {
|
||||
const response = await stClient.post<{ status: string; message?: string }>(
|
||||
`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/refresh`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user