처마커버 최대 단수 적용

This commit is contained in:
hyojun.choi 2025-06-10 14:04:19 +09:00
parent 08606adae6
commit 765cc9c43f

View File

@ -2637,6 +2637,7 @@ export const useTrestle = () => {
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
let isEaveBar = construction.setupCover
let isSnowGuard = construction.setupSnowCover
let cvrLmtRow = construction.cvrLmtRow
let { rackYn, cvrPlvrYn, moduleIntvlHor, moduleIntvlVer, rackQty, lessSupFitQty } = surface.trestleDetail
let result = []
if (rackYn === 'N') {
@ -2678,6 +2679,7 @@ export const useTrestle = () => {
}
// 모듈 하면,최하면 등 구해야함
modules.forEach((module, index) => {
const level = module.level
// 해당 모듈 주변에 다른 모듈이 있는지 확인
let {
bottomModule,
@ -2735,10 +2737,12 @@ export const useTrestle = () => {
}
if (cvrPlvrYn === 'Y') {
moduleRowResultData.eavesHalfCnt++
if (bottomLeftModule || bottomRightModule || halfBottomLeftModule || halfBottomRightModule) {
//처마커버 한개 노출 추가
moduleRowResultData.exposedSideEavesCnt++
if (level <= cvrLmtRow) {
moduleRowResultData.eavesHalfCnt++
if (bottomLeftModule || bottomRightModule || halfBottomLeftModule || halfBottomRightModule) {
//처마커버 한개 노출 추가
moduleRowResultData.exposedSideEavesCnt++
}
}
}
} else {
@ -2747,13 +2751,15 @@ export const useTrestle = () => {
moduleRowResultData.exposedBottomBracketCnt += rackQty
}
if (isEaveBar) {
moduleRowResultData.eavesCnt++
if ((rightModule && !leftModule) || (!rightModule && leftModule)) {
// 둘중 하나가 없는경우는 처마커버 노출 추가
moduleRowResultData.exposedSideEavesCnt++
} else if (!rightModule && !leftModule) {
// 양쪽 둘다 없는경우는 처마커버 노출 2개 추가
moduleRowResultData.exposedSideEavesCnt += 2
if (level <= cvrLmtRow) {
moduleRowResultData.eavesCnt++
if ((rightModule && !leftModule) || (!rightModule && leftModule)) {
// 둘중 하나가 없는경우는 처마커버 노출 추가
moduleRowResultData.exposedSideEavesCnt++
} else if (!rightModule && !leftModule) {
// 양쪽 둘다 없는경우는 처마커버 노출 2개 추가
moduleRowResultData.exposedSideEavesCnt += 2
}
}
}
}