육지붕 대응작업 추가

This commit is contained in:
hyojun.choi 2025-02-24 14:33:26 +09:00
parent 8820711ac6
commit de9e87b586

View File

@ -48,6 +48,9 @@ export const useTrestle = () => {
surfaces.forEach((surface) => {
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
const roofMaterialIndex = parent.roofMaterial.index
if (+roofSizeSet === 3) {
return true
}
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
if (!construction) {
alert('앞에서 셋팅 안됨')
@ -678,14 +681,17 @@ export const useTrestle = () => {
const roofMaterialIndex = parent.roofMaterial.index
const { nameJp: roofMaterialIdMulti } = roofMaterial
const moduleSelection = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex)
const { constTp: constructSpecification, constTpJp: constructSpecificationMulti } = moduleSelection.construction
const {
trestleMkrCd,
constMthdCd: supportMethodId,
roofBaseCd,
trestleMkrCdJp: supportMeaker,
constMthdCdJp: supportMethodIdMulti,
} = moduleSelection.trestle
let construction = moduleSelection?.construction
let constructSpecification = +roofSizeSet === 3 ? null : construction.constTp
let constructSpecificationMulti = +roofSizeSet === 3 ? null : construction.constTpJp
const trestle = moduleSelection?.trestle
let trestleMkrCd = +roofSizeSet === 3 ? null : trestle.trestleMkrCd
let supportMethodId = +roofSizeSet === 3 ? null : trestle.constMthdCd
let roofBaseCd = +roofSizeSet === 3 ? null : trestle.roofBaseCd
let supportMeaker = +roofSizeSet === 3 ? null : trestle.trestleMkrCdJp
let supportMethodIdMulti = +roofSizeSet === 3 ? null : trestle.constMthdCdJp
const modules = surface.modules
const moduleList = modules.map((module) => {
@ -700,16 +706,16 @@ export const useTrestle = () => {
return {
roofSurfaceId: surface.id,
roofSurface: directionText.replace(/[0-9]/g, ''),
roofMaterialId: roofMaterial.roofMatlCd,
roofMaterialId: +roofSizeSet === 3 ? '陸屋根' : roofMaterial.roofMatlCd, // 육지붕의 경우 지붕재 ID 값이 없기 때문에 임의 값 지정
supportMethodId,
constructSpecification,
constructSpecificationMulti,
roofMaterialIdMulti,
roofMaterialIdMulti: +roofSizeSet === 3 ? '陸屋根' : roofMaterialIdMulti,
supportMethodIdMulti,
supportMeaker,
slope,
slope: +roofSizeSet === 3 ? 0 : slope,
classType: currentAngleType === 'slope' ? '0' : '1',
angle: getDegreeByChon(slope),
angle: +roofSizeSet === 3 ? 0 : getDegreeByChon(slope),
azimuth: getAzimuth(parent),
moduleList,
}