미처리하수량 제거(주석포함), 강우량 메인,모달 수치 다른거 해결
This commit is contained in:
@@ -105,6 +105,8 @@ export default function PrecipitationModal(props: PrecipitationModalProps) {
|
||||
|
||||
const getTableData = () => {
|
||||
const totals = calculateTotals();
|
||||
totals.infoRnDay = roundNumber(totals.infoRnDay, 1);
|
||||
|
||||
return [
|
||||
{
|
||||
bscFctCd: "",
|
||||
|
||||
@@ -10,18 +10,11 @@ import { HeadMakeColSpan } from "../HeadMakeColSpan";
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import UnderComment from "@/app/components/common/UnderComment";
|
||||
|
||||
const commentArrayDefault = [
|
||||
"미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)] / (강우시 일별유입BOD)",
|
||||
"음수값 발생시 제외(null, 평균값 산정시 제외)"
|
||||
];
|
||||
|
||||
const commentArrayChungchun = [
|
||||
...commentArrayDefault,
|
||||
"청천시 : 강우량이 3mm미만의 날"
|
||||
];
|
||||
|
||||
const commentArrayRain = [
|
||||
...commentArrayDefault,
|
||||
"강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날"
|
||||
];
|
||||
|
||||
@@ -460,7 +453,6 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
|
||||
<HeadMakeColSpan upHeadList={upHeadListModalYear} layoutNum={3} />
|
||||
</UiTable>
|
||||
</div>
|
||||
<UnderComment commentArray={commentArrayDefault}/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="tab_term_winter">
|
||||
@@ -488,7 +480,6 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
|
||||
<HeadMakeColSpan upHeadList={upHeadListModalYear} layoutNum={3} />
|
||||
</UiTable>
|
||||
</div>
|
||||
<UnderComment commentArray={commentArrayDefault}/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="tab_term_chuncheon">
|
||||
@@ -516,7 +507,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
|
||||
<HeadMakeColSpan upHeadList={upHeadListModalYear} layoutNum={3} />
|
||||
</UiTable>
|
||||
</div>
|
||||
<UnderComment commentArray={commentArrayChungchun} />
|
||||
<UnderComment commentArray={commentArrayChungchun} divHeight="10"/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="tab_term_rain">
|
||||
@@ -544,7 +535,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
|
||||
<HeadMakeColSpan upHeadList={upHeadListModalYear} layoutNum={3} />
|
||||
</UiTable>
|
||||
</div>
|
||||
<UnderComment commentArray={commentArrayRain} />
|
||||
<UnderComment commentArray={commentArrayRain} divHeight="10"/>
|
||||
</TabsContent>
|
||||
</UITab>
|
||||
</TabsContent>
|
||||
|
||||
@@ -10,11 +10,6 @@ import { roundUp } from "@/app/store/common";
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import UnderComment from "@/app/components/common/UnderComment";
|
||||
|
||||
const commentDefault = [
|
||||
"미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)] / (강우시 일별유입BOD)" ,
|
||||
"음수값 발생시 제외(null, 평균값 산정시 제외)"
|
||||
];
|
||||
|
||||
const tabList = [
|
||||
{ value: 'tab_term_year', label: '연간' },
|
||||
{ value: 'tab_term_summer', label: '하절기' },
|
||||
@@ -231,7 +226,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
|
||||
boldArray={[0,1,2]}
|
||||
/>
|
||||
</div>
|
||||
<UnderComment commentArray={commentDefault} />
|
||||
</TabsContent>
|
||||
<TabsContent value="tab_term_summer">
|
||||
<FacilityTermModalHeader<FlowRateModalInterface>
|
||||
@@ -256,7 +250,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
|
||||
boldArray={[0,1,2]}
|
||||
/>
|
||||
</div>
|
||||
<UnderComment commentArray={commentDefault} />
|
||||
</TabsContent>
|
||||
<TabsContent value="tab_term_winter">
|
||||
<FacilityTermModalHeader<FlowRateModalInterface>
|
||||
@@ -281,7 +274,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
|
||||
boldArray={[0,1,2]}
|
||||
/>
|
||||
</div>
|
||||
<UnderComment commentArray={commentDefault} />
|
||||
</TabsContent>
|
||||
<TabsContent value="tab_term_chuncheon">
|
||||
<FacilityTermModalHeader<FlowRateModalInterface>
|
||||
@@ -306,7 +298,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
|
||||
boldArray={[0,1,2]}
|
||||
/>
|
||||
</div>
|
||||
<UnderComment commentArray={[...commentDefault, "청천시 : 강우량이 3mm미만의 날"]} />
|
||||
</TabsContent>
|
||||
<TabsContent value="tab_term_rain">
|
||||
<FacilityTermModalHeader<FlowRateModalInterface>
|
||||
@@ -321,7 +312,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
|
||||
<div className="h-[370px] overflow-y-auto overflow-x-hidden">
|
||||
<UiTable headName="유량현황" tableData={copyYearList} headlist={upHeadListFlowRateModalYear} pageSize={0} total={0} cellClick={undefined} onPageChange={() => {}} className="h-[370px]" boldArray={[0,1,2]}/>
|
||||
</div>
|
||||
<UnderComment commentArray={[...commentDefault, "강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날"]} />
|
||||
<UnderComment commentArray={["강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날"]} />
|
||||
</TabsContent>
|
||||
</UITab>
|
||||
</>
|
||||
|
||||
@@ -26,6 +26,7 @@ export type TableUpperProps = {
|
||||
row? : number;
|
||||
rowSpan?: number;
|
||||
colSpan?: number;
|
||||
widthPercent? : number;
|
||||
}
|
||||
|
||||
// ===TAB1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import DataForm from "@/app/components/common/DataForm";
|
||||
import type { TableUpperProps } from "../dashboard";
|
||||
import { getFetch } from "@/app/components/api";
|
||||
import CalcRainEffect from "@/app/components/common/CalcRainEffect";
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import type { TableUpperProps } from "../dashboard";
|
||||
export type { TableUpperProps };
|
||||
/**====================================
|
||||
* Store - 타입
|
||||
@@ -155,14 +156,15 @@ const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
res.data.map((item: FacilityPrecipitationProps) => {
|
||||
const filteredList = tmpData.filter((gridItem) => {
|
||||
return gridItem.bscFctCd === item.bscFctCd;
|
||||
return gridItem.bscFctCd === item.bscFctCd;
|
||||
});
|
||||
|
||||
item.rainEffectDay = filteredList.reduce((acc, curr) => acc + curr.rainEffectDay, 0);
|
||||
item.totalYearRain = filteredList.reduce((acc, curr) => acc + curr.infoRnDay, 0);
|
||||
const rtnData = CalcRainEffect(filteredList);
|
||||
item.rainEffectDay = rtnData.reduce((acc, curr) => acc + curr.rainEffectDay, 0);
|
||||
item.totalYearRain = rtnData.reduce((acc, curr) => acc + Number(curr.infoRnDay), 0);
|
||||
item.infoRnDay = filteredList.reduce((acc, curr) => acc + curr.rainDay, 0);
|
||||
});
|
||||
|
||||
@@ -178,11 +180,6 @@ export type FacilityPrecipitationActions = {
|
||||
searchFacilityPrecipitationList: (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => void;
|
||||
}
|
||||
|
||||
const dataFormSetting=(item : FacilityPrecipitationProps)=> {
|
||||
DataForm({ type: 'number', column: 'fctCpc', item: item as unknown as Record<string, unknown> });
|
||||
DataForm({ type: 'float1', column: 'totalYearRain', item: item as unknown as Record<string, unknown>});
|
||||
};
|
||||
|
||||
export type FacilityPrecipitationType = {
|
||||
FacilityPrecipitationSearch: {
|
||||
isInit: boolean;
|
||||
@@ -246,13 +243,16 @@ export const facilityPrecipitationReducer:(set:(fn: (state: FacilityPrecipitatio
|
||||
|
||||
const res = await fetchFacilityPrecipitationList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const data = res.data;
|
||||
|
||||
data.forEach(item => {
|
||||
item.fctCpc = roundNumber(item.fctCpc, 0);
|
||||
item.totalYearRain = roundNumber(item.totalYearRain, 1);
|
||||
});
|
||||
|
||||
const excelDownList: ExcelType[] = [];
|
||||
|
||||
if(pageSize>5000){
|
||||
data.forEach((item: FacilityPrecipitationProps) => {
|
||||
dataFormSetting(item)
|
||||
item.fctCpc = item.fctCpc ? parseFloat(item.fctCpc.toString().replace(/,/g, '')) : 0;
|
||||
item.totalYearRain = item.totalYearRain ? parseFloat(item.totalYearRain.toString().replace(/,/g, '')) : 0;
|
||||
excelDownList.push({
|
||||
시설코드: item.bscFctCd,
|
||||
권역: item.rvbsn,
|
||||
@@ -270,18 +270,12 @@ export const facilityPrecipitationReducer:(set:(fn: (state: FacilityPrecipitatio
|
||||
"연간총강수량(mm)": item.totalYearRain,
|
||||
})
|
||||
})
|
||||
}else{
|
||||
data.forEach((item: FacilityPrecipitationProps) => {
|
||||
dataFormSetting(item)
|
||||
item.fctCpc = item.fctCpc ? parseFloat(item.fctCpc.toString().replace(/,/g, '')) : 0;
|
||||
item.totalYearRain = item.totalYearRain ? parseFloat(item.totalYearRain.toString().replace(/,/g, '')) : 0;
|
||||
})
|
||||
}
|
||||
set((state:FacilityPrecipitationType) => ({
|
||||
...state,
|
||||
FacilityPrecipitation: pageSize<5000?{
|
||||
...state.FacilityPrecipitation,
|
||||
facilityPrecipitation: res.data,
|
||||
facilityPrecipitation: data,
|
||||
facilityPrecipitationCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
|
||||
@@ -129,23 +129,23 @@ const mainLabelArray: string[] = ['구분', '시도', '시군구', '용량별',
|
||||
// 시설수질리스트 헤더(행정별)
|
||||
const upHeadList1: TableUpperProps[] = [
|
||||
{ id: "C", title: "행정명", colSpan: 2, row: 0 },
|
||||
{ id: "sidoNm", title: "시도", row: 1 },
|
||||
{ id: "sggNm", title: "시군구", row: 1 },
|
||||
{ id: "bscFctNm", title: "시설명", rowSpan: 2, row: 0 },
|
||||
{ id: "sidoNm", title: "시도", row: 1, widthPercent:8 },
|
||||
{ id: "sggNm", title: "시군구", row: 1, widthPercent:8 },
|
||||
{ id: "bscFctNm", title: "시설명", rowSpan: 2, row: 0, widthPercent: 10 },
|
||||
{ id: "addr", title: "주소", rowSpan: 2, row: 0 },
|
||||
{ id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0 },
|
||||
{ id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0, widthPercent:10 },
|
||||
{ id: "A", title: "유입", colSpan: 5, row: 0 },
|
||||
{ id: "B", title: "방류", colSpan: 5, row: 0 },
|
||||
{ id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1 },
|
||||
{ id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1 },
|
||||
{ id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1 },
|
||||
{ id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 4, align: "right", row: 1 },
|
||||
{ id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1 },
|
||||
{ id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1 },
|
||||
{ id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1 },
|
||||
{ id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1 },
|
||||
{ id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 4, align: "right", row: 1 },
|
||||
{ id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1 },
|
||||
{ id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 4, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 4, align: "right", row: 1, widthPercent:5 },
|
||||
{ id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
|
||||
];
|
||||
|
||||
// 시설수질리스트 헤더(권역별)
|
||||
@@ -214,7 +214,6 @@ const upHeadListModalYear: TableUpperProps[] = [
|
||||
{ id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" },
|
||||
{ id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe2", upSequnce: 2, align: "right" },
|
||||
{ id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" },
|
||||
{ id: "noProcessInflAmnt", title: "미처리하수량\n(m³/일)", align:"right"},
|
||||
{ id: "infoRnDay", title: "강우량\n(mm/일)", align: "right" }
|
||||
];
|
||||
|
||||
@@ -231,7 +230,6 @@ const upHeadListModalYearCod: TableUpperProps[] = [
|
||||
{ id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" },
|
||||
{ id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe2", upSequnce: 2, align: "right" },
|
||||
{ id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" },
|
||||
{ id: "noProcessInflAmnt", title: "미처리하수량\n(m³/일)", align:"right"},
|
||||
{ id: "infoRnDay", title: "강우량\n(mm/일)", align: "right" }
|
||||
];
|
||||
|
||||
|
||||
@@ -158,7 +158,6 @@ const upHeadListFlowRateModal:TableUpperProps[] = [
|
||||
{ id: "sumFlow", title: "연계처리량(m³/일)", align:"right"},
|
||||
{ id: "returnAmnt", title: "총인 반류수량(m³/일)", align:"right"},
|
||||
{ id: "efflAmnt", title: "방류량(m³/일)", align:"right"},
|
||||
{ id: "noProcessInflAmnt", title: "미처리하수량(m³/일)", align:"right"},
|
||||
{ id: "infoRnDay", title: "강우량(mm/일)", align:"right"}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user