Browse Source

Merge remote-tracking branch 'origin/jx-test' into jx-test

jx-test
yuliang 5 months ago
parent
commit
542d1c298a
  1. 11
      src/utils/AmrMapConvert.ts

11
src/utils/AmrMapConvert.ts

@ -201,6 +201,7 @@ export function AmrMapConvert(from: any): Array<ItemJson> {
const rackDepth = new Decimal(td.width).div(d1000).toNumber()
const levelHeight = td.layersHeight.map((lh: any) => new Decimal(lh.layerHeight).div(d1000).toNumber())
const levelCount = levelHeight.length
// 长度除以货位数
const width = new Decimal(td.length).div(td.goodsAllocationNum).div(d1000).toNumber()
storeType.set(td.id, {
't': 'rack',
@ -275,6 +276,16 @@ export function AmrMapConvert(from: any): Array<ItemJson> {
..._.cloneDeep(storeType.get(rackTypeId))
}
// 货架高度是从 attribute[0].goodsAllocation[].layerHeight 读取的
if(insertNode.t === 'rack') {
const levelsInfo = amrNode.attribute[0].attrDetail
const levelCount = levelsInfo.length
const levelHeight = _.map(levelsInfo, l=> new Decimal(l.val).div(d1000).toNumber() )
insertNode.dt.levelCount = levelCount
insertNode.dt.bays[0].levelHeight = levelHeight
}
} else {
// =================== 这是一个路标 =====================

Loading…
Cancel
Save