dev #959
@ -180,7 +180,6 @@ export default function PassivityCircuitAllocation(props) {
|
||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE && obj.pcs && obj.pcs.id === selectedPcs.id)
|
||||
// 1. 북면모듈, 북면외모듈 혼합 여부 체크
|
||||
const targetModuleInfos = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && targetModules.includes(obj.id))
|
||||
debugger
|
||||
const newTargetModuleGroup = [...new Set(targetModuleInfos.concat(originHaveThisPcsModules).map((obj) => obj.moduleInfo.northModuleYn))]
|
||||
|
||||
if (newTargetModuleGroup.length > 1) {
|
||||
|
||||
@ -3384,18 +3384,75 @@ export const useTrestle = () => {
|
||||
const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
||||
const modules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
|
||||
let case1Cnt = 0
|
||||
let case2Cnt = 0
|
||||
const perSurfaceGroups = []
|
||||
|
||||
surfaces.forEach((surface) => {
|
||||
const modules = surface.modules
|
||||
// 1. 현재 surface의 모듈들을 그룹화
|
||||
const groupInSurface = groupPoints(modules, surface)
|
||||
const surfaceCnt = countMatchingCircuitNumbers(groupInSurface)
|
||||
|
||||
cnt += countMatchingCircuitNumbers(groupInSurface)
|
||||
perSurfaceGroups.push({
|
||||
surfaceId: surface.id,
|
||||
direction: surface.direction,
|
||||
moduleIntvlHor: surface.trestleDetail?.moduleIntvlHor,
|
||||
moduleIntvlVer: surface.trestleDetail?.moduleIntvlVer,
|
||||
addedCnt: surfaceCnt,
|
||||
groups: groupInSurface.map((g) =>
|
||||
g.map((m) => {
|
||||
const c = m.getCenterPoint()
|
||||
return { id: m.id, circuitNumber: m.circuitNumber, x: +c.x.toFixed(2), y: +c.y.toFixed(2), w: m.width, h: m.height }
|
||||
}),
|
||||
),
|
||||
})
|
||||
|
||||
cnt += surfaceCnt
|
||||
case1Cnt += surfaceCnt
|
||||
})
|
||||
|
||||
const groupByCircuitAndSurfaceCnt = groupByCircuitAndSurface(modules)
|
||||
|
||||
Object.keys(groupByCircuitAndSurfaceCnt).forEach((key) => {
|
||||
cnt += groupByCircuitAndSurfaceCnt[key] - 1
|
||||
case2Cnt += groupByCircuitAndSurfaceCnt[key] - 1
|
||||
})
|
||||
|
||||
// [DBL-CABLE-PROD] 운영 1회 진단용 — env 게이트 없이 브라우저 콘솔에 전량 출력.
|
||||
// 진단 후 제거. 이 한 줄만 복사해서 전달하면 원인(Case1 면내분리 / Case2 면교차) 확정 가능.
|
||||
console.log('[DBL-CABLE-PROD]', {
|
||||
total: cnt,
|
||||
case1_sameSurfaceSplit: case1Cnt,
|
||||
case2_crossSurface: case2Cnt,
|
||||
groupByCircuitAndSurfaceCnt,
|
||||
roofSizeSet,
|
||||
modules: modules.map((m) => {
|
||||
const c = m.getCenterPoint()
|
||||
return {
|
||||
id: m.id,
|
||||
circuitNumber: m.circuitNumber,
|
||||
surfaceId: m.surfaceId,
|
||||
x: +c.x.toFixed(2),
|
||||
y: +c.y.toFixed(2),
|
||||
w: m.width,
|
||||
h: m.height,
|
||||
northModuleYn: m.moduleInfo?.northModuleYn,
|
||||
moduleTpCd: m.moduleInfo?.moduleTpCd,
|
||||
pcsItemId: m.pcsItemId,
|
||||
pcsTpCd: m.pcs?.pcsTpCd,
|
||||
}
|
||||
}),
|
||||
surfacesSummary: surfaces.map((s) => ({
|
||||
id: s.id,
|
||||
direction: s.direction,
|
||||
moduleCount: s.modules?.length,
|
||||
pitch: s.roofMaterial?.pitch,
|
||||
roofMatlCd: s.roofMaterial?.roofMatlCd,
|
||||
moduleIntvlHor: s.trestleDetail?.moduleIntvlHor,
|
||||
moduleIntvlVer: s.trestleDetail?.moduleIntvlVer,
|
||||
})),
|
||||
perSurfaceGroups,
|
||||
})
|
||||
|
||||
return cnt
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user