!2214 修复五金排砖未编组拆单报错问题

pull/2216/head
cf-erp 1 year ago committed by ChenX
parent b869004daf
commit 0323003c61

@ -175,7 +175,7 @@ export class ErpParseData
let kaiLiaoArray = [boardData.info.kaiLiaoWidth, boardData.info.kaiLiaoHeight];
block.CadData = JSON.stringify([pointInfoArray, basepositionArray, cadModelArray, offsetArray, kaiLiaoArray]);
const extraFilter = (remark) => { return remark.startsWith('jl-') || remark.startsWith('$') || remark.startsWith('#drills'); };
block.RemarkJson = JSON.stringify(boardData.info.remarks.filter(t => !extraFilter(t[0])));
block.RemarkJson = JSON.stringify(boardData.info.remarks.filter(t => !extraFilter(t[0])).map(t => t[1]));
block.RemarkExtra = JSON.stringify(boardData.info.remarks.filter(t => extraFilter(t[0])));
//新增板材备注列表
block.AllRemarkList = boardData.info.remarks;

@ -8,7 +8,7 @@ import { ExtrudeContourCurve } from "../DatabaseServices/Entity/Extrude";
import { Line } from "../DatabaseServices/Entity/Line";
import { XAxis, angleTo, equaln, equalv3, isParallelTo } from "../Geometry/GeUtils";
import { FaceDirection } from "../UI/Store/BoardInterface";
import { IBoardHoleInfo, IDrillingOption } from "./Product";
import { IBoardHoleInfo, IDrillingOption, Production } from "./Product";
/**
* ,
@ -156,7 +156,7 @@ export class ParseBoardHoleData
face,
endPt,
angle,
name: d.GroupId.Object['name']
name: Production.GetGroupName(d)
});
}
@ -192,7 +192,7 @@ export class ParseBoardHoleData
depth: z0 < 1e-6 ? z1 : this._Board.Thickness - z0,
face: z0 < 1e-6 ? FaceDirection.Back : FaceDirection.Front,
angle: angleTo(XAxis, x),
name: d.GroupId.Object['name']
name: Production.GetGroupName(d)
});
}
}
@ -246,7 +246,7 @@ export class ParseBoardHoleData
radius: cir.Radius,
depth,
face,
name: d.GroupId.Object['name']
name: Production.GetGroupName(d)
});
}
}

@ -19,6 +19,7 @@ import { Circle } from "../DatabaseServices/Entity/Circle";
import { ExtrudeContourCurve } from "../DatabaseServices/Entity/Extrude";
import { Line } from "../DatabaseServices/Entity/Line";
import { Polyline } from "../DatabaseServices/Entity/Polyline";
import { GroupRecord } from "../DatabaseServices/GroupTableRecord";
import { HardwareCompositeEntity } from "../DatabaseServices/Hardware/HardwareCompositeEntity";
import { HardwareTopline } from "../DatabaseServices/Hardware/HardwareTopline";
import { Shape } from "../DatabaseServices/Shape";
@ -483,7 +484,7 @@ export namespace Production
radius: nail.Radius,
depth,
face,
name: nail.GroupId.Object['name']
name: GetGroupName(nail)
});
}
}
@ -501,7 +502,7 @@ export namespace Production
radius: cu.Radius,
depth: m.thickness,
face: m.dir as number,
name: cu.GroupId.Object['name']
name: GetGroupName(cu)
}
);
}
@ -666,7 +667,7 @@ export namespace Production
depth,//排钻的插入深度
face,//板在哪个边上
angle,
name: cyHole.GroupId.Object['name']
name: GetGroupName(cyHole)
});
}
@ -728,7 +729,7 @@ export namespace Production
depth,
face: z0 < CanDrawHoleFuzz ? FaceDirection.Back : FaceDirection.Front,
angle: angle,
name: d.GroupId.Object['name']
name: GetGroupName(cir)
});
}
else
@ -781,7 +782,7 @@ export namespace Production
radius: cir.Radius,
depth,
face,
name: d.GroupId.Object['name']
name: GetGroupName(cir)
});
}
}
@ -1016,4 +1017,10 @@ export namespace Production
return paths.map((c: ExtrudeContourCurve) => ConverToPtsBul(c, false));
}
export function GetGroupName(ent: Entity): string
{
let group = ent.GroupId?.Object as GroupRecord;
if (!group || !(group instanceof GroupRecord)) return "未知(无拆单名称)";
return group.Name;
}
}

Loading…
Cancel
Save